[RFC] ethdev: introduce protocol type based header split

Stephen Hemminger stephen at networkplumber.org
Thu Mar 3 17:15:38 CET 2022


On Thu,  3 Mar 2022 06:01:36 +0000
xuan.ding at intel.com wrote:

> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index c2d1f9a972..6743648c22 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1202,7 +1202,8 @@ struct rte_eth_rxseg_split {
>  	struct rte_mempool *mp; /**< Memory pool to allocate segment from. */
>  	uint16_t length; /**< Segment data length, configures split point. */
>  	uint16_t offset; /**< Data offset from beginning of mbuf data buffer. */
> -	uint32_t reserved; /**< Reserved field. */
> +	uint16_t proto;
> +	uint16_t reserved; /**< Reserved field. */
>  };

This feature suffers from a common bad design pattern.
You can't just start using reserved fields unless the previous versions
enforced that the field was a particular value (usually zero).

There is no guarantee that application will initialize these reserved
fields and now using them risks breaking the API/ABI. It looks like

rte_eth_rx_queue_check_split(const struct rte_eth_rxseg_split *rx_seg,

Would have had to check in previous release.

This probably has to wait until 22.11 next API release.


More information about the dev mailing list