This repository was archived by the owner on Jan 20, 2022. It is now read-only.
qemu/qmp: support hotplug a nic whose qdisc is mq#41
Merged
devimc merged 1 commit intokata-containers:masterfrom Aug 23, 2018
Merged
qemu/qmp: support hotplug a nic whose qdisc is mq#41devimc merged 1 commit intokata-containers:masterfrom
devimc merged 1 commit intokata-containers:masterfrom
Conversation
Member
Author
|
From test results, mq can provide better performance than pfifo_fast. So this may be necessary. |
devimc
reviewed
Aug 23, 2018
qemu/qmp.go
Outdated
| // using the device_add command. devID is the id of the device to add. | ||
| // Must be valid QMP identifier. netdevID is the id of nic added by previous netdev_add. | ||
| func (q *QMP) ExecuteNetPCIDeviceAdd(ctx context.Context, netdevID, devID, macAddr, addr, bus string) error { | ||
| func (q *QMP) ExecuteNetPCIDeviceAdd(ctx context.Context, netdevID, devID, macAddr, addr, bus string, fdNum int) error { |
There was a problem hiding this comment.
looks good, but could you add a comment explaining what is fdNum
devimc
reviewed
Aug 23, 2018
qemu/qmp.go
Outdated
|
|
||
| if fdNum > 0 { | ||
| args["mq"] = "on" | ||
| args["vectors"] = 2*fdNum + 2 |
There was a problem hiding this comment.
please add some comments explaining this. why 2 and not 3 or 4 ?
Member
Author
There was a problem hiding this comment.
Done. These codes come from https://github.com/intel/govmm/blob/6aa35d33f2fded7ee32f7eadabda95182059572f/qemu/qemu.go#L497-L502
If we hotplug a nic with args mq=on, its qdisc will be mq by default. This aligns with cold plug nics. Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
sboeuf
approved these changes
Aug 23, 2018
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
If we hotplug a nic with args mq=on, its qdisc will be mq by default.
This aligns with cold plug nics.
Signed-off-by: Ruidong Cao caoruidong@huawei.com