From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 10A437F18 for ; Fri, 7 Nov 2014 17:37:30 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id n3so5151523wiv.6 for ; Fri, 07 Nov 2014 08:47:02 -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=71TohtQlqoYG36n/yMjJJFJXCqAh8UiaiuxfyY75IIo=; b=PcxKSFKIIVcKSWlhuxuPjgpiDywdon7rM8dD15hBcEWtLdNnM6y5Pbt6X6JTf/B6l2 MYeqgnmKQTMq6tC/dV3JX2gfoFey99SZumZaqFKvb9mXsTCl/r2mn3ir3pSuxoGpRDJV azMbaAcMcNrzXjZx/O9MTKozKXfGatwBX1E5jG1tOw0wgzSfUEqUZoWQQ/pAcT8qSRFh xje9PUzLQB68+C5W3uuLtDZVNenE3whPE4b3EGl7FeJUpSoNmdA7c3Hrdv8TB8/LBZkj 9f/53A4/EbR4khIZDOawwLcnBxgGRnkGldXrp/mgmFNh1iUgOint0fsSvSWaXo+MUSnx ellA== X-Gm-Message-State: ALoCoQnkhXRzNgK4CGJdrLgtHkC9HzopDQG3prqkW1gcb8RQPM2MynTkqi/sM6CJcJ26lp03Euv3 X-Received: by 10.180.101.102 with SMTP id ff6mr6922210wib.0.1415378820647; Fri, 07 Nov 2014 08:47:00 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id md11sm2660216wic.15.2014.11.07.08.46.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Nov 2014 08:46:59 -0800 (PST) From: Thomas Monjalon To: "Roberts, Lee A." Date: Fri, 07 Nov 2014 17:46:40 +0100 Message-ID: <4465623.YhbiPPYfmU@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] issue with ixgbevf speed/duplex introduced with commit 8ef32003772a14c61c70b540e41c259c482c2fb6 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, 07 Nov 2014 16:37:30 -0000 Hi, Thank you for reporting and explaining the issue. You have already sent a bug report and a patch for this issue. Are you sending this email to ask a review and integration of your patch? I think it should be reviewed by an Intel developer. Note: it would be good to have the commit reference in the commit log of your patch. PS: in such case, it's better to reply to the previous emails Thanks -- Thomas 2014-11-07 16:36, Roberts, Lee A.: > I'm seeing an issue with ixgbevf speed/duplex reporting that appears to have been introduced with > commit 8ef32003772a14c61c70b540e41c259c482c2fb6 (http://www.dpdk.org/browse/dpdk/commit/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c?id=8ef32003772a14c61c70b540e41c259c482c2fb6) > > The issue I'm seeing seems to involve the following code. If I'm reading this correctly, > one sets "mac->get_link_status = true" if the port is not OK, where "true" means that one > still needs to get the link status. Due to the added test "if (!mac->get_link_status)", > one branches to the early exit if mac->get_link_status is false---meaning we have already > obtained the link status---instead of continuing with the analysis in the function body. > > - if (!(hw->mbx.ops.check_for_rst(hw, 0))) { > - *link_up = false; > - *speed = 0; > - return -1; > - } > + /* If we were hit with a reset drop the link */ > + if (!mbx->ops.check_for_rst(hw, 0) || !mbx->timeout) > + mac->get_link_status = true; > > - links_reg = IXGBE_VFREAD_REG(hw, IXGBE_VFLINKS); > + if (!mac->get_link_status) > + goto out; > > When I run "testpmd" on ixgbevf ports either in the host OS or passed > through to a virtual machine, "testpmd" reports that the ixgbevf ports > have "speed 100 Mbps - half-duplex". With the previous code (or with > my patch), "testpmd" reports "speed 10000 Mbps - full-duplex".