[dpdk-dev] Link status is not coming properly in case of 82599 on VmWare SR-IOV case.

Dey, Souvik sodey at rbbn.com
Thu Apr 15 20:26:11 CEST 2021


Hi All,
     We are seeing a weird issue where the link status of 82599 NIC in SR-IOV mode in VmWare is coming as UP even though the vmnic is taken DOWN in the ESXi. This is working fine when we use a linux to handle the interface inside of DPDK. We are using DPDK 18.11.6 and seeing this issue specific to 82599(ixgbe_vf) pmd only. The same is working fine in KVM setup also. On debugging more on this what we are seeing is that -
On VmWare :
When the link is made down in the esxi, we are getting a IXGBE_VT_MSGTYPE_NACK message in the mailbox. The
     links_reg = IXGBE_READ_REG(hw, IXGBE_VFLINKS);
     if (!(links_reg & IXGBE_LINKS_UP))
           goto out;
is not hitting and it goes to this section ,
if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) {
           /* msg is not CTS and is NACK we must have lost CTS status */
           if (in_msg & IXGBE_VT_MSGTYPE_NACK)
                mac->get_link_status = false;
           goto out;
     }

And as we are setting the get_link_status to false ,and as it returns the link status
*link_up = !mac->get_link_status;
It is becoming as UP.

In KVM setup :
The register read itself is show link down and we are all good there.


On checking why linux is working and not DPDK, we see that in the ixgbevf code in linux  , in the function ixgbevf_check_mac_link_vf, we see that

if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) {

               /* msg is not CTS and is NACK we must have lost CTS status */

               if (in_msg & IXGBE_VT_MSGTYPE_NACK)

                       ret_val = -1;

               goto out;

        }

It returns an error, but the status is not reset to UP.



So, is the code of setting the link as UP in case of receiving a NACK in the mailbox the correct handling or not ? Can some one throw some light on this.



--

Regards,

Souvik


Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.


More information about the dev mailing list