From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lucero Subject: Re: [PATCH] nfp: avoiding concurrency when hardware reconfig Date: Tue, 3 May 2016 12:14:26 +0100 Message-ID: References: <1461672855-44715-1-git-send-email-alejandro.lucero@netronome.com> <20160503110148.GC20328@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev To: Bruce Richardson Return-path: Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by dpdk.org (Postfix) with ESMTP id 57E4C2BE6 for ; Tue, 3 May 2016 13:14:27 +0200 (CEST) Received: by mail-vk0-f51.google.com with SMTP id m188so18780337vka.1 for ; Tue, 03 May 2016 04:14:27 -0700 (PDT) In-Reply-To: <20160503110148.GC20328@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Bruce, Sorry about this. I sent a v2 for this patch but not in the same thread: http://www.dpdk.org/ml/archives/dev/2016-April/037996.html On Tue, May 3, 2016 at 12:01 PM, Bruce Richardson < bruce.richardson@intel.com> wrote: > On Tue, Apr 26, 2016 at 01:14:15PM +0100, Alejandro Lucero wrote: > > Some apps calling some functions from different threads at the > > same time could lead to reconfig problems. Reconfig mechanism is > > based on a hardware queue where incrementing a counter signals the > > firmware to do the reconfig. If there are two increments before the > > first one has been processed the firmware will stop and a device > > reset is necessary. > > > > Signed-off-by: Alejandro Lucero > > --- > > drivers/net/nfp/nfp_net.c | 8 ++++++++ > > drivers/net/nfp/nfp_net_pmd.h | 1 + > > 2 files changed, 9 insertions(+) > > > > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c > > index bc0a3d8..ba0ee04 100644 > > --- a/drivers/net/nfp/nfp_net.c > > +++ b/drivers/net/nfp/nfp_net.c > > @@ -58,6 +58,7 @@ > > #include "nfp_net_pmd.h" > > #include "nfp_net_logs.h" > > #include "nfp_net_ctrl.h" > > +#include > > Hi Alejandro, > > I think this header addition is in the wrong place in the code. When I > apply > this patch to next-net and try a recompile I get the error: > > CC nfp_net.o > In file included from > /home/bruce/next-net/dpdk-next-net/drivers/net/nfp/nfp_net.c:58:0: > /home/bruce/next-net/dpdk-next-net/drivers/net/nfp/nfp_net_pmd.h:409:2: > error: unknown type name =E2=80=98rte_spinlock_t=E2=80=99 > rte_spinlock_t reconfig_lock; > ^ > > You either need to put the spinlock include before the nfp_net_pmd.h > include > or, perhaps better, put the spinlock include inside the nfp_net_pmd heade= r > file > since that is where the spinlock variable is being defined. > > /Bruce > >