Skip to content

Commit

Permalink
bpf: lb: remove redundant reset of key->backend_slot
Browse files Browse the repository at this point in the history
For better or worse, lb*_lookup_service() already does this for us.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
  • Loading branch information
julianwiedmann committed Jun 16, 2023
1 parent dc5c159 commit 5cb8a33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bpf/lib/lb.h
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ static __always_inline int lb6_local(const void *map, struct __ctx_buff *ctx,
*/
if (backend && !state->syn)
break;
key->backend_slot = 0;

svc = lb6_lookup_service(key, false, true);
if (!svc)
goto drop_no_service;
Expand Down Expand Up @@ -1607,7 +1607,7 @@ static __always_inline int lb4_local(const void *map, struct __ctx_buff *ctx,
*/
if (backend && !state->syn)
break;
key->backend_slot = 0;

svc = lb4_lookup_service(key, false, true);
if (!svc)
goto drop_no_service;
Expand Down

0 comments on commit 5cb8a33

Please sign in to comment.