[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140516.165810.1304809993050411212.davem@davemloft.net>
Date: Fri, 16 May 2014 16:58:10 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: duanj.fnst@...fujitsu.com
Cc: kaber@...sh.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ip_tunnel: don't add tunnel twice
From: Duan Jiong <duanj.fnst@...fujitsu.com>
Date: Fri, 16 May 2014 13:06:47 +0800
> 于 2014年05月16日 11:10, David Miller 写道:
>> From: Duan Jiong <duanj.fnst@...fujitsu.com>
>> Date: Thu, 15 May 2014 13:07:02 +0800
>>
>>>
>>> When using command "ip tunnel add" to add a tunnel, the tunnel will be added twice,
>>> through ip_tunnel_create() and ip_tunnel_update().
>>>
>>> Because the second is unnecessary, so we can just break after adding tunnel
>>> through ip_tunnel_create().
>>>
>>> Signed-off-by: Duan Jiong <duanj.fnst@...fujitsu.com>
>>
>> ip_tunnel_update() seems to do some things tha ip_tunnel_create()
>> does not.
>>
>> For example, setting dev->dev_addr[] and dev->broadcast[] from the
>> ipv4 parms if appropriate.
>>
>> I think you need to rethink this change.
>
> When registering tunnel link, function register_netdevice() will call
> dev->netdev_ops->ndo_init, actually the virtual function ndo_init will
> do some same things the ip_tunnel_update() does, such as the
> above you mentioned.
>
> So i think you don't need to worry about that.
Aha, I see, thanks for explaining.
Patch applied.
--
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