From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26038A0093 for ; Wed, 9 Mar 2022 12:03:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A09540150; Wed, 9 Mar 2022 12:03:26 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id B2FE540150 for ; Wed, 9 Mar 2022 12:03:24 +0100 (CET) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 8AE813F4C2 for ; Wed, 9 Mar 2022 11:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646823803; bh=wrmBPFeq4Qxws1us0FrBqBiVG8JinGsdyNsVf+YYmxc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZFF3W5D2WAr+2jiDwHlvFrDwdG89YdNWBX5ZLosggqlRqEb/dgcbMRsDwfI+B3zJg mkuTw4MchJNK1tyWwqDvCVumdw3EqHK8A59+/zpxFhCoN8ztjyfx+cQuYPmuxiMsrB NMdKRGtdzP1Q5NOIkl8yiTzSe58pC4YGeu9bXsBch9IKfG9ID3BXRKVoIUZoS5Nh8R Z5u5BHXVe0Zz+9RTvKwU8FlT9l51zMkLFaOYoFJ1rDMHoA5GsL2NSsgg9ljkGF/x7L 64XFmvgQwyTPqAcpH9HbOcb52A0cjRscN3g6R454OWgCFJCOPPhsExclnWWlvv8LYM oSzeDx/kFp1fQ== Received: by mail-ej1-f72.google.com with SMTP id r18-20020a17090609d200b006a6e943d09eso1082741eje.20 for ; Wed, 09 Mar 2022 03:03:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wrmBPFeq4Qxws1us0FrBqBiVG8JinGsdyNsVf+YYmxc=; b=nPXO0Wqs07jgHrQghqUsVpjicBHGtKVV5vLfh6Ljh2hxiIsUJDwVVsMZPOMK0LlqdI UjPctMhwOaDEY0INuFcNVT68cGnGaaPxPW2f+6imHE6IXOZBuRK4duH9NGvBSQNamOjd iuSyjYFXEZoIZO8wXcCWLpQB5EriLwdU4O9BYDbBT6msmhpe+lOGwJCYwZv4tTLZR3jX oavsL4SugpluAKKAUvd+cqnNRtkMj4fb5/JPaVmzMEmFOwwwpPxkXDCG/p+hqqh6B3CW WBYI3OGOFp5DeW7gFGigI5PsZ8t25Z1vBoT+KaKYwXh+b8j5MQOeSsYj3BcAjFSZ/d/7 DyZw== X-Gm-Message-State: AOAM530dSUDigyIL8qGvFpyulaM2LwEgWaHC/5yOPwRMBVEjoWpP/y9N s7YiZ7gCp/5Uh3dvrdpeXrvAP957fdChAUijnLPZet7OMB5JvqWMZvzu66yaU6O/jNtI912AH63 Aw8OaVQ0HQ4fQW+RY2kx58ZIN X-Received: by 2002:a50:fd8e:0:b0:415:fe34:f03 with SMTP id o14-20020a50fd8e000000b00415fe340f03mr20315444edt.310.1646823803167; Wed, 09 Mar 2022 03:03:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcTmB0StQCTD7i73QFXlTlG8QCEMPhU0Ei95S1Qaf/U6wRA9WG+ajmYaibnFUJdpF/RzV78w== X-Received: by 2002:a50:fd8e:0:b0:415:fe34:f03 with SMTP id o14-20020a50fd8e000000b00415fe340f03mr20315427edt.310.1646823802969; Wed, 09 Mar 2022 03:03:22 -0800 (PST) Received: from localhost.localdomain (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id c1-20020a170906762100b006d00ae72b0csm568601ejn.221.2022.03.09.03.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 03:03:22 -0800 (PST) From: christian.ehrhardt@canonical.com To: Huisong Li Cc: Min Hu , dpdk stable Subject: patch 'net/hns3: increase time waiting for PF reset completion' has been queued to stable release 19.11.12 Date: Wed, 9 Mar 2022 12:01:07 +0100 Message-Id: <20220309110116.1295395-36-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309110116.1295395-1-christian.ehrhardt@canonical.com> References: <20220309110116.1295395-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/11/22. 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. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/b66b96e0fec405203400d2ebfc273f9180cdf231 Thanks. Christian Ehrhardt --- >From b66b96e0fec405203400d2ebfc273f9180cdf231 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 2 Mar 2022 08:35:01 +0800 Subject: [PATCH] net/hns3: increase time waiting for PF reset completion [ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ] On the case that PF and VF need to be reset, after the hardware reset is complete, VF needs wait for 1 second to restore the configuration so that VF does not fail to recover because PF reset isn't complete. But the estimated time is not sufficient. This patch fixes it to 5 seconds. Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Huisong Li Acked-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev_vf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index dbd46cd278..29a483b2f4 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1931,6 +1931,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) static int hns3vf_wait_hardware_ready(struct hns3_adapter *hns) { +#define HNS3_WAIT_PF_RESET_READY_TIME 5 struct hns3_hw *hw = &hns->hw; struct hns3_wait_data *wait_data = hw->reset.wait_data; struct timeval tv; @@ -1951,12 +1952,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns) return 0; wait_data->check_completion = NULL; - wait_data->interval = 1 * MSEC_PER_SEC * USEC_PER_MSEC; + wait_data->interval = HNS3_WAIT_PF_RESET_READY_TIME * + MSEC_PER_SEC * USEC_PER_MSEC; wait_data->count = 1; wait_data->result = HNS3_WAIT_REQUEST; rte_eal_alarm_set(wait_data->interval, hns3_wait_callback, wait_data); - hns3_warn(hw, "hardware is ready, delay 1 sec for PF reset complete"); + hns3_warn(hw, "hardware is ready, delay %d sec for PF reset complete", + HNS3_WAIT_PF_RESET_READY_TIME); return -EAGAIN; } else if (wait_data->result == HNS3_WAIT_TIMEOUT) { gettimeofday(&tv, NULL); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-03-09 11:57:45.238529668 +0100 +++ 0036-net-hns3-increase-time-waiting-for-PF-reset-completi.patch 2022-03-09 11:57:43.400938432 +0100 @@ -1 +1 @@ -From d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc Mon Sep 17 00:00:00 2001 +From b66b96e0fec405203400d2ebfc273f9180cdf231 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 06ddf64184..9091706fe5 100644 +index dbd46cd278..29a483b2f4 100644 @@ -24 +25 @@ -@@ -1877,6 +1877,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) +@@ -1931,6 +1931,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) @@ -32 +33 @@ -@@ -1897,12 +1898,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns) +@@ -1951,12 +1952,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns) @@ -48 +49 @@ - hns3_clock_gettime(&tv); + gettimeofday(&tv, NULL);