lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 May 2008 17:15:59 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Michael Chan <mchan@...adcom.com>
Cc:	davem@...emloft.net, michaelc@...wisc.edu, anilgv@...adcom.com,
	netdev@...r.kernel.org, linux-scsi@...r.kernel.org,
	open-iscsi@...glegroups.com
Subject: Re: [PATCH 3/3] bnx2i: Add bnx2i iSCSI driver.

> +struct bnx2i_async_msg {
> +#if defined(__BIG_ENDIAN)
> +	u8 op_code;
> +	u8 reserved1;
> +	u16 reserved0;
> +#elif defined(__LITTLE_ENDIAN)
> +	u16 reserved0;
> +	u8 reserved1;
> +	u8 op_code;
> +#endif
> +	u32 reserved2;
> +	u32 exp_cmd_sn;
> +	u32 max_cmd_sn;
> +	u32 reserved3[2];

Please don't do the ifdef big endian mess.  Just read the whole
32bit word and do mask and shift operations to extract the actual value.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ