DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: Aaron Conole <aconole@redhat.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC 1/2] nfp: unlink the appropriate lock file
Date: Fri, 13 Apr 2018 09:31:41 +0200	[thread overview]
Message-ID: <CAD+H993G4oUxPEgvVUY6de0b0PD0yN09zbpy8zvwPi9gE9Q+Zw@mail.gmail.com> (raw)
In-Reply-To: <20180412222208.11770-2-aconole@redhat.com>

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 <aconole@redhat.com> 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 <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-13  7:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 22:22 [dpdk-dev] [RFC 0/2] nfp driver fixes Aaron Conole
2018-04-12 22:22 ` [dpdk-dev] [RFC 1/2] nfp: unlink the appropriate lock file Aaron Conole
2018-04-13  7:31   ` Alejandro Lucero [this message]
2018-04-13 13:24     ` Aaron Conole
2018-04-12 22:22 ` [dpdk-dev] [RFC 2/2] nfp: allow for non-root user Aaron Conole
2018-04-13  7:37   ` Alejandro Lucero
2018-04-13 13:31     ` Aaron Conole
2018-04-13 15:31       ` Alejandro Lucero
2018-04-17 15:44         ` Alejandro Lucero
2018-04-17 15:54           ` Alejandro Lucero
2018-04-17 19:19             ` Aaron Conole
2018-04-18 10:53               ` Alejandro Lucero
2018-04-18 12:32                 ` Aaron Conole
2018-04-19  6:05                   ` Alejandro Lucero
2018-04-20 14:12                     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-04-20 14:56                       ` Aaron Conole
2018-04-17 15:54           ` [dpdk-dev] " Thomas Monjalon
2018-04-17 16:24             ` Alejandro Lucero
2018-04-17 19:06               ` Thomas Monjalon
2018-04-13  7:26 ` [dpdk-dev] [RFC 0/2] nfp driver fixes Alejandro Lucero
2018-04-13 13:23   ` Aaron Conole
2018-04-13 15:36     ` Alejandro Lucero

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=CAD+H993G4oUxPEgvVUY6de0b0PD0yN09zbpy8zvwPi9gE9Q+Zw@mail.gmail.com \
    --to=alejandro.lucero@netronome.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.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).