> -----Original Message-----
> From: Lorenzo Bianconi <lorenzo.bianc...@redhat.com>
> Sent: 20 November 2018 23:27
> To: netdev@vger.kernel.org
> Cc: Goutham, Sunil <sunil.gout...@cavium.com>
> Subject: net: thunderx: nicvf_xdp_setup error code path
>
> External Email
>
> Hi all,
>
> looking at thunderx XDP support I noticed that nic->xdp_prog pointer in
> nicvf_xdp_setup is not actually set to NULL if bpf_prog_add fails but it
> is initialized with bpf_prog_add error code. xdp_prog pointer value is used in
> the driver to verify if XDP is currently enabled.
> Moreover nicvf_xdp_setup does not report to the userspace any error code in
> case of failure.
> I wrote the following patch to fix the reported issues. Please note I just
> compiled it, not actually tested since I have no thunderx nic at the moment.
>
> @Sunil: could you please give it a whirl? If it is ok I will post a formal
> patch, thanks
>
> Regards,
> Lorenzo
>
Thanks for fixing, changes look good to me,
Sunil.