[dpdk-dev] Guidelines for moving PMDs to new ethdev offloads API

Thomas Monjalon thomas at monjalon.net
Sun Dec 10 12:23:00 CET 2017

Re-sending Shahaf's email to maintainers
(and without Outlook formatting)

Please, maintainers of networking PMD,
*start the transition work as soon as possible*.
We will ping you individually if no progress is seen.
Thank you


In 17.11 the ethdev offloads API has changed:
	commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
	commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
The new API is documented in the programmer's guide:

As announced in the deprecation notice, the old API is planned to be
removed in 18.05:
As agreed, all the PMDs must be converted to the new API by their maintainers.
This email will better explain the transition process.

The main concepts in the new API are:
	- All offloads are disabled by default
	- Distinction between per port and per queue offloads.
	Per port offloads needs to be set also for each queue of the port.

The transition period is using an API translation in rte_ethdev.c:
	- The old API is translated to allow using converted PMDs
	- The new API is translated to allow using not converted PMDs
	- The use of the new API is flagged to trigger the right translation

* Device capabilities - rte_eth_dev_info_get()
	- Not changing: use DEV_RX/TX_OFFLOAD_* flags
	- Old API: per-port fields rte_eth_dev_info.rx/tx_offload_capa
	- New API: added per-queue rte_eth_dev_info.rx/tx_queue_offload_capa

* Rx offloads
	- Not changing: offload disabled by default
	- Old API: per-port rte_eth_conf.rxmode.[bit-fields]
	- New API: per-port rte_eth_conf.rxmode.offloads using DEV_RX_OFFLOAD_*
	           per-queue rte_eth_rxconf.offloads using DEV_RX_OFFLOAD_*
	- Transition: rte_eth_conf.rxmode.ignore_offload_bitfield must be set
	              when using the new API
	- To be removed: rte_eth_conf.rxmode.[
		header_split, hw_ip_checksum, hw_vlan_filter, hw_vlan_strip,
		hw_vlan_extend, jumbo_frame, hw_strip_crc, enable_scatter,
		enable_lro, hw_timestamp, security, ignore_offload_bitfield]    

* Tx offloads
	- Old API: enabled by default
	           per-queue rte_eth_txconf.txq_flags using ETH_TXQ_FLAGS_NO*
	- New API: disabled by default
	           per-port rte_eth_conf.txmode.offloads using DEV_TX_OFFLOAD_*
	           per-queue rte_eth_txconf.offloads using DEV_TX_OFFLOAD_*
	- Transition: ETH_TXQ_FLAGS_IGNORE must be set when using the new API
	              PMD ignores per-port mismatch when using old per-queue API
	- To be removed: rte_eth_txconf.txq_flags and ETH_TXQ_FLAGS_*

More information about the dev mailing list