Re: [ovs-dev] [ovs-discuss] Do you know how I can set nd_options_type field for ipv6 ND message?

2021-02-24 Thread William Tu
On Tue, Feb 23, 2021 at 6:03 PM Yi Yang (杨燚)-云服务集团  wrote:
>
> Out of curious, I remember OVN doesn't support OVS DPDK, I believe OVN also 
> does IPv6 ND by openflow, is it acceptable to use slow path to handle IPv6 ND 
> for OVS kernel datapath?
>
Maybe OVN uses IPv6 ND, but not setting/matching 'nd_options_type'?
William
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [ovs-discuss] Do you know how I can set nd_options_type field for ipv6 ND message?

2021-02-23 Thread William Tu
On Sun, Feb 21, 2021 at 9:39 PM Yi Yang (杨燚)-云服务集团  wrote:
>
> 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.

Yes, I'm testing it using userspace datapath. I think kernel datapath
doesn't support setting nd_ext.
Look like you can get it working by doing it in slow path, like the
patch you pointed to.
William
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [ovs-discuss] Do you know how I can set nd_options_type field for ipv6 ND message?

2021-02-21 Thread William Tu
On Sat, Feb 20, 2021 at 2:11 AM Yi Yang (杨燚)-云服务集团  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
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev