On 1/18/2018 6:26 AM, Shahaf Shuler wrote: > Wednesday, January 17, 2018 8:58 PM, Ferruh Yigit : >>> Here is it better to check also the ETH_TXQ_FLAGS_IGNORE. >>> If application has not yet moved to the new API, then it won't set any port >> Tx offloads. So for old applications, the >> ena_are_tx_queue_offloads_allowed is not necessary. >> >> But ethdev layer will set the offloads if ETH_TXQ_FLAGS_IGNORE is missing, >> can't PMD always only rely on tx_conf->offloads ? > > This is to address PMD which moved to the new offloads API but the > application still uses the old offloads API. > > There are many Tx offloads which are per port (as there is a burst function > per port, and not per queue). However the application will not set any > offload on the device configuration rather only in the queue setup. The PMD > can fail the setup function on such case, as per-port offload is requested on > the queue setup without being requested first on the device configuration.
I see, dev->data->dev_conf.txmode.offloads will be empty for old applications which ena_are_tx_queue_offloads_allowed() compares against txq->offload. So I agree, thanks.