Commit 845da0a
committed
[sidecar] p4 PHV coherence + mocha container protection
This commit forces metadata fields out of mocha containers via @pa_container_type pragmas.
Mocha containers lack ALUs and only support whole-container set operations. When a field
is the only one written by an action in a mocha container, the whole-container write
clobbers other fields sharing that container. The ipv4_checksum_err field was packed into
mocha MH0 alongside pkt_type, which could cause issues.
This adds similar protections for NAT/encap fields, egress bridge header fields, and
egress action fields in both multicast and non-multicast builds.
Other includes:
- Zero-inits sidecar header pad and unused fields (sc_pad, sc_egress,
sc_payload) across all sidecar header construction sites to prevent stale
PHV data from leaking into the header.
- Removes unreachable ternary entry (0, 0, _, _, _) from the multicast
port_bitmap_check const entries table. The two preceding wildcard entries
already cover that case.
- Simplifies multicast egress counting to use the mcast_tag local captured
before egress decap rather than re-checking header validity.1 parent a75a02e commit 845da0a
2 files changed
Lines changed: 82 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
19 | 75 | | |
20 | 76 | | |
21 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| 315 | + | |
314 | 316 | | |
| 317 | + | |
315 | 318 | | |
| 319 | + | |
316 | 320 | | |
317 | 321 | | |
318 | 322 | | |
| |||
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| 352 | + | |
348 | 353 | | |
349 | 354 | | |
350 | 355 | | |
| |||
1166 | 1171 | | |
1167 | 1172 | | |
1168 | 1173 | | |
| 1174 | + | |
1169 | 1175 | | |
1170 | 1176 | | |
1171 | 1177 | | |
| |||
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
| 1227 | + | |
1221 | 1228 | | |
1222 | 1229 | | |
1223 | 1230 | | |
| |||
1723 | 1730 | | |
1724 | 1731 | | |
1725 | 1732 | | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1726 | 1736 | | |
1727 | 1737 | | |
1728 | 1738 | | |
1729 | 1739 | | |
1730 | 1740 | | |
1731 | 1741 | | |
1732 | | - | |
1733 | 1742 | | |
1734 | 1743 | | |
1735 | | - | |
| 1744 | + | |
1736 | 1745 | | |
1737 | 1746 | | |
1738 | 1747 | | |
| |||
2259 | 2268 | | |
2260 | 2269 | | |
2261 | 2270 | | |
2262 | | - | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
2263 | 2275 | | |
2264 | 2276 | | |
2265 | | - | |
2266 | | - | |
2267 | | - | |
2268 | | - | |
2269 | | - | |
2270 | | - | |
2271 | | - | |
2272 | | - | |
2273 | | - | |
2274 | | - | |
2275 | | - | |
2276 | | - | |
2277 | | - | |
2278 | | - | |
2279 | | - | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
2280 | 2288 | | |
2281 | 2289 | | |
2282 | 2290 | | |
| |||
0 commit comments