From: David Miller Subject: Re: [PATCH net] net: thunderx: set xdp_prog to NULL if bpf_prog_add fails Date: Thu, 22 Nov 2018 11:41:09 -0800 (PST) Message-ID: <20181122.114109.76000898595879800.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Sunil.Goutham@cavium.com To: lorenzo.bianconi@redhat.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:39066 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731412AbeKWGV6 (ORCPT ); Fri, 23 Nov 2018 01:21:58 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 report the error code to userspace if nicvf_xdp_setup fails > > Fixes: 05c773f52b96 ("net: thunderx: Add basic XDP support") > Signed-off-by: Lorenzo Bianconi Applied and queued up for -stable.