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-next>] [day] [month] [year] [list]
Message-ID: <DM6PR18MB338861990B56CCA5A4384779AB540@DM6PR18MB3388.namprd18.prod.outlook.com>
Date:   Fri, 13 Dec 2019 03:13:21 +0000
From:   Manish Chopra <manishc@...vell.com>
To:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "michael.chan@...adcom.com" <michael.chan@...adcom.com>,
        Manish Chopra <manishc@...vell.com>
Subject: LRO/HW_GRO is not disabled when native xdp is installed

Hello,

When attaching native xdp program, device's aggregation features (i.e LRO/HW_GRO) are not getting disabled. 
They seems to be getting disabled only in case of generic xdp install, not in case of native/driver mode xdp,
Shouldn't it be done something like below ?? if so, please let me know if I can post a patch like below.

diff --git a/net/core/dev.c b/net/core/dev.c
index c7db39926769..8a128a34378f 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4580,8 +4580,6 @@ static int generic_xdp_install(struct net_device *dev, struct netdev_bpf *xdp)
                        static_key_slow_dec(&generic_xdp_needed);
                } else if (new && !old) {
                        static_key_slow_inc(&generic_xdp_needed);
-                       dev_disable_lro(dev);
-                       dev_disable_gro_hw(dev);
                }
                break;

@@ -7216,8 +7214,12 @@ int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack,
        }

        err = dev_xdp_install(dev, bpf_op, extack, flags, prog);
-       if (err < 0 && prog)
+       if (err < 0 && prog) {
                bpf_prog_put(prog);
+       } else {
+               dev_disable_lro(dev);
+               dev_disable_gro_hw(dev);
+       }

        return err;
}

Thanks,
Manish

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ