-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v1.13] bpf: improve handling for short packets #25739
Conversation
/test-backport-1.13 Job 'Cilium-PR-K8s-1.24-kernel-4.19' failed: Click to show.Test Name
Failure Output
Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.24-kernel-4.19/9/ If it is a flake and a GitHub issue doesn't already exist to track it, comment Then please upload the Jenkins artifacts to that issue. Job 'Cilium-PR-K8s-1.26-kernel-net-next' failed: Click to show.Test Name
Failure Output
Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.26-kernel-net-next/247/ If it is a flake and a GitHub issue doesn't already exist to track it, comment Then please upload the Jenkins artifacts to that issue. Job 'Cilium-PR-K8s-1.26-kernel-net-next' failed: Click to show.Test Name
Failure Output
Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.26-kernel-net-next/260/ If it is a flake and a GitHub issue doesn't already exist to track it, comment Then please upload the Jenkins artifacts to that issue. |
/test-1.24-4.19 |
/test-1.26-net-next |
e384eaa
to
9832823
Compare
/test-backport-1.13 Job 'Cilium-PR-K8s-1.21-kernel-4.19' failed: Click to show.Test Name
Failure Output
Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.21-kernel-4.19/28/ If it is a flake and a GitHub issue doesn't already exist to track it, comment Then please upload the Jenkins artifacts to that issue. |
(no-change rebase to test against the current stable branch) |
[ upstream commit afaa82e ] af_packet can craft packets without linear data. So make sure that we pull the IPv4 header, as resolve_srcid_ipv4() won't do it for us (we call it with from_host = true). Also update the comment to match current behaviour. This aligns the IPv4 path with handle_to_netdev_ipv6(). Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 1e7fc43 ] Don't trust that host traffic arrives with the IP header in the skb's linear space. So have resolve_srcid_ipv*() always pull the necessary data, without differentiating between from-netdev and from-host traffic. This means that for to-netdev traffic we now have two places that can handle the traffic. This is just temporary, and will go away with the next patch. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit e1f24b6 ] resolve_srcid_ipv*() is meant to return an __u32, that represents the srcid. But it currently also validates the IP header, and returns DROP_INVALID from that. We use this value without further checks. Fix things up by performing the IP header validation & error handling outside the helper. Note that the to-netdev path already contains a revalidate_data_pull() call, so it's safe to lose this additional one inside resolve_srcid_ipv*(). Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
9832823
to
cb4961d
Compare
/test-backport-1.13 |
/test-1.26-net-next |
Manual backport for
Once this PR is merged, you can update the PR labels via:
or with