From: Martin KaFai Lau <kafai@fb.com>
To: <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
Mintz Yuval <Yuval.Mintz@cavium.com>
Subject: [PATCH v3 net-next 9/9] bpf: qede: Report bpf_prog ID during XDP_QUERY_PROG
Date: Thu, 15 Jun 2017 17:29:17 -0700 [thread overview]
Message-ID: <20170616002917.2976329-10-kafai@fb.com> (raw)
In-Reply-To: <20170616002917.2976329-1-kafai@fb.com>
Add support to qede to report bpf_prog ID during XDP_QUERY_PROG.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Mintz Yuval <Yuval.Mintz@cavium.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
---
drivers/net/ethernet/qlogic/qede/qede_filter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c
index 13955a3bd3b3..f939db5bac5f 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_filter.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c
@@ -1037,6 +1037,7 @@ int qede_xdp(struct net_device *dev, struct netdev_xdp *xdp)
return qede_xdp_set(edev, xdp->prog);
case XDP_QUERY_PROG:
xdp->prog_attached = !!edev->xdp_prog;
+ xdp->prog_id = edev->xdp_prog ? edev->xdp_prog->aux->id : 0;
return 0;
default:
return -EINVAL;
--
2.9.3
next prev parent reply other threads:[~2017-06-16 0:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 0:29 [PATCH v3 net-next 0/9] bpf: xdp: Report bpf_prog ID in IFLA_XDP Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 1/9] net: Add IFLA_XDP_PROG_ID Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 2/9] bpf: mlx4: Report bpf_prog ID during XDP_QUERY_PROG Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 3/9] bpf: mlx5e: " Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 4/9] bpf: virtio_net: " Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 5/9] bpf: bnxt: " Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 6/9] bpf: thunderx: " Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 7/9] bpf: ixgbe: " Martin KaFai Lau
2017-06-16 0:29 ` [PATCH v3 net-next 8/9] bpf: nfp: " Martin KaFai Lau
2017-06-16 1:05 ` Jakub Kicinski
2017-06-16 0:29 ` Martin KaFai Lau [this message]
2017-06-16 15:59 ` [PATCH v3 net-next 0/9] bpf: xdp: Report bpf_prog ID in IFLA_XDP David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170616002917.2976329-10-kafai@fb.com \
--to=kafai@fb.com \
--cc=Yuval.Mintz@cavium.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).