[dpdk-dev] [EXT] [PATCH v2] eventdev: fix eth Tx adapter queue count checks
Jerin Jacob Kollanukkaran
jerinj at marvell.com
Mon Dec 17 00:11:51 CET 2018
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 at dpdk.org
> Signed-off-by: Nikhil Rao <nikhil.rao at 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 at marvell.com>
Please send the v3 asap so that I can include it in RC1.
More information about the dev
mailing list