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/stack/nic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/tcpip/stack/nic.go') diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index e251e3b24..b9b5c35c8 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -727,7 +727,7 @@ func (n *nic) DeliverNetworkPacket(remote, local tcpip.LinkAddress, protocol tcp networkEndpoint, ok := n.networkEndpoints[protocol] if !ok { - n.stats.unknownL3ProtocolRcvdPackets.Increment() + n.stats.unknownL3ProtocolRcvdPacketCounts.Increment(uint64(protocol)) return } @@ -827,7 +827,7 @@ func (n *nic) deliverOutboundPacket(remote tcpip.LinkAddress, pkt *PacketBuffer) func (n *nic) DeliverTransportPacket(protocol tcpip.TransportProtocolNumber, pkt *PacketBuffer) TransportPacketDisposition { state, ok := n.stack.transportProtocols[protocol] if !ok { - n.stats.unknownL4ProtocolRcvdPackets.Increment() + n.stats.unknownL4ProtocolRcvdPacketCounts.Increment(uint64(protocol)) return TransportPacketProtocolUnreachable } -- cgit v1.2.3