[ovs-dev] [PATCH v2] datapath-windows: Output a packet to two or more VXLAN ports If we have a flow rule in the following form: actions=strip_vlan, set_tunnel:0x3e9, 15, 16, 17 (Where port 15, 16 and 17 are VXLAN tunnels with different tunnelling information)

Alin Serdean aserdean at cloudbasesolutions.com
Mon Jul 13 14:41:31 UTC 2015


A packet which will hit that specific flow will only be sent out encapsulated
with the first tunnelling information.

This patch saves the initial packet vport, source port and NIC index for
further use of the currently implemented pipeline and ignores the latter if it
is the last tunnelling port.

Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
v2 Address comments
---
 datapath-windows/ovsext/Actions.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
index c8de7c5..c824e71 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -975,6 +975,9 @@ OvsOutputBeforeSetAction(OvsForwardingContext *ovsFwdCtx)
            ovsFwdCtx->tunnelTxNic != NULL || ovsFwdCtx->tunnelRxNic != NULL);
 
     /* Send the original packet out */
+    UINT32 tempVportNo = ovsFwdCtx->srcVportNo;
+    UINT32 tempSourcePortId = ovsFwdCtx->fwdDetail->SourcePortId;
+    UINT32 tempNicIndex = ovsFwdCtx->fwdDetail->SourceNicIndex;
     status = OvsOutputForwardingCtx(ovsFwdCtx);
     ASSERT(ovsFwdCtx->curNbl == NULL);
     ASSERT(ovsFwdCtx->destPortsSizeOut == 0);
@@ -996,6 +999,11 @@ OvsOutputBeforeSetAction(OvsForwardingContext *ovsFwdCtx)
                                       NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
                                       ovsFwdCtx->completionList,
                                       &ovsFwdCtx->layers, FALSE);
+        if (ovsFwdCtx->tunnelTxNic != NULL) {
+            ovsFwdCtx->srcVportNo = tempVportNo;
+            ovsFwdCtx->fwdDetail->SourcePortId = tempSourcePortId;
+            ovsFwdCtx->fwdDetail->SourceNicIndex = tempNicIndex;
+        }
     }
 
     return status;
-- 
1.9.5.msysgit.0



More information about the dev mailing list