-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request] Dynamically disable/enable virtio_net LRO/CSUM #2433
Comments
Hi @Vesnica. I understand that this a limitation for your usecase. We'll get back to you once we understand what are the options to enable it. Are you interested in contributing the code changes? |
Unfortunately, I don’t know much about Rust or network device drivers. The demand of this feature is not urgent at the moment, you can mark it as a low priority. |
in looking to add support for veth pairs, I came across this issue and believe I've "found" the responsible code: https://github.com/firecracker-microvm/firecracker/blob/master/src/devices/src/virtio/net/device.rs#L33 this is a somewhat high priority for myself; and though I have no experience writing Rust and about 30 minutes familiarity with the firecracker codebase, I have no fear attempting to submit mergeable PR's (especially if there is anyone willing to assist/answer questions that arise) |
Hi @aaglenn ! Indeed, that is the net device source file. The code that sets the virtio flags is here. I was curious if you have a specific solution in mind. Modifying the flags or exposing them as API parameters should be easy. But the question is whether we can do this in a generic way. Exposing specific virtio flags through the API doesn't look like a feasible solution. |
For purpose of attaching a XDP object to network device, |
@chenhengqi But xdpgeneric is a test mode with poor performance. |
I believe this is actually two bugs in one:
"Dynamically disabling virtio_net features" really means "reset the device and negotiate a new feature set", but neither part of that works. |
I've forked and added some flags to the virtio device, yet the features are not enabled when looking at them via I was attempting to add tx ipv6 checksum: let mut avail_features = 1 << VIRTIO_NET_F_GUEST_CSUM
| 1 << VIRTIO_NET_F_CSUM
| 1 << VIRTIO_NET_F_GUEST_TSO4
| 1 << VIRTIO_NET_F_GUEST_TSO6
| 1 << VIRTIO_NET_F_GUEST_UFO
| 1 << VIRTIO_NET_F_HOST_TSO4
| 1 << VIRTIO_NET_F_HOST_TSO6
| 1 << VIRTIO_NET_F_HOST_UFO
| 1 << VIRTIO_F_VERSION_1; |
Hi all, sorry for the delay, unfortunately we were not able to make progress regarding this issue. |
Hey all, |
Feature Request
I'm trying to bind a XDP program to eth0 in firecracker vm. like this:
ip -force link set dev eth0 xdpdrv obj bpf_xdp.o sec from-netdev
But it failed with message:
Error: virtio_net: Can't set XDP while host is implementing LRO/CSUM, disable LRO/CSUM first
ethtool produce the following message:
Because
rx-checksumming
andlarge-receive-offload
arefixed
,so I can't turn it off.This prohibits the ebpf application in firecracker vm.
Describe the desired solution
Modify the net device code to make dynamically enable/disable features possible.
Checks
The text was updated successfully, but these errors were encountered: