From: Alin Serdean Date: Thu, 25 Jun 2015 17:18:41 +0000 (+0000) Subject: ofproto-dpif: Don't try to use dpif_probe_feature() with Windows datapath. X-Git-Tag: v2.4.0~67 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=22b4ccf4f76ebd2b47bc3a6cdb08caf2f99f3ff6 ofproto-dpif: Don't try to use dpif_probe_feature() with Windows datapath. This patch disables features which are not currently supported in the Windows datapath. Unfortunately we have to do it in userspace because dpif_probe_feature is not treated accordingly in the Windows datapath. Fixing that is the correct solution; this commit works around it for branch-2.4. I opened the issue to track the feature for later implementations: https://github.com/openvswitch/ovs-issues/issues/85 Signed-off-by: Alin Gabriel Serdean Acked-by: Eitan Eliahu Acked-by: Nithin Raju Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 369e0b975..6cdaa320c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1010,8 +1010,14 @@ check_recirc(struct dpif_backer *backer) ofpbuf_use_stack(&key, &keybuf, sizeof keybuf); odp_flow_key_from_flow(&key, &flow, NULL, 0, true); +#ifdef _WIN32 + /* XXX Force disable of datapath recirculation from userspace until the + * dpif_probe_feature is properly implemented in the windows datapath */ + enable_recirc = false; +#else enable_recirc = dpif_probe_feature(backer->dpif, "recirculation", &key, NULL); +#endif if (enable_recirc) { VLOG_INFO("%s: Datapath supports recirculation", @@ -1045,7 +1051,13 @@ check_ufid(struct dpif_backer *backer) odp_flow_key_from_flow(&key, &flow, NULL, 0, true); dpif_flow_hash(backer->dpif, key.data, key.size, &ufid); +#ifdef _WIN32 + /* XXX Force disable of datapath recirculation from userspace until the + * dpif_probe_feature is properly implemented in the windows datapath */ + enable_ufid = false; +#else enable_ufid = dpif_probe_feature(backer->dpif, "UFID", &key, &ufid); +#endif if (enable_ufid) { VLOG_INFO("%s: Datapath supports unique flow ids", @@ -1151,6 +1163,11 @@ check_max_mpls_depth(struct dpif_backer *backer) ofpbuf_use_stack(&key, &keybuf, sizeof keybuf); odp_flow_key_from_flow(&key, &flow, NULL, 0, false); +#ifdef _WIN32 + /* XXX Force disable of datapath recirculation from userspace until the + * dpif_probe_feature is properly implemented in the windows datapath */ + break; +#endif if (!dpif_probe_feature(backer->dpif, "MPLS", &key, NULL)) { break; }