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)
commitf020fa1a79ff276ff6cc742c71004f2b4ec0b8c2
treee746daeea27088f399bfa3d9ff9e30141e60f446
parentd4178c31a5622ce972785848637f0910bc00561b
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