summaryrefslogtreecommitdiff
path: root/datapath-windows
diff options
context:
space:
mode:
authorEitan Eliahu <eliahue@vmware.com>2014-12-02 20:33:17 -0800
committerBen Pfaff <blp@nicira.com>2014-12-05 10:25:38 -0800
commit3100516ad790b20e449b67a848e071dc5bd3f8d3 (patch)
tree875340ae367d1c6973c1be77819c205e90206c46 /datapath-windows
parentfa07848939869e32ca386e46f1e4e093bc2c7459 (diff)
downloadopenvswitch-3100516ad790b20e449b67a848e071dc5bd3f8d3.tar.gz
datapath-windows: Add PID Number attribute for port notification / Fix logic
[1] User mode OVS expects to have the PID number in the port state notification command [2] Fix logic error-for-Windows-user-mode Signed-off-by: Eitan Eliahu <eliahue@vmware.com> Acked-by: Ankur Sharma <ankursharma@vmware.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r--datapath-windows/ovsext/Datapath.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index f6e6e5008..ef5ae739a 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -1406,7 +1406,7 @@ OvsPortFillInfo(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
PNL_BUFFER nlBuf)
{
NTSTATUS status;
- BOOLEAN rc;
+ BOOLEAN ok;
OVS_MESSAGE msgOutTmp;
PNL_MSG_HDR nlMsg;
POVS_VPORT_ENTRY vport;
@@ -1435,8 +1435,8 @@ OvsPortFillInfo(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
}
msgOutTmp.ovsHdr.dp_ifindex = gOvsSwitchContext->dpNo;
- rc = NlMsgPutHead(nlBuf, (PCHAR)&msgOutTmp, sizeof msgOutTmp);
- if (!rc) {
+ ok = NlMsgPutHead(nlBuf, (PCHAR)&msgOutTmp, sizeof msgOutTmp);
+ if (!ok) {
status = STATUS_INVALID_BUFFER_SIZE;
goto cleanup;
}
@@ -1447,10 +1447,12 @@ OvsPortFillInfo(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
goto cleanup;
}
- rc = NlMsgPutTailU32(nlBuf, OVS_VPORT_ATTR_PORT_NO, eventEntry->portNo) ||
- NlMsgPutTailU32(nlBuf, OVS_VPORT_ATTR_TYPE, vport->ovsType) ||
+ ok = NlMsgPutTailU32(nlBuf, OVS_VPORT_ATTR_PORT_NO, eventEntry->portNo) &&
+ NlMsgPutTailU32(nlBuf, OVS_VPORT_ATTR_TYPE, vport->ovsType) &&
+ NlMsgPutTailU32(nlBuf, OVS_VPORT_ATTR_UPCALL_PID,
+ vport->upcallPid) &&
NlMsgPutTailString(nlBuf, OVS_VPORT_ATTR_NAME, vport->ovsName);
- if (!rc) {
+ if (!ok) {
status = STATUS_INVALID_BUFFER_SIZE;
goto cleanup;
}