From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: net: thunderx: nicvf_xdp_setup error code path Date: Wed, 21 Nov 2018 16:18:46 -0800 (PST) Message-ID: <20181121.161846.32682644237371562.davem@davemloft.net> References: <20181120175635.GA21691@localhost.localdomain> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, sgoutham@cavium.com To: lorenzo.bianconi@redhat.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:48436 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726711AbeKVKz3 (ORCPT ); Thu, 22 Nov 2018 05:55:29 -0500 In-Reply-To: <20181120175635.GA21691@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: From: Lorenzo Bianconi Date: Tue, 20 Nov 2018 18:56:36 +0100 > 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 Sunil did review this, so please resubmit formally.