[ovs-dev] [userspace clone v3 1/4] dpif-netdev: Avoid sending probe packets

Andy Zhou azhou at ovn.org
Sat Jan 21 02:05:52 UTC 2017


When ofproto probe for datapath features, no packets should actually
be sent to the network. This pactch fixes the userspace by dropping
probe packets before action execution.

Signed-off-by: Andy Zhou <azhou at ovn.org>
---
 lib/dpif-netdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 3901129..9c21af3 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2660,6 +2660,13 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute)
         }
     }
 
+    if (execute->probe) {
+        /* If this is part of a probe, Drop the packet, since executing
+         * the action may actually cause spurious packets be sent into
+         * the network. */
+        return 0;
+    }
+
     /* If the current thread is non-pmd thread, acquires
      * the 'non_pmd_mutex'. */
     if (pmd->core_id == NON_PMD_CORE_ID) {
-- 
1.9.1



More information about the dev mailing list