]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e/i40evf: Factor out L4 header and checksum from L3 bits in TSO path
authorAlexander Duyck <aduyck@mirantis.com>
Mon, 25 Jan 2016 05:16:28 +0000 (21:16 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:37:35 +0000 (08:37 -0800)
commitb95731f045790904a2dbe90786fae67666e23b7a
tree9d7156e0c6d24de6ea01bf9d3a9e2dcb148daca3
parenta0938a745a872ac5bf017c8487c258bd667c0f58
i40e/i40evf: Factor out L4 header and checksum from L3 bits in TSO path

Orabug: 22342532

This patch makes it so that the L4 header offsets and such can be ignored
when dealing with the L3 checksum and length update.  This is done making
use of two things.

First we can just use the offset from the L4 header to the start of the
packet to determine the L4 offset, and from that we can then make use of
the data offset to determine the full length of the headers.

As far as adjusting the checksum to remove the length we can simply add the
inverse of the length instead of having to recompute the entire
pseudo-header without the length.  In the case of an IPv6 header this
should be significantly cheaper since we can make use of a value we already
needed instead of having to read the source and destination address out of
the packet.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit c49a7bc3308099a8d5f9e2e38adfc5ab969804aa)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c