Repository navigation
Closed
Description
Lines 1273 to 1283 in 4448f2e
| if (!fwd.is_hit) { | |
| icmp_error(ICMP_DEST_UNREACH, ICMP_DST_UNREACH_NET); | |
| // Dont set meta.dropped because we want an error packet | |
| // to go out. | |
| meta.drop_reason = DROP_IPV4_UNROUTEABLE; | |
| } else if (hdr.ipv4.ttl == 1 && !IS_SERVICE(fwd.port)) { | |
| icmp_error(ICMP_TIME_EXCEEDED, ICMP_EXC_TTL); | |
| // Dont set meta.dropped because we want an error packet | |
| // to go out. | |
| meta.drop_reason = DROP_IPV4_TTL_EXCEEDED; | |
| } else { |
Router4/Router6 (and their multicast cousins) set a drop reason on lookup or TTL failure, but need to delegate packet handling to the switch zone via the CPU port. So they cannot set meta.dropped -- we need to transform the packet and keep it moving. However, all of our drop counters in the ingress pipeline only touch drop statistics if we're actually dropping the packet, rather than transforming it:
Lines 2189 to 2193 in 4448f2e
| if (meta.dropped) { | |
| // Handle dropped packets | |
| ig_dprsr_md.drop_ctl = 1; | |
| drop_port_ctr.count(ig_intr_md.ingress_port); | |
| drop_reason_ctr.count(meta.drop_reason); |
We need to perform the counter operations on meta.drop_reason != 0, as egress does. We could also possibly replace meta.dropped with direct use of ig_dprsr_md.drop_ctl if needed.
Reacted by Zeeshan Lakhani
Metadata
Metadata
Assignees
Labels
No labels
Activity
zeeshanlakhani commentedon Oct 14, 2026
#400 handles this on the mcast side.
Count ICMP-needed drops from L3Router
Count ICMP-needed drops from L3Router
Count ICMP-needed drops from L3Router (#406)