[ovs-dev] 回复:[PATCH] ofproto-dpif: remove checking setting nd_ext field

范开喜 fankaixi.li at bytedance.com
Tue Sep 8 01:51:56 UTC 2020

Hi,  I have modified this patch. Now only userspace code would be affected
by this patch. I have test it and please help to check if it could ok.

于2020年09月07日星期一 14:27 <fankaixi.li at bytedance.com> 写道:

I have test it with ovs 2.14.90 on kernel 4.19.117.

My test flows are as flows. Flow 1 match ipv6 neighbor discovery
solicitation packet, modify icmpv6 type and code and redirect it to table
81. Flow 2 modify ipv6 nd target ipv6 address and destination link-address
# flow 1
ovs-ofctl -Oopenflow13 add-flow br0 "cookie=0x4000000, table=0,
# flow 2
ovs-ofctl -Oopenflow13 add-flow br0

The kernel datapath flows:
#ovs-appctl dpctl/dump-flows
packets:77, bytes:6622, used:0.033s,

The ipv6 nd advertise packet captured at port:
root at n227-025-153:~# tcpdump -eni vethp1_host -nnvvv
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vethp1_host, link-type EN10MB (Ethernet), capture size 262144
14:24:51.743409 00:23:15:d3:22:01 > fa:16:3e:55:ad:df, ethertype IPv6
(0x86dd), length 86: (hlim 255, next-header ICMPv6 (58) payload length: 32)
2001:db8:0:2::1 > fe80::f816:3eff:fe80:6715: [icmp6 sum ok] ICMP6, neighbor
advertisement, length 32, tgt is 2001:db8:0:2::1, Flags [none]
          destination link-address option (2), length 8 (1):
            0x0000:  0023 15d3 2201

于2020年09月06日星期日 15:46 <fankaixi.li at bytedance.com> 写道:

From: "fankaixi.li" In order to support openflow rule which setting nd_ext
fields in openflow tables, we should remove setting nd_ext fields when
constructing rule. The ofproto would translate it into userspace actions
when handling upcalls. Signed-off-by: fankaixi.li ---
ofproto/ofproto-dpif.c | 8 -------- 1 file changed, 8 deletions(-) diff
--git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index
4f0638f23..f4c37f43d 100644 --- a/ofproto/ofproto-dpif.c +++
b/ofproto/ofproto-dpif.c @@ -4637,14 +4637,6 @@ check_actions(const struct
ofproto_dpif *ofproto, "ct original direction tuple"); return
OFPERR_NXBAC_CT_DATAPATH_SUPPORT; } - } else if (!support->nd_ext &&
ofpact->type == OFPACT_SET_FIELD) { - const struct mf_field *dst =
ofpact_get_mf_dst(ofpact); - - if (dst->id == MFF_ND_RESERVED || dst->id ==
MFF_ND_OPTIONS_TYPE) { - report_unsupported_act("set field", - "setting
IPv6 ND Extensions fields"); - return OFPERR_OFPBAC_BAD_SET_ARGUMENT; - } }
} -- 2.24.3 (Apple Git-128)

More information about the dev mailing list