Merge pull request #287 from xlpang/master

fcoe: handle CNAs with DCB firmware support
master
Harald Hoyer 2017-10-09 11:47:08 +02:00 committed by GitHub
commit bada26263c
1 changed files with 20 additions and 6 deletions

View File

@ -61,6 +61,20 @@ cmdline() {
else else
dcb="nodcb" dcb="nodcb"
fi fi

# Some Combined Network Adapters(CNAs) implement DCB in firmware.
# Do not run software-based DCB or LLDP on CNAs that implement DCB.
# If the network interface provides hardware DCB/DCBX capabilities,
# DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to set to "no".
#
# Force "nodcb" if there's any DCB_REQUIRED="no"(child or vlan parent).
grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${i##*/} &>/dev/null
[ $? -eq 0 ] && dcb="nodcb"
if [ "$p" ] ; then
grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${p} &>/dev/null
[ $? -eq 0 ] && dcb="nodcb"
fi

echo "fcoe=${mac}:${dcb}" echo "fcoe=${mac}:${dcb}"
done done
} }