-
Notifications
You must be signed in to change notification settings - Fork 100
qmp: Conditionally pass threadID and socketID when CPU device add #84
Conversation
@@ -1154,6 +1154,14 @@ func (q *QMP) ExecuteCPUDeviceAdd(ctx context.Context, driver, cpuID, socketID, | |||
"thread-id": threadID, | |||
} | |||
|
|||
if socketID != "" { |
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.
Don't we need to remove the initialisation of socket-id and thread-id in the composite literal that initialises the map? Otherwise, this patch doesn't actually do anything, apart from conditionally re-initialise keys that have already been initialised.
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.
@markdryan: Thanks for the review. Updated the patch.
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.
Not sure this patch is working as intended.
Maybe we should update the function documentation as well to mention that socket-id and thread-id are optional on some platforms. |
@devimc Could you take a look at this? |
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.
lgtm
thanks @nitkon
Is the travis-ci because of this PR? I guess not ... |
@nitkon It doesn't look like it. It seems that gometalinter has been updated and has added some new checks. Let me see if I can fix this. |
@nitkon please rebase your pr |
For vCPU hotplug to work on ppc64le, we need not pass threadID and socketID. So conditionally pass arguments when executing CPU device add. Fixes: kata-containers#83 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
Rebased my PR 15 min back. Is the CI running? |
@markdryan @devimc : All green now. |
In order to hotplug vCPU on ppc64le, we need not
pass threadID and socketID. So conditionally pass
arguments when executing CPU device add.
Fixes: #83
Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com