[dpdk-dev] [PATCH v6 1/3] ethdev: new API to free consumed buffers in Tx ring
Thomas Monjalon
thomas.monjalon at 6wind.com
Wed Mar 15 11:30:58 CET 2017
2017-03-09 15:51, Billy McFall:
> @@ -3097,6 +3101,33 @@ rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,
> }
>
> /**
> + * Request the driver to free mbufs currently cached by the driver. The
> + * driver will only free the mbuf if it is no longer in use. It is the
> + * application's responsibity to ensure rte_eth_tx_buffer_flush(..) is
> + * called if needed.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param queue_id
> + * The index of the transmit queue through which output packets must be
> + * sent.
> + * The value must be in the range [0, nb_tx_queue - 1] previously supplied
> + * to rte_eth_dev_configure().
> + * @param free_cnt
> + * Maximum number of packets to free. Use 0 to indicate all possible packets
> + * should be freed. Note that a packet may be using multiple mbufs.
> + * @return
> + * Failure: < 0
> + * -ENODEV: Invalid interface
> + * -ENOTSUP: Driver does not support function
> + * Success: >= 0
> + * 0-n: Number of packets freed. More packets may still remain in ring that
> + * are in use.
> + */
> +int
> +rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt);
> +
> +/**
> * Configure a callback for buffered packets which cannot be sent
> *
> * Register a specific callback to be called when an attempt is made to send
>
Please move this function below the tx_buffer functions (it is currently
between rte_eth_tx_buffer and rte_eth_tx_buffer_set_err_callback).
More information about the dev
mailing list