[ovs-dev] [PATCH v3] datapath-windows: Use OVS_DEFAULT_PORT_NO instead of 0 in a few places

Nithin Raju nithin at vmware.com
Fri Aug 15 04:02:15 UTC 2014


Signed-off-by: Nithin Raju <nithin at vmware.com>
---
 datapath-windows/ovsext/OvsActions.c |    2 +-
 datapath-windows/ovsext/OvsUser.c    |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/datapath-windows/ovsext/OvsActions.c b/datapath-windows/ovsext/OvsActions.c
index 635becc..321f53a 100644
--- a/datapath-windows/ovsext/OvsActions.c
+++ b/datapath-windows/ovsext/OvsActions.c
@@ -273,7 +273,7 @@ OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
          * If the packet will not be encapsulated, consume the tunnel context
          * by clearing it.
          */
-        if (ovsFwdCtx->srcVportNo != 0 &&
+        if (ovsFwdCtx->srcVportNo != OVS_DEFAULT_PORT_NO &&
             !OvsIsVifVportNo(ovsFwdCtx->srcVportNo)) {
             ovsFwdCtx->tunKey.dst = 0;
         }
diff --git a/datapath-windows/ovsext/OvsUser.c b/datapath-windows/ovsext/OvsUser.c
index 5093f20..658fe0d 100644
--- a/datapath-windows/ovsext/OvsUser.c
+++ b/datapath-windows/ovsext/OvsUser.c
@@ -369,7 +369,8 @@ OvsExecuteDpIoctl(PVOID inputBuffer,
         NdisAcquireRWLockRead(gOvsSwitchContext->dispatchLock, &lockState,
                               NDIS_RWL_AT_DISPATCH_LEVEL);
         ndisStatus = OvsActionsExecute(gOvsSwitchContext, NULL, pNbl,
-                                       vport ? vport->portNo : 0,
+                                       vport ? vport->portNo :
+                                               OVS_DEFAULT_PORT_NO,
                                        NDIS_SEND_FLAGS_SWITCH_DESTINATION_GROUP,
                                        &key, NULL, &layers, actions,
                                        execute->actionsLen);
-- 
1.7.4.1




More information about the dev mailing list