Skip to content

Commit

Permalink
disable lldp in 100g intel card as well (#47)
Browse files Browse the repository at this point in the history
* disable lldp in 100g intel card as well

* add intel 100Gb ethernet driver ddp firmware blob
  • Loading branch information
majst01 authored Mar 18, 2021
1 parent 872e9b3 commit 023b0cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
6 changes: 4 additions & 2 deletions cmd/network/ethtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down
Binary file added ice.pkg
Binary file not shown.

0 comments on commit 023b0cf

Please sign in to comment.