netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>
Subject: Re: [PATCH net-next] bpf, i40e: Report bpf_prog id during XDP_QUERY_PROG
Date: Wed, 21 Jun 2017 10:54:55 -0700	[thread overview]
Message-ID: <594AB2EF.2040809@gmail.com> (raw)
In-Reply-To: <754b16a0b2d98a1c6a3796aaa6701fae0c4e2612.1498065586.git.daniel@iogearbox.net>

On 06/21/2017 10:27 AM, Daniel Borkmann wrote:
> Fill the bpf_prog with the id just like we do in other XDP enabled
> drivers.
> 
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>  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..6f5adb5 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 = xdp->prog_attached ? vsi->xdp_prog->aux->id : 0;
>  		return 0;
>  	default:
>  		return -EINVAL;
> 

Looks good to me.

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2017-06-21 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 17:27 [PATCH net-next] bpf, i40e: Report bpf_prog id during XDP_QUERY_PROG Daniel Borkmann
2017-06-21 17:54 ` John Fastabend [this message]
2017-06-21 18:23   ` Alexander Duyck
2017-06-21 18:33     ` Daniel Borkmann

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=594AB2EF.2040809@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@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).