-
Notifications
You must be signed in to change notification settings - Fork 41
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
Consume eBPF program flags feature and match Linux behavior for discontiguous frames #517
Comments
I think discontiguous frames may be a bit different than what It think |
It's really hard to say for certain, because anything definite about the meaning of the flag is GPL-only. That said, the crux of the problem is that eBPF direct packet access is incompatible with virtually-discontiguous buffers, which may arise for a variety of reasons across OS platforms. On Windows in generic XDP mode, buffers may be virtually contiguous because of MDL splits, but may be virtually contiguous across pages within one memory allocation, somewhat unlike XDP on Linux. I think the best we can do from a cross-platform compat perspective is to honor the intent/reason for the flag, which is to provide a way for programs to opt in to discontiguous frame APIs in general. |
https://lpc.events/event/11/contributions/939/attachments/771/1551/xdp-multi-buff.pdf This states the "current" requirements for XDP:
Based on above, if jumbo frames are not supported, it looks like the whole packet is always expected to be in a virtually contiguous memory. So I think the problem we currently have with multiple MDLs is a Windows specific problem? |
Yeah, that slide deck from 2021 has aged, and there has definitely been Linux work in the area since then. That said, yes, the MDL problem is Windows-specific, but again, the problem manifests in a way that is identical to the problem Linux has with their page allocator for packet data. It is simply a problem of virtually discontiguous buffers at the eBPF program layer, though the nitty-gritty details are clearly different within the actual implementations. |
Yes we can decide to "reuse" the same flag for a slightly different problem on Windows; I was mainly trying to understand what the real usage of that flag on Linux is. If we want to implement that flag, I think we will need the following changes:
|
BPF_F_XDP_HAS_FRAGS
is set for the program.The text was updated successfully, but these errors were encountered: