DPDK usage discussions
 help / color / mirror / Atom feed
From: Tushar Mulkar <tusharmulkar@gmail.com>
To: users@dpdk.org
Subject: Re: [dpdk-users] PF link status is not getting detected correctly by dpdk driver in VM
Date: Thu, 11 Jan 2018 19:24:51 +0530	[thread overview]
Message-ID: <CAGWHT4-CG9sorZNTZykzn5mbNHfTLnom6fcx6aBOAWR4+00q1A@mail.gmail.com> (raw)
In-Reply-To: <CAGWHT4-6yy+CniKvfYHn+9cAoTrUezRspmgmzf663L0pggiKew@mail.gmail.com>

Hi All,

So finally I am able to find the issue.  Actually in dpdk i40evf driver,
the way link up/down is propagated is not working for me. Below change set
worked for me.

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
b/drivers/net/i40e/i40e_ethdev_vf.c
index 87a760796..0389f4bfa 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2235,13 +2235,13 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
                new_link.link_speed = ETH_SPEED_NUM_100M;
                break;
        }
+
        /* full duplex only */
        new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
-       new_link.link_status = vf->link_up ? ETH_LINK_UP :
-                                            ETH_LINK_DOWN;
+    new_link.link_status = (vf->link_up & true) ? ETH_LINK_UP :
+                                            ETH_LINK_DOWN;

        i40evf_dev_atomic_write_link_status(dev, &new_link);
-
        return 0;
 }


On Wed, Jan 10, 2018 at 4:14 PM, Tushar Mulkar <tusharmulkar@gmail.com>
wrote:

> I think the IX710 device doesn't support the Link Change Interrupt. I have
> enabled the debug traces and I could see following in the messages
>
>
> Jan 10 02:07:53 <hostname>  packet-forwarding[1518]:
> rte_eth_dev_configure: driver net_i40e_vf does not support lsc
>
>
> Also I could verify that the virtual function bound to kernel (i.e. i40evf
> ) is able to detect the link failure in the PF.
>
>
> Tushar
>
>
>
> On Wed, Jan 10, 2018 at 12:18 PM, Tushar Mulkar <tusharmulkar@gmail.com>
> wrote:
>
>> Hi All,
>>
>>    I am using "Ethernet Controller X710 for 10GbE SFP+" SRIOV NIC card on
>> the host with 8 VFs. Out of these VFs two VFs are associated with a VM, one
>> VF is bound to Linux kernel driver i40evf and another is bound to dpdk pmd
>> i.e. igb_uio.
>>    when there is a link fault on the  hardware nic, the fault is not
>> detected for the VF that is bound to dpdk. Instead it is detecting medium
>> change from 10GBase-SR to 100BASE-TXFD. Is there any configuration, that
>> will allow me to detect the link state on hardware NIC in the VM ?
>>
>>    Basically I want to get the Link change notification on the dpdk
>> application in VM.
>>
>>    I tried to register for the link state change interrupt but the
>> "rte_eth_dev_configure" fails with error code -22
>>
>>    I believe link-state auto actually means replicate PF link-state to VF
>>    Current Config :
>>
>>
>>    [root at ironman <https://dpdk.org/ml/listinfo/dev> tmp]# ip link show p2p2
>>     34: p2p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
>> mode DEFAULT qlen 1000
>>      link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
>>     vf 0 MAC xx:xx:xx:xx:xx:01, spoof checking on, link-state auto, trust off
>>     vf 1 MAC xx:xx:xx:xx:xx:02, spoof checking on, link-state auto, trust off
>>     vf 2 MAC xx:xx:xx:xx:xx:03, spoof checking on, link-state auto, trust off
>>     vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
>>     vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
>>     vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
>>     vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
>>     vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
>>
>>
>> Regards,
>> Tushar
>>
>>
>

  reply	other threads:[~2018-01-11 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  6:48 Tushar Mulkar
2018-01-10 10:44 ` Tushar Mulkar
2018-01-11 13:54   ` Tushar Mulkar [this message]
2018-01-11 14:43     ` Van Haaren, Harry

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=CAGWHT4-CG9sorZNTZykzn5mbNHfTLnom6fcx6aBOAWR4+00q1A@mail.gmail.com \
    --to=tusharmulkar@gmail.com \
    --cc=users@dpdk.org \
    /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).