All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next] bpf, i40e: report bpf prog id during XDP_QUERY_PROG
@ 2017-06-24 19:13 Daniel Borkmann
  2017-06-29 22:24 ` Bowers, AndrewX
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2017-06-24 19:13 UTC (permalink / raw)
  To: intel-wired-lan

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: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
 [ Jeff, this should still go into this net-next window, so that
   XDP_QUERY_PROG is covered for all XDP drivers wrt id. Thanks. ]

 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2db93d3..a76ca6c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9589,6 +9589,7 @@ static int i40e_xdp(struct net_device *dev,
 		return i40e_xdp_setup(vsi, xdp->prog);
 	case XDP_QUERY_PROG:
 		xdp->prog_attached = i40e_enabled_xdp_vsi(vsi);
+		xdp->prog_id = vsi->xdp_prog ? vsi->xdp_prog->aux->id : 0;
 		return 0;
 	default:
 		return -EINVAL;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH net-next] bpf, i40e: report bpf prog id during XDP_QUERY_PROG
  2017-06-24 19:13 [Intel-wired-lan] [PATCH net-next] bpf, i40e: report bpf prog id during XDP_QUERY_PROG Daniel Borkmann
@ 2017-06-29 22:24 ` Bowers, AndrewX
  0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2017-06-29 22:24 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Daniel Borkmann
> Sent: Saturday, June 24, 2017 12:14 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: intel-wired-lan at osuosl.org; Daniel Borkmann <daniel@iogearbox.net>
> Subject: [Intel-wired-lan] [PATCH net-next] bpf, 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: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: John Fastabend <john.fastabend@gmail.com>
> Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>  [ Jeff, this should still go into this net-next window, so that
>    XDP_QUERY_PROG is covered for all XDP drivers wrt id. Thanks. ]
> 
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
>  1 file changed, 1 insertion(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 19:13 [Intel-wired-lan] [PATCH net-next] bpf, i40e: report bpf prog id during XDP_QUERY_PROG Daniel Borkmann
2017-06-29 22:24 ` Bowers, AndrewX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.