[PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure

Leon Hwang posted 2 patches 2 years, 6 months ago
There is a newer version of this series
include/trace/events/xdp.h                    | 17 +++++
net/core/dev.c                                |  5 +-
.../selftests/bpf/prog_tests/xdp_attach.c     | 65 +++++++++++++++++++
.../bpf/progs/test_xdp_attach_fail.c          | 54 +++++++++++++++
4 files changed, 140 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_attach_fail.c
[PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure
Posted by Leon Hwang 2 years, 6 months ago
This series introduces a new tracepoint in bpf_xdp_link_attach(). By
this tracepoint, error message will be captured when error happens in
dev_xdp_attach(), e.g. invalid attaching flags.

v3 -> v4:
* Fix selftest-crashed issue.

Leon Hwang (2):
  bpf, xdp: Add tracepoint to xdp attaching failure
  selftests/bpf: Add testcase for xdp attaching failure tracepoint

 include/trace/events/xdp.h                    | 17 +++++
 net/core/dev.c                                |  5 +-
 .../selftests/bpf/prog_tests/xdp_attach.c     | 65 +++++++++++++++++++
 .../bpf/progs/test_xdp_attach_fail.c          | 54 +++++++++++++++
 4 files changed, 140 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_attach_fail.c


base-commit: a33d978500acd8fb67efac9773ba0a8502c1ff06
-- 
2.41.0
Re: [PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure
Posted by Manjusaka 2 years, 6 months ago
This patch is very important to help us to debug the xdp program. At
the same time, we can make some monitoring tools to observe the kernel
status by using this trace event

李者璈 & Zheaoli

Email: lizheao940510@gmail.com
Github: https://github.com/Zheaoli


Leon Hwang <hffilwlqm@gmail.com> 于2023年7月30日周日 19:50写道:
>
> This series introduces a new tracepoint in bpf_xdp_link_attach(). By
> this tracepoint, error message will be captured when error happens in
> dev_xdp_attach(), e.g. invalid attaching flags.
>
> v3 -> v4:
> * Fix selftest-crashed issue.
>
> Leon Hwang (2):
>   bpf, xdp: Add tracepoint to xdp attaching failure
>   selftests/bpf: Add testcase for xdp attaching failure tracepoint
>
>  include/trace/events/xdp.h                    | 17 +++++
>  net/core/dev.c                                |  5 +-
>  .../selftests/bpf/prog_tests/xdp_attach.c     | 65 +++++++++++++++++++
>  .../bpf/progs/test_xdp_attach_fail.c          | 54 +++++++++++++++
>  4 files changed, 140 insertions(+), 1 deletion(-)
>  create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_attach_fail.c
>
>
> base-commit: a33d978500acd8fb67efac9773ba0a8502c1ff06
> --
> 2.41.0
>
>
Re: [PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure
Posted by Leon Hwang 2 years, 6 months ago

On 2023/7/30 21:49, Manjusaka wrote:
> This patch is very important to help us to debug the xdp program. At
> the same time, we can make some monitoring tools to observe the kernel
> status by using this trace event
> 
> 李者璈 & Zheaoli
> 
> Email: lizheao940510@gmail.com
> Github: https://github.com/Zheaoli
> 

Thank you for your feedback.

I'm glad that it's helpful for you.

Thanks,
Leon