Skip to content

feat(edge): Carry pod VPC attachments through the SRv6 datapath - #950

Draft
privateip wants to merge 2 commits into
feat/edge-host-attachmentsfrom
feat/edge-attachment-datapath
Draft

privateip wants to merge 2 commits into
feat/edge-host-attachmentsfrom
feat/edge-attachment-datapath

Conversation

@privateip

@privateip privateip commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Host-owned attachments have to work through galactic's real SRv6 datapath, not only plain kernel routing.

This registers attachment host links with the datapath the same way the CNI registers workloads, and checks remote traffic against an independent kernel SRv6 peer.

It also gives attachments an MTU equal to the tenant MTU, because the decapsulation path drops a packet too big for its egress link without telling the sender, while a narrower session behind the pod is reported by the pod's own forwarding.

Stack, bottom first:

  1. feat(edge): Attach socket and packet consumer pods to a VPC from the host #949 provisions host-owned attachments
  2. feat(edge): Carry pod VPC attachments through the SRv6 datapath #950 (this PR) carries them through the SRv6 datapath and sets their MTU
  3. test(edge): Enforce traffic policy on pod VPC attachment links #951 enforces traffic policy on their links
  4. test(edge): Check pod VPC attachments on a real node #952 checks them on a real node

Test plan

  • Shared datapath maps hold only host interface indexes and canonical tables
  • Remote workloads in two VPCs with identical addresses reach their own socket and TUN consumers and get replies back
  • A 1280-byte packet crosses the encapsulated path, a larger one gets Packet Too Big from a narrower TUN, and an 1800-byte tenant MTU works only when the attachment link carries it

Related to #944

🤖 Generated with Claude Code

@privateip

Copy link
Copy Markdown
Collaborator Author

Validation for this stack is on #949.

@privateip
privateip force-pushed the feat/edge-attachment-datapath branch from 73d347c to 4984e0b Compare October 20, 2026 18:46
@privateip
privateip force-pushed the feat/edge-host-attachments branch from a64c410 to 7d2526a Compare October 20, 2026 18:46
@privateip privateip changed the title feat: Carry host-owned attachments through the SRv6 datapath feat(edge): Carry pod VPC attachments through the SRv6 datapath Oct 20, 2026
@privateip
privateip force-pushed the feat/edge-host-attachments branch from 7d2526a to e8b4ccb Compare October 20, 2026 19:06
@privateip
privateip force-pushed the feat/edge-attachment-datapath branch from 4984e0b to 35931cd Compare October 20, 2026 19:06
privateip and others added 2 commits October 20, 2026 15:20
Add a root-only test that registers host-owned attachments with galactic's uSID datapath and exercises them against an independent SRv6 peer. Node X loads usid_ingress on its uplink and registers each workload and attachment host link through attachreg.RegisterDatapath, so the shared maps learn only host ifindexes and canonical tables; the pods behind them reuse the same pod-local table IDs and ifindexes. Node Y is built from the kernel's own reduced seg6 encapsulation and End.DT6 decapsulation, and carries workloads with the same address in both VPCs. Its attachment IDs fit the 16-bit field byte accounting decodes.

The test checks that ifindex_vrf_table holds exactly the host attachment links and vrf_table resolves only to canonical tables, that a remote workload reaches a VRF-bound socket and a TUN consumer in its own VPC and gets the reply back through usid_egress encapsulation, that a 1280-byte IPv6 packet crosses the encapsulated path, and that same-node traffic between a workload and an attachment never leaves through the uplink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A packet the uSID datapath decapsulates is redirected to its attachment's host link, and if it does not fit that link the decapsulation path drops it without sending Packet Too Big. An attachment therefore now has an MTU that applies to both ends of its veth pair, at least the IPv6 minimum of 1280, which callers set to the fabric's tenant MTU: the largest packet any interface of the VPC can send. A packet arriving over the fabric then always fits the host link. A narrower limit further in, such as a TUN device whose session carries less, is set through the TUN's own MTU, and the pod's kernel answers larger packets routed to it with Packet Too Big. Provision applies both MTUs to new and existing links and Readback reports a mismatch.

The datapath test gives VPC A's TUN a 1400-byte MTU and checks that a remote workload sending a larger packet through the encapsulated path gets Packet Too Big with that MTU back, then succeeds at 1400 bytes. It also raises the tenant MTU to 1800 bytes and checks that a packet that large reaches an attachment over the fabric, and that the same packet is dropped without a reply when the host link is left at the 1500-byte default. The field documents that the MTU must not exceed what the underlay carries after encapsulation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@privateip
privateip force-pushed the feat/edge-host-attachments branch from e8b4ccb to 015048d Compare October 20, 2026 19:34
@privateip
privateip force-pushed the feat/edge-attachment-datapath branch from 35931cd to a819e61 Compare October 20, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant