Skip to content

Document the netkit attach mechanism and the downgrade path - #2923

Open
tomastigera wants to merge 2 commits into
tigera:mainfrom
tomastigera:tomas/docs-netkit-attach-rollback
Open

Document the netkit attach mechanism and the downgrade path#2923
tomastigera wants to merge 2 commits into
tigera:mainfrom
tomastigera:tomas/docs-netkit-attach-rollback

Conversation

@tomastigera

Copy link
Copy Markdown
Contributor

Product Version(s):
Calico next (the calico/ tree only — the netkit section is tech preview and not yet in a versioned tree).

Issue:
CORE-13281. Documents the user-facing side of projectcalico/calico#13462.

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

The netkit section on the eBPF page covers how to get netkit pod interfaces but not how the eBPF data plane attaches to them, so there is no documented way off netkit attachment. That matters for downgrades: a Calico release that has no concept of netkit attachment cannot remove netkit programs, so downgrading a node directly leaves the old programs attached and enforcing the policy that was in force at downgrade time, while the downgraded Felix programs the same interfaces through TC/TCX — two data planes on one interface.

This PR adds two short subsections:

  • Attach mechanism — the three bpfAttachType values, the fact that TCX/TC also migrate existing netkit interfaces (the interfaces stay netkit, no pod is recreated), and that changing the field restarts Felix. It also notes that pod bandwidth QoS annotations are not supported with TC, so nobody picks TC thinking it is the safer target.
  • Downgrading to a release without netkit support — the procedure: set TCX, let Felix restart, then downgrade; and removing the field to return to the default afterwards.

It also corrects one existing sentence. The page said that after reverting linuxPodInterfaceType to Veth, "the eBPF data plane treats those as veth (programs attach via TC/TCX)". That is not what happens: linuxPodInterfaceType only controls what the CNI plugin creates for new pods, while the attach mechanism follows each interface's own type. Existing netkit interfaces keep netkit attachment.

The behaviour described here was verified on a GCP cluster (kernel 6.17, eBPF data plane, netkit pod interfaces): flipping bpfAttachType between the default and TCX moved the programs on netkit interfaces between netkit and TCX attachment in both directions, with the interfaces staying netkit and no pod recreated; under TC the bandwidth QoS qdiscs were torn down.

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

Copilot AI lite review requested due to automatic review settings August 14, 2026 22:48
@tomastigera
tomastigera requested a review from a team as a code owner August 14, 2026 22:48
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 905a87c
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a7f9e3d8167ec0008bc58db
😎 Deploy Preview https://deploy-preview-2923--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 905a87c
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a7f9e3dc7611f0007a9ade9
😎 Deploy Preview https://deploy-preview-2923--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 76 (🔴 down 17 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Calico “next” eBPF enablement documentation to explain how netkit pod interfaces are attached/programmed by the eBPF dataplane, and to document a safe downgrade path to releases that don’t support netkit attachment (to avoid leaving stale netkit programs attached after downgrade).

Changes:

  • Corrects the description of what happens to existing netkit pod interfaces when switching linuxPodInterfaceType back to Veth.
  • Adds an “Attach mechanism” subsection describing bpfAttachType behaviors for netkit vs non-netkit interfaces.
  • Adds a “Downgrading to a release without netkit support” procedure describing how to switch attachment before downgrading.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +466 to +470
The `bpfAttachType` field of the `FelixConfiguration` selects how the eBPF data plane attaches its programs:

* `Netkit` (default) — netkit attachment on netkit interfaces, TCX on every other interface.
* `TCX` — TCX on every interface, including netkit interfaces.
* `TC` — the legacy qdisc-based attachment on every interface. Pod bandwidth QoS annotations are not supported with `TC`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude: Correct that they disagree today, but _includes/components/FelixConfig/config-params.json is generated, not authored here — scripts/update-felix-config.sh syncs it from the product repos. Hand-editing it would be overwritten on the next sync.

The Netkit value is added by projectcalico/calico#13462, which updates the generated source. So the reference picks it up on the next sync after that merges, and this PR should not merge before it.

```

Existing pods keep their netkit interfaces, but the eBPF data plane treats those as veth (programs attach via TC/TCX, the same path used for actual veth interfaces).
Existing pods keep their netkit interfaces, and the eBPF data plane keeps driving those through netkit attachment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude: Good catch — fixed. The sentence now reads "…keeps driving those through netkit attachment unless bpfAttachType says otherwise (see below)."

The netkit section covered how to get netkit interfaces but not how the
eBPF data plane attaches to them, so there was no documented way off
netkit attachment. A release that predates it cannot remove netkit
programs, so downgrading a node directly leaves the old programs
attached and enforcing a stale policy alongside the downgraded Felix.

Describe the bpfAttachType values and note that TCX or TC also migrates
existing netkit interfaces, then give the downgrade procedure and the
way back to the default.

Also correct the revert paragraph: reverting linuxPodInterfaceType to
Veth only changes what the CNI plugin creates for new pods. Attachment
follows each interface's own type, so existing netkit interfaces keep
netkit attachment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

calico/operations/ebpf/enabling-ebpf.mdx:469

  • The Netkit and TCX bullets read as if TCX is always used, but the generated Felix configuration reference indicates TCX can fall back to TC when TCX isn’t available. Consider reflecting that here to avoid misleading readers about kernel/support requirements.
* `Netkit` (default) — netkit attachment on netkit interfaces, TCX on every other interface.
* `TCX` — TCX on every interface, including netkit interfaces.

calico/operations/ebpf/enabling-ebpf.mdx:487

  • “Removing the netkit links” is ambiguous and can be read as removing the netkit interfaces themselves, but earlier the doc states the interfaces stay netkit and only the attachment changes. Reword to make it clear you mean detaching/moving the netkit-attached programs.
Felix restarts on each node and re-attaches its programs, removing the netkit links.

netkit is the kernel's device type name, so it is spelled lowercase in
prose and Vale.Spelling flags every occurrence. The existing netkit
section predates the check running over it; only changed lines are
linted, so the term first shows up as an error when that section is
edited.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 14, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

calico/operations/ebpf/enabling-ebpf.mdx:470

  • The phrase “Pod bandwidth QoS annotations” is ambiguous here; it’s clearer to either name the annotation(s) or link to the QoS bandwidth controls doc so readers know what’s unsupported under TC.
* `Netkit` (default) — netkit attachment on netkit interfaces, TCX on every other interface.
* `TCX` — TCX on every interface, including netkit interfaces.
* `TC` — the legacy qdisc-based attachment on every interface. Pod bandwidth QoS annotations are not supported with `TC`.

calico/operations/ebpf/enabling-ebpf.mdx:487

  • “Removing the netkit links” reads like the interfaces are removed; this step is about detaching netkit-attached eBPF programs and re-attaching via TCX. Rephrase to avoid confusion during downgrade procedures.
Felix restarts on each node and re-attaches its programs, removing the netkit links.

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.

2 participants