From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C5AA9803E for ; Fri, 19 Dec 2014 16:34:27 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 19 Dec 2014 07:34:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,607,1413270000"; d="scan'208";a="626613139" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga001.jf.intel.com with ESMTP; 19 Dec 2014 07:34:25 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.71]) by IRSMSX106.ger.corp.intel.com ([169.254.8.18]) with mapi id 14.03.0195.001; Fri, 19 Dec 2014 15:34:24 +0000 From: "Gonzalez Monroy, Sergio" To: "Nemeth, Balazs" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] ixgbe_vf: Fix getting link state Thread-Index: AQHQGu1dHHbe9lwKukyUDsrzzkVYrpyXDF+w Date: Fri, 19 Dec 2014 15:34:23 +0000 Message-ID: <91383E96CE459D47BCE92EFBF5CE73B004F1CDCC@IRSMSX108.ger.corp.intel.com> References: <1418822554-1493-1-git-send-email-balazs.nemeth@intel.com> <1418925396-14206-1-git-send-email-balazs.nemeth@intel.com> In-Reply-To: <1418925396-14206-1-git-send-email-balazs.nemeth@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Nemeth, Balazs" Subject: Re: [dpdk-dev] [PATCH v2] ixgbe_vf: Fix getting link state X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2014 15:34:28 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Balazs Nemeth > Sent: Thursday, December 18, 2014 5:57 PM > To: dev@dpdk.org > Cc: Nemeth, Balazs > Subject: [dpdk-dev] [PATCH v2] ixgbe_vf: Fix getting link state >=20 > This patch fixes checking the link state of a virtual function. If the st= ate has > already been checked, it does not need to be checked again. Previously, > get_link_status in the ixgbe_hw struct was used to track if the informati= on > had already been retrieved, but this field was always set to false (signi= fying > that the information was up-to-date). The problem was introduced by > commit 8ef32003 which was part of a patch set to update the ixgbe portion= of > the PMD. This patch does not break consistency with the ixgbevf driver. > Instead, it fixes the problem at the level of DPDK. >=20 > Applications that rely on the reported link speed could fail without this= patch. > The qos_sched example application provided with DPDK did not run when > virtual functions were used. The output for this example application is s= hown > below: >=20 > EAL: Error - exiting with code: 1 > Cause: Unable to config sched subport 0, err=3D-2 >=20 > The problem and the effect of the patch can been seen by running the l2fw= d > example application using the following command: >=20 > sudo ./build/l2fwd -c 0x3 -n 4 -- -p 0x3 -T 0 >=20 > Before the patch has been applied (with both links up): > ... > Checking link statusdone > Port 0 Link Up - speed 100 Mbps - half-duplex >=20 > Port 1 Link Up - speed 100 Mbps - half-duplex >=20 > L2FWD: entering main loop on lcore 1 > ... >=20 > After the patch has been applied (with both links up): > ... > Checking link statusdone > Port 0 Link Up - speed 10000 Mbps - full-duplex Port 1 Link Up - speed 10= 000 > Mbps - full-duplex > L2FWD: entering main loop on lcore 1 > ... >=20 > Before the patch has been applied (with link 0 down, link 1 up): > ... > Checking link statusdone > Port 0 Link Up - speed 100 Mbps - half-duplex >=20 > Port 1 Link Up - speed 100 Mbps - half-duplex >=20 > L2FWD: entering main loop on lcore 1 > ... >=20 > After the patch has been applied (with link 0 down, link 1 up): > ... > Checking link status.....................................................= ....... > ..............................done > Port 0 Link Down > Port 1 Link Up - speed 10000 Mbps - full-duplex ... >=20 > Signed-off-by: Balazs Nemeth > --- >=20 > changes v2: > * Include more elaborate explanation of the problem in the commit message > * Fix the issue at the level of DPDK not touching ixgbe driver code >=20 > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) >=20 Acked-by: Sergio Gonzalez Monroy