diff options
-rw-r--r-- | datapath-windows/ovsext/Datapath.c | 4 | ||||
-rw-r--r-- | datapath-windows/ovsext/Vport.c | 2 | ||||
-rw-r--r-- | datapath-windows/ovsext/Vport.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c index 96d0cab0c..65390b255 100644 --- a/datapath-windows/ovsext/Datapath.c +++ b/datapath-windows/ovsext/Datapath.c @@ -1462,7 +1462,7 @@ OvsGetVportDumpNext(POVS_USER_PARAMS_CONTEXT usrParamsCtx, */ ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); NdisAcquireRWLockRead(gOvsSwitchContext->dispatchLock, &lockState, - NDIS_RWL_AT_DISPATCH_LEVEL); + NDIS_RWL_AT_DISPATCH_LEVEL); if (gOvsSwitchContext->numVports > 0) { /* inBucket: the bucket, used for lookup */ @@ -1490,7 +1490,7 @@ OvsGetVportDumpNext(POVS_USER_PARAMS_CONTEXT usrParamsCtx, if (outIndex >= inIndex) { vport = CONTAINING_RECORD(link, OVS_VPORT_ENTRY, portLink); - if (vport->portNo != 0) { + if (vport->portNo != OVS_DPPORT_NUMBER_INVALID) { OvsCreateMsgFromVport(vport, msgIn, usrParamsCtx->outputBuffer, usrParamsCtx->outputLength, diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c index 942bad00d..98ec439d4 100644 --- a/datapath-windows/ovsext/Vport.c +++ b/datapath-windows/ovsext/Vport.c @@ -718,7 +718,7 @@ POVS_VPORT_ENTRY vport) vport->nicIndex != 0) { vport->portNo = OvsGetVportNo(switchContext, vport->nicIndex, vport->ovsType, vport->portType == NdisSwitchPortTypeExternal); - if (vport->portNo == 0) { + if (vport->portNo == OVS_DPPORT_NUMBER_INVALID) { return NDIS_STATUS_RESOURCES; } ASSERT(OVS_IS_VPORT_ENTRY_NULL(switchContext, diff --git a/datapath-windows/ovsext/Vport.h b/datapath-windows/ovsext/Vport.h index 0061b0fbb..2e96e9502 100644 --- a/datapath-windows/ovsext/Vport.h +++ b/datapath-windows/ovsext/Vport.h @@ -19,6 +19,8 @@ #include "Switch.h" +#define OVS_DPPORT_NUMBER_INVALID 0 + /* * A Vport, or Virtual Port, is a port on the OVS. It can be one of the * following types. Some of the Vports are "real" ports on the hyper-v switch, |