From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by dpdk.org (Postfix) with ESMTP id B794AA49F for ; Thu, 11 Jan 2018 14:54:52 +0100 (CET) Received: by mail-qk0-f176.google.com with SMTP id c14so1759061qkh.4 for ; Thu, 11 Jan 2018 05:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=F6Qo/seSsccTMlyBcl9yYv4HSOTTJg/1uLENKOHFOHI=; b=A1m3Jyd+XesyNkwyvWt8nlw62DYcAOrr4ROE6CdCMMnPUvu+1MowJ7cpVosXKP5p9E Qn0NjjJw00ZS6hkkArZuPQeCgbqxoaVrhxhQ/dHdDIXaF23BruYmHKGC7SpWL36i0vTd dQ+ZRPsgU4oGBsQqiS1wBmnbrJdChnLPFCJAcBD5CrV0l0qjZXgB7w5CLoUslasIEmJE i0ZTBOeJcK+cLMlM6bl96QhqiCHpQE/diOAR8iw44NwH7t6wBOXJNZmXcMUGMsxv+WIr 6mlSZyIs/2H6AcRITdIINm5PMrDvBGkf8fM9HqXM2R3lAwHNiHfzAixnz/mGfh0llM4y GQNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=F6Qo/seSsccTMlyBcl9yYv4HSOTTJg/1uLENKOHFOHI=; b=Jpxoe7QWT+R0J6mkcStUELpj4iRWuqFJn4fXOSXeRi8gHXxsXFKy4TGf0KmhpPrA7e qKYBSvDBCBIo223xY7B8t+f1UiGIjPkXCUAqKWTd05T1uCuB/zBy72BIoZ7gPFb7wYru vYUV+zYJouYp7Lgd3uwUsmFNUu1Xrg3aNM14HrnDJovdFx2lP2nVajiBfpGpF+FmAteS y0PgFMFeQK03RucAOt+EuudjMgZP8CMjaP1PbPwlhVKQL+rYtfRP+LHAGgG+D27M3fdf A0r+TkAkK8fOH26mqq8ZKCikj9OL5Xh12XmvF/vjtO5qp2p9IOOUv3Zh0qsH1fzmKTIb fl4Q== X-Gm-Message-State: AKwxyte4DeYVpn2QQNo3vxNAhgUiMezNVcj026UA4hv1oGs/yJIs1wJQ hL6K3fJ3GOj7MxAjJ2mpV84h4OYdAooSKXglut+Brx1V X-Google-Smtp-Source: ACJfBoth7ylMTueRiL7giVyocZsguwMxQ1ApUVESRSgm0faay2oZodZKDr2v+NqWUtDPqxgKEfnw6RSLMMv/37KLjk4= X-Received: by 10.55.222.7 with SMTP id h7mr29428884qkj.207.1515678891757; Thu, 11 Jan 2018 05:54:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.196.1 with HTTP; Thu, 11 Jan 2018 05:54:51 -0800 (PST) In-Reply-To: References: From: Tushar Mulkar Date: Thu, 11 Jan 2018 19:24:51 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] PF link status is not getting detected correctly by dpdk driver in VM X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 13:54:52 -0000 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 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 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 > 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 tmp]# ip link show p2p2 >> 34: p2p2: 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 >> >> >