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 56C49A04AA; Tue, 8 Sep 2020 13:49:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 347042BAB; Tue, 8 Sep 2020 13:49:04 +0200 (CEST) Received: from mail.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id 8882A1DB8 for ; Tue, 8 Sep 2020 13:49:01 +0200 (CEST) Received: from [192.168.1.199] (139.159.243.11) by INCCAS002.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 19:48:55 +0800 To: Ferruh Yigit CC: , , References: <20200825115305.58490-1-huwei013@chinasoftinc.com> <20200825115305.58490-11-huwei013@chinasoftinc.com> From: "Wei Hu (Xavier)" Message-ID: Date: Tue, 8 Sep 2020 19:48:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [139.159.243.11] Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 10/11] net/hns3: fix Rx/Tx queue offload capability 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" Hi, Ferruh Yigit On 2020/9/4 18:34, Ferruh Yigit wrote: > On 8/25/2020 12:53 PM, Wei Hu (Xavier) wrote: >> From: "Wei Hu (Xavier)" >> >> According to rte_eth_rx_queue_setup and rte_eth_tx_queue_setup API >> function, rx_queue_offload_capa and rx_offload_capa, tx_queue_offload_capa >> and tx_offload_capa must be mutually exclusive in the '.dev_infos_get' ops >> implementation function. Otherwise, rte_eth_rx_queue_setup or >> rte_eth_tx_queue_setup will fail, if user uses rx_offload_capa and >> tx_offload_capa obtained by calling the rte_eth_dev_info_get API function. > Can you please clarify what is fixed here? > > If the PMD doesn't support 'DEV_TX_OFFLOAD_MBUF_FAST_FREE' to be configured per > queue, it makes sense the update the capability reporting to match it. > > But having an offload as queue offload shouldn't cause any error on setting it > on port wise (to all queues). I am asking because if you are getting error > 'rte_eth_rx_queue_setup()' / 'rte_eth_tx_queue_setup()' the reason can be > something else. > Also what do you mean by "'tx_queue_offload_capa' and 'tx_offload_capa' must be > mutually exclusive"? All queue offloads should be present in the port offload, > because of an offload can be applied to any specific queue, this means it can be > applied to all queues which means it can be applied port wise. "rx_queue_offload_capa and rx_offload_capa, tx_queue_offload_capa  and tx_offload_capa must be mutually exclusive" -- It's wrong, we misunderstood the process of rte_eth_rx_queue_setup and rte_eth_tx_queue_setup. Thanks :-) We will update the commit log as below: Currently, offload capabilities are only enabled for all Rx/Tx queues in hns3 PF and VF PMD driver, and offload capability only applied in a Rx/Tx queue is not supported. So this patch moves 'DEV_TX_OFFLOAD_MBUF_FAST_FREE' from tx_queue_offload_capa to tx_offload_capa. >> Currently, offload capabilities are enabled for all Rx/Tx queues in hns3 >> PF and VF PMD driver, and offload capability only applied in a Rx/Tx >> queue is not supported. This patch fixes Rx/Tx queue offload capability. >> >> Fixes: 1f5ca0b460cd67 ("net/hns3: support some device operations") >> Fixes: a5475d61fa34b8 ("net/hns3: support VF") >> Cc: stable@dpdk.org >> >> Signed-off-by: Huisong Li >> Signed-off-by: Wei Hu (Xavier) >> --- >> drivers/net/hns3/hns3_ethdev.c | 5 +++-- >> drivers/net/hns3/hns3_ethdev_vf.c | 5 +++-- >> 2 files changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c >> index 14e4b9e35..281d8b928 100644 >> --- a/drivers/net/hns3/hns3_ethdev.c >> +++ b/drivers/net/hns3/hns3_ethdev.c >> @@ -2459,6 +2459,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) >> 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; >> + info->rx_queue_offload_capa = 0; > No need to set 'rx_queue_offload_capa' or 'tx_queue_offload_capa' to zero since > zero is their default value. Ok, I  will fix it in V2. Thanks Regards Xavier