patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: "nikhil.rao@intel.com" <nikhil.rao@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [EXT] [PATCH v2] eventdev: fix eth Tx adapter queue count checks
Date: Sun, 16 Dec 2018 23:11:51 +0000	[thread overview]
Message-ID: <56dcbf563d2e37698abf25b8f3b5fc15803955f6.camel@marvell.com> (raw)
In-Reply-To: <1544689402-175655-1-git-send-email-nikhil.rao@intel.com>

On Thu, 2018-12-13 at 13:53 +0530, Nikhil Rao wrote:
> 
> rte_event_eth_tx_adapter_queue_add() - add a check
> that returns an error if the ethdev the zero Tx queues
> configured.
> 
> rte_event_eth_tx_adapter_queue_del() - remove the
> checks for ethdev queue count, instead check for
> queues added to the adapter which maybe different
> from the current ethdev queue count.
> 
> Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
> Cc: stable@dpdk.org
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> ---
>  lib/librte_eventdev/rte_event_eth_tx_adapter.c | 53
> +++++++++++++++++---------
>  1 file changed, 36 insertions(+), 17 deletions(-)
> 
> v2:
> - enclosed macro parameter queue in ()
> 
> diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
> b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
> index ccf8a75..8431656 100644
> --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
> @@ -59,6 +59,19 @@
>                 return -EINVAL; \
>  } while (0)
> 
> +#define TXA_CHECK_TXQ(dev, queue) \
> +do {\
> +       if ((dev)->data->nb_tx_queues == 0) { \
> +               RTE_EDEV_LOG_ERR("No tx queues configured"); \
> +               return -EINVAL; \
> +       } \
> +       if (queue != -1 && (uint16_t)queue >= (dev)->data-

missing enclosure for queue to avoid side effects, ie.
	if ((queue) != -1 && (uint16_t)(queue)


> >nb_tx_queues) { \
> +               RTE_EDEV_LOG_ERR("Invalid tx queue_id %" PRIu16, \
> +                               (uint16_t)queue); \

(uint16_t)(queue)

> +               return -EINVAL; \
> +       } \
> +} while (0)


Another than above nits,

Acked-by: Jerin Jacob <jerinj@marvell.com>

Please send the v3 asap so that I can include it in RC1.


  reply	other threads:[~2018-12-16 23:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 11:11 [dpdk-stable] [PATCH] " Nikhil Rao
2018-12-01 14:39 ` Jerin Jacob
2018-12-03  7:37   ` Rao, Nikhil
2018-12-13  8:23 ` [dpdk-stable] [PATCH v2] " Nikhil Rao
2018-12-16 23:11   ` Jerin Jacob Kollanukkaran [this message]
2018-12-17  4:39 ` [dpdk-stable] [PATCH v3] " Nikhil Rao
2018-12-17 21:14   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob Kollanukkaran

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=56dcbf563d2e37698abf25b8f3b5fc15803955f6.camel@marvell.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nikhil.rao@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).