From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02109A051C for ; Tue, 11 Feb 2020 12:27:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA46C2B9C; Tue, 11 Feb 2020 12:27:25 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id EBF621BC25 for ; Tue, 11 Feb 2020 12:27:23 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id y17so11875485wrh.5 for ; Tue, 11 Feb 2020 03:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ILqvtIxkkHFFLmUWAsXUL+i6ShAcrz+OBGGKGo9tzis=; b=QUt+rDstN8Chq0kFzTgERSflYTz4neTaCGMi6qgJCPzJyA1Cwq4UWaggdPf+pW4BRV ws+WzEOKnhVb87mhmwZy+zS46R/7KTT6ksZTo3RCmU6Yqqi5IyzYE7CTm+6/Mn2ABzr8 eKCnO+4LyARbzvDR7ZiSk0apJMQ5NIPxiw0RxsiUpps3SNiqLoCMsuBxXUa+Hye+JVpT bRB+fOBenRZQ0EJgCfgVND5m2xQWkvHzQvBvpykCmn9o4l3WaZB4/fBdJ9YA/Q1xZoH4 uEqGRjX5eG5wZQK3sKZUbKyDwAuA1AUi/VBSDvSF9na6V67cF69pm1uWBi6iHqvehne9 SjzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ILqvtIxkkHFFLmUWAsXUL+i6ShAcrz+OBGGKGo9tzis=; b=ckDQomXZoEyoX0e9ykqbrjXzTGNRpDChl+gzx15XhFQxH5aPYxVewwcjvIJQ/SjZn2 aBbOcFR8KyGRRqR3euEmDO1IP56/SLegBY9MwYfgqbS9g72XiZ9AY+F6TK74dcpPsCUe xNWzdx5RyG9Y8DhQ1f4sRLUYnvBpNcEMUCmlpOIX7zz/nYCMSOjYuJ1P48bP5DhCAaL8 9bo349LWCT9KdT6KMZU8J27933rt96cW4JeY16VSsb9HmnwQI9fh1yRqI3guHv1QzM8l EBW5hSl9PU27Xcv7E/dR4fa90TZhstARjP2UCT6K86FShzftGnkXsNCE39QJMQxgDvFL bJ0g== X-Gm-Message-State: APjAAAWrZ7XUT+5YLLBsL1B3afGjP82xbZX/k7D/grBdhvDMkoINhOHZ SSr9jMHOXpL4T2a4j/GqnGw= X-Google-Smtp-Source: APXvYqyE59AC9a0tH36HErzKRTB3e9e/xS3SIzRDiPjRRjkqrssWMAznayLHH1f/GruY/OmbzUtfTA== X-Received: by 2002:a5d:62c8:: with SMTP id o8mr8009244wrv.316.1581420443642; Tue, 11 Feb 2020 03:27:23 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z11sm4830000wrv.96.2020.02.11.03.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:27:23 -0800 (PST) From: luca.boccassi@gmail.com To: Guinan Sun Cc: Ting Xu , Xiaolong Ye , dpdk stable Date: Tue, 11 Feb 2020 11:19:57 +0000 Message-Id: <20200211112216.3929-51-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ixgbe: set fixed flag for exact link speed' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Tue, 3 Dec 2019 16:59:28 +0000 Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed [ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ] Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required to disable auto-negotiation. Signed-off-by: Guinan Sun Acked-by: Ting Xu Acked-by: Xiaolong Ye --- drivers/net/ixgbe/ixgbe_ethdev.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index fba8c51595..b2f723f0b6 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2559,17 +2559,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - /* IXGBE devices don't support: - * - half duplex (checked afterwards for valid speeds) - * - fixed speed: TODO implement - */ - if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) { - PMD_INIT_LOG(ERR, - "Invalid link_speeds for port %u, fix speed not supported", - dev->data->port_id); - return -EINVAL; - } - /* Stop the link setup handler before resetting the HW. */ rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev); @@ -2725,7 +2714,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev) } link_speeds = &dev->data->dev_conf.link_speeds; - if (*link_speeds & ~allowed_speeds) { + + /* Ignore autoneg flag bit and check the validity of  + * link_speed  + */ + if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) { PMD_INIT_LOG(ERR, "Invalid link setting"); goto error; } @@ -4169,7 +4162,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, link.link_status = ETH_LINK_DOWN; link.link_speed = ETH_SPEED_NUM_NONE; link.link_duplex = ETH_LINK_HALF_DUPLEX; - link.link_autoneg = ETH_LINK_AUTONEG; + link.link_autoneg = !(dev->data->dev_conf.link_speeds & + ETH_LINK_SPEED_FIXED); hw->mac.get_link_status = true; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:40.855523307 +0000 +++ 0051-net-ixgbe-set-fixed-flag-for-exact-link-speed.patch 2020-02-11 11:17:38.416001646 +0000 @@ -1,8 +1,10 @@ -From 34e7360960687c1e99fd693d7a72e3be3a019a36 Mon Sep 17 00:00:00 2001 +From 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Tue, 3 Dec 2019 16:59:28 +0000 Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed +[ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ] + Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required to disable auto-negotiation.