]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: Drop redundant Rx descriptor processing code
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 27 Sep 2016 18:28:50 +0000 (11:28 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:40:22 +0000 (19:40 -0500)
commit522b6d4e00859d440edbb72afea2cbec030b5f7a
tree4397c1eff6385af27f7e8a9b68a44f502bd2161e
parent4303bc17e0d7aa8271ff0d5823822d629e717596
i40e: Drop redundant Rx descriptor processing code

Orabug: 24568124

This patch cleans up several pieces of redundant code in the Rx clean-up
paths.

The first bit is that hdr_addr and the status_err_len portions of the Rx
descriptor represent the same value.  As such there is no point in setting
them to 0 before setting them to 0.  I'm dropping the second spot where we
are updating the value to 0 so that we only have 1 write for this value
instead of 2.

The second piece is the checking for the DD bit in the packet.  We only
need to check for a non-zero value for the status_err_len because if the
device is done with the descriptor it will have written something back and
the DD is just one piece of it.  In addition I have moved the reading of
the Rx descriptor bits related to rx_ptype down so that they are actually
below the dma_rmb() call so that we are guaranteed that we don't have any
funky 64b on 32b calls causing any ordering issues.

Change-ID: I256e44a025d3c64a7224aaaec37c852bfcb1871b
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>
(cherry picked from commit 99dad8b34c687cb8c4975fbabced76db35f88c14)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c