[09/13] app/flow-perf: fix source ipv4 matching

Message ID 20200830111544.4190-10-wisamm@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/flow-perf: add support for new items/actions |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Wisam Jaddo Aug. 30, 2020, 11:15 a.m. UTC
  All value must be converted into intended endianness.

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

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

Patch

diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c
index cc031f24a5..8277ac70da 100644
--- a/app/test-flow-perf/items_gen.c
+++ b/app/test-flow-perf/items_gen.c
@@ -64,7 +64,7 @@  add_ipv4(struct rte_flow_item *items,
 	memset(&ipv4_spec, 0, sizeof(struct rte_flow_item_ipv4));
 	memset(&ipv4_mask, 0, sizeof(struct rte_flow_item_ipv4));
 
-	ipv4_spec.hdr.src_addr = para.src_ip;
+	ipv4_spec.hdr.src_addr = RTE_BE32(para.src_ip);
 	ipv4_mask.hdr.src_addr = RTE_BE32(0xffffffff);
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_IPV4;