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 1B30FA04DD for ; Wed, 28 Oct 2020 11:47:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 140AEC8F8; Wed, 28 Oct 2020 11:47:07 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id BAC6DC8F8 for ; Wed, 28 Oct 2020 11:47:04 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id i1so5178703wro.1 for ; Wed, 28 Oct 2020 03:47:04 -0700 (PDT) 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=C//qIPJUjrpUkDUt18dtg99XUt4F5EUsSFofZBR0Q7Y=; b=rH+i8QPWld1FzUYdTVkXp7cabsHXNELrGsMpjz6buCCr7sRw0YVOTw2KjXY51uCTNB F1Mpo6PROJlvfpwGLmRq4ZAoYDxW35GRjuzmuDeeTrYjao7o+9Dk1L2z8+YRmC5MJ9zQ klrLQhunjUgpfaGFIqAc+HdPuyJAuQ6WBQsbkkJf/dTJ9HJCR492AsupOJsDrqSJsVu4 R5SUC6zMiXdk2cnE03fYKtdvPdfYyhl+NB4Rdlj2WM7QiI5P9HI/FLW8fxhPQ+op8AT0 jK5XGaibJYOVfza3yUBs9hHOFDWSH+KVZPAOOXBRM/+EK8iFHCQeC/Cvx3K0qgw9sSat 7SEg== 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=C//qIPJUjrpUkDUt18dtg99XUt4F5EUsSFofZBR0Q7Y=; b=LC24a05kYZQnvZt9dKBDjopQ9eX55g9lx98Ud96AzcnaOefm7fAYpQe8ug3kUc/l7g INHWJEiATz5NvsVME4gFk1aJyxmddxp30FPrSpE7H7q/MhlFZL2tot9VPJ0c5B1/pPEN w0mOk+JPZgGlgWlRYrH2HPpRvC3xdrSGE82dn9YTAdQTAxTNapcZ3txn7zL9MC6/yznZ NFIyqOfVmjwoqZjOmW+oODicDUGE0bh7RG/N4Z6wlmxGZeNeJ6DWmuUfXDy4gkidsvd0 a9auA2ldQDCiYva5mUwHQFiffChwCa7voag1QigsKrrohsQewONaKS9hDgkOewG1O7SA iO2g== X-Gm-Message-State: AOAM533pf0n1yQ28249CbYepZ0r/+cNo9tmbj94Y++qZJsrzEj00gUnY JTH9/BhDiJymu8aivDR4OY8= X-Google-Smtp-Source: ABdhPJy1QWML5w+e7oizWoN/PU/G83CqfPR3fRvzZ3jLDzhHOXyFu2kxreU/RjCVwOcQ6kmmL3fzJA== X-Received: by 2002:adf:bb43:: with SMTP id x3mr8080087wrg.250.1603882023499; Wed, 28 Oct 2020 03:47:03 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p4sm6205883wrf.67.2020.10.28.03.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:47:02 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Wei Hu , dpdk stable Date: Wed, 28 Oct 2020 10:42:57 +0000 Message-Id: <20201028104606.3504127-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix some incomplete command structures' has been queued to stable release 19.11.6 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/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 019572c6dd21b43703535a03c8a4dd57104de881 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 25 Aug 2020 19:53:05 +0800 Subject: [PATCH] net/hns3: fix some incomplete command structures [ upstream commit e2a8cae024a5de4d08bc79dead9528e9ce6836c5 ] The descriptor of the command between firmware and driver consists of 8-byte header and 24-byte data field. The contents sent to firmware are packaged into a command structure as the data field of command descriptor. There are some command structures in hns3_dcb.h file that are less than 24 byte. So this patch fixes these incomplete command structures. Fixes: 62e3ccc2b94c ("net/hns3: support flow control") Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_dcb.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h index 9c2c5f21c1..1d6fe5dfdf 100644 --- a/drivers/net/hns3/hns3_dcb.h +++ b/drivers/net/hns3/hns3_dcb.h @@ -24,16 +24,19 @@ enum hns3_shap_bucket { struct hns3_priority_weight_cmd { uint8_t pri_id; uint8_t dwrr; + uint8_t rsvd[22]; }; struct hns3_qs_weight_cmd { uint16_t qs_id; uint8_t dwrr; + uint8_t rsvd[21]; }; struct hns3_pg_weight_cmd { uint8_t pg_id; uint8_t dwrr; + uint8_t rsvd[22]; }; struct hns3_ets_tc_weight_cmd { @@ -48,6 +51,7 @@ struct hns3_qs_to_pri_link_cmd { uint8_t priority; #define HNS3_DCB_QS_PRI_LINK_VLD_MSK BIT(0) uint8_t link_vld; + uint8_t rsvd1[18]; }; struct hns3_nq_to_qs_link_cmd { @@ -55,6 +59,7 @@ struct hns3_nq_to_qs_link_cmd { uint16_t rsvd; #define HNS3_DCB_Q_QS_LINK_VLD_MSK BIT(10) uint16_t qset_id; + uint8_t rsvd1[18]; }; #define HNS3_DCB_SHAP_IR_B_MSK GENMASK(7, 0) @@ -72,12 +77,14 @@ struct hns3_pri_shapping_cmd { uint8_t pri_id; uint8_t rsvd[3]; uint32_t pri_shapping_para; + uint32_t rsvd1[4]; }; struct hns3_pg_shapping_cmd { uint8_t pg_id; uint8_t rsvd[3]; uint32_t pg_shapping_para; + uint32_t rsvd1[4]; }; #define HNS3_BP_GRP_NUM 32 @@ -90,16 +97,18 @@ struct hns3_bp_to_qs_map_cmd { uint8_t rsvd[2]; uint8_t qs_group_id; uint32_t qs_bit_map; - uint32_t rsvd1; + uint32_t rsvd1[4]; }; struct hns3_pfc_en_cmd { uint8_t tx_rx_en_bitmap; uint8_t pri_en_bitmap; + uint8_t rsvd[22]; }; struct hns3_port_shapping_cmd { uint32_t port_shapping_para; + uint32_t rsvd[5]; }; struct hns3_cfg_pause_param_cmd { @@ -117,6 +126,7 @@ struct hns3_pg_to_pri_link_cmd { uint8_t pg_id; uint8_t rsvd1[3]; uint8_t pri_bit_map; + uint8_t rsvd2[19]; }; enum hns3_shaper_level { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:12.356151519 +0000 +++ 0018-net-hns3-fix-some-incomplete-command-structures.patch 2020-10-28 10:35:11.436829023 +0000 @@ -1,8 +1,10 @@ -From e2a8cae024a5de4d08bc79dead9528e9ce6836c5 Mon Sep 17 00:00:00 2001 +From 019572c6dd21b43703535a03c8a4dd57104de881 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 25 Aug 2020 19:53:05 +0800 Subject: [PATCH] net/hns3: fix some incomplete command structures +[ upstream commit e2a8cae024a5de4d08bc79dead9528e9ce6836c5 ] + The descriptor of the command between firmware and driver consists of 8-byte header and 24-byte data field. The contents sent to firmware are packaged into a command structure as the data field of command @@ -12,7 +14,6 @@ 24 byte. So this patch fixes these incomplete command structures. Fixes: 62e3ccc2b94c ("net/hns3: support flow control") -Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) @@ -21,10 +22,10 @@ 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h -index 1636c5ae88..557d88bc18 100644 +index 9c2c5f21c1..1d6fe5dfdf 100644 --- a/drivers/net/hns3/hns3_dcb.h +++ b/drivers/net/hns3/hns3_dcb.h -@@ -26,16 +26,19 @@ enum hns3_shap_bucket { +@@ -24,16 +24,19 @@ enum hns3_shap_bucket { struct hns3_priority_weight_cmd { uint8_t pri_id; uint8_t dwrr; @@ -44,7 +45,7 @@ }; struct hns3_ets_tc_weight_cmd { -@@ -50,6 +53,7 @@ struct hns3_qs_to_pri_link_cmd { +@@ -48,6 +51,7 @@ struct hns3_qs_to_pri_link_cmd { uint8_t priority; #define HNS3_DCB_QS_PRI_LINK_VLD_MSK BIT(0) uint8_t link_vld; @@ -52,7 +53,7 @@ }; struct hns3_nq_to_qs_link_cmd { -@@ -57,6 +61,7 @@ struct hns3_nq_to_qs_link_cmd { +@@ -55,6 +59,7 @@ struct hns3_nq_to_qs_link_cmd { uint16_t rsvd; #define HNS3_DCB_Q_QS_LINK_VLD_MSK BIT(10) uint16_t qset_id; @@ -60,7 +61,7 @@ }; #define HNS3_DCB_SHAP_IR_B_MSK GENMASK(7, 0) -@@ -74,12 +79,14 @@ struct hns3_pri_shapping_cmd { +@@ -72,12 +77,14 @@ struct hns3_pri_shapping_cmd { uint8_t pri_id; uint8_t rsvd[3]; uint32_t pri_shapping_para; @@ -75,7 +76,7 @@ }; #define HNS3_BP_GRP_NUM 32 -@@ -92,16 +99,18 @@ struct hns3_bp_to_qs_map_cmd { +@@ -90,16 +97,18 @@ struct hns3_bp_to_qs_map_cmd { uint8_t rsvd[2]; uint8_t qs_group_id; uint32_t qs_bit_map; @@ -95,7 +96,7 @@ }; struct hns3_cfg_pause_param_cmd { -@@ -119,6 +128,7 @@ struct hns3_pg_to_pri_link_cmd { +@@ -117,6 +126,7 @@ struct hns3_pg_to_pri_link_cmd { uint8_t pg_id; uint8_t rsvd1[3]; uint8_t pri_bit_map;