aboutsummaryrefslogtreecommitdiffstats
path: root/examples/l4fwd/lcore.h
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-06-03 17:38:38 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-06-03 17:38:38 +0000
commita32eaa3d00beef6bb81e2aadc2088e9a937d1fd0 (patch)
tree29c5c0daf2e9905578aa0e6732b2de4a68086e6f /examples/l4fwd/lcore.h
parent267cf19de5077e395cc05918159a93e63e8c4a11 (diff)
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 <konstantin.ananyev@intel.com> Change-Id: I32521422e0372d79c4b2781dd6fc9740e4ca93ab
Diffstat (limited to 'examples/l4fwd/lcore.h')
-rw-r--r--examples/l4fwd/lcore.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/l4fwd/lcore.h b/examples/l4fwd/lcore.h
index ac2fbbd..8d69c4f 100644
--- a/examples/l4fwd/lcore.h
+++ b/examples/l4fwd/lcore.h
@@ -24,8 +24,8 @@
* IPv4 destination lookup callback.
*/
static int
-lpm4_dst_lookup(void *data, const struct in_addr *addr,
- struct tle_dest *res)
+lpm4_dst_lookup(void *data, __rte_unused uint64_t sdata,
+ const struct in_addr *addr, struct tle_dest *res)
{
int32_t rc;
uint32_t idx;
@@ -47,8 +47,8 @@ lpm4_dst_lookup(void *data, const struct in_addr *addr,
* IPv6 destination lookup callback.
*/
static int
-lpm6_dst_lookup(void *data, const struct in6_addr *addr,
- struct tle_dest *res)
+lpm6_dst_lookup(void *data, __rte_unused uint64_t sdata,
+ const struct in6_addr *addr, struct tle_dest *res)
{
int32_t rc;
dpdk_lpm6_idx_t idx;