Added changes to send a reply for FLOW_FUSH case. This is needed
as with nithin's transaction reply changes we'll need reply for each
command.

Signed-off-by: Ankur Sharma <ankursha...@vmware.com>
---
 datapath-windows/ovsext/Flow.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c
index b55263b..1431761 100644
--- a/datapath-windows/ovsext/Flow.c
+++ b/datapath-windows/ovsext/Flow.c
@@ -284,8 +284,27 @@ OvsFlowNlCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
     /* FLOW_DEL command w/o any key input is a flush case. */
     if ((genlMsgHdr->cmd == OVS_FLOW_CMD_DEL) &&
         (!(nlAttrs[OVS_FLOW_ATTR_KEY]))) {
+
         rc = OvsFlushFlowIoctl(ovsHdr->dp_ifindex);
-        goto done;
+
+       if (rc == STATUS_SUCCESS) {
+            /* XXX: refactor this code. */
+            /* So far so good. Prepare the reply for userspace */
+            NlBufInit(&nlBuf, usrParamsCtx->outputBuffer,
+                      usrParamsCtx->outputLength);
+
+            /* Prepare nl Msg headers */
+            rc = NlFillOvsMsg(&nlBuf, nlMsgHdr->nlmsgType, 0,
+                              nlMsgHdr->nlmsgSeq, nlMsgHdr->nlmsgPid,
+                              genlMsgHdr->cmd, OVS_FLOW_VERSION,
+                              ovsHdr->dp_ifindex);
+
+            if (rc == STATUS_SUCCESS) {
+                *replyLen = msgOut->nlMsg.nlmsgLen;
+            }
+       }
+
+       goto done;
     }
 
     if ((rc = _MapNlToFlowPut(msgIn, nlAttrs[OVS_FLOW_ATTR_KEY],
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to