app/flow-perf: fix IPv4 source matching
authorWisam Jaddo <wisamm@mellanox.com>
Sun, 30 Aug 2020 11:15:40 +0000 (11:15 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:11 +0000 (18:55 +0200)
All value must be converted into intended endianness.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
app/test-flow-perf/items_gen.c

index cc031f2..8277ac7 100644 (file)
@@ -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;