Qlogic 41262 NICs are configured to use iWARP. However, the operating system driver defaults to RoCEv2 for RDMA. And, Mellanox NICs should be configured ensure that the DcbxMode property is set to Host in charge.
The following commands update these advanced properties based on the network adapter type.
$StorageAdapters = @('SLOT 1 PORT 1','SLOT 1 PORT 2')
ForEach ($port in $StorageAdapters)
{
$adapterProperties = Get-NetAdapterAdvancedProperty -Name $port -AllProperties
$driverDesc = $adapterProperties.Where({$_.RegistryKeyword -eq 'DriverDesc'}).RegistryValue
if ($driverDesc -like "*Mellanox*")
{
# Check if the DcbxMode property exists
if ($adapterProperties.Where({$_.DisplayName -eq 'DcbxMode'}))
{
Set-NetAdapterAdvancedProperty -Name $port -DisplayName 'DcbxMode' -DisplayValue 'Host In Charge'
}
}
elseif ($driverDesc -like "*Qlogic*")
{
# Check if the NetworkDirect Technology property exists
if ($adapterProperties.Where({$_.DisplayName -eq 'NetworkDirect Technology'}))
{
Set-NetAdapterAdvancedProperty -Name $port -DisplayName 'NetworkDirect Technology' -DisplayValue 'iWarp'
}
}
}