diff --git a/Dockerfile b/Dockerfile index 7669427e..8d953ee0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN mkdir -p ${GOPATH}/src/github.com/u-root \ && git checkout ${UROOT_GIT_SHA_OR_TAG} \ && go install WORKDIR /work -COPY metal.key metal.key.pub passwd varrun Makefile .git /work/ +COPY ice.pkg metal.key metal.key.pub passwd varrun Makefile .git /work/ COPY --from=sum /usr/bin/sum /work/ COPY --from=builder /common /common COPY --from=builder /work/bin/metal-hammer /work/bin/ diff --git a/Makefile b/Makefile index 26a95f79..6b904dc3 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,7 @@ ramdisk: -files="/usr/lib/x86_64-linux-gnu/libnss_files.so:lib/libnss_files.so.2" \ -files="passwd:etc/passwd" \ -files="varrun:var/run/keep" \ + -files="ice.pkg:lib/firmware/intel/ice/ddp/ice.pkg" \ -files="metal.key:id_rsa" \ -files="metal.key.pub:authorized_keys" \ -files="sum:sbin/sum" \ diff --git a/cmd/network/ethtool.go b/cmd/network/ethtool.go index f36f1447..59cf28d2 100644 --- a/cmd/network/ethtool.go +++ b/cmd/network/ethtool.go @@ -56,7 +56,8 @@ func (e *Ethtool) disableFirmwareLLDP(ifi string) { output, err := e.Run("--show-priv-flags", ifi) if err != nil { - log.Info("ethtool", "interface", ifi, "msg", "no priv-flags or disable-fw-lldp not present") + log.Info("ethtool", "interface", ifi, "msg", "no priv-flags or disable-fw-lldp not present, try disable via debugfs") + e.stopFirmwareLLDP() return } @@ -88,7 +89,7 @@ func (e *Ethtool) disableFirmwareLLDP(ifi string) { } } -var buggyIntelNicDriverNames = []string{"i40e"} +var buggyIntelNicDriverNames = []string{"i40e", "ice"} // stopFirmwareLLDP stop Firmeware LLDP not persistent over reboots, only during runtime. // mount -t debugfs none /sys/kernel/debug @@ -97,6 +98,7 @@ var buggyIntelNicDriverNames = []string{"i40e"} // or a loop over all directories in /sys/kernel/debug/i40e/*/command func (e *Ethtool) stopFirmwareLLDP() { for _, driver := range buggyIntelNicDriverNames { + log.Info("ethtool", "stopFirmwareLLDP", "driver", driver) debugFSPath := path.Join("/sys/kernel/debug", driver) err := filepath.Walk(debugFSPath, func(path string, info os.FileInfo, err error) error { if err != nil { diff --git a/ice.pkg b/ice.pkg new file mode 100755 index 00000000..018d6ea9 Binary files /dev/null and b/ice.pkg differ