-
Notifications
You must be signed in to change notification settings - Fork 136
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
lkl tools: introduce Intel DPDK network backend for virtio device #67
Conversation
the way to specify to build in DPDK is an open question.
|
thanks @stfairy for the comment. I'll get you back addressing your comments (I think I'm fine:)). |
7622e45
to
b950200
Compare
rebased and split into commits. for additional information how to use dpdk, I drafted a wiki page, which could be put in lkl/linux later. https://github.com/libos-nuse/lkl-linux/wiki/DPDK-Howto-(tmp) |
Reviewed 17 of 17 files at r1. tools/lkl/lib/virtio_net_dpdk.c, line 64 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 83 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 97 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 103 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 117 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 149 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 196 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 271 [r1] (raw file): tools/lkl/lib/virtio_net_tap.c, line 5 [r1] (raw file): tools/lkl/lib/virtio_net_tap.c, line 24 [r1] (raw file): tools/lkl/lib/virtio_net_tap.c, line 40 [r1] (raw file): tools/lkl/Makefile, line 47 [r1] (raw file): tools/lkl/scripts/dpdk-sdk-build.sh, line 5 [r1] (raw file): tools/lkl/tests/net-test.c, line 112 [r1] (raw file): tools/lkl/tests/net-test.c, line 195 [r1] (raw file): tools/lkl/tests/net-test.c, line 204 [r1] (raw file): Though it looks like you might not want this file to be compiled at all if we're on Windows? tools/lkl/tests/net.sh, line 11 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 17 unresolved discussions, some commit checks failed. tools/lkl/lib/virtio_net_dpdk.c, line 64 [r1] (raw file): other than that, I don't see any worries on thread safeness. tools/lkl/lib/virtio_net_dpdk.c, line 83 [r1] (raw file): if tools/lkl/lib/virtio_net_dpdk.c, line 97 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 103 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 117 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 149 [r1] (raw file):
so overall of this patch, I tried to be available as much drivers as possible. tools/lkl/lib/virtio_net_dpdk.c, line 196 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 271 [r1] (raw file): e.g.,
since we/I don't have any cool manager of each VIF right now, doing it in each VIF is the way to be polite. what do you think ? tools/lkl/lib/virtio_net_tap.c, line 5 [r1] (raw file): tools/lkl/lib/virtio_net_tap.c, line 24 [r1] (raw file): tools/lkl/lib/virtio_net_tap.c, line 40 [r1] (raw file): tools/lkl/Makefile, line 47 [r1] (raw file): tools/lkl/scripts/dpdk-sdk-build.sh, line 5 [r1] (raw file): and I think having git submodule in linux tree is hard to convince again so, I just crafted this script for a work around. tools/lkl/tests/net-test.c, line 112 [r1] (raw file): tools/lkl/tests/net-test.c, line 204 [r1] (raw file): tools/lkl/tests/net.sh, line 11 [r1] (raw file): so I don't see any benefit to do a test suite. Comments from the review on Reviewable.io |
b950200
to
bd29e90
Compare
Reviewed 7 of 7 files at r2. tools/lkl/lib/virtio_net_dpdk.c, line 64 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 83 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 149 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 271 [r1] (raw file): tools/lkl/tests/net.sh, line 11 [r1] (raw file): Comments from the review on Reviewable.io |
Sorry I didn't notice there were some comments on Reviewable so maybe some of my comments were duplicate. Aside from that, can you also split this pull request into two, so your first refactoring commit can get merged early before people can fully review the DPDK part? The refactoring looks good to me except for a few minor details. Thanks, |
agree: will keep dpdk part to this PR and split refactor part to new PR. |
035462e
to
9f84ec8
Compare
I split tap refactor part to another PR (#118): please comment the tap part to the PR if you have, not in this PR. |
Reviewed 1 of 7 files at r2. tools/lkl/lib/virtio_net_dpdk.c, line 64 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 83 [r1] (raw file): tools/lkl/tests/net-test.c, line 195 [r1] (raw file): tools/lkl/tests/net.sh, line 11 [r1] (raw file): on CircleCI, neither tap nor DPDK are available. more likely way would be use of raw socket with a root privilege. Comments from the review on Reviewable.io |
Reviewed 1 of 17 files at r3, 1 of 5 files at r4. tools/lkl/lib/virtio_net_dpdk.c, line 64 [r1] (raw file): tools/lkl/lib/virtio_net_dpdk.c, line 83 [r1] (raw file): Comments from the review on Reviewable.io |
This commit also adds a test for networking (tests/net-test.c) using same framework as boot.c. As a result, it exposes common test functions and macros into tests/test.h. only tested with dpdk-2.2.0, vmxnet3 driver. at least e1000 and e1000e don't work on vmware fusion (6.0.x). to build with dpdk backend, one needs to do in advance: - ./scripts/dpdk-sdk-build.sh - make dpdk=yes Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2b435e4
to
229b941
Compare
I modified a bit (the name of ifdefs) and rebased it. |
lkl tools: introduce Intel DPDK network backend for virtio device
I created a wiki page (https://github.com/lkl/linux/wiki/Howto:-DPDK-with-LKL) for the DPDK introduction. |
This involves several refactors in lkl tools:
old) LKL_HIJACK_NET_TAP
new) LKL_HIJACK_NET_IFTYPE and LKL_HIJACK_NET_IFNAME
Using opaque pointers remove the implementation details from lkl.h
and increase the scalability for additional device emulation backends.
only tested with dpdk-2.2.0, vmxnet3 driver. at least e1000 and e1000e
don't work on vmware fusion (6.0.x).
to build with dpdk backend, one needs to do in advance:
Signed-off-by: Thomas Liebetraut thomas@tommie-lie.de
Signed-off-by: Hajime Tazaki thehajime@gmail.com