[v4] eventdev: flag to identify same destined packets enqueue

Message ID 20191009073236.32661-1-nipun.gupta@nxp.com
State Changes Requested
Delegated to: Jerin Jacob
Headers show
Series
  • [v4] eventdev: flag to identify same destined packets enqueue
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Nipun Gupta Oct. 9, 2019, 7:32 a.m.
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@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---

Changes in v4:
 - Update rel note specifying the API change
 - Remove redundant rte_event_tx_adapter_enqueue_same_dest API

Changes in v3:
 - remove flag from internal txa_enqueue_same_dest internal API
 - ABI version update in makefile, meson and rel_notes
 - Few comments update

Changes in v2:
 - have separate internal API in tx adapter for sending burst packets to
   same eth dev, queue pair on the basis of the passed flag
 - fix compilation of examples/eventdev_pipeline/

 app/test-eventdev/test_pipeline_common.h      |  6 +++---
 .../prog_guide/event_ethernet_tx_adapter.rst  |  3 ++-
 doc/guides/rel_notes/release_19_11.rst        |  7 ++++++-
 .../eventdev_pipeline/pipeline_worker_tx.c    |  2 +-
 lib/librte_eventdev/Makefile                  |  2 +-
 lib/librte_eventdev/meson.build               |  2 +-
 .../rte_event_eth_tx_adapter.h                | 19 +++++++++++++++++--
 lib/librte_eventdev/rte_eventdev.c            |  1 +
 lib/librte_eventdev/rte_eventdev.h            | 10 ++++++++++
 9 files changed, 42 insertions(+), 10 deletions(-)

Comments

Rao, Nikhil Oct. 10, 2019, 10:06 a.m. | #1
Hi Nipun,


> -----Original Message-----
> From: Nipun Gupta [mailto:nipun.gupta@nxp.com]
> Sent: Wednesday, October 9, 2019 1:03 PM
> To: dev@dpdk.org
> Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com;
> skori@marvell.com; hemant.agrawal@nxp.com; Richardson, Bruce
> <bruce.richardson@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>; orika@mellanox.com; Nicolau, Radu
> <radu.nicolau@intel.com>; Kantecki, Tomasz <tomasz.kantecki@intel.com>;
> Van Haaren, Harry <harry.van.haaren@intel.com>; Rao, Nikhil
> <nikhil.rao@intel.com>; Nipun Gupta <nipun.gupta@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@nxp.com>
> Acked-by: Jerin Jacob <jerinj@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
Nipun Gupta Oct. 10, 2019, 12:43 p.m. | #2
> -----Original Message-----
> From: Rao, Nikhil <nikhil.rao@intel.com>
> Sent: Thursday, October 10, 2019 3:36 PM
> To: Nipun Gupta <nipun.gupta@nxp.com>; dev@dpdk.org
> Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com;
> skori@marvell.com; Hemant Agrawal <hemant.agrawal@nxp.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>; orika@mellanox.com; Nicolau, Radu
> <radu.nicolau@intel.com>; Kantecki, Tomasz <tomasz.kantecki@intel.com>;
> Van Haaren, Harry <harry.van.haaren@intel.com>
> Subject: RE: [PATCH v4] eventdev: flag to identify same destined packets
> enqueue
> 
> Hi Nipun,
> 
> 
> > -----Original Message-----
> > From: Nipun Gupta [mailto:nipun.gupta@nxp.com]
> > Sent: Wednesday, October 9, 2019 1:03 PM
> > To: dev@dpdk.org
> > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com;
> > skori@marvell.com; hemant.agrawal@nxp.com; Richardson, Bruce
> > <bruce.richardson@intel.com>; Kovacevic, Marko
> > <marko.kovacevic@intel.com>; orika@mellanox.com; Nicolau, Radu
> > <radu.nicolau@intel.com>; Kantecki, Tomasz
> <tomasz.kantecki@intel.com>;
> > Van Haaren, Harry <harry.van.haaren@intel.com>; Rao, Nikhil
> > <nikhil.rao@intel.com>; Nipun Gupta <nipun.gupta@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@nxp.com>
> > Acked-by: Jerin Jacob <jerinj@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 ?

Something like below would work, but it would be unnecessary additional cost
	if (flags && dev->txa_enqueue_same_dest)

Instead the drivers can have both the function pointers pointing to the same 
function in such cases. Seems legitimate?
Ill add the function pointers in the octeontx and octeontx2 drivers in the next spin.

Thanks,
Nipun

> 
> Thanks,
> Nikhil
Jerin Jacob Oct. 11, 2019, 6:14 a.m. | #3
On Thu, Oct 10, 2019 at 6:13 PM Nipun Gupta <nipun.gupta@nxp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Rao, Nikhil <nikhil.rao@intel.com>
> > Sent: Thursday, October 10, 2019 3:36 PM
> > To: Nipun Gupta <nipun.gupta@nxp.com>; dev@dpdk.org
> > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com;
> > skori@marvell.com; Hemant Agrawal <hemant.agrawal@nxp.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>; Kovacevic, Marko
> > <marko.kovacevic@intel.com>; orika@mellanox.com; Nicolau, Radu
> > <radu.nicolau@intel.com>; Kantecki, Tomasz <tomasz.kantecki@intel.com>;
> > Van Haaren, Harry <harry.van.haaren@intel.com>
> > Subject: RE: [PATCH v4] eventdev: flag to identify same destined packets
> > enqueue
> >
> > Hi Nipun,
> >
> >
> > > -----Original Message-----
> > > From: Nipun Gupta [mailto:nipun.gupta@nxp.com]
> > > Sent: Wednesday, October 9, 2019 1:03 PM
> > > To: dev@dpdk.org
> > > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com;
> > > skori@marvell.com; hemant.agrawal@nxp.com; Richardson, Bruce
> > > <bruce.richardson@intel.com>; Kovacevic, Marko
> > > <marko.kovacevic@intel.com>; orika@mellanox.com; Nicolau, Radu
> > > <radu.nicolau@intel.com>; Kantecki, Tomasz
> > <tomasz.kantecki@intel.com>;
> > > Van Haaren, Harry <harry.van.haaren@intel.com>; Rao, Nikhil
> > > <nikhil.rao@intel.com>; Nipun Gupta <nipun.gupta@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@nxp.com>
> > > Acked-by: Jerin Jacob <jerinj@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 ?
>
> Something like below would work, but it would be unnecessary additional cost
>         if (flags && dev->txa_enqueue_same_dest)

Yes

> Instead the drivers can have both the function pointers pointing to the same
> function in such cases. Seems legitimate?
> Ill add the function pointers in the octeontx and octeontx2 drivers in the next spin.

OK. Please make the change as slow path.

>
> Thanks,
> Nipun
>
> >
> > Thanks,
> > Nikhil
>

Patch

diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h
index 0440b9e29..6e73c6ab2 100644
--- a/app/test-eventdev/test_pipeline_common.h
+++ b/app/test-eventdev/test_pipeline_common.h
@@ -106,7 +106,7 @@  pipeline_event_tx(const uint8_t dev, const uint8_t port,
 		struct rte_event * const ev)
 {
 	rte_event_eth_tx_adapter_txq_set(ev->mbuf, 0);
-	while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1))
+	while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1, 0))
 		rte_pause();
 }
 
@@ -116,10 +116,10 @@  pipeline_event_tx_burst(const uint8_t dev, const uint8_t port,
 {
 	uint16_t enq;
 
-	enq = rte_event_eth_tx_adapter_enqueue(dev, port, ev, nb_rx);
+	enq = rte_event_eth_tx_adapter_enqueue(dev, port, ev, nb_rx, 0);
 	while (enq < nb_rx) {
 		enq += rte_event_eth_tx_adapter_enqueue(dev, port,
-				ev + enq, nb_rx - enq);
+				ev + enq, nb_rx - enq, 0);
 	}
 }
 
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 192f9e1cf..a8c13e136 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -137,11 +137,12 @@  should use the ``rte_event_enqueue_burst()`` function.
 	if (cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT) {
 
 		event.mbuf = m;
+		eq_flags = 0;
 
 		m->port = tx_port;
 		rte_event_eth_tx_adapter_txq_set(m, tx_queue_id);
 
-		rte_event_eth_tx_adapter_enqueue(dev_id, ev_port, &event, 1);
+		rte_event_eth_tx_adapter_enqueue(dev_id, ev_port, &event, 1, eq_flags);
 	} else {
 
 		event.queue_id = qid; /* event queue linked to adapter port */
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 27cfbd9e3..051ab26b8 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -94,6 +94,11 @@  API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* event: The function ``rte_event_eth_tx_adapter_enqueue`` takes an additional
+  input as ``flags``. Flag ``RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST`` which
+  has been introduced in this release is used when used when all the packets
+  enqueued in the tx adapter are destined for the same Ethernet port & Tx queue.
+
 
 ABI Changes
 -----------
@@ -146,7 +151,7 @@  The libraries prepended with a plus sign were incremented in this version.
      librte_eal.so.11
      librte_efd.so.1
      librte_ethdev.so.12
-     librte_eventdev.so.7
+     librte_eventdev.so.8
      librte_flow_classify.so.1
      librte_gro.so.1
      librte_gso.so.1
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..a0f40c27c 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -40,7 +40,7 @@  worker_tx_pkt(const uint8_t dev, const uint8_t port, struct rte_event *ev)
 {
 	exchange_mac(ev->mbuf);
 	rte_event_eth_tx_adapter_txq_set(ev->mbuf, 0);
-	while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1))
+	while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1, 0))
 		rte_pause();
 }
 
diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile
index cd3ff8040..9e6a99aa1 100644
--- a/lib/librte_eventdev/Makefile
+++ b/lib/librte_eventdev/Makefile
@@ -8,7 +8,7 @@  include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_eventdev.a
 
 # library version
-LIBABIVER := 7
+LIBABIVER := 8
 
 # build flags
 CFLAGS += -DALLOW_EXPERIMENTAL_API
diff --git a/lib/librte_eventdev/meson.build b/lib/librte_eventdev/meson.build
index 19541f23f..9ba6c0393 100644
--- a/lib/librte_eventdev/meson.build
+++ b/lib/librte_eventdev/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-version = 7
+version = 8
 allow_experimental_apis = true
 
 if is_linux
diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h b/lib/librte_eventdev/rte_event_eth_tx_adapter.h
index c848261c4..93b717af9 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h
@@ -300,6 +300,11 @@  rte_event_eth_tx_adapter_txq_get(struct rte_mbuf *pkt)
 int
 rte_event_eth_tx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
 
+#define RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST	0x1
+/**< This flag is used when all the packets enqueued in the tx adapter are
+ * destined for the same Ethernet port & Tx queue.
+ */
+
 /**
  * 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);
 }
 
 /**
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index f44c869cb..b987e0745 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -1351,6 +1351,7 @@  rte_event_pmd_allocate(const char *name, int socket_id)
 	eventdev = &rte_eventdevs[dev_id];
 
 	eventdev->txa_enqueue = rte_event_tx_adapter_enqueue;
+	eventdev->txa_enqueue_same_dest = rte_event_tx_adapter_enqueue;
 
 	if (eventdev->data == NULL) {
 		struct rte_eventdev_data *eventdev_data = NULL;
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 5044a13d0..ced6f29d9 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -1230,6 +1230,12 @@  typedef uint16_t (*event_tx_adapter_enqueue)(void *port,
 				struct rte_event ev[], uint16_t nb_events);
 /**< @internal Enqueue burst of events on port of a device */
 
+typedef uint16_t (*event_tx_adapter_enqueue_same_dest)(void *port,
+		struct rte_event ev[], uint16_t nb_events);
+/**< @internal Enqueue burst of events on port of a device supporting
+ * burst having same destination Ethernet port & Tx queue.
+ */
+
 #define RTE_EVENTDEV_NAME_MAX_LEN	(64)
 /**< @internal Max length of name of event PMD */
 
@@ -1292,6 +1298,10 @@  struct rte_eventdev {
 	/**< Pointer to PMD dequeue function. */
 	event_dequeue_burst_t dequeue_burst;
 	/**< Pointer to PMD dequeue burst function. */
+	event_tx_adapter_enqueue_same_dest txa_enqueue_same_dest;
+	/**< Pointer to PMD eth Tx adapter burst enqueue function with
+	 * events destined to same Eth port & Tx queue.
+	 */
 	event_tx_adapter_enqueue txa_enqueue;
 	/**< Pointer to PMD eth Tx adapter enqueue function. */
 	struct rte_eventdev_data *data;