[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/31] ftgmac100: fix multicast hash routine
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 11/31] ftgmac100: fix multicast hash routine |
Date: |
Fri, 8 Jun 2018 13:44:57 +0100 |
From: Cédric Le Goater <address@hidden>
Based on the multicast hash calculation of the FTGMAC100 Linux driver.
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
hw/net/ftgmac100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c
index abf80655f28..8a7f274dc11 100644
--- a/hw/net/ftgmac100.c
+++ b/hw/net/ftgmac100.c
@@ -776,8 +776,8 @@ static int ftgmac100_filter(FTGMAC100State *s, const
uint8_t *buf, size_t len)
return 0;
}
- /* TODO: this does not seem to work for ftgmac100 */
- mcast_idx = net_crc32(buf, ETH_ALEN) >> 26;
+ mcast_idx = net_crc32_le(buf, ETH_ALEN);
+ mcast_idx = (~(mcast_idx >> 2)) & 0x3f;
if (!(s->math[mcast_idx / 32] & (1 << (mcast_idx % 32)))) {
return 0;
}
--
2.17.1
- [Qemu-devel] [PULL 00/31] target-arm queue, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 10/31] ftgmac100: add IEEE 802.1Q VLAN support, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 11/31] ftgmac100: fix multicast hash routine,
Peter Maydell <=
- [Qemu-devel] [PULL 08/31] aspeed: add the pc9552 chips to the witherspoon machine, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 13/31] hw/arm: Remove the deprecated xlnx-ep108 machine, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 06/31] aspeed: Add EEPROM I2C devices, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 05/31] smbus: add a smbus_eeprom_init_one() routine, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 04/31] aspeed: add an I2C RTC device to all machines, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 12/31] ftgmac100: remove check on runt messages, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 03/31] aspeed: add support for the witherspoon-bmc board, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 09/31] ftgmac100: compute maximum frame size depending on the protocol, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 18/31] ppc/pnv: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 14/31] hw/i2c: Add trace events, Peter Maydell, 2018/06/08