From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Conole Subject: [RFC 1/2] nfp: unlink the appropriate lock file Date: Thu, 12 Apr 2018 18:22:07 -0400 Message-ID: <20180412222208.11770-2-aconole@redhat.com> References: <20180412222208.11770-1-aconole@redhat.com> Cc: Alejandro Lucero To: dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id BAAF21C087 for ; Fri, 13 Apr 2018 00:22:10 +0200 (CEST) In-Reply-To: <20180412222208.11770-1-aconole@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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