QLogic 41262 and Intel E810/E823 NICs are configured to use iWARP. However, the operating system driver defaults to RoCEv2 for RDMA. Configure Mellanox NICs to 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*")
{
# For Windows Server 22 installations.
Get-NetAdapter $port | Set-NetAdapterAdvancedProperty -DisplayName "NetworkDirect Technology" -DisplayValue "RoCEv2"
# Check if the DcbxMode property exists
if ($adapterProperties.Where({$_.DisplayName -eq 'DcbxMode'}))
{
Set-NetAdapterAdvancedProperty -Name $port -DisplayName 'DcbxMode' -DisplayValue 'Host In Charge'
}
#Set NetworkDirect Technology to RoCEv2
if ((Get-ComputerInfo).OSDisplayVersion -like "*22H2*") {
Get-NetAdapter $port | Set-NetAdapterAdvancedProperty -DisplayName "NetworkDirect Technology" -DisplayValue "RoCEv2"
}
}
elseif ($driverDesc -like "*Qlogic*") -or $driverDesc -like "*E810*" or $driverDesc -like "*E823*"
{
# Check if the NetworkDirect Technology property exists
if ($adapterProperties.Where({$_.DisplayName -eq 'NetworkDirect Technology'}))
{
Set-NetAdapterAdvancedProperty -Name $port -DisplayName 'NetworkDirect Technology' -DisplayValue 'iWarp'
}
}
}