DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dey, Souvik" <sodey@rbbn.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "wenzhuo.lu@intel.com" <wenzhuo.lu@intel.com>,
	"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>,
	"Lal, Shuchin" <slal@rbbn.com>
Subject: [dpdk-dev] Link status is not coming properly in case of 82599 on VmWare SR-IOV case.
Date: Thu, 15 Apr 2021 18:26:11 +0000	[thread overview]
Message-ID: <DM6PR03MB477745A2C2D311BA172EF97DCD4D9@DM6PR03MB4777.namprd03.prod.outlook.com> (raw)

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.

                 reply	other threads:[~2021-04-15 18:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR03MB477745A2C2D311BA172EF97DCD4D9@DM6PR03MB4777.namprd03.prod.outlook.com \
    --to=sodey@rbbn.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=slal@rbbn.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).