lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2017 11:38:26 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     michael.chan@...adcom.com
Cc:     netdev@...r.kernel.org, xdp-newbies@...r.kernel.org
Subject: Re: [PATCH v3 net-next RFC] Generic XDP

From: Michael Chan <michael.chan@...adcom.com>
Date: Wed, 12 Apr 2017 23:48:22 -0700

> On Wed, Apr 12, 2017 at 11:54 AM, David Miller <davem@...emloft.net> wrote:
>>
>> +static struct static_key generic_xdp_needed __read_mostly;
>> +
>> +static int generic_xdp_install(struct net_device *dev, struct netdev_xdp *xdp)
>> +{
>> +       struct bpf_prog *new = xdp->prog;
>> +       int ret = 0;
>> +
>> +       switch (xdp->command) {
>> +       case XDP_SETUP_PROG: {
>> +               struct bpf_prog *old = rtnl_dereference(dev->xdp_prog);
>> +
>> +               rcu_assign_pointer(dev->xdp_prog, new);
>> +               if (old)
>> +                       bpf_prog_put(old);
>> +
>> +               if (old && !new)
>> +                       static_key_slow_dec(&generic_xdp_needed);
>> +               else if (new && !old)
>> +                       static_key_slow_inc(&generic_xdp_needed);
> 
> I think we need to call dev_disable_lro(dev) to disable LRO also when
> a BPF program is installed.

Agreed, I'll add this.

Thanks Michael.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ