patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v4 4/7] app/flow-perf: fix report total stats for masked ports
       [not found] ` <20210314095427.10101-1-wisamm@nvidia.com>
@ 2021-03-14  9:54   ` Wisam Jaddo
  2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 5/7] app/flow-perf: fix the incremental IPv6 src set Wisam Jaddo
  2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 7/7] app/flow-perf: fix setting decap data for decap actions Wisam Jaddo
  2 siblings, 0 replies; 3+ messages in thread
From: Wisam Jaddo @ 2021-03-14  9:54 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>
Acked-by: Alexander Kozyrev <akozyrev@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] 3+ messages in thread

* [dpdk-stable] [PATCH v4 5/7] app/flow-perf: fix the incremental IPv6 src set
       [not found] ` <20210314095427.10101-1-wisamm@nvidia.com>
  2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 4/7] app/flow-perf: fix report total stats for masked ports Wisam Jaddo
@ 2021-03-14  9:54   ` Wisam Jaddo
  2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 7/7] app/flow-perf: fix setting decap data for decap actions Wisam Jaddo
  2 siblings, 0 replies; 3+ messages in thread
From: Wisam Jaddo @ 2021-03-14  9:54 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>
Acked-by: Alexander Kozyrev <akozyrev@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] 3+ messages in thread

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

When using decap actions it's been set to the data to decap
into the encap_data instead of decap_data, as a results we end
up with bad encap and decap data in many cases.

Fixes: 0c8f1f4ab90e ("app/flow-perf: support raw encap/decap actions")
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 app/test-flow-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index d33b00a89e..97a4d4ac63 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -730,7 +730,7 @@ args_parse(int argc, char **argv)
 					for (i = 0; i < RTE_DIM(flow_options); i++) {
 						if (strcmp(flow_options[i].str, token) == 0) {
 							printf("%s,", token);
-							encap_data |= flow_options[i].mask;
+							decap_data |= flow_options[i].mask;
 							break;
 						}
 						/* Reached last item with no match */
-- 
2.17.1


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210310135546.8680-2-wisamm@nvidia.com>
     [not found] ` <20210314095427.10101-1-wisamm@nvidia.com>
2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 4/7] app/flow-perf: fix report total stats for masked ports Wisam Jaddo
2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 5/7] app/flow-perf: fix the incremental IPv6 src set Wisam Jaddo
2021-03-14  9:54   ` [dpdk-stable] [PATCH v4 7/7] app/flow-perf: fix setting decap data for decap actions 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).