> -----Original Message----- > From: Akihiko Odaki <akihiko.od...@daynix.com> > Sent: Thursday, 20 April 2023 07:46 > Cc: Sriram Yagnaraman <sriram.yagnara...@est.tech>; Jason Wang > <jasow...@redhat.com>; Dmitry Fleytman <dmitry.fleyt...@gmail.com>; > Michael S . Tsirkin <m...@redhat.com>; Alex Bennée > <alex.ben...@linaro.org>; Philippe Mathieu-Daudé <phi...@linaro.org>; > Thomas Huth <th...@redhat.com>; Wainer dos Santos Moschetta > <waine...@redhat.com>; Beraldo Leal <bl...@redhat.com>; Cleber Rosa > <cr...@redhat.com>; Laurent Vivier <lviv...@redhat.com>; Paolo Bonzini > <pbonz...@redhat.com>; qemu-devel@nongnu.org; Tomasz Dzieciol > <t.dziec...@partner.samsung.com>; Akihiko Odaki > <akihiko.od...@daynix.com> > Subject: [PATCH v2 03/41] 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.od...@daynix.com> > --- > hw/net/e1000x_common.h | 5 +++-- > hw/net/e1000.c | 6 +++--- > hw/net/e1000e_core.c | 20 +++----------------- > hw/net/e1000x_common.c | 25 +++++++++++++++++++------ > hw/net/igb_core.c | 22 +++++----------------- > 5 files changed, 33 insertions(+), 45 deletions(-) >
Reviewed-by: Sriram Yagnaraman <sriram.yagnara...@est.tech>