diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2021-01-18 16:13:08 +0100 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2021-02-12 09:49:32 -0800 |
commit | 99f097270a18f06f08ac814c55e512a6f15c00d4 (patch) | |
tree | 0630c98e6ebce67eb33410681c8f239976305b32 /drivers | |
parent | 3c5a2fd042d0bfac71a2dfb99515723d318df47b (diff) |
i40e: drop redundant check when setting xdp prog
Net core handles the case where netdev has no xdp prog attached and
current prog is NULL. Therefore, remove such check within
i40e_xdp_setup.
Reviewed-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 63e19d2e3301..8bb8eb65add9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -12947,9 +12947,6 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog, return -EINVAL; } - if (!i40e_enabled_xdp_vsi(vsi) && !prog) - return 0; - /* When turning XDP on->off/off->on we reset and rebuild the rings. */ need_reset = (i40e_enabled_xdp_vsi(vsi) != !!prog); |