From patchwork Tue Sep 22 08:54:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wei Hu (Xavier)" X-Patchwork-Id: 78327 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43FD9A04E1; Tue, 22 Sep 2020 11:05:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13D4F1DCBC; Tue, 22 Sep 2020 10:55:33 +0200 (CEST) Received: from incedge.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id EB1981DB8D for ; Tue, 22 Sep 2020 10:55:00 +0200 (CEST) X-ASG-Debug-ID: 1600764899-149d111bae19b090003-TfluYd Received: from mail.chinasoftinc.com ([10.168.0.51]) by incedge.chinasoftinc.com with ESMTP id EEWbKUAAZ54smBpY (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Sep 2020 16:55:00 +0800 (CST) X-Barracuda-Envelope-From: huwei013@chinasoftinc.com X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.51 X-ASG-Whitelist: Client Received: from localhost.localdomain (120.133.139.157) by INCCAS001.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 22 Sep 2020 16:54:58 +0800 From: "Wei Hu (Xavier)" X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.60 To: CC: Date: Tue, 22 Sep 2020 16:54:01 +0800 X-ASG-Orig-Subj: [PATCH 17/17] net/hns3: fix storing RSS info when creating flow action Message-ID: <20200922085401.12272-18-huwei013@chinasoftinc.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20200922085401.12272-1-huwei013@chinasoftinc.com> References: <20200922085401.12272-1-huwei013@chinasoftinc.com> MIME-Version: 1.0 X-Originating-IP: [120.133.139.157] X-Barracuda-Connect: UNKNOWN[10.168.0.51] X-Barracuda-Start-Time: 1600764900 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://incspam.chinasofti.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at chinasoftinc.com X-Barracuda-Scan-Msg-Size: 1490 Subject: [dpdk-dev] [PATCH 17/17] net/hns3: fix storing RSS info when creating flow action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: "Wei Hu (Xavier)" Currently, when calling the rte_flow_query API function to query the RSS information, the queue related information is not as expected. The root cause is that when application call the rte_flow_create API function to create RSS action, the operation of storing the data whose typs is struct rte_flow_action_rss is incorrect in the '.create' ops implementation function named hns3_flow_create. This patch fixes it by replacing memcpy with hns3_rss_conf_copy function to store the RSS information in the hns3_flow_create. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 4f078e8..3e48963 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1839,8 +1839,8 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, ret = -ENOMEM; goto err; } - memcpy(&rss_filter_ptr->filter_info, rss_conf, - sizeof(struct hns3_rss_conf)); + hns3_rss_conf_copy(&rss_filter_ptr->filter_info, + &rss_conf->conf); rss_filter_ptr->filter_info.valid = true; TAILQ_INSERT_TAIL(&process_list->filter_rss_list, rss_filter_ptr, entries);