[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <037780fb-984c-cc69-969e-2c98bc406dc9@cumulusnetworks.com>
Date: Thu, 15 Sep 2016 19:49:16 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Mahesh Bandewar <mahesh@...dewar.net>,
netdev <netdev@...r.kernel.org>
Cc: Eric Dumazet <edumazet@...gle.com>,
David Miller <davem@...emloft.net>,
Mahesh Bandewar <maheshb@...gle.com>
Subject: Re: [PATCHv3 next 3/3] ipvlan: Introduce l3s mode
On 9/15/16 6:14 PM, Mahesh Bandewar wrote:
> diff --git a/drivers/net/ipvlan/ipvlan.h b/drivers/net/ipvlan/ipvlan.h
> index 695a5dc9ace3..371f4548c42d 100644
> --- a/drivers/net/ipvlan/ipvlan.h
> +++ b/drivers/net/ipvlan/ipvlan.h
> @@ -23,11 +23,13 @@
> #include <linux/if_vlan.h>
> #include <linux/ip.h>
> #include <linux/inetdevice.h>
> +#include <linux/netfilter.h>
> #include <net/ip.h>
> #include <net/ip6_route.h>
> #include <net/rtnetlink.h>
> #include <net/route.h>
> #include <net/addrconf.h>
> +#include <net/l3mdev.h>
>
> #define IPVLAN_DRV "ipvlan"
> #define IPV_DRV_VER "0.1"
> @@ -96,6 +98,7 @@ struct ipvl_port {
> struct work_struct wq;
> struct sk_buff_head backlog;
> int count;
> + bool hooks_attached;
With a refcnt on the hook registration you don't need this bool and removing simplifies the set_mode logic.
> diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
> index 18b4e8c7f68a..aca690f41559 100644
> --- a/drivers/net/ipvlan/ipvlan_main.c
> +++ b/drivers/net/ipvlan/ipvlan_main.c
....
> +static void ipvlan_unregister_nf_hook(void)
> +{
> + BUG_ON(!ipvl_nf_hook_refcnt);
not a panic() worthy issue. just a pr_warn or WARN_ON_ONCE should be ok.
Powered by blists - more mailing lists