@@ -174,14 +174,27 @@ ovn_init_symtab(struct shash *symtab)
expr_symtab_add_field(symtab, "arp.tha", MFF_ARP_THA, "arp", false);
expr_symtab_add_predicate(symtab, "nd",
- "icmp6.type == {135, 136} && icmp6.code == 0 && ip.ttl == 255");
+ "icmp6.type == {133, 134, 135, 136, 137} "
+ "&& icmp6.code == 0 && ip.ttl == 255");
+ expr_symtab_add_predicate(symtab, "nd_rs",
+ "icmp6.type == 133 && icmp6.code == 0 && ip.ttl == 255");
+ expr_symtab_add_predicate(symtab, "nd_ra",
+ "icmp6.type == 134 && icmp6.code == 0 && ip.ttl == 255");
expr_symtab_add_predicate(symtab, "nd_ns",
"icmp6.type == 135 && icmp6.code == 0 && ip.ttl == 255");
expr_symtab_add_predicate(symtab, "nd_na",
"icmp6.type == 136 && icmp6.code == 0 && ip.ttl == 255");
- expr_symtab_add_field(symtab, "nd.target", MFF_ND_TARGET, "nd", false);
- expr_symtab_add_field(symtab, "nd.sll", MFF_ND_SLL, "nd_ns", false);
- expr_symtab_add_field(symtab, "nd.tll", MFF_ND_TLL, "nd_na", false);
+ expr_symtab_add_predicate(symtab, "nd_rd",
+ "icmp6.type == 137 && icmp6.code == 0 && ip.ttl == 255");
+ expr_symtab_add_field(symtab, "nd.target", MFF_ND_TARGET,
+ "icmp6.type == {135, 136, 137} "
+ "&& icmp6.code == 0 && ip.ttl == 255", false);
+ expr_symtab_add_field(symtab, "nd.sll", MFF_ND_SLL,
+ "icmp6.type == {133, 134, 135} "
+ "&& icmp6.code == 0 && ip.ttl == 255", false);
+ expr_symtab_add_field(symtab, "nd.tll", MFF_ND_TLL,
+ "icmp6.type == {136, 137} "
+ "&& icmp6.code == 0 && ip.ttl == 255", false);
expr_symtab_add_predicate(symtab, "tcp", "ip.proto == 6");
expr_symtab_add_field(symtab, "tcp.src", MFF_TCP_SRC, "tcp", false);
@@ -858,9 +858,12 @@
<li><code>ip.later_frag</code> expands to <code>ip.frag[1]</code></li>
<li><code>ip.first_frag</code> expands to <code>ip.is_frag && !ip.later_frag</code></li>
<li><code>arp</code> expands to <code>eth.type == 0x806</code></li>
- <li><code>nd</code> expands to <code>icmp6.type == {135, 136} && icmp6.code == 0 && ip.ttl == 255</code></li>
+ <li><code>nd</code> expands to <code>icmp6.type == {133, 134, 135, 136, 137} && icmp6.code == 0 && ip.ttl == 255</code></li>
+ <li><code>nd_rs</code> expands to <code>icmp6.type == 133 && icmp6.code == 0 && ip.ttl == 255</code></li>
+ <li><code>nd_ra</code> expands to <code>icmp6.type == 134 && icmp6.code == 0 && ip.ttl == 255</code></li>
<li><code>nd_ns</code> expands to <code>icmp6.type == 135 && icmp6.code == 0 && ip.ttl == 255</code></li>
<li><code>nd_na</code> expands to <code>icmp6.type == 136 && icmp6.code == 0 && ip.ttl == 255</code></li>
+ <li><code>nd_rd</code> expands to <code>icmp6.type == 137 && icmp6.code == 0 && ip.ttl == 255</code></li>
<li><code>tcp</code> expands to <code>ip.proto == 6</code></li>
<li><code>udp</code> expands to <code>ip.proto == 17</code></li>
<li><code>sctp</code> expands to <code>ip.proto == 132</code></li>
@@ -911,7 +911,7 @@ get_nd(xxreg0, ip6.dst);
# put_nd
put_nd(inport, nd.target, nd.sll);
encodes as push:NXM_NX_XXREG0[],push:NXM_OF_ETH_SRC[],push:NXM_NX_ND_SLL[],push:NXM_NX_ND_TARGET[],pop:NXM_NX_XXREG0[],pop:NXM_OF_ETH_SRC[],controller(userdata=00.00.00.04.00.00.00.00),pop:NXM_OF_ETH_SRC[],pop:NXM_NX_XXREG0[]
- has prereqs ((icmp6.type == 0x87 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd)) || (icmp6.type == 0x88 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd))) && icmp6.code == 0 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd) && ip.ttl == 0xff && (eth.type == 0x800 || eth.type == 0x86dd) && icmp6.type == 0x87 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd) && icmp6.code == 0 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd) && ip.ttl == 0xff && (eth.type == 0x800 || eth.type == 0x86dd)
+ has prereqs ((icmp6.type == 0x87 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd)) || (icmp6.type == 0x88 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd)) || (icmp6.type == 0x89 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd))) && icmp6.code == 0 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd) && ip.ttl == 0xff && (eth.type == 0x800 || eth.type == 0x86dd) && ((icmp6.type == 0x85 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd)) || (icmp6.type == 0x86 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd)) || (icmp6.type == 0x87 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd))) && icmp6.code == 0 && eth.type == 0x86dd && ip.proto == 0x3a && (eth.type == 0x800 || eth.type == 0x86dd) && ip.ttl == 0xff && (eth.type
== 0x800 || eth.type == 0x86dd)
# put_dhcpv6_opts
From: Zongkai LI <zealokii@gmail.com> This patch updates symbols in logical-fields for ND, such as "nd", "nd.target", "nd.sll", "nd.tll", to describe more clear about "icmp6.type" predicate. And it adds new symbols: - "nd_rs" stands for Router Solicitation message, - "nd_ra" stands for Router Advertisement message, - "nd_rd" stands for Redirect message, --- ovn/lib/logical-fields.c | 21 +++++++++++++++++---- ovn/ovn-sb.xml | 5 ++++- tests/ovn.at | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) reg1[0] = put_dhcpv6_opts(ia_addr = ae70::4, server_id = 00:00:00:00:10:02);