From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 64E8D1BB1B for ; Fri, 13 Apr 2018 09:31:42 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id t67so3198792wmt.0 for ; Fri, 13 Apr 2018 00:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/IjzrBragAVfJcQDu3EIe4ZKdVX53f/dhnb9RvesvPI=; b=sRoXHvVbGcVKIODtumf0XRs1ND3LdXqKPT8hqpAxr7vJbzInkFc9I4CxOH5KU/JIqu kcuusMwPFSUANi1UAQEEzP8o/NRMTrCidCjfQi+x8amO21x1XnDn7ZNROg+3ZQ9RuxCD QqnOwwG+zpOpBkQ5/9dJrvNYVu/5gd2RK4sslYY2OvxrCBWKjem61mmPcqXaqDad0AOw JL+BwWLehsHD6m69lTKRAu2waXMoeFNCVuJjnhJR/Mt/NAxSwoNxKn+y0CSFazYgxnJJ UCVRFfjeucU7cvyHj2D4GBqqLFwchDoT/gbN+4kE6y1HkpFGLFdo6oYdJ81LJaXEMnqx vfFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/IjzrBragAVfJcQDu3EIe4ZKdVX53f/dhnb9RvesvPI=; b=WZQ55QiAwvD7++bwpdgkYiXxqH//q6ccvzaJjlNaXjjvRW6lACNOdCSonxjWV+ZBEU yQBBoPRPz17a6+iqPnT+63VtgtXViu/kGfiHDUSI9IRJyfyRoJ7ozzOAfTDqUi5rJYIB uaQhxY9rRGcwxNHuDLs+BLmI1F3mt2zSIoHjpqQI0P8WZfLIeInX8W0uKtmnqmzKv72g 74WDAKfqlQ23V4TyVGQ1G2AXKDerCz66AhEXkdf/fef1PfjAnWxzDo3GOG7oSwKUuouE ADEKuWw9X7vDuvJ7CtM0vN5TXK4UsdEtrsLq+1uxM6IxVsgtPH4Wj0ta90SyBTMTaThm rQWQ== X-Gm-Message-State: ALQs6tDheOYjn5J9Egax9z0TVZesnUU9qACrkcMoXlw8iJ6dRU7gjmiL OynpfWi56WI30L0RlVeuPn9NWKMIyuVs7QVyr6rjkA== X-Google-Smtp-Source: AIpwx4+d/swTKImff95tguspukNB6Wnv1boiFoa7GK8/Md5c+SLstPstsyWyba9WfR5LjnTF//ycbHiLgj9quKrDsMk= X-Received: by 10.80.173.196 with SMTP id b4mr19533239edd.168.1523604702205; Fri, 13 Apr 2018 00:31:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.203.69 with HTTP; Fri, 13 Apr 2018 00:31:41 -0700 (PDT) In-Reply-To: <20180412222208.11770-2-aconole@redhat.com> References: <20180412222208.11770-1-aconole@redhat.com> <20180412222208.11770-2-aconole@redhat.com> From: Alejandro Lucero Date: Fri, 13 Apr 2018 09:31:41 +0200 Message-ID: To: Aaron Conole Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC 1/2] nfp: unlink the appropriate lock file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2018 07:31:42 -0000 Although the patch is correct, the truth is there was not option for locks but "nfp0", because the PMD did not support more than one NFP card. After commit with CPP support, the PMD can support more than one NFP card, but this interface is not supported anymore and this file was removed. is this patch coming from some code revision or from a problem you found? On Fri, Apr 13, 2018 at 12:22 AM, Aaron Conole wrote: > The nfpu_close needs to unlink the lock file associated with the > nfp descriptor, not lock file 0. > > Fixes: d12206e00590 ("net/nfp: add NSP user space interface") > > Cc: stable@dpdk.org > Signed-off-by: Aaron Conole > --- > drivers/net/nfp/nfp_nfpu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/nfp/nfp_nfpu.c b/drivers/net/nfp/nfp_nfpu.c > index f11afef35..2ed985ff4 100644 > --- a/drivers/net/nfp/nfp_nfpu.c > +++ b/drivers/net/nfp/nfp_nfpu.c > @@ -101,8 +101,12 @@ nfpu_open(struct rte_pci_device *pci_dev, nfpu_desc_t > *desc, int nfp) > int > nfpu_close(nfpu_desc_t *desc) > { > + char lockname[30]; > + > rte_free(desc->nspu); > close(desc->lock); > - unlink("/var/lock/nfp0"); > + > + snprintf(lockname, sizeof(lockname), "/var/lock/nfp%d", desc->nfp); > + unlink(lockname); > return 0; > } > -- > 2.14.3 > >