Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next PATCH v2 1/2] e1000: add initial XDP support
Date: Tue, 20 Sep 2016 21:30:36 -0700	[thread overview]
Message-ID: <57E20CEC.4040600@gmail.com> (raw)
In-Reply-To: <CAD=hENf9UZppBSx11Pdg8A9U2tmNLYOXeY5tpzyYiBF4dOcGLg@mail.gmail.com>

On 16-09-20 09:26 PM, zhuyj wrote:
>  +static int e1000_xdp_set(struct net_device *netdev, struct bpf_prog *prog)
> +{
> +       struct e1000_adapter *adapter = netdev_priv(netdev);
> +       struct bpf_prog *old_prog;
> +
> +       old_prog = xchg(&adapter->prog, prog);
> +       if (old_prog) {
> +               synchronize_net();
> +               bpf_prog_put(old_prog);
> +       }
> +
> +       if (netif_running(netdev))
> +               e1000_reinit_locked(adapter);
> +       else
> +               e1000_reset(adapter);
> +       return 0;
> +}
> 
> To this function, is it better to use "static void
> e1000_xdp_set(struct net_device *netdev, struct bpf_prog *prog)"?
> since it is always to return 0.
> 

In general try to avoid top posting.

Yes making it void would be reasonable and probably a good idea. I'll
do it in v3.

[...]

Thanks,
John


      reply	other threads:[~2016-09-21  4:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 21:29 [Intel-wired-lan] [net-next PATCH v2 1/2] e1000: add initial XDP support John Fastabend
2016-09-09 21:29 ` [Intel-wired-lan] [net-next PATCH v2 2/2] e1000: bundle xdp xmit routines John Fastabend
2016-09-09 23:37   ` John Fastabend
2016-09-09 23:44   ` Tom Herbert
2016-09-10  0:01     ` John Fastabend
2016-09-10  1:04       ` Tom Herbert
2016-09-10  1:12         ` John Fastabend
2016-09-10  1:19           ` Tom Herbert
2016-09-10  1:40             ` Alexei Starovoitov
2016-09-10  3:12               ` Tom Herbert
2016-09-10  3:26                 ` John Fastabend
2016-09-10  4:13                   ` Tom Herbert
2016-09-12  3:15                     ` John Fastabend
2016-09-12  4:12                       ` Alexei Starovoitov
2016-09-10  3:56                 ` Alexei Starovoitov
2016-09-12 11:56             ` Jesper Dangaard Brouer
2016-09-10 15:36   ` Tom Herbert
2016-09-12  3:07     ` John Fastabend
2016-09-12 12:17   ` Jesper Dangaard Brouer
2016-09-12 18:11     ` John Fastabend
2016-09-09 22:04 ` [Intel-wired-lan] [net-next PATCH v2 1/2] e1000: add initial XDP support Eric Dumazet
2016-09-09 23:33   ` John Fastabend
2016-09-21  4:26 ` zhuyj
2016-09-21  4:30   ` John Fastabend [this message]

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=57E20CEC.4040600@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=intel-wired-lan@osuosl.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