Some datapaths do not support the ct action, and others support only a subset of its features. Until now, it has been difficult to tell why a particular action is being rejected. This commit should make it clearer.
Reported-by: Kevin Lin <kevin...@berkeley.edu> Reported-at: http://openvswitch.org/pipermail/discuss/2016-October/023060.html Signed-off-by: Ben Pfaff <b...@ovn.org> --- ofproto/ofproto-dpif.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 7374ccc..3a9f74a 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4152,10 +4152,13 @@ check_actions(const struct ofproto_dpif *ofproto, ct = CONTAINER_OF(ofpact, struct ofpact_conntrack, ofpact); support = &ofproto_dpif_get_support(ofproto)->odp; + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); if (!support->ct_state) { + VLOG_WARN_RL(&rl, "datapath does not support ct action"); return OFPERR_OFPBAC_BAD_TYPE; } if ((ct->zone_imm || ct->zone_src.field) && !support->ct_zone) { + VLOG_WARN_RL(&rl, "datapath does not support zone in ct action"); return OFPERR_OFPBAC_BAD_ARGUMENT; } @@ -4166,10 +4169,13 @@ check_actions(const struct ofproto_dpif *ofproto, /* The backer doesn't seem to support the NAT bits in * 'ct_state': assume that it doesn't support the NAT * action. */ + VLOG_WARN_RL(&rl, "datapath does not support ct action nat"); return OFPERR_OFPBAC_BAD_TYPE; } if (dst && ((dst->id == MFF_CT_MARK && !support->ct_mark) || (dst->id == MFF_CT_LABEL && !support->ct_label))) { + VLOG_WARN_RL(&rl, "datapath does not support ct setting mark " + "and/or label"); return OFPERR_OFPBAC_BAD_SET_ARGUMENT; } } -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev