Skip to content

Commit a5b268e

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
i40e/i40evf: Clean-up process_skb_fields
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 0a25b73 commit a5b268e

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,8 +1392,6 @@ bool i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
13921392
* @vsi: the VSI we care about
13931393
* @skb: skb currently being received and modified
13941394
* @rx_desc: the receive descriptor
1395-
*
1396-
* skb->protocol must be set before this function is called
13971395
**/
13981396
static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
13991397
struct sk_buff *skb,
@@ -1555,12 +1553,12 @@ void i40e_process_skb_fields(struct i40e_ring *rx_ring,
15551553

15561554
i40e_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
15571555

1558-
/* modifies the skb - consumes the enet header */
1559-
skb->protocol = eth_type_trans(skb, rx_ring->netdev);
1560-
15611556
i40e_rx_checksum(rx_ring->vsi, skb, rx_desc);
15621557

15631558
skb_record_rx_queue(skb, rx_ring->queue_index);
1559+
1560+
/* modifies the skb - consumes the enet header */
1561+
skb->protocol = eth_type_trans(skb, rx_ring->netdev);
15641562
}
15651563

15661564
/**

drivers/net/ethernet/intel/i40evf/i40e_txrx.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,6 @@ bool i40evf_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
764764
* @vsi: the VSI we care about
765765
* @skb: skb currently being received and modified
766766
* @rx_desc: the receive descriptor
767-
*
768-
* skb->protocol must be set before this function is called
769767
**/
770768
static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
771769
struct sk_buff *skb,
@@ -917,12 +915,12 @@ void i40evf_process_skb_fields(struct i40e_ring *rx_ring,
917915
{
918916
i40e_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
919917

920-
/* modifies the skb - consumes the enet header */
921-
skb->protocol = eth_type_trans(skb, rx_ring->netdev);
922-
923918
i40e_rx_checksum(rx_ring->vsi, skb, rx_desc);
924919

925920
skb_record_rx_queue(skb, rx_ring->queue_index);
921+
922+
/* modifies the skb - consumes the enet header */
923+
skb->protocol = eth_type_trans(skb, rx_ring->netdev);
926924
}
927925

928926
/**

0 commit comments

Comments
 (0)