Skip to contentSkip to conversation

ebpf: fix swapped toeplitz/indirection args in set_data trace

PATCH In review yujun 2 participants 2 messages Jun 29 – Jul 7

lore
Share & tools
lore

yujun

author
#0 lore raw

PATCH 1/1 ebpf: fix swapped toeplitz/indirection args in set_data trace

trace_ebpf_rss_set_data() passes its third and fourth arguments to the toeplitz-ptr and indirection-ptr fields defined in trace-events. ebpf_rss_set_all() passed indirections_table and toeplitz_key in the opposite order, so tracing mislabeled the two pointers.

Match the argument order already used by trace_ebpf_rss_mmap().

Fixes f5cae19d10 ("ebpf: improve trace event coverage to all key operations")
---
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/ebpf_rss.c +1 -1
index 926392b3c5..6650d0daef 100644
@@ -270,7 +270,7 @@ bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
 
     ebpf_rss_set_toepliz_key(ctx, toeplitz_key);
 
-    trace_ebpf_rss_set_data(ctx, config, indirections_table, toeplitz_key);
+    trace_ebpf_rss_set_data(ctx, config, toeplitz_key, indirections_table);
 
     return true;
 }
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · yujun

trace_ebpf_rss_set_data() passes its third and fourth arguments to the toeplitz-ptr and indirection-ptr fields defined in trace-events. ebpf_rss_set_all() passed indirections_table and toeplitz_key in the opposite order, so tracing mislabeled the two pointers.

Quoted 7 lines

Match the argument order already used by trace_ebpf_rss_mmap().

Fixes f5cae19d10 ("ebpf: improve trace event coverage to all key operations")
---
  ebpf/ebpf_rss.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)