> On Fri, Dec 20, 2019 at 5:02 PM Lorenzo Bianconi > <[email protected]> wrote: > > > > Introduce IPv6 Prefix delegation state machine according to RFC 3633 > > https://tools.ietf.org/html/rfc3633. > > Add handle_dhcpv6_reply controller action to parse advertise/reply from > > IPv6 delegation server. > > Introduce logical flows in ovn router pipeline in order to parse dhcpv6 > > advertise/reply from IPv6 prefix delegation router. > > This series relies on the following OVS commit: > > https://github.com/openvswitch/ovs/commit/cec89046f72cb044b068ba6a4e30dbcc4292c4c1 > > > > Hi Lorenzo, >
Hi Numan, thx for reviewing and testing the series :) > I tested this patch series. And I don't think it is working as expected. > > My test setup has the below ovn resources > > ****** > witch 6f57f575-1dc0-463e-8c04-7bcee6697cea (public) > port public-lr0 > type: router > router-port: lr0-public > port ln-public > type: localnet > addresses: ["unknown"] > switch 1fa5de75-fcae-49a8-9eca-55ed274cc100 (sw0) > port sw0-port1 > addresses: ["50:54:00:00:00:03 10.0.0.3"] > port sw0-lr0 > type: router > router-port: lr0-sw0 > switch 73af6b0e-8156-446e-8419-83e5ecc323ee (sw1) > port sw1-lr0 > type: router > router-port: lr0-sw1 > port sw1-port1 > addresses: ["40:54:00:00:00:03 20.0.0.3"] > router 87c8d985-3a42-423b-8ed0-d4a5b4cfb5ac (lr0) > port lr0-public > mac: "00:00:20:20:12:13" > networks: ["172.16.0.100/24", "2001:db8:3333::1/64"] > gateway chassis: [ovn-gw-1] > port lr0-sw1 > mac: "00:00:00:00:ff:02" > networks: ["20.0.0.1/24"] > port lr0-sw0 > mac: "00:00:00:00:ff:01" > networks: ["10.0.0.1/24"] > ****** > > When I enabled prefix delegation on lr-public, lr0-sw1 and lr0-sw0, > ovn-controller (on ovn-gw-1) didn't > send the IPv6 PD messages. I had to add an IPv6 address on lr0-public > router port for ovn-controller > to start sending IPv6 PD messages. > > *** > ovn-nbctl add logical_router_port lr0-public networks > "2001\:db8\:3333\:\:1/64" > *** > > I think that should not be the case. If prefix_delegation=true is set > on a lrp, then ovn-controller should use the > IPv6 link local address (which is derived from the mac) instead of > expecting CMS to configure an IPv6 address. > > In my case, the logical router port - lr0-sw0 never received any IPv6 > prefix. lr0-sw1 did receive. ack, I will fix it in v5 > > In my testing, ovn-controller crashed with the below trace when I ran > the above "ovn-nbctl add logical_router_port ..." command > > *** > (gdb) bt > #0 0x00000000004b7875 in skiplist_get_data (node=node@entry=0x786966) > at ../lib/skiplist.c:212 > #1 0x00000000004aa457 in ovsdb_idl_cursor_next_eq > (cursor=cursor@entry=0x7ffe28971090) at ../lib/ovsdb-idl.c:2982 > #2 0x000000000041f2fd in prepare_ipv6_prefixd > (active_tunnels=0x1f3dc60, chassis=0x1f9f9d0, > local_datapaths=0x1f3dc00, > sbrec_port_binding_by_name=0x1f12cd0, > sbrec_port_binding_by_datapath=<optimized out>, > ovnsb_idl_txn=0x2036cb0) > at ../controller/pinctrl.c:3257 > #3 pinctrl_run (ovnsb_idl_txn=ovnsb_idl_txn@entry=0x2036cb0, > > sbrec_datapath_binding_by_key=sbrec_datapath_binding_by_key@entry=0x1f3f940, > > sbrec_port_binding_by_datapath=sbrec_port_binding_by_datapath@entry=0x1f134b0, > sbrec_port_binding_by_key=sbrec_port_binding_by_key@entry=0x1f12e80, > sbrec_port_binding_by_name=sbrec_port_binding_by_name@entry=0x1f12cd0, > > sbrec_mac_binding_by_lport_ip=sbrec_mac_binding_by_lport_ip@entry=0x1f3faf0, > sbrec_igmp_groups=0x1f3d060, > sbrec_ip_multicast_opts=0x1f3fc80, dns_table=0x1f48f50, > ce_table=0x1f48f50, svc_mon_table=0x1f48f50, > br_int=<optimized out>, chassis=0x1f9f9d0, > local_datapaths=0x1f3dc00, active_tunnels=0x1f3dc60) > at ../controller/pinctrl.c:2510 > #4 0x0000000000408536 in main (argc=<optimized out>, argv=<optimized > out>) at ../controller/ovn-controller.c:2136 > **** ack, I will fix it in v5 > > This patch series stores the received PD in the > port_binding.options:ipv6_ra_pd_list column. > CMS will not come to know about the configured PD. Ideally all this > should be transparent to CMS. > When ovn-controller stores the received PD in the > port_binding.options, ovn-northd should read this > value and store it in logical_Router_port addresses column (or > probably a new column) to indicate CMS > that prefix is configured for this router port. ack, I will add it in v5 > > And if CMS has enabled, router advertisement for a router port, > ovn-controller(s) should start sending RAs > for the ports which belong to the logical switches. > > As suggested earlier, please enhance system-ovn test case to add > another logical router port to > the router R1 and make sure that all the logical router ports get > separate prefixes. I guess I have already done it but probably the name convention I used is a little bit messy. I will improve it in v5. Regards, Lorenzo > > Thanks > Numan > > > Changes since v3: > > - cosmetics > > - add a provider bridge in the unit-test deployment and add a localnet > > port to the deployment to access the underlay network > > - request IPv6 prefix even for bar router logical port in the unit-test > > deployment > > > > Changes since v2: > > - add unitest support in system-ovn.at > > > > Changes since v1: > > - rebase on top of ovn master branch > > - request an IPv6 prefix for each 'downstream' logical router port marked > > with > > prefix set to true > > - add missing documentation > > - rename dhcp6_server_pkt in handle_dhcpv6_reply > > > > Lorenzo Bianconi (2): > > controller: add ipv6 prefix delegation state machine > > northd: add logical flows for dhcpv6 pfd parsing > > > > controller/pinctrl.c | 597 ++++++++++++++++++++++++++++++++++++++++++ > > include/ovn/actions.h | 8 +- > > lib/actions.c | 22 ++ > > lib/ovn-l7.h | 19 ++ > > northd/ovn-northd.c | 69 ++++- > > ovn-nb.xml | 17 ++ > > ovn-sb.xml | 8 + > > tests/atlocal.in | 5 +- > > tests/ovn.at | 6 + > > tests/system-ovn.at | 124 +++++++++ > > utilities/ovn-trace.c | 3 + > > 11 files changed, 875 insertions(+), 3 deletions(-) > > > > -- > > 2.21.0 > > > > _______________________________________________ > > dev mailing list > > [email protected] > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
