When probing for variable length userdata before handler threads are
set, the pid included in the userspace action will be 0, which is
flagged as an error by the linux kernel datapath.  As a result the
feature probe will produce an unnecessary log message.  By probing for
variable length userdata later the probe works as intended and the
unnecessary log message is avoided.

Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
---
 ofproto/ofproto-dpif.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index d3e527a..fc01bef 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -943,7 +943,6 @@ open_dpif_backer(const char *type, struct dpif_backer 
**backerp)
     shash_add(&all_dpif_backers, type, backer);
 
     backer->enable_recirc = check_recirc(backer);
-    backer->variable_length_userdata = check_variable_length_userdata(backer);
     backer->max_mpls_depth = check_max_mpls_depth(backer);
     backer->masked_set_action = check_masked_set_action(backer);
     backer->rid_pool = recirc_id_pool_create();
@@ -960,6 +959,8 @@ open_dpif_backer(const char *type, struct dpif_backer 
**backerp)
         udpif_set_threads(backer->udpif, n_handlers, n_revalidators);
     }
 
+    backer->variable_length_userdata = check_variable_length_userdata(backer);
+
     return error;
 }
 
@@ -1115,7 +1116,8 @@ check_max_mpls_depth(struct dpif_backer *backer)
         odp_flow_key_from_flow(&key, &flow, NULL, 0, false);
 
         error = dpif_flow_put(backer->dpif, DPIF_FP_CREATE,
-                              ofpbuf_data(&key), ofpbuf_size(&key), NULL, 0, 
NULL, 0, NULL);
+                              ofpbuf_data(&key), ofpbuf_size(&key), NULL, 0,
+                              NULL, 0, NULL);
         if (error && error != EEXIST) {
             if (error != EINVAL) {
                 VLOG_WARN("%s: MPLS stack length feature probe failed (%s)",
@@ -1124,7 +1126,8 @@ check_max_mpls_depth(struct dpif_backer *backer)
             break;
         }
 
-        error = dpif_flow_del(backer->dpif, ofpbuf_data(&key), 
ofpbuf_size(&key), NULL);
+        error = dpif_flow_del(backer->dpif, ofpbuf_data(&key),
+                              ofpbuf_size(&key), NULL);
         if (error) {
             VLOG_WARN("%s: failed to delete MPLS feature probe flow",
                       dpif_name(backer->dpif));
-- 
1.7.10.4

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

Reply via email to