Commit b4bf245
AF_XDP/XSK UDP client transport (fleet-safe re-land)
Summary:
Re-land of the AF_XDP/XSK UDP client transport for the ucache fast path (originally D109703046), now with a fix for the fleet-wide breakage that forced the backout (D110310180, see T277941128).
What this adds: the `mc_xdp_protocol` transport plumbing — `XdpTransport` (single-threaded, per-EVB, AsyncUDPSocket-based, fiber/baton reply demux under `facebook/`), the `xdp` protocol enum + parse cases, the `xdp_tx_truncate_bytes` mcrouter option, and the `McRouteHandleProvider` wiring.
Why the first version broke the fleet: `McRouteHandleProvider` (linked by nearly everything via memcache/ServiceRouter) instantiates `createDestinationRoute<XdpTransport>`, which pulls in `UdpWireFormat.h`. That single header unconditionally included the generated TAO and Ucache carbon message codegen, so via `mcrouter-core -> xdp_transport -> udp_wire_format -> carbon-Ucache-messages` every mcrouter dependent was forced to build the Ucache protocol codegen. Ucache protocol sits architecturally above mcrouter, so this dragged a heavy, effectively-cyclic subtree into the fleet and broke 100+ unrelated targets. (TAO codegen was already reachable fleet-wide via `carbon-Memcache-messages`, so it was not part of the regression; the new fleet edge was `carbon-Ucache-messages`.)
The fix: split `UdpWireFormat.h` by protocol family. The core header keeps framing, the `MessageType` enum, the generic `serializeWithId`/`deserializeWithId`/`peek` helpers, and the Memcache `MessageTypeTag` specialisations (Memcache is the only family reachable through the universal `MemcacheRouterInfo` path). The TAO and Ucache tags move to `UdpWireFormatTao.h` / `UdpWireFormatUcache.h` behind their own `udp_wire_format_tao` / `udp_wire_format_ucache` targets, taken only by consumers that actually (de)serialise those families (the ucache XSK server). No ODR risk: each type tag is defined in exactly one header. Net effect: `mcrouter-core -> xdp_transport -> udp_wire_format` adds zero new codegen to mcrouter dependents.
Reviewed By: lenar-f
Differential Revision: D110316229
fbshipit-source-id: 533b603b4c57c4a5330340424b2e0b1a388eec7f1 parent 852eee7 commit b4bf245
7 files changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
149 | 156 | | |
150 | 157 | | |
151 | 158 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
884 | 894 | | |
885 | 895 | | |
886 | 896 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
408 | 430 | | |
409 | 431 | | |
410 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments