From 22a6a37079c69129d10abfbdd6fdfdf7a9d4a68d Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Wed, 27 Oct 2021 10:03:11 -0700 Subject: 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 --- pkg/tcpip/network/ipv6/ipv6_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkg/tcpip/network/ipv6') 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) } } -- cgit v1.2.3