RE: [EXT] [PATCH v8] app/dma-perf: introduce dma-perf application
Hi Anoob, Replies are inline. Thanks, Cheng > -Original Message- > From: Anoob Joseph > Sent: Friday, June 23, 2023 2:53 PM > To: Jiang, Cheng1 ; tho...@monjalon.net; > Richardson, Bruce ; > m...@smartsharesystems.com; Xia, Chenbo ; Amit > Prakash Shukla ; huangdeng...@huawei.com; > Laatz, Kevin ; fengcheng...@huawei.com; Jerin > Jacob Kollanukkaran > Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan > ; Ma, WenwuX ; Wang, > YuanX ; He, Xingguang ; > Ling, WeiX > Subject: RE: [EXT] [PATCH v8] app/dma-perf: introduce dma-perf application > > Hi Cheng, > > Thanks for the new version. Please see inline. > > Thanks, > Anoob > > > -Original Message- > > From: Cheng Jiang > > Sent: Tuesday, June 20, 2023 12:24 PM > > To: tho...@monjalon.net; bruce.richard...@intel.com; > > m...@smartsharesystems.com; chenbo@intel.com; Amit Prakash Shukla > > ; Anoob Joseph ; > > huangdeng...@huawei.com; kevin.la...@intel.com; > > fengcheng...@huawei.com; Jerin Jacob Kollanukkaran > > > > Cc: dev@dpdk.org; jiayu...@intel.com; xuan.d...@intel.com; > > wenwux...@intel.com; yuanx.w...@intel.com; xingguang...@intel.com; > > weix.l...@intel.com; Cheng Jiang > > Subject: [EXT] [PATCH v8] app/dma-perf: introduce dma-perf application > > > > External Email > > > > -- > > There are many high-performance DMA devices supported in DPDK now, > and > > these DMA devices can also be integrated into other modules of DPDK as > > accelerators, such as Vhost. Before integrating DMA into applications, > > developers need to know the performance of these DMA devices in > > various scenarios and the performance of CPUs in the same scenario, > > such as different buffer lengths. Only in this way can we know the > > target performance of the application accelerated by using them. This > > patch introduces a high-performance testing tool, which supports > > comparing the performance of CPU and DMA in different scenarios > > automatically with a pre- set config file. Memory Copy performance test > are supported for now. > > > > Signed-off-by: Cheng Jiang > > Signed-off-by: Jiayu Hu > > Signed-off-by: Yuan Wang > > Acked-by: Morten Brørup > > Acked-by: Chenbo Xia > > --- > > v8: > > fixed string copy issue in parse_lcore(); > > improved some data display format; > > added doc in doc/guides/tools; > > updated release notes; > > > > v7: > > fixed some strcpy issues; > > removed cache setup in calling rte_pktmbuf_pool_create(); > > fixed some typos; > > added some memory free and null set operations; > > improved result calculation; > > v6: > > improved code based on Anoob's comments; > > fixed some code structure issues; > > v5: > > fixed some LONG_LINE warnings; > > v4: > > fixed inaccuracy of the memory footprint display; > > v3: > > fixed some typos; > > v2: > > added lcore/dmadev designation; > > added error case process; > > removed worker_threads parameter from config.ini; > > improved the logs; > > improved config file; > > > > app/meson.build| 1 + > > app/test-dma-perf/benchmark.c | 498 + > > app/test-dma-perf/config.ini | 61 +++ > > app/test-dma-perf/main.c | 594 + > > app/test-dma-perf/main.h | 69 +++ > > app/test-dma-perf/meson.build | 17 + > > doc/guides/rel_notes/release_23_07.rst | 6 + > > doc/guides/tools/dmaperf.rst | 103 + > > doc/guides/tools/index.rst | 1 + > > 9 files changed, 1350 insertions(+) > > create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 > > app/test-dma-perf/config.ini create mode 100644 app/test-dma- > > perf/main.c create mode 100644 app/test-dma-perf/main.h create mode > > 100644 app/test-dma-perf/meson.build create mode 100644 > > doc/guides/tools/dmaperf.rst > > > > > > > +/* Configuration of device. */ > > +static void > > +configure_dmadev_queue(uint32_t dev_id, uint32_t ring_size) { > > + uint16_t vchan = 0; > > + struct rte_dma_info info; > > + struct rte_dma_conf dev_config = { .nb_vchans = 1 }; > > + struct rte_dma_vchan_conf qconf = { > > + .direction = RTE_DMA_DIR_MEM_TO_MEM, > > + .nb_desc = ring_size > > + }; > > + > > + if (rte_dma_configure(dev_id, &dev_config) != 0) > > + rte_exit(EXIT_FAILURE, "Error with dma configure.\n"); > > + > > + if (rte_dma_vchan_setup(dev_id, vchan, &qconf) != 0) > > + rte_exit(EXIT_FAILURE, "Error with queue configuration.\n"); > > + > > + rte_dma_info_get(dev_id, &info); > > [Anoob] This API can return errors. Better to add handling. [Cheng] Sure, I'll fix it in the next version. > > > + if (info.nb_vchans != 1) > > + rte_exit(EXIT_FAILURE, "Error, no configured queues > > reported on device id. %u\n", > > + dev_id); > > + > > + if (rte_dma_start(dev_id) !=
Re: [PATCH v3 0/2] enhance bonding PMD to support the LACP negotiation
Hi, Ferruh, 在 2023/6/23 21:32, Ferruh Yigit 写道: On 6/7/2023 4:10 AM, Chaoyong He wrote: On 6/6/2023 2:23 AM, Chaoyong He wrote: A gentle ping on this series. ... Long Wu (2): net/bonding: add independent LACP sending function app/testpmd: add support for bonding port's LACP negotiation app/test-pmd/config.c | 19 app/test-pmd/parameters.c | 4 ++ app/test-pmd/testpmd.c| 37 +++ app/test-pmd/testpmd.h| 4 ++ doc/guides/testpmd_app_ug/run_app.rst | 4 ++ drivers/net/bonding/rte_eth_bond_8023ad.c | 58 +++ drivers/net/bonding/rte_eth_bond_8023ad.h | 21 drivers/net/bonding/version.map | 8 8 files changed, 155 insertions(+) -- 2.39.1 Hi Chaoyong, Sorry for the delay, bonding maintainers are cc'ed. I can see this set adds new bonding specific APIs, instead can't application (in this case testpmd) call bonding Tx function explicitly to handle LACP packets? Actually, I think apps should not aware of LACP packets because these packets are stored by bonding pmd(port->tx_ring). Or should we have a special forwarding mode for bonding, as we have one for ICMP echo? Yes, both ICMP and LACP are protocol. But LACP is related to a type of port (bonding port in mode4). Of course, we can add a special forwarding mode for bonding, but that will make it valid in very narrow situation. What I really want is to support mode4 bonding port on every forward mode of testpmd, and I also want to treat dpdk bonding port as a regular NIC. It makes sense to make bonding work as regular NIC and supported by all forwarding modes. But current patch adds bonding specific check to the shared forwarding function, that is not good I think. If application doesn't need to know about LACP packages, or if there is no decision making required by application, can we handle LACP packets within bonding PMD, transparent to application? Chas, Connor, what do you think? Agree with you, Currently testpmd is too "big" to add specific check. Also, private APIs should be restricted to add because we want to make bonding device as a regular NIC device.
RE: [PATCH] net/ice: revert mark action in switch filter
> -Original Message- > From: Zeng, ZhichaoX > Sent: Wednesday, June 21, 2023 5:41 PM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Zeng, ZhichaoX > ; Yang, Qiming ; Yan, > Zhirun > Subject: [PATCH] net/ice: revert mark action in switch filter > > This implementation has some problem, the function did not work properly, > and it broke the mark action in FDir filter, so revert this commit. > Hi Zhichao, Actually, I think it is better to describe a functional impact in commit message. It could make it easier to understand the issue. It could be: Revert this part to disable mark action in switch and recover the mark action hit in FDIR by default. For current impl, switch filter missed the consumption part of mark id for app. And switch filter capture the rules first rather than FDIR which makes FDIR rules lost. Does it sound OK to you? > Fixes: e24f43f2c824 ("net/ice: support flow mark action in switch") > Signed-off-by: Zhichao Zeng > --- > drivers/net/ice/ice_switch_filter.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/drivers/net/ice/ice_switch_filter.c > b/drivers/net/ice/ice_switch_filter.c > index 1ff4b1afda..110d8895fe 100644 > --- a/drivers/net/ice/ice_switch_filter.c > +++ b/drivers/net/ice/ice_switch_filter.c > @@ -1715,7 +1715,6 @@ ice_switch_parse_action(struct ice_pf *pf, > struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data; > const struct rte_flow_action_queue *act_q; > const struct rte_flow_action_rss *act_qgrop; > - const struct rte_flow_action_mark *act_mark; > uint16_t base_queue, i; > const struct rte_flow_action *action; > enum rte_flow_action_type action_type; @@ -1768,13 +1767,6 @@ > ice_switch_parse_action(struct ice_pf *pf, > ICE_DROP_PACKET; > break; > > - case RTE_FLOW_ACTION_TYPE_MARK: > - act_mark = action->conf; > - rule_info->sw_act.fltr_act = > - ICE_SET_MARK; > - rule_info->sw_act.markid = act_mark->id; > - break; > - > case RTE_FLOW_ACTION_TYPE_VOID: > break; > > @@ -1830,7 +1822,6 @@ ice_switch_check_action(const struct > rte_flow_action *actions, > case RTE_FLOW_ACTION_TYPE_RSS: > case RTE_FLOW_ACTION_TYPE_QUEUE: > case RTE_FLOW_ACTION_TYPE_DROP: > - case RTE_FLOW_ACTION_TYPE_MARK: > case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT: > case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR: > actions_num++; > -- > 2.34.1
RE: [PATCH] net/ice: revert mark action in switch filter
Hi Zhirun, > -Original Message- > From: Yan, Zhirun > Sent: Sunday, June 25, 2023 10:20 AM > To: Zeng, ZhichaoX ; dev@dpdk.org > Cc: Zhang, Qi Z ; Yang, Qiming > > Subject: RE: [PATCH] net/ice: revert mark action in switch filter > > > > > -Original Message- > > From: Zeng, ZhichaoX > > Sent: Wednesday, June 21, 2023 5:41 PM > > To: dev@dpdk.org > > Cc: Zhang, Qi Z ; Zeng, ZhichaoX > > ; Yang, Qiming ; Yan, > > Zhirun > > Subject: [PATCH] net/ice: revert mark action in switch filter > > > > This implementation has some problem, the function did not work > > properly, and it broke the mark action in FDir filter, so revert this > > commit. > > > Hi Zhichao, > > Actually, I think it is better to describe a functional impact in commit > message. > It could make it easier to understand the issue. > > It could be: > Revert this part to disable mark action in switch and recover the mark action > hit in FDIR by default. For current impl, switch filter missed the consumption > part of mark id for app. > And switch filter capture the rules first rather than FDIR which makes FDIR > rules lost. > > Does it sound OK to you? > Thanks for your comments, I will submit v2 with detailed commit log as your advice. > > Fixes: e24f43f2c824 ("net/ice: support flow mark action in switch") > > Signed-off-by: Zhichao Zeng > > --- > > drivers/net/ice/ice_switch_filter.c | 9 - > > 1 file changed, 9 deletions(-) > > > > diff --git a/drivers/net/ice/ice_switch_filter.c > > b/drivers/net/ice/ice_switch_filter.c > > index 1ff4b1afda..110d8895fe 100644 > > --- a/drivers/net/ice/ice_switch_filter.c > > +++ b/drivers/net/ice/ice_switch_filter.c > > @@ -1715,7 +1715,6 @@ ice_switch_parse_action(struct ice_pf *pf, > > struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data; > > const struct rte_flow_action_queue *act_q; > > const struct rte_flow_action_rss *act_qgrop; > > - const struct rte_flow_action_mark *act_mark; > > uint16_t base_queue, i; > > const struct rte_flow_action *action; > > enum rte_flow_action_type action_type; @@ -1768,13 +1767,6 @@ > > ice_switch_parse_action(struct ice_pf *pf, > > ICE_DROP_PACKET; > > break; > > > > - case RTE_FLOW_ACTION_TYPE_MARK: > > - act_mark = action->conf; > > - rule_info->sw_act.fltr_act = > > - ICE_SET_MARK; > > - rule_info->sw_act.markid = act_mark->id; > > - break; > > - > > case RTE_FLOW_ACTION_TYPE_VOID: > > break; > > > > @@ -1830,7 +1822,6 @@ ice_switch_check_action(const struct > > rte_flow_action *actions, > > case RTE_FLOW_ACTION_TYPE_RSS: > > case RTE_FLOW_ACTION_TYPE_QUEUE: > > case RTE_FLOW_ACTION_TYPE_DROP: > > - case RTE_FLOW_ACTION_TYPE_MARK: > > case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT: > > case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR: > > actions_num++; > > -- > > 2.34.1
[PATCH v2] net/ice: revert mark action in switch filter
For current implementation, switch filter missed the consumption part of mark id for app, and switch filter captures the rules first instead of FDIR, which makes the FDIR rules lost. Revert this commit to disable mark action in switch filter and recover the mark action hit in FDIR by default. Fixes: e24f43f2c824 ("net/ice: support flow mark action in switch") Signed-off-by: Zhichao Zeng --- drivers/net/ice/ice_switch_filter.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 1ff4b1afda..110d8895fe 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1715,7 +1715,6 @@ ice_switch_parse_action(struct ice_pf *pf, struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data; const struct rte_flow_action_queue *act_q; const struct rte_flow_action_rss *act_qgrop; - const struct rte_flow_action_mark *act_mark; uint16_t base_queue, i; const struct rte_flow_action *action; enum rte_flow_action_type action_type; @@ -1768,13 +1767,6 @@ ice_switch_parse_action(struct ice_pf *pf, ICE_DROP_PACKET; break; - case RTE_FLOW_ACTION_TYPE_MARK: - act_mark = action->conf; - rule_info->sw_act.fltr_act = - ICE_SET_MARK; - rule_info->sw_act.markid = act_mark->id; - break; - case RTE_FLOW_ACTION_TYPE_VOID: break; @@ -1830,7 +1822,6 @@ ice_switch_check_action(const struct rte_flow_action *actions, case RTE_FLOW_ACTION_TYPE_RSS: case RTE_FLOW_ACTION_TYPE_QUEUE: case RTE_FLOW_ACTION_TYPE_DROP: - case RTE_FLOW_ACTION_TYPE_MARK: case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT: case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR: actions_num++; -- 2.34.1
[PATCH v2] net/ice: revert mark action in switch filter
For current implementation, switch filter missed the consumption part of mark id for app, and switch filter captures the rules first instead of FDIR, which makes the FDIR rules lost. Revert this commit to disable mark action in switch filter and recover the mark action hit in FDIR by default. Fixes: e24f43f2c824 ("net/ice: support flow mark action in switch") Signed-off-by: Zhichao Zeng --- drivers/net/ice/ice_switch_filter.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 1ff4b1afda..110d8895fe 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1715,7 +1715,6 @@ ice_switch_parse_action(struct ice_pf *pf, struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data; const struct rte_flow_action_queue *act_q; const struct rte_flow_action_rss *act_qgrop; - const struct rte_flow_action_mark *act_mark; uint16_t base_queue, i; const struct rte_flow_action *action; enum rte_flow_action_type action_type; @@ -1768,13 +1767,6 @@ ice_switch_parse_action(struct ice_pf *pf, ICE_DROP_PACKET; break; - case RTE_FLOW_ACTION_TYPE_MARK: - act_mark = action->conf; - rule_info->sw_act.fltr_act = - ICE_SET_MARK; - rule_info->sw_act.markid = act_mark->id; - break; - case RTE_FLOW_ACTION_TYPE_VOID: break; @@ -1830,7 +1822,6 @@ ice_switch_check_action(const struct rte_flow_action *actions, case RTE_FLOW_ACTION_TYPE_RSS: case RTE_FLOW_ACTION_TYPE_QUEUE: case RTE_FLOW_ACTION_TYPE_DROP: - case RTE_FLOW_ACTION_TYPE_MARK: case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT: case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR: actions_num++; -- 2.34.1