]> git.baikalelectronics.ru Git - kernel.git/commit
igc: Refactor __igc_xdp_run_prog()
authorAndre Guedes <andre.guedes@intel.com>
Fri, 23 Apr 2021 06:25:48 +0000 (23:25 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 20 May 2021 17:16:41 +0000 (10:16 -0700)
commit9639351f56dd31e2434d911b797398d834273457
tree0f1cde4e121b5f993712b901834c4ddaacfaf5e9
parent105f94d8e97b6ea43b3357a3b12a6e88d255744a
igc: Refactor __igc_xdp_run_prog()

Refactor __igc_xdp_run_prog() helper from igc_xdp_run_prog(),
preparing the code for AF_XDP zero-copy support which is added
by upcoming patches.

The existing igc_xdp_run_prog() caters to regular XDP rx path
which has to verify if bpf_prog is not NULL. Zero-copy
path assumes that bpf_prog is not NULL and hence this check is
not required. Therefore it makes sense to refactor the common
code into a helper function, to avoid code duplication.

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