Subject: Re: [PATCH net-next] ip_tunnel: don't add tunnel twice

From: Duan Jiong <[email-masked]>
Date: Fri, 16 May 2014 13:06:47 +0800

于 2014年05月16日 11:10, David Miller 写道:
> From: Duan Jiong <[email-masked]>
> 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 <[email-masked]>
> 
> 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.

Thanks,
   Duan
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>