samples/bpf: Check detach prog exist or not in xdp_fwd
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 6 Jun 2022 00:54:25 +0000 (08:54 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 16 Jun 2022 00:26:20 +0000 (17:26 -0700)
commitde5bb43826dd5326ade7158fc45bca0b9c0d927d
treed0e3c3c3590388de6e8ddf9f10f20dca6efc9adc
parent3831cd1f9ff627734096f22d8e37f72a5cabf92e
samples/bpf: Check detach prog exist or not in xdp_fwd

Before detach the prog, we should check detach prog exist or not.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20220606005425.261967-1-shaozhengchao@huawei.com
samples/bpf/xdp_fwd_user.c