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 571B0A0518 for ; Fri, 24 Jul 2020 14:08:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5017F1BFE7; Fri, 24 Jul 2020 14:08:10 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 3392D1C191 for ; Fri, 24 Jul 2020 14:08:09 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id k20so401784wmi.5 for ; Fri, 24 Jul 2020 05:08:09 -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=Ig2sZzoOAvBoPsocEAGbcsInnqKlkdVqd1NAutfYq/8=; b=S3rw6lJeVCpc8Fm1JuujeYLJOs37UwIhLPs4oD17eRyjvXO0DLjVrAPjvtNWgrdV48 Gd3R3aMBVIrUvWaFfJ0A0rtKSMKq9x6p78RZ2xK30ovWLH6TAMKcegQ/R7BfEZWFFFAW 3X9cm/0uj0Jx6u6SGcw1mR7YVZ1y2APvb976NvHHx5z6FQcCbMg82RFP7Bvnm2OXA3Ez MI6WNFTnXZAI7dDBAGT2iPhgsMMvIEQkJhDbuvvEqjSDL7i2iany4Idse9DpExLkKmu1 IRR6DJwPZVMScUWQ0M+osPlcfT1VpXinf5zUEeSuSUYqX4jM/EAtKibpRdlVsTrATsDM e5kQ== 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=Ig2sZzoOAvBoPsocEAGbcsInnqKlkdVqd1NAutfYq/8=; b=Qo/TzKMjtIM+ol7V4n00VQTERpW4vR8RfUbImybAvuZnZurRQmVDf9xHFlbo1Zqem2 qWYC7a66oXDq5LDPY8GLi81wxrfde7t2SOb9rLXWp0IOeeaE3JWfqGL/uJvwOuMgIdmo TafNlqOvmw+SLTgSp4nxwLrNRsJ/ZWe3uEPo/2uw/dFZf9Fe2e5mPpAvwpJhstSZlI9A J/v8uF6RmZVijzNcpOl1+k4ccZHCFHYm+OySaiRKOp0VzOxHehrb4egXz17YRrSXrHCa nS4Cr4extwyDCGevxhcYaVH2ExTrgAoGPUa2iwRcKBpHaqOWKTpn51siHS8+WIlEdCzk 7IXQ== X-Gm-Message-State: AOAM532wRSyUBqSfFvZdal3kCZjiCra6FVR9GrXm5vMNVWqdeii6+fVA 84K2eNuAWvluDrJos+VY4Zs= X-Google-Smtp-Source: ABdhPJzznySGERbTt9UKoYpgjJHWKjGgtttxwxTNWhyeISl83TsPyVKv4XMj9UN1oDCrJAFogM/OMQ== X-Received: by 2002:a1c:283:: with SMTP id 125mr9016972wmc.12.1595592488812; Fri, 24 Jul 2020 05:08:08 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id j6sm1194511wro.25.2020.07.24.05.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:08:07 -0700 (PDT) From: luca.boccassi@gmail.com To: "Wei Hu (Xavier)" Cc: Chengchang Tang , dpdk stable Date: Fri, 24 Jul 2020 12:59:10 +0100 Message-Id: <20200724120030.1863487-112-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix Rx buffer size' has been queued to stable release 19.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/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 479064d41e9cbd7654abe1689043e4045e206bbd Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Wed, 1 Jul 2020 19:54:40 +0800 Subject: [PATCH] net/hns3: fix Rx buffer size [ upstream commit dfac40d93edf7dbac8ef41f775daba4e54a39263 ] Currently, rx_buf_size of hns3 PMD driver is fixed on, and it's value depends on the firmware which will decrease the flexibility of PMD. The receive side mbufs was allocated from the mempool given by upper application calling rte_eth_rx_queue_setup API function. So the memory chunk used for net device DMA is depend on the data room size of the objects in this mempool. Hns3 PMD driver should set the rx_buf_len smaller than the data room size of mempool and our hardware only support the following four specifications: 512, 1024, 2148 and 4096. Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Signed-off-by: Chengchang Tang Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_ethdev.c | 3 +- drivers/net/hns3/hns3_ethdev.h | 1 - drivers/net/hns3/hns3_ethdev_vf.c | 5 +-- drivers/net/hns3/hns3_rxtx.c | 56 +++++++++++++++++++++++++++++-- drivers/net/hns3/hns3_rxtx.h | 8 +++++ 5 files changed, 64 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 4a1bb174c..4922e1bde 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2362,7 +2362,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) info->max_rx_queues = queue_num; info->max_tx_queues = hw->tqps_num; info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */ - info->min_rx_bufsize = hw->rx_buf_len; + info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE; info->max_mac_addrs = HNS3_UC_MACADDR_NUM; info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD; info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM | @@ -2709,7 +2709,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) hw->mac.media_type = cfg.media_type; hw->rss_size_max = cfg.rss_size_max; hw->rss_dis_flag = false; - hw->rx_buf_len = cfg.rx_buf_len; memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN); hw->mac.phy_addr = cfg.phy_addr; hw->mac.default_addr_setted = false; diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index e7d9fe0e0..155099e99 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -363,7 +363,6 @@ struct hns3_hw { uint16_t tqps_num; /* num task queue pairs of this function */ uint16_t intr_tqps_num; /* num queue pairs mapping interrupt */ uint16_t rss_size_max; /* HW defined max RSS task queue */ - uint16_t rx_buf_len; uint16_t num_tx_desc; /* desc num of per tx queue */ uint16_t num_rx_desc; /* desc num of per rx queue */ diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 22cd9eb33..a2867f8ec 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -652,7 +652,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) info->max_rx_queues = q_num; info->max_tx_queues = hw->tqps_num; info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */ - info->min_rx_bufsize = hw->rx_buf_len; + info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE; info->max_mac_addrs = HNS3_VF_UC_MACADDR_NUM; info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD; @@ -816,8 +816,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw) return -EINVAL; } - if (hw->rx_buf_len == 0) - hw->rx_buf_len = HNS3_DEFAULT_RX_BUF_LEN; hw->alloc_rss_size = RTE_MIN(hw->rss_size_max, hw->tqps_num); return 0; @@ -839,7 +837,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw) memcpy(&hw->tqps_num, &resp_msg[0], sizeof(uint16_t)); memcpy(&hw->rss_size_max, &resp_msg[2], sizeof(uint16_t)); - memcpy(&hw->rx_buf_len, &resp_msg[4], sizeof(uint16_t)); return hns3vf_check_tqp_info(hw); } diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 3251515fe..c1ffa136b 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -884,7 +884,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, nb_rx_q = dev->data->nb_rx_queues; rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET + (nb_rx_q + idx) * HNS3_TQP_REG_SIZE); - rxq->rx_buf_len = hw->rx_buf_len; + rxq->rx_buf_len = HNS3_MIN_BD_BUF_SIZE; rte_spinlock_lock(&hw->lock); hw->fkq_data.rx_queues[idx] = rxq; @@ -1160,6 +1160,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns) } } +static int +hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len) +{ + uint16_t vld_buf_size; + uint16_t num_hw_specs; + uint16_t i; + + /* + * hns3 network engine only support to set 4 typical specification, and + * different buffer size will affect the max packet_len and the max + * number of segmentation when hw gro is turned on in receive side. The + * relationship between them is as follows: + * rx_buf_size | max_gro_pkt_len | max_gro_nb_seg + * ---------------------|-------------------|---------------- + * HNS3_4K_BD_BUF_SIZE | 60KB | 15 + * HNS3_2K_BD_BUF_SIZE | 62KB | 31 + * HNS3_1K_BD_BUF_SIZE | 63KB | 63 + * HNS3_512_BD_BUF_SIZE | 31.5KB | 63 + */ + static const uint16_t hw_rx_buf_size[] = { + HNS3_4K_BD_BUF_SIZE, + HNS3_2K_BD_BUF_SIZE, + HNS3_1K_BD_BUF_SIZE, + HNS3_512_BD_BUF_SIZE + }; + + vld_buf_size = (uint16_t)(rte_pktmbuf_data_room_size(mp) - + RTE_PKTMBUF_HEADROOM); + + if (vld_buf_size < HNS3_MIN_BD_BUF_SIZE) + return -EINVAL; + + num_hw_specs = RTE_DIM(hw_rx_buf_size); + for (i = 0; i < num_hw_specs; i++) { + if (vld_buf_size >= hw_rx_buf_size[i]) { + *rx_buf_len = hw_rx_buf_size[i]; + break; + } + } + return 0; +} + int hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_rxconf *conf, @@ -1169,6 +1211,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, struct hns3_hw *hw = &hns->hw; struct hns3_queue_info q_info; struct hns3_rx_queue *rxq; + uint16_t rx_buf_size; int rx_entry_len; if (dev->data->dev_started) { @@ -1193,6 +1236,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, q_info.nb_desc = nb_desc; q_info.type = "hns3 RX queue"; q_info.ring_name = "rx_ring"; + + if (hns3_rx_buf_len_calc(mp, &rx_buf_size)) { + hns3_err(hw, "rxq mbufs' data room size:%u is not enough! " + "minimal data room size:%u.", + rte_pktmbuf_data_room_size(mp), + HNS3_MIN_BD_BUF_SIZE + RTE_PKTMBUF_HEADROOM); + return -EINVAL; + } + rxq = hns3_alloc_rxq_and_dma_zone(dev, &q_info); if (rxq == NULL) { hns3_err(hw, @@ -1226,7 +1278,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, rxq->configured = true; rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET + idx * HNS3_TQP_REG_SIZE); - rxq->rx_buf_len = hw->rx_buf_len; + rxq->rx_buf_len = rx_buf_size; rxq->l2_errors = 0; rxq->pkt_len_errors = 0; rxq->l3_csum_erros = 0; diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index 771f3c9be..1fd1afd1d 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -11,6 +11,14 @@ #define HNS3_ALIGN_RING_DESC 32 #define HNS3_RING_BASE_ALIGN 128 +#define HNS3_512_BD_BUF_SIZE 512 +#define HNS3_1K_BD_BUF_SIZE 1024 +#define HNS3_2K_BD_BUF_SIZE 2048 +#define HNS3_4K_BD_BUF_SIZE 4096 + +#define HNS3_MIN_BD_BUF_SIZE HNS3_512_BD_BUF_SIZE +#define HNS3_MAX_BD_BUF_SIZE HNS3_4K_BD_BUF_SIZE + #define HNS3_BD_SIZE_512_TYPE 0 #define HNS3_BD_SIZE_1024_TYPE 1 #define HNS3_BD_SIZE_2048_TYPE 2 -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:52.860342031 +0100 +++ 0112-net-hns3-fix-Rx-buffer-size.patch 2020-07-24 12:53:48.375008099 +0100 @@ -1,8 +1,10 @@ -From dfac40d93edf7dbac8ef41f775daba4e54a39263 Mon Sep 17 00:00:00 2001 +From 479064d41e9cbd7654abe1689043e4045e206bbd Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Wed, 1 Jul 2020 19:54:40 +0800 Subject: [PATCH] net/hns3: fix Rx buffer size +[ upstream commit dfac40d93edf7dbac8ef41f775daba4e54a39263 ] + Currently, rx_buf_size of hns3 PMD driver is fixed on, and it's value depends on the firmware which will decrease the flexibility of PMD. @@ -14,7 +16,6 @@ the following four specifications: 512, 1024, 2148 and 4096. Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") -Cc: stable@dpdk.org Signed-off-by: Chengchang Tang Signed-off-by: Wei Hu (Xavier) @@ -27,10 +28,10 @@ 5 files changed, 64 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c -index b9868de54..13ce32432 100644 +index 4a1bb174c..4922e1bde 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c -@@ -2450,7 +2450,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) +@@ -2362,7 +2362,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) info->max_rx_queues = queue_num; info->max_tx_queues = hw->tqps_num; info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */ @@ -38,8 +39,8 @@ + info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE; info->max_mac_addrs = HNS3_UC_MACADDR_NUM; info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD; - info->max_lro_pkt_size = HNS3_MAX_LRO_SIZE; -@@ -2848,7 +2848,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) + info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM | +@@ -2709,7 +2709,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) hw->mac.media_type = cfg.media_type; hw->rss_size_max = cfg.rss_size_max; hw->rss_dis_flag = false; @@ -48,10 +49,10 @@ hw->mac.phy_addr = cfg.phy_addr; hw->mac.default_addr_setted = false; diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h -index c390263bd..3c991f4ce 100644 +index e7d9fe0e0..155099e99 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h -@@ -375,7 +375,6 @@ struct hns3_hw { +@@ -363,7 +363,6 @@ struct hns3_hw { uint16_t tqps_num; /* num task queue pairs of this function */ uint16_t intr_tqps_num; /* num queue pairs mapping interrupt */ uint16_t rss_size_max; /* HW defined max RSS task queue */ @@ -60,10 +61,10 @@ uint16_t num_rx_desc; /* desc num of per rx queue */ diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c -index 9c45ffae2..3c5998abe 100644 +index 22cd9eb33..a2867f8ec 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c -@@ -902,7 +902,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) +@@ -652,7 +652,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) info->max_rx_queues = q_num; info->max_tx_queues = hw->tqps_num; info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */ @@ -71,8 +72,8 @@ + info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE; info->max_mac_addrs = HNS3_VF_UC_MACADDR_NUM; info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD; - info->max_lro_pkt_size = HNS3_MAX_LRO_SIZE; -@@ -1096,8 +1096,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw) + +@@ -816,8 +816,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw) return -EINVAL; } @@ -81,7 +82,7 @@ hw->alloc_rss_size = RTE_MIN(hw->rss_size_max, hw->tqps_num); return 0; -@@ -1162,7 +1160,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw) +@@ -839,7 +837,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw) memcpy(&hw->tqps_num, &resp_msg[0], sizeof(uint16_t)); memcpy(&hw->rss_size_max, &resp_msg[2], sizeof(uint16_t)); @@ -90,10 +91,10 @@ return hns3vf_check_tqp_info(hw); } diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c -index 0f9825f74..931d89a1a 100644 +index 3251515fe..c1ffa136b 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c -@@ -909,7 +909,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, +@@ -884,7 +884,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, nb_rx_q = dev->data->nb_rx_queues; rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET + (nb_rx_q + idx) * HNS3_TQP_REG_SIZE); @@ -102,7 +103,7 @@ rte_spinlock_lock(&hw->lock); hw->fkq_data.rx_queues[idx] = rxq; -@@ -1185,6 +1185,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns) +@@ -1160,6 +1160,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns) } } @@ -151,7 +152,7 @@ int hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_rxconf *conf, -@@ -1194,6 +1236,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, +@@ -1169,6 +1211,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, struct hns3_hw *hw = &hns->hw; struct hns3_queue_info q_info; struct hns3_rx_queue *rxq; @@ -159,7 +160,7 @@ int rx_entry_len; if (dev->data->dev_started) { -@@ -1218,6 +1261,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, +@@ -1193,6 +1236,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, q_info.nb_desc = nb_desc; q_info.type = "hns3 RX queue"; q_info.ring_name = "rx_ring"; @@ -175,7 +176,7 @@ rxq = hns3_alloc_rxq_and_dma_zone(dev, &q_info); if (rxq == NULL) { hns3_err(hw, -@@ -1252,7 +1304,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, +@@ -1226,7 +1278,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, rxq->configured = true; rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET + idx * HNS3_TQP_REG_SIZE); @@ -185,7 +186,7 @@ rxq->pkt_len_errors = 0; rxq->l3_csum_erros = 0; diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h -index b85c64f65..ccd508b74 100644 +index 771f3c9be..1fd1afd1d 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -11,6 +11,14 @@