[dpdk-dev] [PATCH v4 2/3] ethdev: introduce Tx queue offloads API

Andrew Rybchenko arybchenko at solarflare.com
Mon Sep 18 09:50:35 CEST 2017


On 09/17/2017 09:54 AM, Shahaf Shuler wrote:
> Introduce a new API to configure Tx offloads.
>
> In the new API, offloads are divided into per-port and per-queue
> offloads. The PMD reports capability for each of them.
> Offloads are enabled using the existing DEV_TX_OFFLOAD_* flags.
> To enable per-port offload, the offload should be set on both device
> configuration and queue configuration. To enable per-queue offload, the
> offloads can be set only on queue configuration.
>
> In addition the Tx offloads will be disabled by default and be
> enabled per application needs. This will much simplify PMD management of
> the different offloads.
>
> Applications should set the ETH_TXQ_FLAGS_IGNORE flag on txq_flags
> field in order to move to the new API.
>
> The old Tx offloads API is kept for the meanwhile, in order to enable a
> smooth transition for PMDs and application to the new API.
>
> Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
> ---
>   doc/guides/nics/features.rst  | 33 ++++++++++++++-----
>   lib/librte_ether/rte_ethdev.c | 67 +++++++++++++++++++++++++++++++++++++-
>   lib/librte_ether/rte_ethdev.h | 38 ++++++++++++++++++++-
>   3 files changed, 128 insertions(+), 10 deletions(-)

<...>

> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 6a2af355a..0a75b1b1e 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h

<...>

> @@ -744,6 +759,12 @@ struct rte_eth_txconf {
>   
>   	uint32_t txq_flags; /**< Set flags for the Tx queue */
>   	uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
> +	/**
> +	 * Per-queue Tx offloads to be set  using DEV_TX_OFFLOAD_* flags.
> +	 * Only offloads set on tx_queue_offload_capa field on rte_eth_dev_info
> +	 * structure are allowed to be set.

It contradicts to the statements that:
-  tx_queue_offload_capa is per-queue offloads only
-  to enable per-port offload, the offload should be set on both device 
configuration and
     queue configuration.
Similar is applicable to Rx offloads as well.

> +	 */
> +	uint64_t offloads;
>   };
>   
>   /**

<...>


More information about the dev mailing list