lkml.org 
[lkml]   [2014]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13 114/140] net/vxlan: Share RX skb de-marking and checksum checks with ovs
    Date
    3.13-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Or Gerlitz <ogerlitz@mellanox.com>

    [ Upstream commit d0bc65557ad09a57b4db176e9e3ccddb26971453 ]

    Make sure the practice set by commit 0afb166 "vxlan: Add capability
    of Rx checksum offload for inner packet" is applied when the skb
    goes through the portion of the RX code which is shared between
    vxlan netdevices and ovs vxlan port instances.

    Cc: Joseph Gasparakis <joseph.gasparakis@intel.com>
    Cc: Pravin B Shelar <pshelar@nicira.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/vxlan.c | 20 +++++++++-----------
    1 file changed, 9 insertions(+), 11 deletions(-)

    --- a/drivers/net/vxlan.c
    +++ b/drivers/net/vxlan.c
    @@ -1047,6 +1047,15 @@ static int vxlan_udp_encap_recv(struct s
    if (!vs)
    goto drop;

    + /* If the NIC driver gave us an encapsulated packet
    + * with the encapsulation mark, the device checksummed it
    + * for us. Otherwise force the upper layers to verify it.
    + */
    + if (skb->ip_summed != CHECKSUM_UNNECESSARY || !skb->encapsulation)
    + skb->ip_summed = CHECKSUM_NONE;
    +
    + skb->encapsulation = 0;
    +
    vs->rcv(vs, skb, vxh->vx_vni);
    return 0;

    @@ -1105,17 +1114,6 @@ static void vxlan_rcv(struct vxlan_sock

    skb_reset_network_header(skb);

    - /* If the NIC driver gave us an encapsulated packet with
    - * CHECKSUM_UNNECESSARY and Rx checksum feature is enabled,
    - * leave the CHECKSUM_UNNECESSARY, the device checksummed it
    - * for us. Otherwise force the upper layers to verify it.
    - */
    - if (skb->ip_summed != CHECKSUM_UNNECESSARY || !skb->encapsulation ||
    - !(vxlan->dev->features & NETIF_F_RXCSUM))
    - skb->ip_summed = CHECKSUM_NONE;
    -
    - skb->encapsulation = 0;
    -
    if (oip6)
    err = IP6_ECN_decapsulate(oip6, skb);
    if (oip)



    \
     
     \ /
      Last update: 2014-02-05 01:01    [W:4.033 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site