]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: Fix traffic counters/statistics
authorClayton Yager <Clayton_Yager@selinc.com>
Mon, 8 Aug 2022 22:38:23 +0000 (15:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Aug 2022 12:45:06 +0000 (13:45 +0100)
commite48cb679342c09f129cd91bd6c34b80f6b5ed6bf
treedbdb1b5e4a8aab28e6fd0b855bf975c494648c36
parenta722cf48d6af05e41bcb34faf8766b040b4928bb
macsec: Fix traffic counters/statistics

OutOctetsProtected, OutOctetsEncrypted, InOctetsValidated, and
InOctetsDecrypted were incrementing by the total number of octets in frames
instead of by the number of octets of User Data in frames.

The Controlled Port statistics ifOutOctets and ifInOctets were incrementing
by the total number of octets instead of the number of octets of the MSDUs
plus octets of the destination and source MAC addresses.

The Controlled Port statistics ifInDiscards and ifInErrors were not
incrementing each time the counters they aggregate were.

The Controlled Port statistic ifInErrors was not included in the output of
macsec_get_stats64 so the value was not present in ip commands output.

The ReceiveSA counters InPktsNotValid, InPktsNotUsingSA, and InPktsUnusedSA
were not incrementing.

Signed-off-by: Clayton Yager <Clayton_Yager@selinc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c