From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 1F3F5322C for ; Mon, 19 Nov 2018 13:26:06 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id b13so31812979wrx.6 for ; Mon, 19 Nov 2018 04:26:06 -0800 (PST) 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=Bi2qwIp4k3o3pLOK8Jf/jh8seKOw3egPjInRT5Hj+uQ=; b=O9+Q59geXbCL54uguODi+tpcfoCxPDMBHVoHQUzqdG+8qrhnsfUQy39vU8nnYR0fBY 4iQbjKAZqOw0U8jqN2ilJuwKWXnrR1ghIe7uKp0GYDlfc0EB113dwT9Ijq8TtXMNavHe fAgrc3e8Ju4GbyUn2ZLkvJUBXTRXKH2+RUs9KWKtZ62H2VnEb4NzPADpPaPMSY1V0qXJ 8HM4EzF9L2qF7L83+HI/Z59D71/remb5hRApwP6uWbkq3kBGSGUZfRgRtI2eLLyWXVcT fjcNN5gts8mEO/WwqxuF1A7qcXelWw7nV91xq6O+m095OLxNHaFLSOO4ptXWhPUMvtj3 lmqg== X-Gm-Message-State: AA+aEWZbX2q14tfKJaq0NNfega+Us0IUq4GJnc9uh3H7MtL5JTwNLrDZ 8In0Pupa7ZrkibTWboRm4TyaV7li X-Google-Smtp-Source: AFSGD/WCN/xjbBCg5TzJKDdp5vb+mcocZE9R30wv25KkrCTVprvwqs3tBd5EDJdIFFKHaclDgqhaFQ== X-Received: by 2002:a5d:60cc:: with SMTP id x12mr178170wrt.193.1542630365710; Mon, 19 Nov 2018 04:26:05 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id b9sm34445458wrx.85.2018.11.19.04.26.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 04:26:04 -0800 (PST) From: Luca Boccassi To: Yanglong Wu Cc: Rosen Xu , Qi Zhang , dpdk stable Date: Mon, 19 Nov 2018 12:25:31 +0000 Message-Id: <20181119122538.14207-14-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119122538.14207-1-bluca@debian.org> References: <20181108180111.25873-1-bluca@debian.org> <20181119122538.14207-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ixgbevf: fix link state' has been queued to LTS release 16.11.9 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: , X-List-Received-Date: Mon, 19 Nov 2018 12:26:06 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From d0c0b8732e167a1bd78ccc119e3ed403fdc6fc4d Mon Sep 17 00:00:00 2001 From: Yanglong Wu Date: Tue, 13 Nov 2018 14:34:43 +0800 Subject: [PATCH] net/ixgbevf: fix link state [ upstream commit 91546fb62e675943a574c2542c0486f2928fed49 ] For ixgbevf kernel driver, link status changes from down to up will trigger vf kernel driver send IXGBE_VF_RESET message to pf kernel driver, after this, vf kernel driver will disable and enable it self. By these series operations, the vf kernel driver report link up. Besides, all these operations handles in kernel thread. For DPDK user space driver, it only gets link status changes from down to up, but miss IXGBE_VF_RESET message sending and reset itself. If we will add fully implementation of link status change for DPDK user space driver, we need take much more modification. We have aligned that for link status changes from down to up we only notify link is up, users need to reset vf port. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") Signed-off-by: Rosen Xu Signed-off-by: Yanglong Wu Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 182a8c662..61c075b6a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3227,13 +3227,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev, static int ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, - int *link_up, int wait_to_complete) + int *link_up, int wait_to_complete __rte_unused) { - /** - * for a quick link status checking, wait_to_compelet == 0, - * skip PF link status checking - */ - bool no_pflink_check = wait_to_complete == 0; struct ixgbe_mbx_info *mbx = &hw->mbx; struct ixgbe_mac_info *mac = &hw->mac; uint32_t links_reg, in_msg; @@ -3294,14 +3289,6 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, *speed = IXGBE_LINK_SPEED_UNKNOWN; } - if (no_pflink_check) { - if (*speed == IXGBE_LINK_SPEED_UNKNOWN) - mac->get_link_status = true; - else - mac->get_link_status = false; - - goto out; - } /* if the read failed it could just be a mailbox collision, best wait * until we are called again and don't report an error */ @@ -3311,7 +3298,7 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) { /* msg is not CTS and is NACK we must have lost CTS status */ if (in_msg & IXGBE_VT_MSGTYPE_NACK) - ret_val = -1; + mac->get_link_status = false; goto out; } -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-19 12:15:18.396946906 +0000 +++ 0014-net-ixgbevf-fix-link-state.patch 2018-11-19 12:15:18.107611433 +0000 @@ -1,8 +1,10 @@ -From 91546fb62e675943a574c2542c0486f2928fed49 Mon Sep 17 00:00:00 2001 +From d0c0b8732e167a1bd78ccc119e3ed403fdc6fc4d Mon Sep 17 00:00:00 2001 From: Yanglong Wu Date: Tue, 13 Nov 2018 14:34:43 +0800 Subject: [PATCH] net/ixgbevf: fix link state +[ upstream commit 91546fb62e675943a574c2542c0486f2928fed49 ] + For ixgbevf kernel driver, link status changes from down to up will trigger vf kernel driver send IXGBE_VF_RESET message to pf kernel driver, after this, vf kernel driver will disable and enable @@ -16,22 +18,24 @@ link is up, users need to reset vf port. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") -Cc: stable@dpdk.org Signed-off-by: Rosen Xu Signed-off-by: Yanglong Wu Acked-by: Qi Zhang --- - drivers/net/ixgbe/ixgbe_ethdev.c | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) + drivers/net/ixgbe/ixgbe_ethdev.c | 17 ++--------------- + 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c -index 8148577f5..91ba6201d 100644 +index 182a8c662..61c075b6a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -3880,11 +3880,6 @@ static int +@@ -3227,13 +3227,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev, + + static int ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, - int *link_up, int wait_to_complete) +- int *link_up, int wait_to_complete) ++ int *link_up, int wait_to_complete __rte_unused) { - /** - * for a quick link status checking, wait_to_compelet == 0, @@ -41,7 +45,7 @@ struct ixgbe_mbx_info *mbx = &hw->mbx; struct ixgbe_mac_info *mac = &hw->mac; uint32_t links_reg, in_msg; -@@ -3945,14 +3940,6 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, +@@ -3294,14 +3289,6 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, *speed = IXGBE_LINK_SPEED_UNKNOWN; } @@ -56,7 +60,7 @@ /* if the read failed it could just be a mailbox collision, best wait * until we are called again and don't report an error */ -@@ -3962,7 +3949,7 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, +@@ -3311,7 +3298,7 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) { /* msg is not CTS and is NACK we must have lost CTS status */ if (in_msg & IXGBE_VT_MSGTYPE_NACK)