DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <xavier.huwei@huawei.com>
Subject: Re: [dpdk-dev] [PATCH V2] net/hns3: support getting Tx and Rx queue information
Date: Thu, 20 Aug 2020 17:07:46 +0800	[thread overview]
Message-ID: <c56c80bf-e954-09ac-1679-a5f1c718b243@chinasoftinc.com> (raw)
In-Reply-To: <3976b92e-f3fa-d974-3da4-2ef9a715356f@intel.com>

Hi, Ferruh Yigit

On 2020/8/20 0:19, Ferruh Yigit wrote:
> On 8/18/2020 4:07 AM, Wei Hu (Xavier) wrote:
>> From: Huisong Li <lihuisong@huawei.com>
>>
>> This patch adds support for querying Rx/Tx queue information.
>>
>> Currently, if there are not available Rx buffer descriptors in receiving
>> direction based on hns3 network engine, incoming packets will always be
>> dropped by hardware. This patch reports the '.rx_drop_en' information to
>> DPDK framework in the '.dev_infos_get', '.rxq_info_get' and
>> '.rx_queue_setup' ops implementation function.
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> <...>
>
>> @@ -2495,6 +2495,15 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
>>   		.nb_mtu_seg_max = HNS3_MAX_NON_TSO_BD_PER_PKT,
>>   	};
>>   
>> +	info->default_rxconf = (struct rte_eth_rxconf) {
>> +		/*
>> +		 * If there are no available Rx buffer descriptors, incoming
>> +		 * packets are always dropped by hardware based on hns3 network
>> +		 * engine.
>> +		 */
>> +		.rx_drop_en = 1,
>> +	};
> Can you please separate this into two patches, first one for 'rx_drop_en'
> related changes to existing code, second one to add queue info get functions?
>
> And you may prefer to request backporting the 'rx_drop_en' patch.

Thanks for you suggestion.

I will update them in V3.

>
> <...>
>> +void
>> +hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
>> +		  struct rte_eth_rxq_info *qinfo)
>> +{
>> +	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>> +	struct hns3_rx_queue *rxq = dev->data->rx_queues[queue_id];
>> +
>> +	if (rxq == NULL) {
>> +		hns3_err(hw, "queue pointer of rx queue_id (%u) is NULL.",
>> +			 queue_id);
>> +		return;
>> +	}
> 'rxq' should not be 'NULL' at this stage, because of the "queue_id >=
> dev->data->nb_rx_queues" check in 'rte_eth_rx_queue_info_get()'.
> Can you please check if it can be 'NULL' and if it can be, better to check it in
> the ethdev API, instead of doing in each PMD, both for 'rxq' & 'txq'.

OK, I will send a email to add check rxq & txq in the 
rte_eth_rx_queue_info_get

and rte_eth_tx_queue_info_get API function.

Thanks, Xavier.


  reply	other threads:[~2020-08-20  9:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  2:51 [dpdk-dev] [PATCH] " Wei Hu (Xavier)
2020-08-18  3:07 ` [dpdk-dev] [PATCH V2] " Wei Hu (Xavier)
2020-08-19 16:19   ` Ferruh Yigit
2020-08-20  9:07     ` Wei Hu (Xavier) [this message]
2020-08-20  9:03 ` [dpdk-dev] [PATCH v3 0/3] minor updates for getting queue info Wei Hu (Xavier)
2020-08-20  9:03   ` [dpdk-dev] [PATCH v3 1/3] net/hns3: report Rx drop packets enable configuration Wei Hu (Xavier)
2020-08-20  9:03   ` [dpdk-dev] [PATCH v3 2/3] net/hns3: support getting Tx and Rx queue information Wei Hu (Xavier)
2020-08-20  9:03   ` [dpdk-dev] [PATCH v3 3/3] ethdev: check if queue setupped when getting queue info Wei Hu (Xavier)
2020-08-24 11:01 ` [dpdk-dev] [PATCH v4 0/3] minor updates for " Wei Hu (Xavier)
2020-08-24 11:01   ` [dpdk-dev] [PATCH v4 1/3] net/hns3: report Rx drop packets enable configuration Wei Hu (Xavier)
2020-08-24 11:01   ` [dpdk-dev] [PATCH v4 2/3] net/hns3: support getting Tx and Rx queue information Wei Hu (Xavier)
2020-08-24 11:01   ` [dpdk-dev] [PATCH v4 3/3] ethdev: check if queue setupped when getting queue info Wei Hu (Xavier)
2020-08-25  8:43     ` Ferruh Yigit
2020-08-25  8:44   ` [dpdk-dev] [PATCH v4 0/3] minor updates for " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c56c80bf-e954-09ac-1679-a5f1c718b243@chinasoftinc.com \
    --to=huwei013@chinasoftinc.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=xavier.huwei@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).