[ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET command handler.

Ankur Sharma ankursharma at vmware.com
Fri Sep 26 16:51:42 UTC 2014


Hi Sam,

We plan to handle the error cases properly, but not in this series.
Let me know if it sounds fine.

Thanks.

Regards,
Ankur
________________________________________
From: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Sent: Thursday, September 25, 2014 9:28 AM
To: dev at openvswitch.org
Cc: Ankur Sharma
Subject: RE: [ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET         command handler.

Hey Ankur,

There are a few differences between flow new and flow set, with regard to the transactional errors that will need to be implemented:
Flow New: can do NEW or SET.
If netlink command flow new is issued, with netlink flags "create" and "exclusive", and the flow exists, it must return EEXIST.

Flow Set: can do SET only: if the flow does not exist, it must return ENOENT.

Also, Flow Set has actions optional, while for Flow New the actions are required.

Regards,
Sam

________________________________________
Date: Wed, 24 Sep 2014 00:15:42 -0700
From: Ankur Sharma <ankursharma at vmware.com>
To: dev at openvswitch.org
Subject: [ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET
        command handler.
Message-ID: <1411542944-19374-8-git-send-email-ankursharma at vmware.com>

Registered FLOW_SET command handler. The same command
handler as FLOW_ADD is good enough to handle FLOW_SET
case as well.
---
 datapath-windows/ovsext/Datapath.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index 7b064f9..5008aab 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -193,7 +193,12 @@ NETLINK_FAMILY nlVportFamilyOps = {
 /* Netlink flow family. */

 NETLINK_CMD nlFlowFamilyCmdOps[] = {
-    { .cmd              = OVS_FLOW_CMD_NEW,
+    { .cmd              = OVS_FLOW_CMD_NEW,
+      .handler          = OvsFlowNlNewCmdHandler,
+      .supportedDevOp   = OVS_TRANSACTION_DEV_OP,
+      .validateDpIndex  = FALSE
+    },
+    { .cmd              = OVS_FLOW_CMD_SET,
       .handler          = OvsFlowNlNewCmdHandler,
       .supportedDevOp   = OVS_TRANSACTION_DEV_OP,
       .validateDpIndex  = FALSE
--
1.9.1





More information about the dev mailing list