Commit eb23039f authored by Daniel Borkmann's avatar Daniel Borkmann Committed by Jeff Kirsher

i40e: report BPF prog id during XDP_QUERY_PROG

Fill the XDP prog_id with the id just like we do in other XDP enabled
drivers such as ixgbe. This is needed so that on dump we can retrieve
the attached program based on the id, and dump BPF insns, opcodes, etc
back to user space. Only XDP driver missing this is currently i40e.
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Acked-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 8d9ee66a
...@@ -9601,6 +9601,7 @@ static int i40e_xdp(struct net_device *dev, ...@@ -9601,6 +9601,7 @@ static int i40e_xdp(struct net_device *dev,
return i40e_xdp_setup(vsi, xdp->prog); return i40e_xdp_setup(vsi, xdp->prog);
case XDP_QUERY_PROG: case XDP_QUERY_PROG:
xdp->prog_attached = i40e_enabled_xdp_vsi(vsi); xdp->prog_attached = i40e_enabled_xdp_vsi(vsi);
xdp->prog_id = vsi->xdp_prog ? vsi->xdp_prog->aux->id : 0;
return 0; return 0;
default: default:
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment