[PATCH v6 08/15] net/xsc: add Rx and Tx queue setup

Stephen Hemminger stephen at networkplumber.org
Mon Jan 20 19:16:37 CET 2025


On Mon, 20 Jan 2025 19:14:48 +0800
"WanRenyong" <wanry at yunsilicon.com> wrote:

> +struct __rte_packed_begin xsc_send_wqe_ctrl_seg {
> +	rte_le32_t	msg_opcode:8;
> +	rte_le32_t	with_immdt:1;
> +	rte_le32_t	csum_en:2;
> +	rte_le32_t	ds_data_num:5;
> +	rte_le32_t	wqe_id:16;
> +	rte_le32_t	msg_len;
> +	union __rte_packed_begin {
> +		rte_le32_t		opcode_data;
> +		struct __rte_packed_begin {
> +			rte_le16_t	has_pph:1;
> +			rte_le16_t	so_type:1;
> +			rte_le16_t	so_data_size:14;
> +			rte_le16_t	rsv1:8;
> +			rte_le16_t	so_hdr_len:8;
> +		} __rte_packed_end;
> +		struct __rte_packed_begin {
> +			rte_le16_t	desc_id;
> +			rte_le16_t	is_last_wqe:1;
> +			rte_le16_t	dst_qp_id:15;
> +		} __rte_packed_end;
> +	} __rte_packed_end;
> +	rte_le32_t	se:1;

If the whole structure is marked with packed attribute,
don't think you also need to mark the sub structures and unions
as packed. 

This is what is confusing the checkpatch check for __rte_packed_begin / __rte_packed_end


More information about the dev mailing list