-
Notifications
You must be signed in to change notification settings - Fork 114
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
load vhost-net kernel module #344
load vhost-net kernel module #344
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 2739070269
💛 - Coveralls |
pkg/daemon/daemon.go
Outdated
@@ -905,6 +906,12 @@ func tryEnableTun() { | |||
} | |||
} | |||
|
|||
func tryEnableVhostNet() { | |||
if err := utils.LoadKernelModule("vhost-net"); err != nil { | |||
glog.Errorf("tryEnableTun(): VHOST-NET kernel module not loaded: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: please change to tryEnableVhostNet()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch!
pkg/daemon/daemon.go
Outdated
@@ -905,6 +906,12 @@ func tryEnableTun() { | |||
} | |||
} | |||
|
|||
func tryEnableVhostNet() { | |||
if err := utils.LoadKernelModule("vhost-net"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to change to vhost_net
, as lsmod
print modules with underscore and we would not grep it in load-kmod.sh
lsmod | grep "vhost_net"
vhost_net 28672 0
vhost 49152 1 vhost_net
tap 28672 1 vhost_net
tun 49152 4 vhost_net
if err := utils.LoadKernelModule("vhost-net"); err != nil { | |
if err := utils.LoadKernelModule("vhost_net"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both of them work I am fine chaining :)
This commit is needed when using DPDK with vhost-net in virtio mode. We must load the vhost-net kernel module if we don't want the dpdk application to run with privilege Signed-off-by: Sebastian Sch <[email protected]>
848923c
to
3e8d487
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
LGTM |
This commit is needed when using DPDK with vhost-net in virtio mode.
We must load the vhost-net kernel module if we don't want the dpdk
application to run with privilege
Signed-off-by: Sebastian Sch [email protected]