bpftool: Refactor xdp attach/detach type judgment
authorTao Chen <chen.dylane@gmail.com>
Sun, 21 Jul 2024 14:33:50 +0000 (22:33 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 29 Jul 2024 19:53:50 +0000 (12:53 -0700)
commitb7264f87f76c59698c7fd019a8797378fa17e7e3
treee52cb3aca5b5f7d9dd15ed62b2d5f9cc8a0cd9a3
parent81a0b95432c4fe605955939d8c36ad233c61293d
bpftool: Refactor xdp attach/detach type judgment

This commit no logical changed, just increases code readability and
facilitates TCX prog expansion, which will be implemented in the next
patch.

Signed-off-by: Tao Chen <chen.dylane@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240721143353.95980-2-chen.dylane@gmail.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tools/bpf/bpftool/net.c