Repository navigation
Count ICMP-needed drops from L3Router - #406
FelixMcFelix wants to merge 1 commit into
Conversation
Packets which are dropped in L3Router and its nested controls all need to be handled by the host, so we cannot actually drop these packets in the Tofino. However the counters were only ever modified when the packet is truly dropped, so these counters were non-functional. This PR separates out the counter increment to occur for both classes of drop. I did look into centralising everything onto `ig_dprsr_md.drop_ctl` and ridding ourselves of `meta.dropped`, but this ended up both uglier and took up more stages under multicast. Simple seems best, here! Fixes #404.
21e3553 to
c406851
Compare
| /// If the test runs to completion we return the counter evaluation as a | ||
| /// boolean rather than an Error. This allows us to trigger the error in | ||
| /// the test routine, which gives us a more specific test failure message | ||
| pub async fn one_counted_test( |
There was a problem hiding this comment.
Noting that this is somewhat similar to check_counter_incremented in https://github.com/oxidecomputer/dendrite/pull/362/changes#diff-892387f02bc3907dbe15941e9c76aecc0b8ca4b85d61f6a6130686aaba5b77ca
Which was moved from a helper that already exists in main. Could we easily achieve the same end with only one of these?
dendrite/dpd-client/tests/integration_tests/mcast.rs
Lines 74 to 103 in 9ffd5a1
| } | ||
|
|
||
| if (meta.dropped) { | ||
| ig_dprsr_md.drop_ctl = 1; |
There was a problem hiding this comment.
I believe these are all the cases this affects. There's some duplication for the multicast blocks. Is it worth adding checks for the TTL, ARP, and NDP cases?
Lines 1141 to 1143 in 9ffd5a1
Lines 1189 to 1191 in 9ffd5a1
Lines 1247 to 1249 in 9ffd5a1
Lines 1252 to 1254 in 9ffd5a1
Lines 1329 to 1331 in 9ffd5a1
Lines 1334 to 1336 in 9ffd5a1
Lines 1386 to 1388 in 9ffd5a1
Lines 1391 to 1393 in 9ffd5a1
Lines 1465 to 1467 in 9ffd5a1
Lines 1470 to 1472 in 9ffd5a1
taspelund
left a comment
There was a problem hiding this comment.
Nice improvement to the tests! Looks like a pretty straightforward change.
|
Inspired by this PR, I had claude write a template and script formatting compiler diffs into markdown. The P4 changes here are fairly benign, but it's nice to keep an eye on how it evolves. TOF report: dendrite#406Count ICMP-needed drops from L3Router
SummaryFrom
Compiler resourcesFrom
PHV containersIngressFrom
EgressFrom
TotalFrom
PHV fieldsFrom No change |
Packets which are dropped in L3Router and its nested controls all need to be handled by the host, so we cannot actually drop these packets in the Tofino. However the counters were only ever modified when the packet is truly dropped, so these counters were non-functional. This PR separates out the counter increment to occur for both classes of drop.
I did look into centralising everything onto
ig_dprsr_md.drop_ctland ridding ourselves ofmeta.dropped, but this ended up both uglier and took up more stages under multicast. Simple seems best, here!Fixes #404.