* [net-next] net: remove duplicate add_device_randomness() call
@ 2017-05-04 3:40 Zhang Shengju
2017-05-04 15:13 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Zhang Shengju @ 2017-05-04 3:40 UTC (permalink / raw)
To: davem, netdev, edumazet
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 35a06ce..cb48e40 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1347,7 +1347,6 @@ static int __dev_open(struct net_device *dev)
dev->flags |= IFF_UP;
dev_set_rx_mode(dev);
dev_activate(dev);
- add_device_randomness(dev->dev_addr, dev->addr_len);
}
return ret;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [net-next] net: remove duplicate add_device_randomness() call
2017-05-04 3:40 [net-next] net: remove duplicate add_device_randomness() call Zhang Shengju
@ 2017-05-04 15:13 ` David Miller
2017-05-05 2:40 ` 张胜举
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2017-05-04 15:13 UTC (permalink / raw)
To: zhangshengju; +Cc: netdev, edumazet
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Thu, 4 May 2017 11:40:42 +0800
> Since register_netdevice() already call add_device_randomness() and
> dev_set_mac_address() will call it after mac address change.
> It's not necessary to call at device UP.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
The net-next tree is closed, please resubmit this when the net-next
tree opens back up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [net-next] net: remove duplicate add_device_randomness() call
2017-05-04 15:13 ` David Miller
@ 2017-05-05 2:40 ` 张胜举
0 siblings, 0 replies; 5+ messages in thread
From: 张胜举 @ 2017-05-05 2:40 UTC (permalink / raw)
To: 'David Miller'; +Cc: netdev, edumazet
> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Thursday, May 04, 2017 11:13 PM
> To: zhangshengju@cmss.chinamobile.com
> Cc: netdev@vger.kernel.org; edumazet@google.com
> Subject: Re: [net-next] net: remove duplicate add_device_randomness() call
>
> From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Date: Thu, 4 May 2017 11:40:42 +0800
>
> > Since register_netdevice() already call add_device_randomness() and
> > dev_set_mac_address() will call it after mac address change.
> > It's not necessary to call at device UP.
> >
> > Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>
> The net-next tree is closed, please resubmit this when the net-next tree
> opens back up.
Okay, thanks David.
BRs,
ZSJ
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [net-next] net: remove duplicate add_device_randomness() call
2017-05-17 9:23 Zhang Shengju
@ 2017-05-17 15:17 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-05-17 15:17 UTC (permalink / raw)
To: zhangshengju; +Cc: netdev
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Wed, 17 May 2017 17:23:26 +0800
> Since register_netdevice() already call add_device_randomness() and
> dev_set_mac_address() will call it after mac address change.
> It's not necessary to call at device UP.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
__dev_open() can (at least theroretically) do things which adjust the
MAC address, and therefore the add_device_randomness() call is
appropriate.
And even if ->ndo_open() implementations do not do so currently, I
do not want to prevent it from doing so.
I am not applying this patch, sorry.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [net-next] net: remove duplicate add_device_randomness() call
@ 2017-05-17 9:23 Zhang Shengju
2017-05-17 15:17 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Zhang Shengju @ 2017-05-17 9:23 UTC (permalink / raw)
To: davem, netdev
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 35a06ce..cb48e40 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1347,7 +1347,6 @@ static int __dev_open(struct net_device *dev)
dev->flags |= IFF_UP;
dev_set_rx_mode(dev);
dev_activate(dev);
- add_device_randomness(dev->dev_addr, dev->addr_len);
}
return ret;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-17 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 3:40 [net-next] net: remove duplicate add_device_randomness() call Zhang Shengju
2017-05-04 15:13 ` David Miller
2017-05-05 2:40 ` 张胜举
2017-05-17 9:23 Zhang Shengju
2017-05-17 15:17 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.