Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-14 Thread Andrea Mayer
On Sat, 13 Jun 2020 18:37:09 -0600 David Ahern wrote: > On 6/12/20 10:49 AM, Andrea Mayer wrote: > > @@ -37,6 +45,15 @@ struct l3mdev_ops { > > > > #ifdef CONFIG_NET_L3_MASTER_DEV > > > > +int l3mdev_table_lookup_register(enum l3mdev_type l3type, > > +int (*fn)(st

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-13 Thread David Ahern
On 6/12/20 10:49 AM, Andrea Mayer wrote: > @@ -37,6 +45,15 @@ struct l3mdev_ops { > > #ifdef CONFIG_NET_L3_MASTER_DEV > > +int l3mdev_table_lookup_register(enum l3mdev_type l3type, > + int (*fn)(struct net *net, u32 table_id)); > + > +void l3mdev_table_lookup_unreg

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-13 Thread Andrea Mayer
On Fri, 12 Jun 2020 10:51:48 -0700 Jakub Kicinski wrote: > net/l3mdev/l3mdev.c:12:1: warning: symbol 'l3mdev_lock' was not declared. > Should it be static? > > Please make sure it doesn't add errors with W=1 C=1 :) Hi Jakub, thanks for your feedback. sorry, I did not want to add more warnings

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-12 Thread Jakub Kicinski
On Fri, 12 Jun 2020 18:49:33 +0200 Andrea Mayer wrote: > Add infrastructure to l3mdev (the core code for Layer 3 master devices) in > order to find out the corresponding VRF device for a given table id. > Therefore, the l3mdev implementations: > - can register a callback that returns the device in

[RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-12 Thread Andrea Mayer
Add infrastructure to l3mdev (the core code for Layer 3 master devices) in order to find out the corresponding VRF device for a given table id. Therefore, the l3mdev implementations: - can register a callback that returns the device index of the l3mdev associated with a given table id; - can o