Fix incomplete VirtualBox workaround#19
Draft
Bobo1239 wants to merge 11 commits intoemmericp:masterfrom
Draft
Conversation
Certain VM setups filter out packets that do this which breaks our example.
The descriptor size includes the net_hdr but isn't part of the data the user receives.
Fixes the issue where packets were duplicated when the tx queue was drained (e.g. by sleeping in pktgen between batches).
virtualbox does not support VIRTIO_F_ANY_LAYOUT making the code really ugly. also, it's super slow like factor 20 compared to to qemu-kvm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a rebase of the VirtualBox workaround branch onto my other PR. Also contains a commit to make the tx code more readable and fixes the rx code as that wasn't yet converted to chained descriptors (which made it non-functional with VirtualBox).
With these changes a simple pktgen -> pcap setup works as expected. (btw: the perf difference compared to KVM is nowadays "only" about 50% on my laptop)
Unfortunately, due to some strange bug between Vagrant and VirtualBox, you can't just use
vagrant upto test this as the NATed primary network interface fails to connect properly. (at least that's the case with my machine) After trying out dozens of different Vagrant base boxes I resorted to manually setting up two VMs in VirtualBox to work on this.Finally this PR isn't intended to be merged. You probably just want to squash this back into a single commit and force-push the virtualbox-workarounds once my other PR is merged.