Skip to content

bpf: only clean up XDP from devices with XDP attached#13532

Merged
tklauser merged 1 commit intocilium:masterfrom
ctripcloud:avoid-removing-xdp-from-innocent-devices
Oct 14, 2020
Merged

bpf: only clean up XDP from devices with XDP attached#13532
tklauser merged 1 commit intocilium:masterfrom
ctripcloud:avoid-removing-xdp-from-innocent-devices

Conversation

@jaffcheng
Copy link
Copy Markdown
Contributor

Currently, during agent startup, cilium removes XDP from all
interfaces except for cilium_host, cilium_net and $XDP_DEV
regardless of whether there is an XDP program attached to it.

For some drivers, e.g. Mellanox mlx5, the following command will
cause device reset regardless of whether there is an XDP program
attached to it, which introduces node and pod network interruption:
ip link set dev $DEV xdpdrv off.

This patch adds a check of XDP program existence to avoid such
network interruption.

Fixes: #13526
Reported-by: ArthurChiao arthurchiao@hotmail.com
Signed-off-by: Jaff Cheng jaff.cheng.sh@gmail.com

Currently, during agent startup, cilium removes XDP from all
interfaces except for `cilium_host`, `cilium_net` and `$XDP_DEV`
regardless of whether there is an XDP program attached to it.

For some drivers, e.g. Mellanox mlx5, the following command will
cause device reset regardless of whether there is an XDP program
attached to it, which introduces node and pod network interruption:
`ip link set dev $DEV xdpdrv off`.

This patch adds a check of XDP program existence to avoid such
network interruption.

Fixes: cilium#13526
Reported-by: ArthurChiao <arthurchiao@hotmail.com>
Signed-off-by: Jaff Cheng <jaff.cheng.sh@gmail.com>
@jaffcheng jaffcheng requested a review from a team October 13, 2020 09:07
@maintainer-s-little-helper maintainer-s-little-helper Bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 13, 2020
@aanm aanm added the release-note/bug This PR fixes an issue in a previous release of Cilium. label Oct 13, 2020
@maintainer-s-little-helper maintainer-s-little-helper Bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 13, 2020
@aanm
Copy link
Copy Markdown
Member

aanm commented Oct 13, 2020

test-me-please

@aanm aanm added the needs/triage This issue requires triaging to establish severity and next steps. label Oct 13, 2020
Comment thread bpf/init.sh
@maintainer-s-little-helper maintainer-s-little-helper Bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 13, 2020
@aanm aanm added priority/release-blocker and removed needs/triage This issue requires triaging to establish severity and next steps. labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Traffic disruption during cilium-agent upgrade/restart with Mellanox NICs

8 participants