Skip to content

Commit e37084a

Browse files
mfijalkoanguy11
authored andcommitted
i40e: remove redundant memory barrier when cleaning Tx descs
i40e has a feature which writes to memory location last descriptor successfully sent. Memory barrier in i40e_clean_tx_irq() was used to avoid forward-reading descriptor fields in case DD bit was not set. Having mentioned feature in place implies that such situation will not happen as we know in advance how many descriptors HW has dealt with. Besides, this barrier placement was wrong. Idea is to have this protection *after* reading DD bit from HW descriptor, not before. Digging through git history showed me that indeed barrier was before DD bit check, anyways the commit introducing i40e_get_head() should have wiped it out altogether. Also, there was one commit doing s/read_barrier_depends/smp_rmb when get head feature was already in place, but it was only theoretical based on ixgbe experiences, which is different in these terms as that driver has to read DD bit from HW descriptor. Fixes: 1943d8b ("i40e/i40evf: enable hardware feature head write back") Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 84bf1ac commit e37084a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,6 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,
948948
if (!eop_desc)
949949
break;
950950

951-
/* prevent any other reads prior to eop_desc */
952-
smp_rmb();
953-
954951
i40e_trace(clean_tx_irq, tx_ring, tx_desc, tx_buf);
955952
/* we have caught up to head, no work left to do */
956953
if (tx_head == tx_desc)

0 commit comments

Comments
 (0)