]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e/i40evf: Clean-up process_skb_fields
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 21 Feb 2017 23:55:46 +0000 (15:55 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 10 Jun 2017 01:57:04 +0000 (18:57 -0700)
This is a minor clean-up to make the i40e/i40evf process_skb_fields
function look a little more like what we have in igb.  The Rx checksum
function called out a need for skb->protocol but I can't see where it
actually needs it.  I am assuming this is something that was likely
refactored out some time ago as the Rx checksum code has gone through a few
rewrites.

Change-ID: I0b4668a34d90b61b66ded7c7c26e19a3e2d06251
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26132523
(cherry picked from commit a5b268e4b103e5dea4850ad732b6ed584a5562ea)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index 29c8b9acbe9e665ce56772728bf748047b8e692a..db5f9056114291d93311563bdfd1869c51795380 100644 (file)
@@ -1369,8 +1369,6 @@ no_buffers:
  * @vsi: the VSI we care about
  * @skb: skb currently being received and modified
  * @rx_desc: the receive descriptor
- *
- * skb->protocol must be set before this function is called
  **/
 static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
                                    struct sk_buff *skb,
@@ -1528,12 +1526,12 @@ void i40e_process_skb_fields(struct i40e_ring *rx_ring,
 
        i40e_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
 
-       /* modifies the skb - consumes the enet header */
-       skb->protocol = eth_type_trans(skb, rx_ring->netdev);
-
        i40e_rx_checksum(rx_ring->vsi, skb, rx_desc);
 
        skb_record_rx_queue(skb, rx_ring->queue_index);
+
+       /* modifies the skb - consumes the enet header */
+       skb->protocol = eth_type_trans(skb, rx_ring->netdev);
 }
 
 /**
index 69cdb46cdb18fff1e79a57bda7d15852ae2132a3..78a1af277fc63b28599a2118bd27296fda1f00d6 100644 (file)
@@ -741,8 +741,6 @@ no_buffers:
  * @vsi: the VSI we care about
  * @skb: skb currently being received and modified
  * @rx_desc: the receive descriptor
- *
- * skb->protocol must be set before this function is called
  **/
 static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
                                    struct sk_buff *skb,
@@ -890,12 +888,12 @@ void i40evf_process_skb_fields(struct i40e_ring *rx_ring,
 {
        i40e_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
 
-       /* modifies the skb - consumes the enet header */
-       skb->protocol = eth_type_trans(skb, rx_ring->netdev);
-
        i40e_rx_checksum(rx_ring->vsi, skb, rx_desc);
 
        skb_record_rx_queue(skb, rx_ring->queue_index);
+
+       /* modifies the skb - consumes the enet header */
+       skb->protocol = eth_type_trans(skb, rx_ring->netdev);
 }
 
 /**