samples: bpf: Do not unload prog within xdpsock
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 29 Mar 2021 22:43:06 +0000 (00:43 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Mar 2021 16:24:39 +0000 (09:24 -0700)
commitc9d27c9e8dc7ccced65007a4d5d3640cad42adfc
tree63b4ee169b18673ae9de82e0a481f3b5e9cf1f6f
parent10397994d30f2de51bfd9321ed9ddb789464f572
samples: bpf: Do not unload prog within xdpsock

With the introduction of bpf_link in xsk's libbpf part, there's no
further need for explicit unload of prog on xdpsock's termination. When
process dies, the bpf_link's refcount will be decremented and resources
will be unloaded/freed under the hood in case when there are no more
active users.

While at it, don't dump stats on error path.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210329224316.17793-8-maciej.fijalkowski@intel.com
samples/bpf/xdpsock_user.c