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>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
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();
}
{
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);
}
}
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 */
* ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
``int`` to provide a way to report various error conditions.
+* 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
-----------
librte_eal.so.11
librte_efd.so.1
+ librte_ethdev.so.13
- librte_eventdev.so.7
+ + librte_eventdev.so.8
librte_flow_classify.so.1
librte_gro.so.1
librte_gso.so.1
dev->dequeue = ssows_deq;
dev->dequeue_burst = ssows_deq_burst;
dev->txa_enqueue = sso_event_tx_adapter_enqueue;
+ dev->txa_enqueue_same_dest = dev->txa_enqueue;
if (edev->is_timeout_deq) {
dev->dequeue = ssows_deq_timeout;
NIX_TX_OFFLOAD_L3_L4_CSUM_F)];
}
}
+
+ event_dev->txa_enqueue_same_dest = event_dev->txa_enqueue;
rte_mb();
}
{
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();
}
LIB = librte_eventdev.a
# library version
-LIBABIVER := 7
+LIBABIVER := 8
# build flags
CFLAGS += -DALLOW_EXPERIMENTAL_API
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-version = 7
+version = 8
allow_experimental_apis = true
if is_linux
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
* 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
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];
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);
}
/**
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;
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 */
/**< 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;