DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>
Cc: Jerin Jacob <jerinj@marvell.com>, Liang Ma <liang.j.ma@intel.com>,
	 Peter Mccarthy <peter.mccarthy@intel.com>, dev <dev@dpdk.org>,
	 Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 3/3] event/opdl: fix to set positive rte_errno
Date: Thu, 4 Jul 2019 13:41:45 +0200	[thread overview]
Message-ID: <CAJFAV8zK2NqWdWjkXbMb=NeXT0oCY-q=5-P8raW0To6g6R8HGg@mail.gmail.com> (raw)
In-Reply-To: <1562234612-631-4-git-send-email-arybchenko@solarflare.com>

On Thu, Jul 4, 2019 at 12:04 PM Andrew Rybchenko <arybchenko@solarflare.com>
wrote:

> From: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>
>
> Fixes: 0bf298e39286 ("event/opdl: add event port config get/set")
> Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function")
> Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  drivers/event/opdl/opdl_evdev.c      | 10 +++++-----
>  drivers/event/opdl/opdl_evdev_init.c | 12 ++++++------
>  drivers/event/opdl/opdl_ring.c       |  2 +-
>  3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/event/opdl/opdl_evdev.c
> b/drivers/event/opdl/opdl_evdev.c
> index d2d2be4..3beca89 100644
> --- a/drivers/event/opdl/opdl_evdev.c
> +++ b/drivers/event/opdl/opdl_evdev.c
> @@ -102,7 +102,7 @@
>                              dev->data->dev_id,
>                                 queues[0],
>                                 p->id);
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>
> @@ -113,7 +113,7 @@
>                              dev->data->dev_id,
>                                 num,
>                                 p->id);
> -               rte_errno = -EDQUOT;
> +               rte_errno = EDQUOT;
>                 return 0;
>         }
>
> @@ -123,7 +123,7 @@
>                              dev->data->dev_id,
>                                 p->id,
>                                 queues[0]);
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>
> @@ -134,7 +134,7 @@
>                                 p->id,
>                                 p->external_qid,
>                                 queues[0]);
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>
> @@ -160,7 +160,7 @@
>                              dev->data->dev_id,
>                              queues[0],
>                              p->id);
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>         RTE_SET_USED(nb_unlinks);
> diff --git a/drivers/event/opdl/opdl_evdev_init.c
> b/drivers/event/opdl/opdl_evdev_init.c
> index 582ad69..15aae47 100644
> --- a/drivers/event/opdl/opdl_evdev_init.c
> +++ b/drivers/event/opdl/opdl_evdev_init.c
> @@ -35,7 +35,7 @@
>                                              p->id,
>                                              ev[i].queue_id,
>                                              p->next_external_qid);
> -                               rte_errno = -EINVAL;
> +                               rte_errno = EINVAL;
>                                 return 0;
>                         }
>                 }
> @@ -63,7 +63,7 @@
>         } else {
>                 if (num > 0 &&
>                                 ev[0].queue_id != p->next_external_qid) {
> -                       rte_errno = -EINVAL;
> +                       rte_errno = EINVAL;
>                         return 0;
>                 }
>         }
> @@ -116,7 +116,7 @@
>         RTE_SET_USED(ev);
>         RTE_SET_USED(num);
>
> -       rte_errno = -ENOSPC;
> +       rte_errno = ENOSPC;
>
>         return 0;
>  }
> @@ -145,7 +145,7 @@
>
>
>         if (enqueued < num)
> -               rte_errno = -ENOSPC;
> +               rte_errno = ENOSPC;
>
>         return enqueued;
>  }
> @@ -164,7 +164,7 @@
>         RTE_SET_USED(ev);
>         RTE_SET_USED(num);
>
> -       rte_errno = -ENOSPC;
> +       rte_errno = ENOSPC;
>
>         return 0;
>  }
> @@ -240,7 +240,7 @@
>                              "Attempt to dequeue num of events larger than
> port (%d) max",
>                              opdl_pmd_dev_id(p->opdl),
>                              p->id);
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>
> diff --git a/drivers/event/opdl/opdl_ring.c
> b/drivers/event/opdl/opdl_ring.c
> index e988f1c..e8b29e2 100644
> --- a/drivers/event/opdl/opdl_ring.c
> +++ b/drivers/event/opdl/opdl_ring.c
> @@ -756,7 +756,7 @@ struct opdl_ring {
>  opdl_stage_disclaim(struct opdl_stage *s, uint32_t num_entries, bool
> block)
>  {
>         if (num_entries != s->num_event) {
> -               rte_errno = -EINVAL;
> +               rte_errno = EINVAL;
>                 return 0;
>         }
>         if (s->threadsafe == false) {
> --
> 1.8.3.1
>


Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand

      reply	other threads:[~2019-07-04 11:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 10:03 [dpdk-dev] [PATCH 0/3] eventdev fixes " Andrew Rybchenko
2019-07-04 10:03 ` [dpdk-dev] [PATCH 1/3] eventdev: fix " Andrew Rybchenko
2019-07-04 11:34   ` [dpdk-dev] [dpdk-stable] " David Marchand
2019-07-04 11:56     ` Andrew Rybchenko
2019-07-04 11:58       ` David Marchand
2019-07-04 12:13         ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-07-04 10:03 ` [dpdk-dev] [PATCH 2/3] event/sw: " Andrew Rybchenko
2019-07-04 10:43   ` Van Haaren, Harry
2019-07-04 10:03 ` [dpdk-dev] [PATCH 3/3] event/opdl: " Andrew Rybchenko
2019-07-04 11:41   ` David Marchand [this message]

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='CAJFAV8zK2NqWdWjkXbMb=NeXT0oCY-q=5-P8raW0To6g6R8HGg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=Dilshod.Urazov@oktetlabs.ru \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=liang.j.ma@intel.com \
    --cc=peter.mccarthy@intel.com \
    --cc=stable@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).