qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2 0/5] net: introduce common net_crc32() and net_crc32_le() functions
@ 2017-12-05  8:17 Mark Cave-Ayland
  2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 1/5] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function Mark Cave-Ayland
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Mark Cave-Ayland @ 2017-12-05  8:17 UTC (permalink / raw)
  To: qemu-devel, jasowang, sw

Whilst trying to debug a CRC32 endian issue for NIC multicast hash lookups, it
struck me that it would make sense to have a common set of standard ethernet
CRC32 functions (both little and big endian variants) in net.c.

The first two patches introduce the relevant functions while the last 3 patches
switch the pcnet, eepro100 and sunhme drivers over to use them, allowing us to remove
their private implementations.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

v2:
- Add sumhme net_crc32_le() conversion


Mark Cave-Ayland (5):
  net: move CRC32 calculation from compute_mcast_idx() into its own
    net_crc32() function
  net: introduce net_crc32_le() function
  pcnet: switch lnc_mchash() over to use net_crc32_le()
  eepro100: switch e100_compute_mcast_idx() over to use net_crc32()
  sunhme: switch sunhme_receive() over to use net_crc32_le()

 hw/net/eepro100.c | 19 +------------------
 hw/net/pcnet.c    | 16 +---------------
 hw/net/sunhme.c   | 25 +------------------------
 include/net/net.h |  5 ++++-
 net/net.c         | 38 +++++++++++++++++++++++++++++++++-----
 5 files changed, 40 insertions(+), 63 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2017-12-07  5:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05  8:17 [Qemu-devel] [PATCHv2 0/5] net: introduce common net_crc32() and net_crc32_le() functions Mark Cave-Ayland
2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 1/5] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function Mark Cave-Ayland
2017-12-06  3:26   ` Philippe Mathieu-Daudé
2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 2/5] net: introduce net_crc32_le() function Mark Cave-Ayland
2017-12-05 14:31   ` Eric Blake
2017-12-07  5:09     ` Mark Cave-Ayland
2017-12-06  3:27   ` Philippe Mathieu-Daudé
2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 3/5] pcnet: switch lnc_mchash() over to use net_crc32_le() Mark Cave-Ayland
2017-12-05 14:33   ` Eric Blake
2017-12-06  3:28   ` Philippe Mathieu-Daudé
2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 4/5] eepro100: switch e100_compute_mcast_idx() over to use net_crc32() Mark Cave-Ayland
2017-12-05 14:28   ` Eric Blake
2017-12-07  5:08     ` Mark Cave-Ayland
2017-12-05 15:13   ` Stefan Weil
2017-12-05 15:16     ` Stefan Weil
2017-12-07  5:15     ` Mark Cave-Ayland
2017-12-06  3:28   ` Philippe Mathieu-Daudé
2017-12-05  8:17 ` [Qemu-devel] [PATCHv2 5/5] sunhme: switch sunhme_receive() over to use net_crc32_le() Mark Cave-Ayland
2017-12-05 14:34   ` Eric Blake
2017-12-06  3:34   ` Philippe Mathieu-Daudé
2017-12-06  3:40     ` Philippe Mathieu-Daudé
2017-12-07  5:17     ` Mark Cave-Ayland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).