Commit 22b4ccf4f (ofproto-dpif: Don't try to use dpif_probe_feature() with Windows datapath.) stopped ofproto-dpif from trying to use the DPIF_FP_PROBE feature of the datapath interface, because it doesn't work with Windows yet. However, it was *too* broad--it also stopped ofproto-dpif from using DPIF_FP_PROBE with the netdev datapath, which still does support DPIF_FP_PROBE on Windows. This commit moves disabling DPIF_FP_PROBE a couple of layers down, to a place where the two datapaths can be easily distinguished.
Reported-by: Gurucharan Shetty <shet...@nicira.com> Signed-off-by: Ben Pfaff <b...@nicira.com> --- This is untested and based on a guess. lib/dpif-netlink.c | 14 ++++++++++++++ ofproto/ofproto-dpif.c | 17 ----------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index 6838def..dd44e3e 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -1595,6 +1595,20 @@ dpif_netlink_operate__(struct dpif_netlink *dpif, switch (op->type) { case DPIF_OP_FLOW_PUT: put = &op->u.flow_put; +#ifdef _WIN32 + /* Windows datapath doesn't support DPIF_FP_PROBE yet. */ + if (put->flags & DPIF_FP_PROBE) { + /* Report an error immediately if this is the first operation. + * Otherwise the easiest thing to do is to postpone to the next + * call (when this will be the first operation). */ + if (i == 0) { + op->error = EINVAL; + return 1; + } + n_ops = i; + break; + } +#endif dpif_netlink_init_flow_put(dpif, put, &flow); if (put->stats) { flow.nlmsg_flags |= NLM_F_ECHO; diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 0ace36d..8575b1c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1010,14 +1010,8 @@ 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", @@ -1051,13 +1045,7 @@ 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", @@ -1163,11 +1151,6 @@ 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; } -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev