Thanks, David. Those slides are extremely helpful. Also, I ran into a bug that manifested on big endian architecture:
diff --git i/drivers/net/vrf.c w/drivers/net/vrf.c index b23bb2fae5f8..a5f984689aee 100644 --- i/drivers/net/vrf.c +++ w/drivers/net/vrf.c @@ -1130,7 +1130,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it) frh->family = family; frh->action = FR_ACT_TO_TBL; - if (nla_put_u32(skb, FRA_L3MDEV, 1)) + if (nla_put_u8(skb, FRA_L3MDEV, 1)) goto nla_put_failure; if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF)) I was surprised that nlmsg_parse in fib_nl_newrule() didn't pick this up, but I verified that the received value for this attribute was 0, not 1 (w/o the patch). Jeff On Sun, Oct 29, 2017 at 11:48 AM, David Ahern <dsah...@gmail.com> wrote: > On 10/27/17 8:43 PM, Jeff Barnhill wrote: >> ping v4 loopback... >> >> jeff@VM2:~$ ip route list vrf myvrf >> 127.0.0.0/8 dev myvrf proto kernel scope link src 127.0.0.1 >> 192.168.200.0/24 via 192.168.210.3 dev enp0s8 >> 192.168.210.0/24 dev enp0s8 proto kernel scope link src 192.168.210.2 >> >> Lookups shown in perf script were for table 255. Is it necessary to >> put the l3mdev table first? If I re-order the tables, it starts >> working: > > Yes, we advise moving the local table down to avoid false hits (e.g., > duplicate addresses like this between the default VRF and another VRF). > > I covered that and a few other things at OSS 2017. Latest VRF slides for > users: > http://schd.ws/hosted_files/ossna2017/fe/vrf-tutorial-oss.pdf