diff options
author | Nick Brown <nickbrow@google.com> | 2021-10-27 10:03:11 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-27 10:06:55 -0700 |
commit | 22a6a37079c69129d10abfbdd6fdfdf7a9d4a68d (patch) | |
tree | 6c19c8844d062db058f9fe02840ed4c69387314d /pkg/tcpip/stack/nic_stats.go | |
parent | 7b8f19dc76a9fecbf4d2e5f43a47c6d47d53e100 (diff) |
Record counts of packets with unknown L3/L4 numbers
Previously, we recorded a single aggregated count. These per-protocol counts
can help us debug field issues when frames are dropped for this reason.
PiperOrigin-RevId: 405913911
Diffstat (limited to 'pkg/tcpip/stack/nic_stats.go')
-rw-r--r-- | pkg/tcpip/stack/nic_stats.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pkg/tcpip/stack/nic_stats.go b/pkg/tcpip/stack/nic_stats.go index 1773d5e8d..89aa95131 100644 --- a/pkg/tcpip/stack/nic_stats.go +++ b/pkg/tcpip/stack/nic_stats.go @@ -35,7 +35,7 @@ func (m *multiCounterNICPacketStats) init(a, b *tcpip.NICPacketStats) { m.bytes.Init(a.Bytes, b.Bytes) } -// LINT.ThenChange(../../tcpip.go:NICPacketStats) +// LINT.ThenChange(../tcpip.go:NICPacketStats) // LINT.IfChange(multiCounterNICNeighborStats) @@ -47,23 +47,23 @@ func (m *multiCounterNICNeighborStats) init(a, b *tcpip.NICNeighborStats) { m.unreachableEntryLookups.Init(a.UnreachableEntryLookups, b.UnreachableEntryLookups) } -// LINT.ThenChange(../../tcpip.go:NICNeighborStats) +// LINT.ThenChange(../tcpip.go:NICNeighborStats) // LINT.IfChange(multiCounterNICStats) type multiCounterNICStats struct { - unknownL3ProtocolRcvdPackets tcpip.MultiCounterStat - unknownL4ProtocolRcvdPackets tcpip.MultiCounterStat - malformedL4RcvdPackets tcpip.MultiCounterStat - tx multiCounterNICPacketStats - rx multiCounterNICPacketStats - disabledRx multiCounterNICPacketStats - neighbor multiCounterNICNeighborStats + unknownL3ProtocolRcvdPacketCounts tcpip.MultiIntegralStatCounterMap + unknownL4ProtocolRcvdPacketCounts tcpip.MultiIntegralStatCounterMap + malformedL4RcvdPackets tcpip.MultiCounterStat + tx multiCounterNICPacketStats + rx multiCounterNICPacketStats + disabledRx multiCounterNICPacketStats + neighbor multiCounterNICNeighborStats } func (m *multiCounterNICStats) init(a, b *tcpip.NICStats) { - m.unknownL3ProtocolRcvdPackets.Init(a.UnknownL3ProtocolRcvdPackets, b.UnknownL3ProtocolRcvdPackets) - m.unknownL4ProtocolRcvdPackets.Init(a.UnknownL4ProtocolRcvdPackets, b.UnknownL4ProtocolRcvdPackets) + m.unknownL3ProtocolRcvdPacketCounts.Init(a.UnknownL3ProtocolRcvdPacketCounts, b.UnknownL3ProtocolRcvdPacketCounts) + m.unknownL4ProtocolRcvdPacketCounts.Init(a.UnknownL4ProtocolRcvdPacketCounts, b.UnknownL4ProtocolRcvdPacketCounts) m.malformedL4RcvdPackets.Init(a.MalformedL4RcvdPackets, b.MalformedL4RcvdPackets) m.tx.init(&a.Tx, &b.Tx) m.rx.init(&a.Rx, &b.Rx) @@ -71,4 +71,4 @@ func (m *multiCounterNICStats) init(a, b *tcpip.NICStats) { m.neighbor.init(&a.Neighbor, &b.Neighbor) } -// LINT.ThenChange(../../tcpip.go:NICStats) +// LINT.ThenChange(../tcpip.go:NICStats) |