]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: consolidate handling of XDP program actions
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Thu, 14 Jan 2021 14:33:18 +0000 (14:33 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 9 Feb 2021 01:19:03 +0000 (17:19 -0800)
commit00b12c0aefe1e0d3842dc2e0b582292fdd2495a2
treee746daeea27088f399bfa3d9ff9e30141e60f446
parented3270c32dc0e49d0bbed7f0f71e79a8eed2c72c
i40e: consolidate handling of XDP program actions

Consolidate the actions performed on the packet based on the XDP
program result into a separate function that is easier to read and
maintain. Simplify the i40e_construct_skb_zc function, so that the
input xdp buffer is always freed, regardless of whether the output
skb is successfully created or not. Simplify the behavior of the
i40e_clean_rx_irq_zc function, so that the current packet descriptor
is dropped when function i40_construct_skb_zc returns an error as
opposed to re-processing the same description on the next invocation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_xsk.c