Skip to content

Commit

Permalink
idpf: fix unloading the xdp program on rmmod
Browse files Browse the repository at this point in the history
Block the soft reset and vport re-configuration from "idpf_remove()"
context.
The XDP_SETUP_PROG command is normally called while the netdev is being
unregistered. In such a case the IDPF driver should unload the XDP
program and return success. Otherwise, the kernel warning will be shown
in dmesg.

Fixes: 79d940b ("idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq")
Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
  • Loading branch information
michalQb committed Sep 18, 2024
1 parent 2ab1225 commit c1d1547
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/intel/idpf/xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ idpf_xdp_setup_prog(struct idpf_vport *vport, struct netdev_bpf *xdp)
int ret;

info = &vport->adapter->vport_config[vport->idx]->user_config.xdp;
reconfig = !!info->prog != !!prog;
reconfig = !!info->prog != !!prog &&
!test_bit(IDPF_REMOVE_IN_PROG, vport->adapter->flags);

xdp_attachment_setup(info, xdp);

Expand Down

0 comments on commit c1d1547

Please sign in to comment.