* [net-next] macvlan: propagate the mac address change status for lowerdev
@ 2017-06-13 14:45 Zhang Shengju
2017-06-13 15:53 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Zhang Shengju @ 2017-06-13 14:45 UTC (permalink / raw)
To: davem, fgao, vyasevic, netdev
The macvlan dev should propagate the return value of mac address change for
lower device in the passthru mode, instead of always return 0.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
drivers/net/macvlan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 346ad2f..ade1213 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -703,10 +703,8 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
- if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
- dev_set_mac_address(vlan->lowerdev, addr);
- return 0;
- }
+ if (vlan->mode == MACVLAN_MODE_PASSTHRU)
+ return dev_set_mac_address(vlan->lowerdev, addr);
return macvlan_sync_address(dev, addr->sa_data);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [net-next] macvlan: propagate the mac address change status for lowerdev
2017-06-13 14:45 [net-next] macvlan: propagate the mac address change status for lowerdev Zhang Shengju
@ 2017-06-13 15:53 ` Sergei Shtylyov
2017-06-13 20:34 ` Yuval Shaia
2017-06-14 18:35 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2017-06-13 15:53 UTC (permalink / raw)
To: Zhang Shengju, davem, fgao, vyasevic, netdev
Hello!
On 06/13/2017 05:45 PM, Zhang Shengju wrote:
> The macvlan dev should propagate the return value of mac address change for
> lower device in the passthru mode, instead of always return 0.
Returning. Perhaps can be fixed while applying...
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
[...]
MBR,Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [net-next] macvlan: propagate the mac address change status for lowerdev
2017-06-13 14:45 [net-next] macvlan: propagate the mac address change status for lowerdev Zhang Shengju
2017-06-13 15:53 ` Sergei Shtylyov
@ 2017-06-13 20:34 ` Yuval Shaia
2017-06-14 15:26 ` 张胜举
2017-06-14 18:35 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Yuval Shaia @ 2017-06-13 20:34 UTC (permalink / raw)
To: Zhang Shengju; +Cc: davem, fgao, vyasevic, netdev
On Tue, Jun 13, 2017 at 10:45:11PM +0800, Zhang Shengju wrote:
> The macvlan dev should propagate the return value of mac address change for
> lower device in the passthru mode, instead of always return 0.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> ---
> drivers/net/macvlan.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
> index 346ad2f..ade1213 100644
> --- a/drivers/net/macvlan.c
> +++ b/drivers/net/macvlan.c
> @@ -703,10 +703,8 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
> if (!is_valid_ether_addr(addr->sa_data))
> return -EADDRNOTAVAIL;
>
> - if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
> - dev_set_mac_address(vlan->lowerdev, addr);
> - return 0;
> - }
> + if (vlan->mode == MACVLAN_MODE_PASSTHRU)
> + return dev_set_mac_address(vlan->lowerdev, addr);
Do you think the following functions needs this fix as well?
- alb_set_mac_address
- bond_alb_handle_active_change
- bond_enslave
- __bond_release_one
- macvlan_set_mac_address
Yuval
>
> return macvlan_sync_address(dev, addr->sa_data);
> }
> --
> 1.8.3.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [net-next] macvlan: propagate the mac address change status for lowerdev
2017-06-13 20:34 ` Yuval Shaia
@ 2017-06-14 15:26 ` 张胜举
0 siblings, 0 replies; 5+ messages in thread
From: 张胜举 @ 2017-06-14 15:26 UTC (permalink / raw)
To: 'Yuval Shaia'; +Cc: davem, fgao, vyasevic, netdev
> -----Original Message-----
> From: Yuval Shaia [mailto:yuval.shaia@oracle.com]
> Sent: Wednesday, June 14, 2017 4:34 AM
> To: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Cc: davem@davemloft.net; fgao@48lvckh6395k16k5.yundunddos.com;
> vyasevic@redhat.com; netdev@vger.kernel.org
> Subject: Re: [net-next] macvlan: propagate the mac address change status
> for lowerdev
>
> On Tue, Jun 13, 2017 at 10:45:11PM +0800, Zhang Shengju wrote:
> > The macvlan dev should propagate the return value of mac address
> > change for lower device in the passthru mode, instead of always return
0.
> >
> > Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> > ---
> > drivers/net/macvlan.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index
> > 346ad2f..ade1213 100644
> > --- a/drivers/net/macvlan.c
> > +++ b/drivers/net/macvlan.c
> > @@ -703,10 +703,8 @@ static int macvlan_set_mac_address(struct
> net_device *dev, void *p)
> > if (!is_valid_ether_addr(addr->sa_data))
> > return -EADDRNOTAVAIL;
> >
> > - if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
> > - dev_set_mac_address(vlan->lowerdev, addr);
> > - return 0;
> > - }
> > + if (vlan->mode == MACVLAN_MODE_PASSTHRU)
> > + return dev_set_mac_address(vlan->lowerdev, addr);
>
> Do you think the following functions needs this fix as well?
> - alb_set_mac_address
> - bond_alb_handle_active_change
> - bond_enslave
> - __bond_release_one
> - macvlan_set_mac_address
>
> Yuval
Actually, this patch fixes macvlan part.
The other part is not so easy to fix in my option, you can try to fix if
possible.
BRs,
ZSJ
>
> >
> > return macvlan_sync_address(dev, addr->sa_data); }
> > --
> > 1.8.3.1
> >
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [net-next] macvlan: propagate the mac address change status for lowerdev
2017-06-13 14:45 [net-next] macvlan: propagate the mac address change status for lowerdev Zhang Shengju
2017-06-13 15:53 ` Sergei Shtylyov
2017-06-13 20:34 ` Yuval Shaia
@ 2017-06-14 18:35 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-06-14 18:35 UTC (permalink / raw)
To: zhangshengju; +Cc: fgao, vyasevic, netdev
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Tue, 13 Jun 2017 22:45:11 +0800
> The macvlan dev should propagate the return value of mac address change for
> lower device in the passthru mode, instead of always return 0.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-14 18:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 14:45 [net-next] macvlan: propagate the mac address change status for lowerdev Zhang Shengju
2017-06-13 15:53 ` Sergei Shtylyov
2017-06-13 20:34 ` Yuval Shaia
2017-06-14 15:26 ` 张胜举
2017-06-14 18:35 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).