[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api
Stephen Hemminger
stephen at networkplumber.org
Fri Jan 15 19:13:41 CET 2016
On Fri, 15 Jan 2016 15:43:57 +0100
Tomasz Kulasek <tomaszx.kulasek at intel.com> wrote:
> static int
> rte_eth_dev_tx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)
> {
> uint16_t old_nb_queues = dev->data->nb_tx_queues;
> void **txq;
> + struct rte_eth_dev_tx_buffer *new_bufs;
> unsigned i;
>
> if (dev->data->tx_queues == NULL) { /* first time configuration */
> @@ -841,17 +872,40 @@ rte_eth_dev_tx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)
> dev->data->nb_tx_queues = 0;
> return -(ENOMEM);
> }
> +
> + dev->data->txq_bufs = rte_zmalloc("ethdev->txq_bufs",
> + sizeof(*dev->data->txq_bufs) * nb_queues, 0);
You should use zmalloc_socket and put the buffering on the same numa
node as the device?
More information about the dev
mailing list