patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: stable@dpdk.org
Cc: Alejandro Lucero <alejandro.lucero@netronome.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Yuanhan Liu <yliu@fridaylinux.org>,
	Eelco Chaudron <echaudro@redhat.com>,
	Pablo Cascon <pablo.cascon@redhat.com>,
	Kevin Traynor <ktraynor@redhat.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: [dpdk-stable] [PATCH 1/2] nfp: unlink the appropriate lock file
Date: Mon, 30 Apr 2018 13:20:39 -0400	[thread overview]
Message-ID: <20180430172040.13506-2-aconole@redhat.com> (raw)
In-Reply-To: <20180430172040.13506-1-aconole@redhat.com>

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 <aconole@redhat.com>
---
 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

  reply	other threads:[~2018-04-30 17:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 17:20 [dpdk-stable] [PATCH 0/2] nfp: support non-root user for the Netronome Aaron Conole
2018-04-30 17:20 ` Aaron Conole [this message]
2018-04-30 17:20 ` [dpdk-stable] [PATCH 2/2] nfp: allow for non-root user Aaron Conole
2018-05-08 13:09   ` Eelco Chaudron
2018-05-08 13:20     ` Aaron Conole
2018-05-09 17:05   ` Alejandro Lucero
2018-05-09 17:53     ` Aaron Conole
2018-05-09 19:44       ` Alejandro Lucero
2018-05-10 12:00         ` Alejandro Lucero
2018-04-30 18:02 ` [dpdk-stable] [PATCH 0/2] nfp: support non-root user for the Netronome Kevin Traynor
2018-05-06  6:34   ` Yuanhan Liu
2018-05-08  9:23     ` Kevin Traynor
2018-05-14 14:23       ` Kevin Traynor
2018-05-20  7:19         ` Yuanhan Liu
2018-05-22 10:45           ` Kevin Traynor
2018-05-01 10:36 ` Luca Boccassi
2018-05-03 10:30   ` Luca Boccassi
2018-05-03 12:25     ` Alejandro Lucero
2018-05-03 12:57       ` Luca Boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180430172040.13506-2-aconole@redhat.com \
    --to=aconole@redhat.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=echaudro@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=ktraynor@redhat.com \
    --cc=pablo.cascon@redhat.com \
    --cc=stable@dpdk.org \
    --cc=yliu@fridaylinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).