netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next 0/3] team: couple of fixes
@ 2012-06-26 16:52 Jiri Pirko
  2012-06-27  4:09 ` David Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Pirko @ 2012-06-26 16:52 UTC (permalink / raw)
  To: netdev; +Cc: davem, eric.dumazet, brouer

Jiri Pirko (3):
  team: fix team_adjust_ops with regard to enabled ports
  team: do not allow to map disabled ports
  team: remove unuset rcu_head field from team_port struct

 drivers/net/team/team.c                  |   35 ++++++++++++++++++------------
 drivers/net/team/team_mode_loadbalance.c |    3 ++-
 include/linux/if_team.h                  |    3 ++-
 3 files changed, 25 insertions(+), 16 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch net-next 0/3] team: couple of fixes
  2012-06-26 16:52 Jiri Pirko
@ 2012-06-27  4:09 ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2012-06-27  4:09 UTC (permalink / raw)
  To: jpirko; +Cc: netdev, eric.dumazet, brouer

From: Jiri Pirko <jpirko@redhat.com>
Date: Tue, 26 Jun 2012 18:52:44 +0200

> Jiri Pirko (3):
>   team: fix team_adjust_ops with regard to enabled ports
>   team: do not allow to map disabled ports
>   team: remove unuset rcu_head field from team_port struct

All looks good, I'll apply this, thanks Jiri.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [patch net-next 0/3] team: couple of fixes
@ 2012-08-23 13:26 Jiri Pirko
  2012-08-23 13:26 ` [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send Jiri Pirko
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, brouer, ogerlitz

+ vlan helper

Jiri Pirko (3):
  teamd: don't print warn message on -ESRCH during event send
  vlan: add helper which can be called to se it device is used by vlan
  team: do not allow to add VLAN challenged port when vlan is used

 drivers/net/team/team.c | 15 +++++++++++----
 include/linux/if_vlan.h |  9 +++++++--
 net/8021q/vlan_core.c   |  6 ++++++
 3 files changed, 24 insertions(+), 6 deletions(-)

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send
  2012-08-23 13:26 [patch net-next 0/3] team: couple of fixes Jiri Pirko
@ 2012-08-23 13:26 ` Jiri Pirko
  2012-08-23 13:31   ` Jiri Pirko
  2012-08-23 13:26 ` [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan Jiri Pirko
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, brouer, ogerlitz

When no one is listening on NL socket, -ESRCH is returned and warning
message is printed. This message is confusing people and in fact has no
meaning. So do not print it in this case.

Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 17ce11b..4010bcd 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2487,7 +2487,7 @@ static void __team_options_change_check(struct team *team)
 			list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
 	}
 	err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
-	if (err)
+	if (err && err != -ESRCH)
 		netdev_warn(team->dev, "Failed to send options change via netlink (err %d)\n",
 			    err);
 }
@@ -2518,9 +2518,9 @@ static void __team_port_change_check(struct team_port *port, bool linkup)
 
 send_event:
 	err = team_nl_send_event_port_list_get(port->team);
-	if (err)
-		netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink\n",
-			    port->dev->name);
+	if (err && err != -ESRCH)
+		netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink (err %d)\n",
+			    port->dev->name, err);
 
 }
 
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan
  2012-08-23 13:26 [patch net-next 0/3] team: couple of fixes Jiri Pirko
  2012-08-23 13:26 ` [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send Jiri Pirko
@ 2012-08-23 13:26 ` Jiri Pirko
  2012-08-23 13:33   ` Or Gerlitz
  2012-08-23 13:26 ` [patch net-next 3/3] team: do not allow to add VLAN challenged port when vlan is used Jiri Pirko
  2012-08-24 17:47 ` [patch net-next 0/3] team: couple of fixes David Miller
  3 siblings, 1 reply; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, brouer, ogerlitz, Patrick McHardy

also, remove unused vlan_info definition from header

CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/linux/if_vlan.h | 9 +++++++--
 net/8021q/vlan_core.c   | 6 ++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index a810987..e6ff12d 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -74,8 +74,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
 /* found in socket.c */
 extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
 
-struct vlan_info;
-
 static inline int is_vlan_dev(struct net_device *dev)
 {
         return dev->priv_flags & IFF_802_1Q_VLAN;
@@ -101,6 +99,8 @@ extern int vlan_vids_add_by_dev(struct net_device *dev,
 				const struct net_device *by_dev);
 extern void vlan_vids_del_by_dev(struct net_device *dev,
 				 const struct net_device *by_dev);
+
+extern bool vlan_uses_dev(const struct net_device *dev);
 #else
 static inline struct net_device *
 __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id)
@@ -151,6 +151,11 @@ static inline void vlan_vids_del_by_dev(struct net_device *dev,
 					const struct net_device *by_dev)
 {
 }
+
+static inline bool vlan_uses_dev(const struct net_device *dev)
+{
+	return false;
+}
 #endif
 
 /**
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index d4babc6..517b940 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -372,3 +372,9 @@ void vlan_vids_del_by_dev(struct net_device *dev,
 		vlan_vid_del(dev, vid_info->vid);
 }
 EXPORT_SYMBOL(vlan_vids_del_by_dev);
+
+bool vlan_uses_dev(const struct net_device *dev)
+{
+	return rtnl_dereference(dev->vlan_info) ? true : false;
+}
+EXPORT_SYMBOL(vlan_uses_dev);
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [patch net-next 3/3] team: do not allow to add VLAN challenged port when vlan is used
  2012-08-23 13:26 [patch net-next 0/3] team: couple of fixes Jiri Pirko
  2012-08-23 13:26 ` [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send Jiri Pirko
  2012-08-23 13:26 ` [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan Jiri Pirko
@ 2012-08-23 13:26 ` Jiri Pirko
  2012-08-24 17:47 ` [patch net-next 0/3] team: couple of fixes David Miller
  3 siblings, 0 replies; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, brouer, ogerlitz

Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 4010bcd..49629fb 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -989,6 +989,13 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
 		return -EBUSY;
 	}
 
+	if (port_dev->features & NETIF_F_VLAN_CHALLENGED &&
+	    vlan_uses_dev(dev)) {
+		netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n",
+			   portname);
+		return -EPERM;
+	}
+
 	err = team_dev_type_check_change(dev, port_dev);
 	if (err)
 		return err;
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send
  2012-08-23 13:26 ` [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send Jiri Pirko
@ 2012-08-23 13:31   ` Jiri Pirko
  0 siblings, 0 replies; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, brouer, ogerlitz

Oups. Subject should start with "team:" without "d" :(

David, should I repost?

Thu, Aug 23, 2012 at 03:26:51PM CEST, jiri@resnulli.us wrote:
>When no one is listening on NL socket, -ESRCH is returned and warning
>message is printed. This message is confusing people and in fact has no
>meaning. So do not print it in this case.
>
>Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
>Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>---
> drivers/net/team/team.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>index 17ce11b..4010bcd 100644
>--- a/drivers/net/team/team.c
>+++ b/drivers/net/team/team.c
>@@ -2487,7 +2487,7 @@ static void __team_options_change_check(struct team *team)
> 			list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
> 	}
> 	err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
>-	if (err)
>+	if (err && err != -ESRCH)
> 		netdev_warn(team->dev, "Failed to send options change via netlink (err %d)\n",
> 			    err);
> }
>@@ -2518,9 +2518,9 @@ static void __team_port_change_check(struct team_port *port, bool linkup)
> 
> send_event:
> 	err = team_nl_send_event_port_list_get(port->team);
>-	if (err)
>-		netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink\n",
>-			    port->dev->name);
>+	if (err && err != -ESRCH)
>+		netdev_warn(port->team->dev, "Failed to send port change of device %s via netlink (err %d)\n",
>+			    port->dev->name, err);
> 
> }
> 
>-- 
>1.7.11.4
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan
  2012-08-23 13:26 ` [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan Jiri Pirko
@ 2012-08-23 13:33   ` Or Gerlitz
  2012-08-23 13:42     ` Jiri Pirko
  0 siblings, 1 reply; 11+ messages in thread
From: Or Gerlitz @ 2012-08-23 13:33 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, brouer, Patrick McHardy

On 23/08/2012 16:26, Jiri Pirko wrote:
> also, remove unused vlan_info definition from header

just a typo in the subject line, you probably wanted to say "see" and 
not "se"?

Or.

>
> CC: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>   include/linux/if_vlan.h | 9 +++++++--
>   net/8021q/vlan_core.c   | 6 ++++++
>   2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> index a810987..e6ff12d 100644
> --- a/include/linux/if_vlan.h
> +++ b/include/linux/if_vlan.h
> @@ -74,8 +74,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
>   /* found in socket.c */
>   extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
>   
> -struct vlan_info;
> -
>   static inline int is_vlan_dev(struct net_device *dev)
>   {
>           return dev->priv_flags & IFF_802_1Q_VLAN;
> @@ -101,6 +99,8 @@ extern int vlan_vids_add_by_dev(struct net_device *dev,
>   				const struct net_device *by_dev);
>   extern void vlan_vids_del_by_dev(struct net_device *dev,
>   				 const struct net_device *by_dev);
> +
> +extern bool vlan_uses_dev(const struct net_device *dev);
>   #else
>   static inline struct net_device *
>   __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id)
> @@ -151,6 +151,11 @@ static inline void vlan_vids_del_by_dev(struct net_device *dev,
>   					const struct net_device *by_dev)
>   {
>   }
> +
> +static inline bool vlan_uses_dev(const struct net_device *dev)
> +{
> +	return false;
> +}
>   #endif
>   
>   /**
> diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
> index d4babc6..517b940 100644
> --- a/net/8021q/vlan_core.c
> +++ b/net/8021q/vlan_core.c
> @@ -372,3 +372,9 @@ void vlan_vids_del_by_dev(struct net_device *dev,
>   		vlan_vid_del(dev, vid_info->vid);
>   }
>   EXPORT_SYMBOL(vlan_vids_del_by_dev);
> +
> +bool vlan_uses_dev(const struct net_device *dev)
> +{
> +	return rtnl_dereference(dev->vlan_info) ? true : false;
> +}
> +EXPORT_SYMBOL(vlan_uses_dev);

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan
  2012-08-23 13:33   ` Or Gerlitz
@ 2012-08-23 13:42     ` Jiri Pirko
  0 siblings, 0 replies; 11+ messages in thread
From: Jiri Pirko @ 2012-08-23 13:42 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: netdev, davem, brouer, Patrick McHardy

Thu, Aug 23, 2012 at 03:33:06PM CEST, ogerlitz@mellanox.com wrote:
>On 23/08/2012 16:26, Jiri Pirko wrote:
>>also, remove unused vlan_info definition from header
>
>just a typo in the subject line, you probably wanted to say "see" and
>not "se"?

Yes. I need some coffe :(

>
>Or.
>
>>
>>CC: Patrick McHardy <kaber@trash.net>
>>Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>>---
>>  include/linux/if_vlan.h | 9 +++++++--
>>  net/8021q/vlan_core.c   | 6 ++++++
>>  2 files changed, 13 insertions(+), 2 deletions(-)
>>
>>diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
>>index a810987..e6ff12d 100644
>>--- a/include/linux/if_vlan.h
>>+++ b/include/linux/if_vlan.h
>>@@ -74,8 +74,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
>>  /* found in socket.c */
>>  extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
>>-struct vlan_info;
>>-
>>  static inline int is_vlan_dev(struct net_device *dev)
>>  {
>>          return dev->priv_flags & IFF_802_1Q_VLAN;
>>@@ -101,6 +99,8 @@ extern int vlan_vids_add_by_dev(struct net_device *dev,
>>  				const struct net_device *by_dev);
>>  extern void vlan_vids_del_by_dev(struct net_device *dev,
>>  				 const struct net_device *by_dev);
>>+
>>+extern bool vlan_uses_dev(const struct net_device *dev);
>>  #else
>>  static inline struct net_device *
>>  __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id)
>>@@ -151,6 +151,11 @@ static inline void vlan_vids_del_by_dev(struct net_device *dev,
>>  					const struct net_device *by_dev)
>>  {
>>  }
>>+
>>+static inline bool vlan_uses_dev(const struct net_device *dev)
>>+{
>>+	return false;
>>+}
>>  #endif
>>  /**
>>diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
>>index d4babc6..517b940 100644
>>--- a/net/8021q/vlan_core.c
>>+++ b/net/8021q/vlan_core.c
>>@@ -372,3 +372,9 @@ void vlan_vids_del_by_dev(struct net_device *dev,
>>  		vlan_vid_del(dev, vid_info->vid);
>>  }
>>  EXPORT_SYMBOL(vlan_vids_del_by_dev);
>>+
>>+bool vlan_uses_dev(const struct net_device *dev)
>>+{
>>+	return rtnl_dereference(dev->vlan_info) ? true : false;
>>+}
>>+EXPORT_SYMBOL(vlan_uses_dev);
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch net-next 0/3] team: couple of fixes
  2012-08-23 13:26 [patch net-next 0/3] team: couple of fixes Jiri Pirko
                   ` (2 preceding siblings ...)
  2012-08-23 13:26 ` [patch net-next 3/3] team: do not allow to add VLAN challenged port when vlan is used Jiri Pirko
@ 2012-08-24 17:47 ` David Miller
  2012-08-24 18:53   ` Jiri Pirko
  3 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2012-08-24 17:47 UTC (permalink / raw)
  To: jiri; +Cc: netdev, brouer, ogerlitz

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 23 Aug 2012 15:26:50 +0200

> + vlan helper
> 
> Jiri Pirko (3):
>   teamd: don't print warn message on -ESRCH during event send
>   vlan: add helper which can be called to se it device is used by vlan
>   team: do not allow to add VLAN challenged port when vlan is used

Applied with typos corrected :-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [patch net-next 0/3] team: couple of fixes
  2012-08-24 17:47 ` [patch net-next 0/3] team: couple of fixes David Miller
@ 2012-08-24 18:53   ` Jiri Pirko
  0 siblings, 0 replies; 11+ messages in thread
From: Jiri Pirko @ 2012-08-24 18:53 UTC (permalink / raw)
  To: David Miller
  Cc: netdev@vger.kernel.org, brouer@redhat.com, ogerlitz@mellanox.com


24. 8. 2012 v 19:47, David Miller <davem@davemloft.net>:

> From: Jiri Pirko <jiri@resnulli.us>
> Date: Thu, 23 Aug 2012 15:26:50 +0200
> 
>> + vlan helper
>> 
>> Jiri Pirko (3):
>>  teamd: don't print warn message on -ESRCH during event send
>>  vlan: add helper which can be called to se it device is used by vlan
>>  team: do not allow to add VLAN challenged port when vlan is used
> 
> Applied with typos corrected :-)

I owe you a beer :)

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-08-24 18:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 13:26 [patch net-next 0/3] team: couple of fixes Jiri Pirko
2012-08-23 13:26 ` [patch net-next 1/3] teamd: don't print warn message on -ESRCH during event send Jiri Pirko
2012-08-23 13:31   ` Jiri Pirko
2012-08-23 13:26 ` [patch net-next 2/3] vlan: add helper which can be called to se it device is used by vlan Jiri Pirko
2012-08-23 13:33   ` Or Gerlitz
2012-08-23 13:42     ` Jiri Pirko
2012-08-23 13:26 ` [patch net-next 3/3] team: do not allow to add VLAN challenged port when vlan is used Jiri Pirko
2012-08-24 17:47 ` [patch net-next 0/3] team: couple of fixes David Miller
2012-08-24 18:53   ` Jiri Pirko
  -- strict thread matches above, loose matches on Subject: below --
2012-06-26 16:52 Jiri Pirko
2012-06-27  4:09 ` 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).