From: Vincent Bernat Date: Fri, 30 Apr 2021 09:03:14 +0000 (+0200) Subject: priv: explain why we don't use ethtool X-Git-Tag: 1.0.11~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3765d7ff8554b0d34c5da338eabecefc3c30c865;p=thirdparty%2Flldpd.git priv: explain why we don't use ethtool 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). --- diff --git a/src/daemon/priv-linux.c b/src/daemon/priv-linux.c index 649b38b9..36a4039c 100644 --- a/src/daemon/priv-linux.c +++ b/src/daemon/priv-linux.c @@ -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,