patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 4/5] app/flow-perf: fix report total stats for masked ports
       [not found] <20210307091202.586-1-wisamm@nvidia.com>
@ 2021-03-07  9:12 ` Wisam Jaddo
  2021-03-07  9:12 ` [dpdk-stable] [PATCH 5/5] app/flow-perf: fix the incremental IPv6 src set Wisam Jaddo
  1 sibling, 0 replies; 2+ messages in thread
From: Wisam Jaddo @ 2021-03-07  9:12 UTC (permalink / raw)
  To: arybchenko, thomas, akozyrev, rasland, dev; +Cc: dongzhou, stable

Take into consideration that the user may call portmask for
any run, thus the app should always check if port is needed
to collect and report or not.

Fixes: 070316d01d3e ("app/flow-perf: add multi-core rule insertion and deletion")
Fixes: d8099d7ecbd0 ("app/flow-perf: split dump functions")
Cc: dongzhou@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
---
 app/test-flow-perf/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 01607881df..e32714131c 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -1437,6 +1437,9 @@ run_rte_flow_handler_cores(void *data __rte_unused)
 	rte_eal_mp_wait_lcore();
 
 	RTE_ETH_FOREACH_DEV(port) {
+		/* If port outside portmask */
+		if (!((ports_mask >> port) & 0x1))
+			continue;
 		if (has_meter())
 			dump_used_cpu_time("Meters:",
 				port, &mc_pool.meters_record);
-- 
2.17.1


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

* [dpdk-stable] [PATCH 5/5] app/flow-perf: fix the incremental IPv6 src set
       [not found] <20210307091202.586-1-wisamm@nvidia.com>
  2021-03-07  9:12 ` [dpdk-stable] [PATCH 4/5] app/flow-perf: fix report total stats for masked ports Wisam Jaddo
@ 2021-03-07  9:12 ` Wisam Jaddo
  1 sibling, 0 replies; 2+ messages in thread
From: Wisam Jaddo @ 2021-03-07  9:12 UTC (permalink / raw)
  To: arybchenko, thomas, akozyrev, rasland, dev; +Cc: wisamm, stable

Currently the memset() will not set a correct src ip that represent
the incremental value of the counter.

This commit will fix this and each flow will have correct IPv6.src
that it's incremental from previous flow and equal to the decimal
values.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: wisamm@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
---
 app/test-flow-perf/items_gen.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c
index ccebc08b39..a73de9031f 100644
--- a/app/test-flow-perf/items_gen.c
+++ b/app/test-flow-perf/items_gen.c
@@ -72,14 +72,15 @@ add_ipv6(struct rte_flow_item *items,
 	static struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE] __rte_cache_aligned;
 	static struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE] __rte_cache_aligned;
 	uint8_t ti = para.core_idx;
+	uint8_t i;
 
 	/** Set ipv6 src **/
-	memset(&ipv6_specs[ti].hdr.src_addr, para.src_ip,
-		sizeof(ipv6_specs->hdr.src_addr) / 2);
-
-	/** Full mask **/
-	memset(&ipv6_masks[ti].hdr.src_addr, 0xff,
-		sizeof(ipv6_specs->hdr.src_addr));
+	for (i = 0; i < 16; i++) {
+		/* Currently src_ip is limited to 32 bit */
+		if (i < 4)
+			ipv6_specs[ti].hdr.src_addr[15 - i] = para.src_ip >> (i * 8);
+		ipv6_masks[ti].hdr.src_addr[15 - i] = 0xff;
+	}
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_IPV6;
 	items[items_counter].spec = &ipv6_specs[ti];
-- 
2.17.1


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

end of thread, other threads:[~2021-03-07  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210307091202.586-1-wisamm@nvidia.com>
2021-03-07  9:12 ` [dpdk-stable] [PATCH 4/5] app/flow-perf: fix report total stats for masked ports Wisam Jaddo
2021-03-07  9:12 ` [dpdk-stable] [PATCH 5/5] app/flow-perf: fix the incremental IPv6 src set Wisam Jaddo

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).