lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200614235613.b16ef9bad3e93b8727a80abe@uniroma2.it>
Date:   Sun, 14 Jun 2020 23:56:13 +0200
From:   Andrea Mayer <andrea.mayer@...roma2.it>
To:     David Ahern <dsahern@...il.com>
Cc:     David Ahern <dsahern@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Shrijeet Mukherjee <shrijeet@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Shuah Khan <shuah@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        Donald Sharp <sharpd@...ulusnetworks.com>,
        Roopa Prabhu <roopa@...ulusnetworks.com>,
        Dinesh Dutt <didutt@...il.com>,
        Stefano Salsano <stefano.salsano@...roma2.it>,
        Paolo Lungaroni <paolo.lungaroni@...t.it>,
        Ahmed Abdelsalam <ahabdels@...il.com>,
        Andrea Mayer <andrea.mayer@...roma2.it>
Subject: Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF
 mapping

On Sat, 13 Jun 2020 18:37:09 -0600
David Ahern <dsahern@...il.com> 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)(struct net *net, u32 table_id));
> > +
> > +void l3mdev_table_lookup_unregister(enum l3mdev_type l3type,
> > +				    int (*fn)(struct net *net, u32 table_id));
> > +
> > +int l3mdev_ifindex_lookup_by_table_id(enum l3mdev_type l3type, struct net *net,
> > +				      u32 table_id);
> > +
> >  int l3mdev_fib_rule_match(struct net *net, struct flowi *fl,
> >  			  struct fib_lookup_arg *arg);
> >  
> > @@ -280,6 +297,26 @@ struct sk_buff *l3mdev_ip6_out(struct sock *sk, struct sk_buff *skb)
> >  	return skb;
> >  }
> >  
> > +static inline
> > +int l3mdev_table_lookup_register(enum l3mdev_type l3type,
> > +				 int (*fn)(struct net *net, u32 table_id))
> > +{
> > +	return -EOPNOTSUPP;
> > +}
> > +
> > +static inline
> > +void l3mdev_table_lookup_unregister(enum l3mdev_type l3type,
> > +				    int (*fn)(struct net *net, u32 table_id))
> > +{
> > +}
> > +
> > +static inline
> > +int l3mdev_ifindex_lookup_by_table_id(enum l3mdev_type l3type, struct net *net,
> > +				      u32 table_id)
> > +{
> > +	return -ENODEV;
> > +}
> > +
> >  static inline
> >  int l3mdev_fib_rule_match(struct net *net, struct flowi *fl,
> >  			  struct fib_lookup_arg *arg)
> > diff --git a/net/l3mdev/l3mdev.c b/net/l3mdev/l3mdev.c
> > index f35899d45a9a..6cc1fe7eb039 100644
> > --- a/net/l3mdev/l3mdev.c
> > +++ b/net/l3mdev/l3mdev.c
> > @@ -9,6 +9,101 @@
> >  #include <net/fib_rules.h>
> >  #include <net/l3mdev.h>
> >  
> > +DEFINE_SPINLOCK(l3mdev_lock);
> > +
> > +typedef int (*lookup_by_table_id_t)(struct net *net, u32 table_d);
> > +
> 
> I should have caught this earlier. Move lookup_by_table_id_t to l3mdev.h
> and use above for 'fn' in l3mdev_table_lookup_{un,}register
> 

Hi David,
Ok, I will do it!

Thank you,
Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ