Hi, I’m trying to implement multiple routing tables support for Logical Routers and met some difficulties, need help/advice.
How I see it can be used by administrators: 1. In LRP’s options field is added key route_table with the routing table’s name - any string. 2. When adding new logical router static route record, supply optional parameter - route_table. 3. If route_table values in LRP and LR route match, packets coming from this particular LRP are looked up against routes with mentioned route_table value. 4. Routes to directly-connected networks of LRs have higher priority that routes from route_tables. So, this functionality can help achieve different routes loockup for different LR’s subnets. Planned changes: - add route_table field to Logical_Router_Static_Route table’s schema - add new optional field to Logical_Router_Static_Routes table, which when absent indicates that route is global for LR (current behaviour), and when there is a string with route_table name Regards, Vladislav Odintsov - add new stage in logical router ingress pipeline right before lr_in_ip_routing - lr_in_ip_routing_pre. In this stage packets are checked against inport and route_table’s id (computed somehow, uniq per route_table of LR) writes to some of OVS registers and then passes to next table - lr_in_ip_routing. Currently in my dev env it looks like this: table=9 (lr_in_ip_routing_pre), priority=100 , match=(inport == "subnet-8E3CDCC0"), action=(reg7 = 110; next;) table=9 (lr_in_ip_routing_pre), priority=100 , match=(inport == "subnet-E99CDA60"), action=(reg7 = 100; next;) table=9 (lr_in_ip_routing_pre), priority=0 , match=(1), action=(next;) - routes, which have route_table set, are added to lflow with match on previously set value of computed uniq route_table id, stored in OVS register. Like this: table=10(lr_in_ip_routing ), priority=1 , match=(reg7 == 100 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[0..15] = 0; reg0 = 169.254.0.1; reg1 = 169.254.0.2; eth.src = 06:00:b1:5f:12:77; outport = "vpc-B15F1277-up"; flags.loopback = 1; next;) table=10(lr_in_ip_routing ), priority=1 , match=(reg7 == 110 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[0..15] = 0; reg0 = 169.254.0.1; reg1 = 169.254.0.2; eth.src = 06:00:b1:5f:12:77; outport = "vpc-B15F1277-up"; flags.loopback = 1; next;) My question is about OVS register choice. I see in ovn-northd.c described OVS fields and (please correct me, if I’m wrong) it looks like there are no registers available to store route_table id? It looks for me that all registers are busy. What should I do in this particular situation? If I set reg10, for instance, ovn-controller can’t process such match and action, thus it’s an unknown symbol. If I increase the MFF_N_LOG_REGS from 10 to 12, ovn connectivity tests fail and even arp/ip connectivity drops. (see commit: https://github.com/ovn-org/ovn/commit/18e71b5240009c519dc44eb06d101b3edd9dc103 <https://github.com/ovn-org/ovn/commit/18e71b5240009c519dc44eb06d101b3edd9dc103>) I’m new to OVN development, please help :) Thanks in advance! Regards, Vladislav Odintsov _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
