[dpdk-dev] [PATCH] doc: update new ethdev offload API description

Shahaf Shuler shahafs at mellanox.com
Sun Mar 18 06:52:18 CET 2018


Friday, March 16, 2018 5:52 PM, Ferruh Yigit:
> Don't mandate API to pass port offload configuration during queue setup,
> this is unnecessary for devices that support only port level offloads.
> 
> Fixes: 81ac560dc1b4 ("doc: add details on ethdev offloads API")
> Cc: shahafs at mellanox.com
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> ---
> Cc: Patil, Harish <harish.patil at cavium.com>
> 
> Btw, this expectation from API should be clear from source code and API
> documentation (doxygen comments in header file) instead of
> documentation. Am I missing something or we are doing something wrong
> here?
> ---
>  doc/guides/prog_guide/poll_mode_drv.rst | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/doc/guides/prog_guide/poll_mode_drv.rst
> b/doc/guides/prog_guide/poll_mode_drv.rst
> index e5d01874e..3247f309f 100644
> --- a/doc/guides/prog_guide/poll_mode_drv.rst
> +++ b/doc/guides/prog_guide/poll_mode_drv.rst
> @@ -303,9 +303,7 @@ Supported offloads can be either per-port or per-
> queue.
>  Offloads are enabled using the existing ``DEV_TX_OFFLOAD_*`` or
> ``DEV_RX_OFFLOAD_*`` flags.
>  Per-port offload configuration is set using ``rte_eth_dev_configure``.
>  Per-queue offload configuration is set using ``rte_eth_rx_queue_setup``
> and ``rte_eth_tx_queue_setup``.
> -To enable per-port offload, the offload should be set on both device
> configuration and queue setup.
> -In case of a mixed configuration the queue setup shall return with an error.
> -To enable per-queue offload, the offload can be set only on the queue
> setup.
> +Per-port offloads should be set on the port configuration. Queue offloads
> should be set on the queue configuration.
>  Offloads which are not enabled are disabled by default.
> 
>  For an application to use the Tx offloads API it should set the
> ``ETH_TXQ_FLAGS_IGNORE`` flag in the ``txq_flags`` field located in
> ``rte_eth_txconf`` struct.

I am OK with such change.

However, while documentation is good, most of the customers learn on the API usage from the existing examples. 
Currently both examples and testpmd behave according to the old approach, see example from testpmd[1] before the rx_queue_setup.

I think a modification there is needed if we are going to change the API. 



[1]
                       /* Apply Rx offloads configuration */                    
                       port->rx_conf.offloads = port->dev_conf.rxmode.offloads;


> --
> 2.13.6



More information about the dev mailing list