[dpdk-dev] [PATCH v4] eventdev: flag to identify same destined packets enqueue

Rao, Nikhil nikhil.rao at intel.com
Thu Oct 10 12:06:04 CEST 2019


Hi Nipun,


> -----Original Message-----
> From: Nipun Gupta [mailto:nipun.gupta at nxp.com]
> Sent: Wednesday, October 9, 2019 1:03 PM
> To: dev at dpdk.org
> Cc: jerinj at marvell.com; aconole at redhat.com; pbhagavatula at marvell.com;
> skori at marvell.com; hemant.agrawal at nxp.com; Richardson, Bruce
> <bruce.richardson at intel.com>; Kovacevic, Marko
> <marko.kovacevic at intel.com>; orika at mellanox.com; Nicolau, Radu
> <radu.nicolau at intel.com>; Kantecki, Tomasz <tomasz.kantecki at intel.com>;
> Van Haaren, Harry <harry.van.haaren at intel.com>; Rao, Nikhil
> <nikhil.rao at intel.com>; Nipun Gupta <nipun.gupta at nxp.com>
> Subject: [PATCH v4] eventdev: flag to identify same destined packets enqueue
> 
> This patch introduces a `flag` in the Eth TX adapter enqueue API.
> Some drivers may support burst functionality only with the packets having
> same destination device and queue.
> 
> The flag `RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST` can be used
> to indicate this so the underlying driver, for drivers to utilize burst functionality
> appropriately.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
> Acked-by: Jerin Jacob <jerinj at marvell.com>
> ---
> 
> Changes in v4:
>  - Update rel note specifying the API change
>  - Remove redundant rte_event_tx_adapter_enqueue_same_dest API
> 
</snip>

>  /**
>   * Enqueue a burst of events objects or an event object supplied in *rte_event*
>   * structure on an  event device designated by its *dev_id* through the event
> @@ -324,6 +329,10 @@ rte_event_eth_tx_adapter_event_port_get(uint8_t
> id, uint8_t *event_port_id);
>   *  The number of event objects to enqueue, typically number of
>   *  rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...)
>   *  available for this port.
> + * @param flags
> + *  RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_ flags.
> + *  #RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST signifies that all
> the
> + packets
> + *  which are enqueued are destined for the same Ethernet port & Tx queue.
>   *
>   * @return
>   *   The number of event objects actually enqueued on the event device. The
> @@ -343,7 +352,8 @@ static inline uint16_t
> rte_event_eth_tx_adapter_enqueue(uint8_t dev_id,
>  				uint8_t port_id,
>  				struct rte_event ev[],
> -				uint16_t nb_events)
> +				uint16_t nb_events,
> +				const uint8_t flags)
>  {
>  	const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
> 
> @@ -359,7 +369,12 @@ rte_event_eth_tx_adapter_enqueue(uint8_t dev_id,
>  		return 0;
>  	}
>  #endif
> -	return dev->txa_enqueue(dev->data->ports[port_id], ev, nb_events);
> +	if (flags)
> +		return dev->txa_enqueue_same_dest(dev->data-
> >ports[port_id],
> +						  ev, nb_events);
> +	else
> +		return dev->txa_enqueue(dev->data->ports[port_id], ev,
> +					nb_events);
>  }

For the if (flags) condition to work for the PMDs that support RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT but do not have a txa_enqueue_same_dest callback, doesn't the dev->txa_enqueue_same_dest pointer need to be set to the same value as dev->txa_enqueue ?

Thanks,
Nikhil



More information about the dev mailing list