DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function
@ 2021-04-09 10:26 Min Hu (Connor)
  2021-04-13  8:36 ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Min Hu (Connor) @ 2021-04-09 10:26 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds debug info for Rx/Tx burst function which was choosing.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index b45afcd..19adf00 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4205,6 +4205,22 @@ hns3_dummy_rxtx_burst(void *dpdk_txq __rte_unused,
 	return 0;
 }
 
+static void
+hns3_trace_rxtx_function(struct rte_eth_dev *dev)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_burst_mode rx_mode;
+	struct rte_eth_burst_mode tx_mode;
+
+	memset(&rx_mode, 0, sizeof(rx_mode));
+	memset(&tx_mode, 0, sizeof(tx_mode));
+	(void)hns3_rx_burst_mode_get(dev, 0, &rx_mode);
+	(void)hns3_tx_burst_mode_get(dev, 0, &tx_mode);
+
+	hns3_dbg(hw, "using rx_pkt_burst: %s, tx_pkt_burst: %s.",
+		 rx_mode.info, tx_mode.info);
+}
+
 void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
 {
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
@@ -4217,6 +4233,7 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
 		eth_dev->tx_pkt_burst = hns3_get_tx_function(eth_dev, &prep);
 		eth_dev->tx_pkt_prepare = prep;
 		eth_dev->tx_descriptor_status = hns3_dev_tx_descriptor_status;
+		hns3_trace_rxtx_function(eth_dev);
 	} else {
 		eth_dev->rx_pkt_burst = hns3_dummy_rxtx_burst;
 		eth_dev->tx_pkt_burst = hns3_dummy_rxtx_burst;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function
  2021-04-09 10:26 [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function Min Hu (Connor)
@ 2021-04-13  8:36 ` Ferruh Yigit
  2021-04-13  9:03   ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2021-04-13  8:36 UTC (permalink / raw)
  To: Min Hu (Connor), dev

On 4/9/2021 11:26 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> This patch adds debug info for Rx/Tx burst function which was choosing.
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function
  2021-04-13  8:36 ` Ferruh Yigit
@ 2021-04-13  9:03   ` David Marchand
  2021-04-13  9:13     ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2021-04-13  9:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Min Hu (Connor), dev

On Tue, Apr 13, 2021 at 10:37 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 4/9/2021 11:26 AM, Min Hu (Connor) wrote:
> > From: Chengwen Feng <fengchengwen@huawei.com>
> >
> > This patch adds debug info for Rx/Tx burst function which was choosing.
> >
> > Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> > Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>
> Applied to dpdk-next-net/main, thanks.

Can we avoid mentioning "trace" in the title?
This is to avoid confusion with rte_trace.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function
  2021-04-13  9:03   ` David Marchand
@ 2021-04-13  9:13     ` Ferruh Yigit
  2021-04-13 11:42       ` Min Hu (Connor)
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2021-04-13  9:13 UTC (permalink / raw)
  To: David Marchand; +Cc: Min Hu (Connor), dev

On 4/13/2021 10:03 AM, David Marchand wrote:
> On Tue, Apr 13, 2021 at 10:37 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 4/9/2021 11:26 AM, Min Hu (Connor) wrote:
>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>>
>>> This patch adds debug info for Rx/Tx burst function which was choosing.
>>>
>>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>>
>> Applied to dpdk-next-net/main, thanks.
> 
> Can we avoid mentioning "trace" in the title?
> This is to avoid confusion with rte_trace.
> 

Indeed, I also though if it is adding rte_trace support when I first see the 
title, I will update it to:
"net/hns3: log selected datapath"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function
  2021-04-13  9:13     ` Ferruh Yigit
@ 2021-04-13 11:42       ` Min Hu (Connor)
  0 siblings, 0 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-04-13 11:42 UTC (permalink / raw)
  To: Ferruh Yigit, David Marchand; +Cc: dev



在 2021/4/13 17:13, Ferruh Yigit 写道:
> On 4/13/2021 10:03 AM, David Marchand wrote:
>> On Tue, Apr 13, 2021 at 10:37 AM Ferruh Yigit <ferruh.yigit@intel.com> 
>> wrote:
>>>
>>> On 4/9/2021 11:26 AM, Min Hu (Connor) wrote:
>>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>>>
>>>> This patch adds debug info for Rx/Tx burst function which was choosing.
>>>>
>>>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>>>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>>>
>>> Applied to dpdk-next-net/main, thanks.
>>
>> Can we avoid mentioning "trace" in the title?
>> This is to avoid confusion with rte_trace.
>>
> 
> Indeed, I also though if it is adding rte_trace support when I first see 
> the title, I will update it to:
> "net/hns3: log selected datapath"
OK, thanks Ferruh and David.
> .

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-13 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 10:26 [dpdk-dev] [PATCH] net/hns3: support trace Rx/Tx burst function Min Hu (Connor)
2021-04-13  8:36 ` Ferruh Yigit
2021-04-13  9:03   ` David Marchand
2021-04-13  9:13     ` Ferruh Yigit
2021-04-13 11:42       ` Min Hu (Connor)

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git