On 3/23/17 11:34 AM, Amine Kherbouche wrote:
Yes but we still need a default value. You have also to see the perf impact, now the current mpls entry size in linux kernel is under a cache line, even using 12 stacked labels, we are always under a cache line but beyond this value we're going to see performance issue.
The implementation changes I have do not have a static allocation for labels. The max limit discussed here is an upper bound on what the kernel will take from userspace. Individual routes and nexthops allocate memory only for the max number of labels across all nexthops within a route: struct mpls_nh { /* next hop label forwarding entry */ struct net_device __rcu *nh_dev; unsigned int nh_flags; u8 nh_labels; u8 nh_via_alen; u8 nh_via_table; /* u8 hole */ u32 nh_label[0]; };