Thanks William, it is my ovs-ofctl issue, my ovs-vswitchd is new, but ovs-ofctl 
is old, but after I used ovs-ofctl, I still saw issues:

OFPT_ERROR (OF1.3) (xid=0x6): OFPBAC_BAD_SET_ARGUMENT
OFPT_FLOW_MOD (OF1.3) (xid=0x6): ADD 
icmp6,icmp_type=135,icmp_code=0,nd_sll=22:70:e0:d0:fc:75 
cookie:0x1234567890123456 
actions=set_field:136->icmpv6_type,set_field:0->icmpv6_code,set_field:2->nd_options_type,resubmit(,0)
OFPT_ERROR (OF1.3) (xid=0x6): OFPBAC_BAD_SET_ARGUMENT
OFPT_FLOW_MOD (OF1.3) (xid=0x6): ADD icmp6,icmp_type=136,icmp_code=0 
cookie:0x1234567890123456 
actions=move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],set_field:22:70:e0:d0:fc:76->eth_src,move:NXM_NX_IPV6_SRC[]->NXM_NX_IPV6_DST[],set_field:fe80::2070:e0ff:fed0:fc76->ipv6_src,set_field:22:70:e0:d0:fc:76->nd_tll,set_field:57344->nd_reserved,IN_PORT

I saw this thread 
https://www.mail-archive.com/ovs-dev@openvswitch.org/msg47815.html discussed 
it,  it can work after I applied patch in 
https://www.mail-archive.com/ovs-dev@openvswitch.org/msg47815.html.

So @Flavio, maybe you need to apply the patch in 
https://www.mail-archive.com/ovs-dev@openvswitch.org/msg47815.html to fix this 
issue in kernel datapath, per my check, kernel datapath with this patch can 
work, I verified it by using openflow to do NS reply and ICMPv6 ping reply.

William, I guess  you're using ovs userspace, so it doesn't have this issue.

-----邮件原件-----
发件人: William Tu [mailto:u9012...@gmail.com] 
发送时间: 2021年2月22日 12:20
收件人: Yi Yang (杨燚)-云服务集团 <yangy...@inspur.com>
抄送: vishal.deep.ajm...@ericsson.com; b...@ovn.org; ovs-...@openvswitch.org; 
ovs-discuss@openvswitch.org
主题: Re: [ovs-discuss] Do you know how I can set nd_options_type field for ipv6 
ND message?

On Sat, Feb 20, 2021 at 2:11 AM Yi Yang (杨燚)-云服务集团 <yangy...@inspur.com> wrote:
>
> Hi, folks
>
>
>
> I need to set nd_options_type to 2 for NS message to respond IPv6 NS, my flow 
> is below, why nd_options_type can’t be set? Per commit 
> 9b2b84973db76e1138d9234ff1b84bb6bb156011, it should work, what’s wrong? 
> Appreciate your help in advance, thank you.
>
>
>
> $ sudo ovs-ofctl -Oopenflow13 add-flow br-int 
> "table=0,ipv6,icmp6,icmp_type=135,icmp_code=0,nd_target=fe80::505c:cff:fe88:392f,nd_sll=52:5c:0c:88:39:2f,actions=set_field:136->icmpv6_type,set_field:0->icmpv6_code,move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],set_field:52:5c:0c:88:39:3f->eth_src,move:NXM_NX_IPV6_SRC[]->NXM_NX_IPV6_DST[],set_field:fe80::505c:cff:fe88:392f->ipv6_src,set_field:52:5c:0c:88:39:3f->nd_tll,set_field:2->nd_options_type,set_field:OxE000->nd_reserved,output:IN_PORT"
>
> ovs-ofctl: nd_options_type is not a valid OXM field name
>
> $ sudo ovs-ofctl -Oopenflow13 add-flow br-int 
> "table=0,ipv6,icmp6,icmp_type=135,icmp_code=0,nd_target=fe80::505c:cff:fe88:392f,nd_sll=52:5c:0c:88:39:2f,actions=set_field:136->icmpv6_type,set_field:0->icmpv6_code,move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],set_field:52:5c:0c:88:39:3f->eth_src,move:NXM_NX_IPV6_SRC[]->NXM_NX_IPV6_DST[],set_field:fe80::505c:cff:fe88:392f->ipv6_src,set_field:52:5c:0c:88:39:3f->nd_tll,load:2->ERICOXM_OF_ICMPV6_ND_OPTIONS_TYPE[],set_field:OxE000->nd_reserved,output:IN_PORT"
>
> ovs-ofctl: ERICOXM_OF_ICMPV6_ND_OPTIONS_TYPE[]: unknown field 
> `ERICOXM_OF_ICMPV6_ND_OPTIONS_TYPE'

I tested by doing
roos:~/ovs# ovs-ofctl add-flow br0 "in_port=1
icmp6,icmpv6_code=0,icmpv6_type=135
actions=set_field:2->nd_options_type, 2"
roos:~/ovs# ovs-ofctl dump-flows br0
 cookie=0x0, duration=8.492s, table=0, n_packets=0, n_bytes=0,
icmp6,in_port="afxdp-p0",icmp_type=135,icmp_code=0
actions=load:0x2->ERICOXM_OF_ICMPV6_ND_OPTIONS_TYPE[],output:2
 cookie=0x0, duration=1078.248s, table=0, n_packets=0, n_bytes=0,
priority=0 actions=NORMAL

Looks ok.
William

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to