On 3/27/17 9:08 PM, Eric W. Biederman wrote:
> I believe we should just kill MAX_NEW_LABELS.
> 
> I think the only significant change from your patch is the removal of an
> array from mpls_route_config.
> 
> With the removal of MAX_NEW_LABELS I would replace it by a sanity check
> in mpls_rt_alloc that verifies that the amount we are going to allocate
> for struct mpls_route is < PAGE_SIZE.  Anything larger is just
> asking for trouble.
> 
> That should put our practical limit just a little bit below 32 nexthops
> adding 32 labels each.

The 4096 limit works nice for mpls_route but not for lwt encap info.
That struct is 4-bytes + the labels. Seems odd to let ip->mpls allow up
to 255 labels (max for u8) while mpls->mpls has a limit.

I'm going to send v2 soon with the 4096 limit for mpls_route total size
but keeping the MAX_NEW_LABELS with a count of 30 for both. That keeps
the two paths consistent, keeps mpls_iptunnel_encap < 128 bytes for the
max allocation and 30 labels is allows plenty of options for TE and SR.

Reply via email to