summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/ipv6
diff options
context:
space:
mode:
authorNick Brown <nickbrow@google.com>2021-10-27 10:03:11 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-27 10:06:55 -0700
commit22a6a37079c69129d10abfbdd6fdfdf7a9d4a68d (patch)
tree6c19c8844d062db058f9fe02840ed4c69387314d /pkg/tcpip/network/ipv6
parent7b8f19dc76a9fecbf4d2e5f43a47c6d47d53e100 (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/network/ipv6')
-rw-r--r--pkg/tcpip/network/ipv6/ipv6_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/tcpip/network/ipv6/ipv6_test.go b/pkg/tcpip/network/ipv6/ipv6_test.go
index e5286081e..9e08b5318 100644
--- a/pkg/tcpip/network/ipv6/ipv6_test.go
+++ b/pkg/tcpip/network/ipv6/ipv6_test.go
@@ -3515,10 +3515,16 @@ func TestMultiCounterStatsInitialization(t *testing.T) {
// supposed to be bound.
refStack := s.Stats()
refEP := ep.stats.localStats
- if err := testutil.ValidateMultiCounterStats(reflect.ValueOf(&ep.stats.ip).Elem(), []reflect.Value{reflect.ValueOf(&refStack.IP).Elem(), reflect.ValueOf(&refEP.IP).Elem()}); err != nil {
+ if err := testutil.ValidateMultiCounterStats(reflect.ValueOf(&ep.stats.ip).Elem(), []reflect.Value{reflect.ValueOf(&refStack.IP).Elem(), reflect.ValueOf(&refEP.IP).Elem()}, testutil.ValidateMultiCounterStatsOptions{
+ ExpectMultiCounterStat: true,
+ ExpectMultiIntegralStatCounterMap: false,
+ }); err != nil {
t.Error(err)
}
- if err := testutil.ValidateMultiCounterStats(reflect.ValueOf(&ep.stats.icmp).Elem(), []reflect.Value{reflect.ValueOf(&refStack.ICMP.V6).Elem(), reflect.ValueOf(&refEP.ICMP).Elem()}); err != nil {
+ if err := testutil.ValidateMultiCounterStats(reflect.ValueOf(&ep.stats.icmp).Elem(), []reflect.Value{reflect.ValueOf(&refStack.ICMP.V6).Elem(), reflect.ValueOf(&refEP.ICMP).Elem()}, testutil.ValidateMultiCounterStatsOptions{
+ ExpectMultiCounterStat: true,
+ ExpectMultiIntegralStatCounterMap: false,
+ }); err != nil {
t.Error(err)
}
}