From a32eaa3d00beef6bb81e2aadc2088e9a937d1fd0 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Thu, 3 Jun 2021 17:38:38 +0000 Subject: l4p: add ability to assign user-data to the stream Add ability for the user to assign user provided data to the stream. Right now this user provided 64-bit value is passed as a parameter for lookup4/lookup6 callbacks. Another change: change interpretation of lookup4()/lookup6() return value: < 0: error code (existing behaviour). == 0: success, TLDK will update L3 header src/dst addresses based on tldk dev values (existing behaviour). > 0: success, TLDK will not update L3 header src/dst addresses, will rely on user provided values. Signed-off-by: Konstantin Ananyev Change-Id: I32521422e0372d79c4b2781dd6fc9740e4ca93ab --- test/gtest/test_tle_udp_stream_gen.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/gtest/test_tle_udp_stream_gen.h') diff --git a/test/gtest/test_tle_udp_stream_gen.h b/test/gtest/test_tle_udp_stream_gen.h index 8476375..855980c 100644 --- a/test/gtest/test_tle_udp_stream_gen.h +++ b/test/gtest/test_tle_udp_stream_gen.h @@ -62,7 +62,8 @@ extern struct rte_mempool *mbuf_pool; /* Dummy lookup functions, TX operations are not performed in these tests */ static int -lookup4_function(void *opaque, const struct in_addr *addr, struct tle_dest *res) +lookup4_function(void *opaque, __rte_unused uint64_t sdata, + const struct in_addr *addr, struct tle_dest *res) { struct in_addr route; struct rte_ether_hdr *eth; @@ -98,8 +99,8 @@ lookup4_function(void *opaque, const struct in_addr *addr, struct tle_dest *res) } static int -lookup6_function(void *opaque, const struct in6_addr *addr, - struct tle_dest *res) +lookup6_function(void *opaque, __rte_unused uint64_t sdata, + const struct in6_addr *addr, struct tle_dest *res) { struct rte_ether_hdr *eth; struct rte_ipv6_hdr *ip6h; -- cgit 1.2.3-korg