• Vlad Yasevich's avatar
    e1000e: Fix TSO with non-accelerated vlans · 47ccd1ed
    Vlad Yasevich authored
    This device claims  TSO support for vlans.  It also allows a
    user to control vlan acceleration offloading.  As such, it is
    possible to turn off vlan acceleration and configure a vlan
    which will continue to support TSO.
    
    In such situation the packet passed down the the device will contain
    a vlan header and skb->protocol will be set to ETH_P_8021Q.
    The device assumes that skb->protocol contains network protocol
    value and uses that value to set up TSO information.  This results
    in corrupted frames sent on the wire.  Corruptions include
    incorrect IP total length and invalid IP checksum.
    
    This patch extract the protocol value correctly and corrects TSO
    for non-accelerated traffic.
    
    CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
    CC: Bruce Allan <bruce.w.allan@intel.com>
    CC: Carolyn Wyborny <carolyn.wyborny@intel.com>
    CC: Don Skidmore <donald.c.skidmore@intel.com>
    CC: Greg Rose <gregory.v.rose@intel.com>
    CC: Alex Duyck <alexander.h.duyck@intel.com>
    CC: John Ronciak <john.ronciak@intel.com>
    CC: Mitch Williams <mitch.a.williams@intel.com>
    CC: Linux NICS <linux.nics@intel.com>
    CC: e1000-devel@lists.sourceforge.net
    Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    47ccd1ed
netdev.c 203 KB