Commit 506f7d4bcfbc ("northd: rely on new actions for ecmp-symmetric
routing") introduced northd usage of the chk_ecmp_nh, chk_ecmp_nh_mac,
and commit_ecmp_nh actions. Commit 23fdc5fe43b3 ("northd: Always ct
commit ECMP symmetric traffic in the original direction.") removed the
usage of these actions by northd. In the latter commit, it is
specifically noted that the actions' implementations were left alone,
since there was a possibility of a newer ovn-controller being used with
an older ovn-northd that still programmed those actions.That latter commit was made in September of 2023. Since then, we have released two LTS versions of OVN. This should safely allow for us to remove these actions from the code entirely. This commit removes the actions' implementations as well as the documentation for these actions. Signed-off-by: Mark Michelson <[email protected]> --- v3 -> v4: Removed the gap in the constants defined in lflow.h. Also updated ovn-macros.m4 to have correct table constants. --- NEWS | 2 + controller/lflow.h | 28 ++- include/ovn/actions.h | 10 -- include/ovn/logical-fields.h | 7 +- lib/actions.c | 331 ----------------------------------- lib/ovn-util.c | 2 +- ovn-sb.xml | 52 ------ tests/ovn-macros.at | 28 ++- tests/ovn.at | 20 --- utilities/ovn-trace.c | 6 - 10 files changed, 33 insertions(+), 453 deletions(-) diff --git a/NEWS b/NEWS index c40fd2108..f93bf30e2 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ Post v26.09.0 -------------- + - Removed implementations of the commit_ecmp_nh, chk_ecmp_nh, and + chk_ecmp_nh_mac actions from the code. - Mark tunnel ports as transient (other_config:transient=true) when the local chassis is a member of an HA chassis group. Systems which invoke ovs-ctl --delete-transient-ports during OVS startup diff --git a/controller/lflow.h b/controller/lflow.h index 33b8deeba..ca84f3753 100644 --- a/controller/lflow.h +++ b/controller/lflow.h @@ -91,21 +91,19 @@ struct uuid; #define OFTABLE_CHK_IN_PORT_SEC 97 #define OFTABLE_CHK_IN_PORT_SEC_ND 98 #define OFTABLE_CHK_OUT_PORT_SEC 99 -#define OFTABLE_ECMP_NH_MAC 100 -#define OFTABLE_ECMP_NH 101 -#define OFTABLE_CHK_LB_AFFINITY 102 -#define OFTABLE_MAC_CACHE_USE 103 -#define OFTABLE_CT_ZONE_LOOKUP 104 -#define OFTABLE_CT_ORIG_NW_DST_LOAD 105 -#define OFTABLE_CT_ORIG_IP6_DST_LOAD 106 -#define OFTABLE_CT_ORIG_TP_DST_LOAD 107 -#define OFTABLE_FLOOD_REMOTE_CHASSIS 108 -#define OFTABLE_CT_STATE_SAVE 109 -#define OFTABLE_CT_ORIG_PROTO_LOAD 110 -#define OFTABLE_GET_REMOTE_FDB 111 -#define OFTABLE_LEARN_REMOTE_FDB 112 -#define OFTABLE_EVPN_ARP_LOOKUP 113 -#define OFTABLE_NF_ORIG_INPORT_LEARN 114 +#define OFTABLE_CHK_LB_AFFINITY 100 +#define OFTABLE_MAC_CACHE_USE 101 +#define OFTABLE_CT_ZONE_LOOKUP 102 +#define OFTABLE_CT_ORIG_NW_DST_LOAD 103 +#define OFTABLE_CT_ORIG_IP6_DST_LOAD 104 +#define OFTABLE_CT_ORIG_TP_DST_LOAD 105 +#define OFTABLE_FLOOD_REMOTE_CHASSIS 106 +#define OFTABLE_CT_STATE_SAVE 107 +#define OFTABLE_CT_ORIG_PROTO_LOAD 108 +#define OFTABLE_GET_REMOTE_FDB 109 +#define OFTABLE_LEARN_REMOTE_FDB 110 +#define OFTABLE_EVPN_ARP_LOOKUP 111 +#define OFTABLE_NF_ORIG_INPORT_LEARN 112 /* Verify that table regions do not overlap. */ BUILD_ASSERT_DECL(OFTABLE_LOG_INGRESS_PIPELINE + LOG_PIPELINE_INGRESS_LEN diff --git a/include/ovn/actions.h b/include/ovn/actions.h index 7d0ed63bc..7def8917e 100644 --- a/include/ovn/actions.h +++ b/include/ovn/actions.h @@ -125,9 +125,6 @@ struct collector_set_ids; OVNACT(LOOKUP_FDB, ovnact_lookup_fdb) \ OVNACT(CHECK_IN_PORT_SEC, ovnact_result) \ OVNACT(CHECK_OUT_PORT_SEC, ovnact_result) \ - OVNACT(COMMIT_ECMP_NH, ovnact_commit_ecmp_nh) \ - OVNACT(CHK_ECMP_NH_MAC, ovnact_result) \ - OVNACT(CHK_ECMP_NH, ovnact_result) \ OVNACT(COMMIT_LB_AFF, ovnact_commit_lb_aff) \ OVNACT(CHK_LB_AFF, ovnact_result) \ OVNACT(SAMPLE, ovnact_sample) \ @@ -541,13 +538,6 @@ struct ovnact_sample { bool use_cookie; /* use cookie as obs_point_id */ }; -/* OVNACT_COMMIT_ECMP_NH. */ -struct ovnact_commit_ecmp_nh { - struct ovnact ovnact; - bool ipv6; - uint8_t proto; -}; - /* OVNACT_COMMIT_LB_AFF. */ struct ovnact_commit_lb_aff { struct ovnact ovnact; diff --git a/include/ovn/logical-fields.h b/include/ovn/logical-fields.h index e95dee316..de81a7fe2 100644 --- a/include/ovn/logical-fields.h +++ b/include/ovn/logical-fields.h @@ -127,7 +127,10 @@ enum mff_log_flags_bits { MLF_LOCALPORT_BIT = 10, MLF_USE_SNAT_ZONE = 11, MLF_CHECK_PORT_SEC_BIT = 12, - MLF_LOOKUP_COMMIT_ECMP_NH_BIT = 13, + /* Gap at 13, formerly used for COMMIT_ECMP_NH_BIT. + * This gap needs to be maintained for compatibility + * purposes between older and new OVN versions. + */ MLF_USE_LB_AFF_SESSION_BIT = 14, MLF_LOCALNET_BIT = 15, MLF_RX_FROM_TUNNEL_BIT = 16, @@ -187,8 +190,6 @@ enum mff_log_flags { /* Indicate the packet has been received from a localport */ MLF_LOCALPORT = (1 << MLF_LOCALPORT_BIT), - MLF_LOOKUP_COMMIT_ECMP_NH = (1 << MLF_LOOKUP_COMMIT_ECMP_NH_BIT), - MLF_USE_LB_AFF_SESSION = (1 << MLF_USE_LB_AFF_SESSION_BIT), /* Indicate that the port is localnet. */ diff --git a/lib/actions.c b/lib/actions.c index 77b053361..0e95e2d70 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -5078,327 +5078,6 @@ ovnact_sample_free(struct ovnact_sample *sample OVS_UNUSED) { } -static void -parse_commit_ecmp_nh(struct action_context *ctx, - struct ovnact_commit_ecmp_nh *ecmp_nh) -{ - uint8_t proto; - bool ipv6; - - lexer_force_match(ctx->lexer, LEX_T_LPAREN); /* Skip '('. */ - if (!lexer_match_id(ctx->lexer, "ipv6")) { - lexer_syntax_error(ctx->lexer, "invalid parameter"); - return; - } - if (!lexer_force_match(ctx->lexer, LEX_T_EQUALS)) { - lexer_syntax_error(ctx->lexer, "invalid parameter"); - return; - } - if (lexer_match_string(ctx->lexer, "true") || - lexer_match_id(ctx->lexer, "true")) { - ipv6 = true; - } else if (lexer_match_string(ctx->lexer, "false") || - lexer_match_id(ctx->lexer, "false")) { - ipv6 = false; - } else { - lexer_syntax_error(ctx->lexer, - "expecting true or false"); - return; - } - - lexer_force_match(ctx->lexer, LEX_T_COMMA); - - if (!lexer_match_id(ctx->lexer, "proto")) { - lexer_syntax_error(ctx->lexer, "invalid parameter"); - return; - } - if (!lexer_force_match(ctx->lexer, LEX_T_EQUALS)) { - lexer_syntax_error(ctx->lexer, "invalid parameter"); - return; - } - if (lexer_match_id(ctx->lexer, "tcp")) { - proto = IPPROTO_TCP; - } else if (lexer_match_id(ctx->lexer, "udp")) { - proto = IPPROTO_UDP; - } else if (lexer_match_id(ctx->lexer, "sctp")) { - proto = IPPROTO_SCTP; - } else { - lexer_syntax_error(ctx->lexer, "invalid protocol"); - return; - } - - lexer_force_match(ctx->lexer, LEX_T_RPAREN); /* Skip ')'. */ - - ecmp_nh->proto = proto; - ecmp_nh->ipv6 = ipv6; -} - -static void -format_COMMIT_ECMP_NH(const struct ovnact_commit_ecmp_nh *ecmp_nh, - struct ds *s) -{ - const char *proto; - - switch (ecmp_nh->proto) { - case IPPROTO_UDP: - proto = "udp"; - break; - case IPPROTO_SCTP: - proto = "sctp"; - break; - case IPPROTO_TCP: - default: - proto = "tcp"; - break; - } - ds_put_format(s, "commit_ecmp_nh(ipv6 = %s, proto = %s);", - ecmp_nh->ipv6 ? "true" : "false", proto); -} - -static void -ovnact_commit_ecmp_nh_free(struct ovnact_commit_ecmp_nh *ecmp_nh OVS_UNUSED) -{ -} - -static void -commit_ecmp_learn_action(struct ofpbuf *ofpacts, bool nw_conn, - bool ipv6, uint8_t proto) -{ - struct ofpact_learn *ol = ofpact_put_LEARN(ofpacts); - struct match match = MATCH_CATCHALL_INITIALIZER; - struct ofpact_learn_spec *ol_spec; - unsigned int imm_bytes; - uint8_t *src_imm; - - ol->flags = NX_LEARN_F_DELETE_LEARNED; - ol->idle_timeout = 20; /* seconds. */ - ol->hard_timeout = 30; /* seconds. */ - ol->priority = OFP_DEFAULT_PRIORITY; - ol->table_id = nw_conn ? OFTABLE_ECMP_NH_MAC : OFTABLE_ECMP_NH; - - /* Match on metadata of the packet that created the new table. */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = mf_from_id(MFF_METADATA); - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - ol_spec->src.field = mf_from_id(MFF_METADATA); - - if (nw_conn) { - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = mf_from_id(MFF_ETH_SRC); - ol_spec->src.field = mf_from_id(MFF_ETH_SRC); - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - } - - /* Match on the same ETH type as the packet that created the new table. */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = mf_from_id(MFF_ETH_TYPE); - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE; - union mf_value imm_eth_type = { - .be16 = ipv6 ? htons(ETH_TYPE_IPV6) : htons(ETH_TYPE_IP) - }; - mf_write_subfield_value(&ol_spec->dst, &imm_eth_type, &match); - /* Push value last, as this may reallocate 'ol_spec'. */ - imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8); - src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes)); - memcpy(src_imm, &imm_eth_type, imm_bytes); - - /* IP src. */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = - ipv6 ? mf_from_id(MFF_IPV6_SRC) : mf_from_id(MFF_IPV4_SRC); - if (nw_conn) { - ol_spec->src.field = - ipv6 ? mf_from_id(MFF_IPV6_SRC) : mf_from_id(MFF_IPV4_SRC); - } else { - ol_spec->src.field = - ipv6 ? mf_from_id(MFF_IPV6_DST) : mf_from_id(MFF_IPV4_DST); - } - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - - /* IP dst. */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = - ipv6 ? mf_from_id(MFF_IPV6_DST) : mf_from_id(MFF_IPV4_DST); - if (nw_conn) { - ol_spec->src.field = - ipv6 ? mf_from_id(MFF_IPV6_DST) : mf_from_id(MFF_IPV4_DST); - } else { - ol_spec->src.field = - ipv6 ? mf_from_id(MFF_IPV6_SRC) : mf_from_id(MFF_IPV4_SRC); - } - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - - /* IP proto. */ - union mf_value imm_proto = { - .u8 = proto, - }; - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = mf_from_id(MFF_IP_PROTO); - ol_spec->src.field = mf_from_id(MFF_IP_PROTO); - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE; - mf_write_subfield_value(&ol_spec->dst, &imm_proto, &match); - /* Push value last, as this may reallocate 'ol_spec' */ - imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8); - src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes)); - memcpy(src_imm, &imm_proto, imm_bytes); - - /* src port */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - switch (proto) { - case IPPROTO_TCP: - ol_spec->dst.field = mf_from_id(MFF_TCP_SRC); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_TCP_SRC) : mf_from_id(MFF_TCP_DST); - break; - case IPPROTO_UDP: - ol_spec->dst.field = mf_from_id(MFF_UDP_SRC); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_UDP_SRC) : mf_from_id(MFF_UDP_DST); - break; - case IPPROTO_SCTP: - ol_spec->dst.field = mf_from_id(MFF_SCTP_SRC); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_SCTP_SRC) : mf_from_id(MFF_SCTP_DST); - break; - default: - OVS_NOT_REACHED(); - break; - } - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - - /* dst port */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - switch (proto) { - case IPPROTO_TCP: - ol_spec->dst.field = mf_from_id(MFF_TCP_DST); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_TCP_DST) : mf_from_id(MFF_TCP_SRC); - break; - case IPPROTO_UDP: - ol_spec->dst.field = mf_from_id(MFF_UDP_DST); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_UDP_DST) : mf_from_id(MFF_UDP_SRC); - break; - case IPPROTO_SCTP: - ol_spec->dst.field = mf_from_id(MFF_SCTP_DST); - ol_spec->src.field = - nw_conn ? mf_from_id(MFF_SCTP_DST) : mf_from_id(MFF_SCTP_SRC); - break; - default: - OVS_NOT_REACHED(); - break; - } - ol_spec->dst.ofs = 0; - ol_spec->dst.n_bits = ol_spec->dst.field->n_bits; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_MATCH; - ol_spec->src_type = NX_LEARN_SRC_FIELD; - - /* Set MLF_LOOKUP_COMMIT_ECMP_NH_BIT for ecmp replies. */ - ol_spec = ofpbuf_put_zeros(ofpacts, sizeof *ol_spec); - ol_spec->dst.field = mf_from_id(MFF_LOG_FLAGS); - ol_spec->dst.ofs = MLF_LOOKUP_COMMIT_ECMP_NH_BIT; - ol_spec->dst.n_bits = 1; - ol_spec->n_bits = ol_spec->dst.n_bits; - ol_spec->dst_type = NX_LEARN_DST_LOAD; - ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE; - union mf_value imm_reg_value = { - .u8 = 1 - }; - mf_write_subfield_value(&ol_spec->dst, &imm_reg_value, &match); - - /* Push value last, as this may reallocate 'ol_spec' */ - imm_bytes = DIV_ROUND_UP(ol_spec->dst.n_bits, 8); - src_imm = ofpbuf_put_zeros(ofpacts, OFPACT_ALIGN(imm_bytes)); - ol = ofpacts->header; - memcpy(src_imm, &imm_reg_value, imm_bytes); - - ofpact_finish_LEARN(ofpacts, &ol); -} - -static void -encode_COMMIT_ECMP_NH(const struct ovnact_commit_ecmp_nh *ecmp_nh, - const struct ovnact_encode_params *ep OVS_UNUSED, - struct ofpbuf *ofpacts) -{ - commit_ecmp_learn_action(ofpacts, true, ecmp_nh->ipv6, ecmp_nh->proto); - commit_ecmp_learn_action(ofpacts, false, ecmp_nh->ipv6, ecmp_nh->proto); -} - -static void -parse_chk_ecmp_nh_mac(struct action_context *ctx, const struct expr_field *dst, - struct ovnact_result *res) -{ - parse_ovnact_result(ctx, "chk_ecmp_nh_mac", NULL, dst, res); -} - -static void -format_CHK_ECMP_NH_MAC(const struct ovnact_result *res, struct ds *s) -{ - expr_field_format(&res->dst, s); - ds_put_cstr(s, " = chk_ecmp_nh_mac();"); -} - -static void -encode_CHK_ECMP_NH_MAC(const struct ovnact_result *res, - const struct ovnact_encode_params *ep OVS_UNUSED, - struct ofpbuf *ofpacts) -{ - encode_result_action__(res, OFTABLE_ECMP_NH_MAC, - MLF_LOOKUP_COMMIT_ECMP_NH_BIT, ofpacts); -} - -static void -parse_chk_ecmp_nh(struct action_context *ctx, const struct expr_field *dst, - struct ovnact_result *res) -{ - parse_ovnact_result(ctx, "chk_ecmp_nh", NULL, dst, res); -} - -static void -format_CHK_ECMP_NH(const struct ovnact_result *res, struct ds *s) -{ - expr_field_format(&res->dst, s); - ds_put_cstr(s, " = chk_ecmp_nh();"); -} - -static void -encode_CHK_ECMP_NH(const struct ovnact_result *res, - const struct ovnact_encode_params *ep OVS_UNUSED, - struct ofpbuf *ofpacts) -{ - encode_result_action__(res, OFTABLE_ECMP_NH, - MLF_LOOKUP_COMMIT_ECMP_NH_BIT, ofpacts); -} - static void parse_commit_lb_aff(struct action_context *ctx, struct ovnact_commit_lb_aff *lb_aff) @@ -6172,14 +5851,6 @@ parse_set_action(struct action_context *ctx) && lexer_lookahead(ctx->lexer) == LEX_T_LPAREN) { parse_check_out_port_sec( ctx, &lhs, ovnact_put_CHECK_OUT_PORT_SEC(ctx->ovnacts)); - } else if (!strcmp(ctx->lexer->token.s, "chk_ecmp_nh_mac") - && lexer_lookahead(ctx->lexer) == LEX_T_LPAREN) { - parse_chk_ecmp_nh_mac(ctx, &lhs, - ovnact_put_CHK_ECMP_NH_MAC(ctx->ovnacts)); - } else if (!strcmp(ctx->lexer->token.s, "chk_ecmp_nh") - && lexer_lookahead(ctx->lexer) == LEX_T_LPAREN) { - parse_chk_ecmp_nh(ctx, &lhs, - ovnact_put_CHK_ECMP_NH(ctx->ovnacts)); } else if (!strcmp(ctx->lexer->token.s, "chk_lb_aff") && lexer_lookahead(ctx->lexer) == LEX_T_LPAREN) { parse_chk_lb_aff(ctx, &lhs, @@ -6323,8 +5994,6 @@ parse_action(struct action_context *ctx) ovnact_put_CT_SNAT_TO_VIP(ctx->ovnacts); } else if (lexer_match_id(ctx->lexer, "put_fdb")) { parse_put_fdb(ctx, ovnact_put_PUT_FDB(ctx->ovnacts)); - } else if (lexer_match_id(ctx->lexer, "commit_ecmp_nh")) { - parse_commit_ecmp_nh(ctx, ovnact_put_COMMIT_ECMP_NH(ctx->ovnacts)); } else if (lexer_match_id(ctx->lexer, "commit_lb_aff")) { parse_commit_lb_aff(ctx, ovnact_put_COMMIT_LB_AFF(ctx->ovnacts)); } else if (lexer_match_id(ctx->lexer, "sample")) { diff --git a/lib/ovn-util.c b/lib/ovn-util.c index 9842afb3c..eb1fa8a06 100644 --- a/lib/ovn-util.c +++ b/lib/ovn-util.c @@ -1007,7 +1007,7 @@ ip_address_and_port_from_lb_key(const char *key, char **ip_address, * * NOTE: If OVN_NORTHD_PIPELINE_CSUM is updated make sure to double check * whether an update of OVN_INTERNAL_MINOR_VER is required. */ -#define OVN_NORTHD_PIPELINE_CSUM "1167787232 11430" +#define OVN_NORTHD_PIPELINE_CSUM "3980195012 11262" #define OVN_INTERNAL_MINOR_VER 16 /* Returns the OVN version. The caller must free the returned value. */ diff --git a/ovn-sb.xml b/ovn-sb.xml index b41b79662..808694fe0 100644 --- a/ovn-sb.xml +++ b/ovn-sb.xml @@ -2881,58 +2881,6 @@ tcp.flags = RST; </p> </dd> - <dt><code>commit_ecmp_nh(<var>ipv6</var>);</code></dt> - <dd> - <p> - <b>Parameters</b>: IPv4/IPv6 traffic. - </p> - - <p> - This action translates to an openflow "learn" action that inserts - two new flows in tables referenced by table 100 and 101. - </p> - - <ul> - <li> - Match on the 5-tuple and the expected next-hop mac address - in table 100: - <code>nw_src=ip0</code>, <code>nw_dst=ip1</code>, - <code>ip_proto</code>,<code>tp_src=l4_port0</code>, - <code>tp_dst=l4_port1</code>,<code>dl_src=ethaddr</code> and - set <code>reg9[5]</code>. - </li> - <li> - Match on the 5-tuple in table 101: - <code>nw_src=ip1</code>, <code>nw_dst=ip0</code>, - <code>ip_proto</code>, <code>tp_src=l4_port1</code>, - <code>tp_dst=l4_port0</code> and set <code>reg9[5]</code> to 1 - </li> - </ul> - - <p> - This action is applied if the packet arrives via ECMP route or - if it is routed via an ECMP route - </p> - </dd> - - <dt><code><var>R</var> = chk_ecmp_nh_mac();</code></dt> - <dd> - <p> - This action checks if the packet under consideration matches any - flow in table 100. If it is so, then the 1-bit destination - register <var>R</var> is set to 1. - </p> - </dd> - - <dt><code><var>R</var> = chk_ecmp_nh();</code></dt> - <dd> - <p> - This action checks if the packet under consideration matches any - flow in table 101. If it is so, then the 1-bit destination - register <var>R</var> is set to 1. - </p> - </dd> - <dt> <code> commit_lb_aff(<var>vip</var>, <var>backend</var>, diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 7ae147dee..560f02fc1 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -1677,20 +1677,18 @@ m4_define([OFTABLE_LOOKUP_FDB], [96]) m4_define([OFTABLE_CHK_IN_PORT_SEC], [97]) m4_define([OFTABLE_CHK_IN_PORT_SEC_ND], [98]) m4_define([OFTABLE_CHK_OUT_PORT_SEC], [99]) -m4_define([OFTABLE_ECMP_NH_MAC], [100]) -m4_define([OFTABLE_ECMP_NH], [101]) -m4_define([OFTABLE_CHK_LB_AFFINITY], [102]) -m4_define([OFTABLE_MAC_CACHE_USE], [103]) -m4_define([OFTABLE_CT_ZONE_LOOKUP], [104]) -m4_define([OFTABLE_CT_ORIG_NW_DST_LOAD], [105]) -m4_define([OFTABLE_CT_ORIG_IP6_DST_LOAD], [106]) -m4_define([OFTABLE_CT_ORIG_TP_DST_LOAD], [107]) -m4_define([OFTABLE_FLOOD_REMOTE_CHASSIS], [108]) -m4_define([OFTABLE_CT_STATE_SAVE], [109]) -m4_define([OFTABLE_CT_ORIG_PROTO_LOAD], [110]) -m4_define([OFTABLE_GET_REMOTE_FDB], [111]) -m4_define([OFTABLE_LEARN_REMOTE_FDB], [112]) -m4_define([OFTABLE_EVPN_ARP_LOOKUP], [113]) -m4_define([OFTABLE_NF_ORIG_INPORT_LEARN], [114]) +m4_define([OFTABLE_CHK_LB_AFFINITY], [100]) +m4_define([OFTABLE_MAC_CACHE_USE], [101]) +m4_define([OFTABLE_CT_ZONE_LOOKUP], [102]) +m4_define([OFTABLE_CT_ORIG_NW_DST_LOAD], [103]) +m4_define([OFTABLE_CT_ORIG_IP6_DST_LOAD], [104]) +m4_define([OFTABLE_CT_ORIG_TP_DST_LOAD], [105]) +m4_define([OFTABLE_FLOOD_REMOTE_CHASSIS], [106]) +m4_define([OFTABLE_CT_STATE_SAVE], [107]) +m4_define([OFTABLE_CT_ORIG_PROTO_LOAD], [108]) +m4_define([OFTABLE_GET_REMOTE_FDB], [109]) +m4_define([OFTABLE_LEARN_REMOTE_FDB], [110]) +m4_define([OFTABLE_EVPN_ARP_LOOKUP], [111]) +m4_define([OFTABLE_NF_ORIG_INPORT_LEARN], [112]) m4_define([OFTABLE_SAVE_INPORT_HEX], [m4_eval(OFTABLE_SAVE_INPORT, 16)]) diff --git a/tests/ovn.at b/tests/ovn.at index a88a077c6..13c05528e 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -2180,26 +2180,6 @@ reg0[[0]] = check_out_port_sec(foo); check_out_port_sec; Syntax error at `check_out_port_sec' expecting action. -# commit_ecmp_nh -commit_ecmp_nh(ipv6 = "false", proto = tcp); - formats as commit_ecmp_nh(ipv6 = false, proto = tcp); - encodes as learn(table=OFTABLE_ECMP_NH_MAC,idle_timeout=20,hard_timeout=30,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_SRC[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],NXM_OF_IP_DST[[]],nw_proto=6,NXM_OF_TCP_SRC[[]],NXM_OF_TCP_DST[[]],load:0x1->NXM_NX_REG10[[13]]),learn(table=OFTABLE_ECMP_NH,idle_timeout=20,hard_timeout=30,delete_learned,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[0..-1]],NXM_OF_IP_DST[[]]=NXM_OF_IP_SRC[[0..-1]],nw_proto=6,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[0..-1]],NXM_OF_TCP_DST[[]]=NXM_OF_TCP_SRC[[0..-1]],load:0x1->NXM_NX_REG10[[13]]) - -commit_ecmp_nh(ipv6 = "true", proto = udp); - formats as commit_ecmp_nh(ipv6 = true, proto = udp); - encodes as learn(table=OFTABLE_ECMP_NH_MAC,idle_timeout=20,hard_timeout=30,delete_learned,OXM_OF_METADATA[[]],NXM_OF_ETH_SRC[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],NXM_NX_IPV6_DST[[]],nw_proto=17,NXM_OF_UDP_SRC[[]],NXM_OF_UDP_DST[[]],load:0x1->NXM_NX_REG10[[13]]),learn(table=OFTABLE_ECMP_NH,idle_timeout=20,hard_timeout=30,delete_learned,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]]=NXM_NX_IPV6_DST[[0..-1]],NXM_NX_IPV6_DST[[]]=NXM_NX_IPV6_SRC[[0..-1]],nw_proto=17,NXM_OF_UDP_SRC[[]]=NXM_OF_UDP_DST[[0..-1]],NXM_OF_UDP_DST[[]]=NXM_OF_UDP_SRC[[0..-1]],load:0x1->NXM_NX_REG10[[13]]) - -commit_ecmp_nh(proto = sctp); - Syntax error at `proto' invalid parameter. - -# chk_ecmp_nh_mac -reg9[[5]] = chk_ecmp_nh_mac(); - encodes as set_field:0/0x2000->reg10,resubmit(,OFTABLE_ECMP_NH_MAC),move:NXM_NX_REG10[[13]]->OXM_OF_PKT_REG4[[5]] - -# chk_ecmp_nh -reg9[[5]] = chk_ecmp_nh(); - encodes as set_field:0/0x2000->reg10,resubmit(,OFTABLE_ECMP_NH),move:NXM_NX_REG10[[13]]->OXM_OF_PKT_REG4[[5]] - # commit_lb_aff commit_lb_aff(vip = "172.16.0.123:8080", backend = "10.0.0.3:8080", proto = tcp, timeout = 30); encodes as learn(table=OFTABLE_CHK_LB_AFFINITY,idle_timeout=30,delete_learned,cookie=0xaaaaaaaa,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],ip_dst=172.16.0.123,nw_proto=6,tcp_dst=8080,load:0x1->NXM_NX_REG10[[14]],load:0xa000003->NXM_NX_REG4[[]],load:0x1f90->NXM_NX_REG2[[0..15]]) diff --git a/utilities/ovn-trace.c b/utilities/ovn-trace.c index 1fcebf584..8901354cb 100644 --- a/utilities/ovn-trace.c +++ b/utilities/ovn-trace.c @@ -3617,12 +3617,6 @@ trace_actions(const struct ovnact *ovnacts, size_t ovnacts_len, execute_mirror(ovnact_get_MIRROR(a), dp, uflow, super); break; - case OVNACT_COMMIT_ECMP_NH: - break; - case OVNACT_CHK_ECMP_NH_MAC: - break; - case OVNACT_CHK_ECMP_NH: - break; case OVNACT_COMMIT_LB_AFF: break; case OVNACT_CHK_LB_AFF: -- 2.55.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
