> -----Original Message----- > From: Akihiko Odaki <[email protected]> > Sent: Thursday, 20 April 2023 07:46 > Cc: Sriram Yagnaraman <[email protected]>; Jason Wang > <[email protected]>; Dmitry Fleytman <[email protected]>; > Michael S . Tsirkin <[email protected]>; Alex Bennée > <[email protected]>; Philippe Mathieu-Daudé <[email protected]>; > Thomas Huth <[email protected]>; Wainer dos Santos Moschetta > <[email protected]>; Beraldo Leal <[email protected]>; Cleber Rosa > <[email protected]>; Laurent Vivier <[email protected]>; Paolo Bonzini > <[email protected]>; [email protected]; Tomasz Dzieciol > <[email protected]>; Akihiko Odaki > <[email protected]> > 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 <[email protected]> > --- > 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 <[email protected]>
