[PATCH 08/14] net/nfp: structure adjustment

Ferruh Yigit ferruh.yigit at xilinx.com
Fri Jun 3 00:54:08 CEST 2022


On 6/2/2022 2:52 AM, Jin Liu wrote:
> Add and modify the nfp PMD struct and macro that will be used by NFDK
> firmware.
> 
> Signed-off-by: Jin Liu <jin.liu at corigine.com>
> Signed-off-by: Diana Wang <na.wang at corigine.com>
> Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
> Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at corigine.com>

<...>

> @@ -114,9 +166,14 @@ struct nfp_net_txq {
>   	 * For each descriptor keep a reference to the mbuf and
>   	 * DMA address used until completion is signalled.
>   	 */
> -	struct {
> -		struct rte_mbuf *mbuf;
> -	} *txbufs;
> +	union {
> +		struct {
> +			struct rte_mbuf *mbuf;
> +		} *txbufs;
> +		struct {
> +			struct rte_mbuf *mbuf;
> +		} *ktxbufs;

What is the point of this union? Both structs are same.




More information about the dev mailing list