]> git.proxmox.com Git - mirror_qemu.git/commit
e1000x: Fix BPRC and MPRC
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 23 May 2023 02:42:54 +0000 (11:42 +0900)
committerJason Wang <jasowang@redhat.com>
Tue, 23 May 2023 07:20:15 +0000 (15:20 +0800)
commitf3f9b726afba1f53663768603189e574f80b5907
tree2456a6da87c01c6702a73385db16c2dbcca2bec5
parenta51db5802744b274ab40385dd9fe8354722fcc4d
e1000x: Fix BPRC and MPRC

Before this change, e1000 and the common code updated BPRC and MPRC
depending on the matched filter, but e1000e and igb decided to update
those counters by deriving the packet type independently. This
inconsistency caused a multicast packet to be counted twice.

Updating BPRC and MPRC depending on are fundamentally flawed anyway as
a filter can be used for different types of packets. For example, it is
possible to filter broadcast packets with MTA.

Always determine what counters to update by inspecting the packets.

Fixes: 3b27430177 ("e1000: Implementing various counters")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/e1000.c
hw/net/e1000e_core.c
hw/net/e1000x_common.c
hw/net/e1000x_common.h
hw/net/igb_core.c