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 --- app/nginx/src/tldk/be.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/nginx/src/tldk/be.c') diff --git a/app/nginx/src/tldk/be.c b/app/nginx/src/tldk/be.c index b226c26..1309aa4 100644 --- a/app/nginx/src/tldk/be.c +++ b/app/nginx/src/tldk/be.c @@ -122,8 +122,8 @@ be_lcore_lpm_init(struct tldk_ctx *tcx, uint32_t sid, } int -be_lpm4_dst_lookup(void *data, const struct in_addr *addr, - struct tle_dest *res) +be_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; @@ -142,8 +142,8 @@ be_lpm4_dst_lookup(void *data, const struct in_addr *addr, } int -be_lpm6_dst_lookup(void *data, const struct in6_addr *addr, - struct tle_dest *res) +be_lpm6_dst_lookup(void *data, __rte_unused uint64_t sdata, + const struct in6_addr *addr, struct tle_dest *res) { int32_t rc; struct tldk_ctx *tcx; -- cgit 1.2.3-korg