[ovs-dev] [PATCH 2/5] datapath-windows: return success when duplicate flow is added

Eitan Eliahu eliahue at vmware.com
Tue Oct 21 23:25:57 UTC 2014


Acked-by: Eitan Eliahu <eliahue at vmware.com>


-----Original Message-----
From: dev [mailto:dev-bounces at openvswitch.org] On Behalf Of Nithin Raju
Sent: Tuesday, October 21, 2014 4:11 PM
To: dev at openvswitch.org
Subject: [ovs-dev] [PATCH 2/5] datapath-windows: return success when duplicate flow is added

If we are trying to insert a flow while there's already a key with the same flow, return success instead of failure. It can be argued that we should probably return a transactional error EEXIST, but we'll handle this in a subsequent commit. I've added a comment to address this later.

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

diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c index bc9ef87..14c3072 100644
--- a/datapath-windows/ovsext/Flow.c
+++ b/datapath-windows/ovsext/Flow.c
@@ -2255,7 +2255,9 @@ HandleFlowPut(OvsFlowPut *put,
                     RemoveFlow(datapath, &KernelFlow);
                 }
             } else {
-                return STATUS_UNSUCCESSFUL;
+                /* Return success if an identical flow already exists. */
+                /* XXX: should we return EEXIST in a netlink error? */
+                return STATUS_SUCCESS;
             }
         }
     }
--
1.7.4.1

_______________________________________________
dev mailing list
dev at openvswitch.org
https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6ViHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=4JTHOlMXe6m8VPG7RWVexZJI7jDUfIwTmpm90J36Lc8%3D%0A&s=5691305dd1209e6df5d33883218687061ef3934c0d3cff96030639be17f59e1b



More information about the dev mailing list