]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
priv: explain why we don't use ethtool
authorVincent Bernat <vincent@bernat.ch>
Fri, 30 Apr 2021 09:03:14 +0000 (11:03 +0200)
committerVincent Bernat <vincent@bernat.ch>
Fri, 30 Apr 2021 09:03:14 +0000 (11:03 +0200)
I have tested on a few servers I have access to and none of them
supported the use of this ethtool command. So, keep using sysfs
instead (with the drawback that 1. debugfs should be mounted, 2. we
need to tell systemd we want to tune through sysfs).

src/daemon/priv-linux.c

index 649b38b90b5a3220b6fa3d4f09d1081b8b17e645..36a4039c9c8567db411f3f37d708b391f11b80f3 100644 (file)
@@ -157,6 +157,16 @@ asroot_iface_init_quirks(int ifindex, char *name)
         * is mounted, then unshare a new mount namespace, mount it, issues the
         * command, leave the namespace. Let's see if there is such a need. */
 
+       /* Alternative is to use ethtool (ethtool --set-priv-flags ens5f0
+        * disable-fw-lldp on). However, this requires a recent firmware (from
+        * i40e_ethtool.c):
+        *
+        * If the driver detected FW LLDP was disabled on init, this flag could
+        * be set, however we do not support _changing_ the flag:
+        * - on XL710 if NPAR is enabled or FW API version < 1.7
+        * - on X722 with FW API version < 1.6
+        */
+
        char command[] = "lldp stop";
        char sysfs_path[SYSFS_PATH_MAX+1];
        if (snprintf(sysfs_path, SYSFS_PATH_MAX,