Repository navigation
Commit 543c3de
perf(acl-filter): skip the lookups for a peering without ACLs
For a packet on a flow that no rule matches directly, the filter
builds the reply's summary from the reverse flow, looks that up too,
and only then falls back to the peering's default action. A peering
without an ACL takes that whole path for every packet of every flow:
it upgrades the `Weak` to the reverse flow (an atomic on a cold cache
line, then another to drop it) and reads that flow's key, to look up
rules that cannot exist.
Every peering with an ACL registers a default action for both
directions, and only such a peering has rules, so a pair without a
default action can match nothing either way. The filter now allows it
without looking anything up. The config-oracle fuzz test checks the
invariant this rests on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent f3ddb5d commit 543c3de
2 files changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
239 | 252 | | |
240 | 253 | | |
241 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| |||
0 commit comments