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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7MqO2te-OR7mZqdy=TDkrcgyGhb-A4DvbQ07JAaKu49-Q@mail.gmail.com>
Date:	Fri, 8 May 2015 13:55:15 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	"John W. Linville" <linville@...driver.com>
Cc:	netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Jesse Gross <jesse@...ira.com>, Andy Zhou <azhou@...ira.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Alexander Duyck <alexander.h.duyck@...hat.com>
Subject: Re: [PATCH 5/5] geneve: add initial netdev driver for GENEVE tunnels

On Fri, May 8, 2015 at 10:20 AM, John W. Linville
<linville@...driver.com> wrote:
> +
> +/* Setup stats when device is created */
> +static int geneve_init(struct net_device *dev)
> +{
> +       struct geneve_dev *geneve = netdev_priv(dev);
> +
> +       dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
> +       if (!dev->tstats)
> +               return -ENOMEM;
> +
> +       /* make new socket outside of RTNL */
> +       dev_hold(dev);
> +       queue_work(geneve_wq, &geneve->sock_work);
> +


Any reason to create socket in this init() rather than in ndo_open()?


> +       return 0;
> +}
> +
> +static void geneve_uninit(struct net_device *dev)
> +{
> +       struct geneve_dev *geneve = netdev_priv(dev);
> +       struct geneve_sock *gs = geneve->sock;
> +
> +       if (gs)
> +               geneve_sock_release(gs);
> +       free_percpu(dev->tstats);
> +}


Ditto, ndo_stop().


> +
> +static int geneve_newlink(struct net *net, struct net_device *dev,
> +                        struct nlattr *tb[], struct nlattr *data[])
> +{
...
> +
> +       if (data[IFLA_GENEVE_REMOTE])
> +               geneve->remote.sin_addr.s_addr =
> +                       nla_get_be32(data[IFLA_GENEVE_REMOTE]);


nla_get_in_addr()
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ