Skip to content

Commit

Permalink
ebpf: replace deprecated bpf_program__set_socket_filter
Browse files Browse the repository at this point in the history
bpf_program__set_<TYPE> functions have been deprecated since libbpf 0.8.
Replace with the equivalent bpf_program__set_type call to avoid a
deprecation warning.

Signed-off-by: Haochen Tong <i@hexchain.org>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
  • Loading branch information
hexchain authored and jasowang committed Jul 6, 2022
1 parent 034d00d commit a495eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ebpf/ebpf_rss.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool ebpf_rss_load(struct EBPFRSSContext *ctx)
goto error;
}

bpf_program__set_socket_filter(rss_bpf_ctx->progs.tun_rss_steering_prog);
bpf_program__set_type(rss_bpf_ctx->progs.tun_rss_steering_prog, BPF_PROG_TYPE_SOCKET_FILTER);

if (rss_bpf__load(rss_bpf_ctx)) {
trace_ebpf_error("eBPF RSS", "can not load RSS program");
Expand Down

0 comments on commit a495eba

Please sign in to comment.