Re: [PATCH net-next 07/10] ethtool: cmis_cdb: Add a layer for supporting CDB commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 08, 2024 at 03:53:37PM +0300, Danielle Ratson wrote:
> +/**
> + * struct ethtool_cmis_cdb_request - CDB commands request fields as decribed in
> + *				the CMIS standard
> + * @id: Command ID.
> + * @epl_len: EPL memory length.
> + * @lpl_len: LPL memory length.
> + * @chk_code: Check code for the previous field and the payload.
> + * @resv1: Added to match the CMIS standard request continuity.
> + * @resv2: Added to match the CMIS standard request continuity.
> + * @payload: Payload for the CDB commands.
> + */
> +struct ethtool_cmis_cdb_request {
> +	__be16 id;
> +	struct_group(body,
> +		u16 epl_len;

u16 with a struct that also uses __be16 looks suspicious.

> +		u8 lpl_len;
> +		u8 chk_code;
> +		u8 resv1;
> +		u8 resv2;
> +		u8 payload[ETHTOOL_CMIS_CDB_LPL_MAX_PL_LENGTH];
> +	);

Does it matter if the compiler inserts some padding before this struct
group?

> +/**
> + * struct ethtool_cmis_cdb_rpl_hdr - CDB commands reply header arguments
> + * @rpl_len: Reply length.
> + * @rpl_chk_code: Reply check code.
> + */
> +struct ethtool_cmis_cdb_rpl_hdr {
> +	u8 rpl_len;
> +	u8 rpl_chk_code;

Does it matter if the compiler adds some padding here?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux