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, 03 Mar 2016 17:20:43 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	Lada.Trimasova@...opsys.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Alexey.Brodkin@...opsys.com, noamc@...hip.com, talz@...hip.com,
	arnd@...db.de
Subject: Re: [PATCH V3] net: ezchip: adapt driver to little endian
 architecture

From: Lada Trimasova <Lada.Trimasova@...opsys.com>
Date: Thu,  3 Mar 2016 17:07:46 +0300

> Since ezchip network driver is written with big endian EZChip platform it
> is necessary to add support for little endian architecture.
> 
> The first issue is that the order of the bits in a bit field is
> implementation specific. So all the bit fields are removed.
> Named constants are used to access necessary fields.
> 
> And the second one is that network byte order is big endian.
> For example, data on ethernet is transmitted with most-significant
> octet (byte) first. So in case of little endian architecture
> it is important to swap data byte order when we read it from
> register. In case of unaligned access we can use "get_unaligned_be32"
> and in other case we can use function "ioread32_rep" which reads all
> data from register and works either with little endian or big endian
> architecture.
> 
> And then when we are going to write data to register we need to restore
> byte order using the function "put_unaligned_be32" in case of
> unaligned access and in other case "iowrite32_rep".
> 
> The last little fix is a space between type and pointer to observe
> coding style.
> 
> Signed-off-by: Lada Trimasova <ltrimas@...opsys.com>

Applied to net-next, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ