OSDN Git Service

igc: Introduce igc_rx_buffer_flip() helper
authorAndre Guedes <andre.guedes@intel.com>
Wed, 10 Mar 2021 07:13:16 +0000 (23:13 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 29 Mar 2021 15:49:20 +0000 (08:49 -0700)
commit613cf199fd10a610d46dd6b3a6eb3b14fe2b1104
tree6417c8c09fd2b9cdf335e69508396466b954cad6
parent2f019ebd5330c38e3c28fc8d35cc0bce6f4ddfe4
igc: Introduce igc_rx_buffer_flip() helper

The igc driver implements the same page recycling scheme from other
Intel drivers which reuses the page by flipping the buffer. The code
to handle buffer flips is duplicated in many locations so introduce
the igc_rx_buffer_flip() helper and use it where applicable.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c