Re: [PATCH net] net: thunderx: set xdp_prog to NULL if bpf_prog_add fails

2018-11-22 Thread David Miller
From: Lorenzo Bianconi Date: Wed, 21 Nov 2018 16:32:10 +0100 > Set xdp_prog pointer to NULL if bpf_prog_add fails since that routine > reports the error code instead of NULL in case of failure and xdp_prog > pointer value is used in the driver to verify if XDP is currently > enabled. > Moreover r

[PATCH net] net: thunderx: set xdp_prog to NULL if bpf_prog_add fails

2018-11-21 Thread Lorenzo Bianconi
Set xdp_prog pointer to NULL if bpf_prog_add fails since that routine reports the error code instead of NULL in case of failure and xdp_prog pointer value is used in the driver to verify if XDP is currently enabled. Moreover report the error code to userspace if nicvf_xdp_setup fails Fixes: 05c773