From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 9896B68AA for ; Fri, 19 Dec 2014 23:42:32 +0100 (CET) Received: by mail-wg0-f47.google.com with SMTP id n12so2493430wgh.20 for ; Fri, 19 Dec 2014 14:42:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=lJ3POVztHB3OIHZpgw2XnRc1BoJ/APYE9uVA61nUJp0=; b=ahg0i4sJJmq20K8GKHORideJoAG3e2UTSootH/Fpn8zkgHUa3ymPvdtce1iOT/heGQ xrVptaGOhik3JpOnPs9MqGn+GJyTqriez+Wluwf3vRf8ikh1wfp42xu3DZJNzyRgMkNG XQTuJgeRPP7OGzsecp+mO1SP19PTmF7S5kct+JLrVH3pzV8ipwghO2KdUjDfjfUxwHXp PtS/tTFFD2Z1YvSnPBEqzIGMBv25+Lj0oD1o4MGYOUsNbZJgNKOKv5amZHyudgrW5ToU v7nBChW6arxhvFRhlpXvCmxK2dsPSD8BMEvBA7SwBJ7W/GXtf1gRZWP+gYs6rzlI1Txc 9LWA== X-Gm-Message-State: ALoCoQmdVcW7evSh1CcfucHjvCESyfH2AA1gTfnNQyJ8B0VLzJHLppGy2O63bqAd8QA/CtG8BRue X-Received: by 10.194.81.1 with SMTP id v1mr18334866wjx.50.1419028952508; Fri, 19 Dec 2014 14:42:32 -0800 (PST) Received: from xps13.localnet (117.114.118.80.rev.sfr.net. [80.118.114.117]) by mx.google.com with ESMTPSA id mo12sm14272675wjc.35.2014.12.19.14.42.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Dec 2014 14:42:31 -0800 (PST) From: Thomas Monjalon To: "Nemeth, Balazs" Date: Fri, 19 Dec 2014 23:42:06 +0100 Message-ID: <2115719.IJ2O6rpKyu@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <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> <91383E96CE459D47BCE92EFBF5CE73B004F1CDCC@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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 22:42:32 -0000 > > This patch fixes checking the link state of a virtual function. If the state 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 information > > had already been retrieved, but this field was always set to false (signifying > > 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. > > > > 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 shown > > below: > > > > EAL: Error - exiting with code: 1 > > Cause: Unable to config sched subport 0, err=-2 > > > > The problem and the effect of the patch can been seen by running the l2fwd > > example application using the following command: > > > > sudo ./build/l2fwd -c 0x3 -n 4 -- -p 0x3 -T 0 > > > > Before the patch has been applied (with both links up): > > ... > > Checking link statusdone > > Port 0 Link Up - speed 100 Mbps - half-duplex > > > > Port 1 Link Up - speed 100 Mbps - half-duplex > > > > L2FWD: entering main loop on lcore 1 > > ... > > > > 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 10000 > > Mbps - full-duplex > > L2FWD: entering main loop on lcore 1 > > ... > > > > 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 > > > > Port 1 Link Up - speed 100 Mbps - half-duplex > > > > L2FWD: entering main loop on lcore 1 > > ... > > > > 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 ... > > > > Signed-off-by: Balazs Nemeth > > --- > > > > 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 > > > > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > Acked-by: Sergio Gonzalez Monroy Applied Thanks -- Thomas