diff options
author | Lee Duncan <lduncan@suse.com> | 2021-08-27 13:09:11 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2021-09-01 12:37:11 -0700 |
commit | 09b34121c443998ffe4df38084b19696bd3ef902 (patch) | |
tree | c7d75ec00df81f230bd331466c60a0e2652f8b20 /utils | |
parent | 2a8f9d81d0d6b5094c3fe9c686e2afb2ec27058a (diff) | |
download | open-iscsi-09b34121c443998ffe4df38084b19696bd3ef902.tar.gz |
Handle qedi correctly in NPAR mode
Use the correct driver, and handle the NPAR 4-MAC-ADDr offset
of qedi, unlike other Offload cards.
Found-by: David Bond <DBond@suse.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/iscsi_offload | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/iscsi_offload b/utils/iscsi_offload index 833d26f..1869fe1 100755 --- a/utils/iscsi_offload +++ b/utils/iscsi_offload @@ -85,10 +85,11 @@ iscsi_macaddress_from_pcifn() local h local host local ifmac + local olemacoffset=$3 ifmac=$(ip addr show dev $if | sed -n 's/ *link\/ether \(.*\) brd.*/\1/p') m5=$(( 0x${ifmac##*:} )) - m5=$(( $m5 + 1 )) + m5=$(( $m5 + $olemacoffset )) ifmac=$(printf "%s:%02x" ${ifmac%:*} $m5) for host in /sys/class/iscsi_host/host* ; do if [ -L "$host" ] ; then @@ -190,10 +191,7 @@ case "$driver" in qla*) mod=qla4xxx ;; - qede) - mod=qede - ;; - qedi) + qed*) mod=qedi ;; esac @@ -221,11 +219,11 @@ if [ "$mod" = "bnx2i" ] ; then elif [ "$mod" = "cxgb3i" ] ; then mac=$(iscsi_macaddress_from_pcidevice $pcipath $IFNAME) elif [ "$mod" = "be2iscsi" ] ; then - mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME) + mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 1) elif [ "$mod" = "qla4xxx" ] ; then - mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME) + mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 1) elif [ "$mod" = "qede" -o "$mod" = "qedi" ] ; then - mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME) + mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 4) fi if [ -z "$mac" ] ; then |