Netdev List
 help / color / mirror / Atom feed
* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Paul E. McKenney @ 2014-10-24 17:20 UTC (permalink / raw)
  To: Yanko Kaneti
  Cc: Josh Boyer, Eric W. Biederman, Cong Wang, Kevin Fenzi, netdev,
	Linux-Kernel@Vger. Kernel. Org, jay.vosburgh, mroos
In-Reply-To: <20141024170931.GA21849@declera.com>

On Fri, Oct 24, 2014 at 08:09:31PM +0300, Yanko Kaneti wrote:
> On Fri-10/24/14-2014 09:54, Paul E. McKenney wrote:
> > On Fri, Oct 24, 2014 at 07:29:43PM +0300, Yanko Kaneti wrote:
> > > On Fri-10/24/14-2014 08:40, Paul E. McKenney wrote:
> > > > On Fri, Oct 24, 2014 at 12:08:57PM +0300, Yanko Kaneti wrote:
> > > > > On Thu-10/23/14-2014 15:04, Paul E. McKenney wrote:
> > > > > > On Fri, Oct 24, 2014 at 12:45:40AM +0300, Yanko Kaneti wrote:
> > > > > > > 
> > > > > > > On Thu, 2014-10-23 at 13:05 -0700, Paul E. McKenney wrote:
> > > > > > > > On Thu, Oct 23, 2014 at 10:51:59PM +0300, Yanko Kaneti wrote:
> > 
> > [ . . . ]
> > 
> > > > > Ok, unless I've messsed up something major, bisecting points to:
> > > > > 
> > > > > 35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
> > > > > 
> > > > > Makes any sense ?
> > > > 
> > > > Good question.  ;-)
> > > > 
> > > > Are any of your online CPUs missing rcuo kthreads?  There should be
> > > > kthreads named rcuos/0, rcuos/1, rcuos/2, and so on for each online CPU.
> > > 
> > > Its a Phenom II X6. With 3.17 and linux-tip with 35ce7f29a44a reverted, the rcuos are 8
> > > and the modprobe ppp_generic testcase reliably works, libvirt also manages
> > > to setup its bridge.
> > > 
> > > Just with linux-tip , the rcuos are 6 but the failure is as reliable as
> > > before.
> 
> > Thank you, very interesting.  Which 6 of the rcuos are present?
> 
> Well, the rcuos are 0 to 5. Which sounds right for a 6 core CPU like this   
> Phenom II.

Ah, you get 8 without the patch because it creates them for potential
CPUs as well as real ones.  OK, got it.

> > > Awating instructions: :)
> > 
> > Well, I thought I understood the problem until you found that only 6 of
> > the expected 8 rcuos are present with linux-tip without the revert.  ;-)
> > 
> > I am putting together a patch for the part of the problem that I think
> > I understand, of course, but it would help a lot to know which two of
> > the rcuos are missing.  ;-)
> 
> Ready to test

Well, if you are feeling aggressive, give the following patch a spin.
I am doing sanity tests on it in the meantime.

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 29fb23f33c18..927c17b081c7 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2546,9 +2546,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
 			rdp->nocb_leader = rdp_spawn;
 			if (rdp_last && rdp != rdp_spawn)
 				rdp_last->nocb_next_follower = rdp;
-			rdp_last = rdp;
-			rdp = rdp->nocb_next_follower;
-			rdp_last->nocb_next_follower = NULL;
+			if (rdp == rdp_spawn) {
+				rdp = rdp->nocb_next_follower;
+			} else {
+				rdp_last = rdp;
+				rdp = rdp->nocb_next_follower;
+				rdp_last->nocb_next_follower = NULL;
+			}
 		} while (rdp);
 		rdp_spawn->nocb_next_follower = rdp_old_leader;
 	}

^ permalink raw reply related

* Re: [PATCH RFC v5 net 0/3] ipv6: Reduce the number of fib6_lookup() calls from ip6_pol_route()
From: Martin Lau @ 2014-10-24 17:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20141024.001550.1808591527768047773.davem@davemloft.net>

Hi,

> Can you cook up some clean patches against the net_test_tools repo so
> that people can use it for both ipv4 and ipv6 route lookup measurements?
Yes, will do.

Thanks,
--Martin

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Yanko Kaneti @ 2014-10-24 17:35 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Josh Boyer, Eric W. Biederman, Cong Wang, Kevin Fenzi, netdev,
	Linux-Kernel@Vger. Kernel. Org, jay.vosburgh, mroos
In-Reply-To: <20141024172009.GV4977@linux.vnet.ibm.com>

On Fri-10/24/14-2014 10:20, Paul E. McKenney wrote:
> On Fri, Oct 24, 2014 at 08:09:31PM +0300, Yanko Kaneti wrote:
> > On Fri-10/24/14-2014 09:54, Paul E. McKenney wrote:
> > > On Fri, Oct 24, 2014 at 07:29:43PM +0300, Yanko Kaneti wrote:
> > > > On Fri-10/24/14-2014 08:40, Paul E. McKenney wrote:
> > > > > On Fri, Oct 24, 2014 at 12:08:57PM +0300, Yanko Kaneti wrote:
> > > > > > On Thu-10/23/14-2014 15:04, Paul E. McKenney wrote:
> > > > > > > On Fri, Oct 24, 2014 at 12:45:40AM +0300, Yanko Kaneti wrote:
> > > > > > > > 
> > > > > > > > On Thu, 2014-10-23 at 13:05 -0700, Paul E. McKenney wrote:
> > > > > > > > > On Thu, Oct 23, 2014 at 10:51:59PM +0300, Yanko Kaneti wrote:
> > > 
> > > [ . . . ]
> > > 
> > > > > > Ok, unless I've messsed up something major, bisecting points to:
> > > > > > 
> > > > > > 35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
> > > > > > 
> > > > > > Makes any sense ?
> > > > > 
> > > > > Good question.  ;-)
> > > > > 
> > > > > Are any of your online CPUs missing rcuo kthreads?  There should be
> > > > > kthreads named rcuos/0, rcuos/1, rcuos/2, and so on for each online CPU.
> > > > 
> > > > Its a Phenom II X6. With 3.17 and linux-tip with 35ce7f29a44a reverted, the rcuos are 8
> > > > and the modprobe ppp_generic testcase reliably works, libvirt also manages
> > > > to setup its bridge.
> > > > 
> > > > Just with linux-tip , the rcuos are 6 but the failure is as reliable as
> > > > before.
> > 
> > > Thank you, very interesting.  Which 6 of the rcuos are present?
> > 
> > Well, the rcuos are 0 to 5. Which sounds right for a 6 core CPU like this   
> > Phenom II.
> 
> Ah, you get 8 without the patch because it creates them for potential
> CPUs as well as real ones.  OK, got it.
> 
> > > > Awating instructions: :)
> > > 
> > > Well, I thought I understood the problem until you found that only 6 of
> > > the expected 8 rcuos are present with linux-tip without the revert.  ;-)
> > > 
> > > I am putting together a patch for the part of the problem that I think
> > > I understand, of course, but it would help a lot to know which two of
> > > the rcuos are missing.  ;-)
> > 
> > Ready to test
> 
> Well, if you are feeling aggressive, give the following patch a spin.
> I am doing sanity tests on it in the meantime.

Doesn't seem to make a difference here

 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 29fb23f33c18..927c17b081c7 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -2546,9 +2546,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
>  			rdp->nocb_leader = rdp_spawn;
>  			if (rdp_last && rdp != rdp_spawn)
>  				rdp_last->nocb_next_follower = rdp;
> -			rdp_last = rdp;
> -			rdp = rdp->nocb_next_follower;
> -			rdp_last->nocb_next_follower = NULL;
> +			if (rdp == rdp_spawn) {
> +				rdp = rdp->nocb_next_follower;
> +			} else {
> +				rdp_last = rdp;
> +				rdp = rdp->nocb_next_follower;
> +				rdp_last->nocb_next_follower = NULL;
> +			}
>  		} while (rdp);
>  		rdp_spawn->nocb_next_follower = rdp_old_leader;
>  	}
> 

^ permalink raw reply

* Re: [PATCH] ovs: Turn vports with dependencies into separate modules
From: Pravin Shelar @ 2014-10-24 17:47 UTC (permalink / raw)
  To: Thomas Graf; +Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, netdev
In-Reply-To: <ab9438abe3e23289db6f850eea9626fe8bd0a969.1413991519.git.tgraf-G/eBtMaohhA@public.gmane.org>

On Wed, Oct 22, 2014 at 8:29 AM, Thomas Graf <tgraf@suug.ch> wrote:
> The internal and netdev vport remain part of openvswitch.ko. Encap
> vports including vxlan, gre, and geneve can be built as separate
> modules and are loaded on demand. Modules can be unloaded after use.
> Datapath ports keep a reference to the vport module during their
> lifetime.
>
> Allows to remove the error prone maintenance of the global list
> vport_ops_list.
>
How error prone is this interface, can you give example? Set of ovs
vport type is been pretty stable, so am not sure if we need loadable
module support for vports implementations.


> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> ---
>  net/openvswitch/Kconfig              |  18 +++----
>  net/openvswitch/Makefile             |  14 ++---
>  net/openvswitch/datapath.c           |  16 +++++-
>  net/openvswitch/vport-geneve.c       |  23 +++++++-
>  net/openvswitch/vport-gre.c          |  23 +++++++-
>  net/openvswitch/vport-internal_dev.c |  17 +++++-
>  net/openvswitch/vport-netdev.c       |  14 ++++-
>  net/openvswitch/vport-netdev.h       |   3 ++
>  net/openvswitch/vport-vxlan.c        |  23 +++++++-
>  net/openvswitch/vport.c              | 102 ++++++++++++++++++++++++-----------
>  net/openvswitch/vport.h              |  14 +++--
>  11 files changed, 199 insertions(+), 68 deletions(-)
>
> diff --git a/net/openvswitch/Kconfig b/net/openvswitch/Kconfig
> index ba3bb82..2a9673e 100644
> --- a/net/openvswitch/Kconfig
> +++ b/net/openvswitch/Kconfig
> @@ -29,11 +29,11 @@ config OPENVSWITCH
>           If unsure, say N.
>
>  config OPENVSWITCH_GRE
> -       bool "Open vSwitch GRE tunneling support"
> +       tristate "Open vSwitch GRE tunneling support"
>         depends on INET
>         depends on OPENVSWITCH
> -       depends on NET_IPGRE_DEMUX && !(OPENVSWITCH=y && NET_IPGRE_DEMUX=m)
> -       default y
> +       depends on NET_IPGRE_DEMUX
> +       default OPENVSWITCH
>         ---help---
>           If you say Y here, then the Open vSwitch will be able create GRE
>           vport.
> @@ -43,11 +43,11 @@ config OPENVSWITCH_GRE
>           If unsure, say Y.
>
>  config OPENVSWITCH_VXLAN
> -       bool "Open vSwitch VXLAN tunneling support"
> +       tristate "Open vSwitch VXLAN tunneling support"
>         depends on INET
>         depends on OPENVSWITCH
> -       depends on VXLAN && !(OPENVSWITCH=y && VXLAN=m)
> -       default y
> +       depends on VXLAN
> +       default OPENVSWITCH
>         ---help---
>           If you say Y here, then the Open vSwitch will be able create vxlan vport.
>
> @@ -56,11 +56,11 @@ config OPENVSWITCH_VXLAN
>           If unsure, say Y.
>
>  config OPENVSWITCH_GENEVE
> -       bool "Open vSwitch Geneve tunneling support"
> +       tristate "Open vSwitch Geneve tunneling support"
>         depends on INET
>         depends on OPENVSWITCH
> -       depends on GENEVE && !(OPENVSWITCH=y && GENEVE=m)
> -       default y
> +       depends on GENEVE
> +       default OPENVSWITCH
>         ---help---
>           If you say Y here, then the Open vSwitch will be able create geneve vport.
>
> diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile
> index 9a33a27..91b9478 100644
> --- a/net/openvswitch/Makefile
> +++ b/net/openvswitch/Makefile
> @@ -15,14 +15,6 @@ openvswitch-y := \
>         vport-internal_dev.o \
>         vport-netdev.o
>
> -ifneq ($(CONFIG_OPENVSWITCH_GENEVE),)
> -openvswitch-y += vport-geneve.o
> -endif
> -
> -ifneq ($(CONFIG_OPENVSWITCH_VXLAN),)
> -openvswitch-y += vport-vxlan.o
> -endif
> -
> -ifneq ($(CONFIG_OPENVSWITCH_GRE),)
> -openvswitch-y += vport-gre.o
> -endif
> +obj-$(CONFIG_OPENVSWITCH_GENEVE)+= vport-geneve.o
> +obj-$(CONFIG_OPENVSWITCH_VXLAN)        += vport-vxlan.o
> +obj-$(CONFIG_OPENVSWITCH_GRE)  += vport-gre.o
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index e6d7255..aecddb9 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -59,6 +59,7 @@
>  #include "vport-netdev.h"
>
>  int ovs_net_id __read_mostly;
> +EXPORT_SYMBOL(ovs_net_id);
>
>  static struct genl_family dp_packet_genl_family;
>  static struct genl_family dp_flow_genl_family;
> @@ -1764,6 +1765,7 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
>                 return -ENOMEM;
>
>         ovs_lock();
> +restart:
>         dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex);
>         err = -ENODEV;
>         if (!dp)
> @@ -1795,8 +1797,11 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
>
>         vport = new_vport(&parms);
>         err = PTR_ERR(vport);
> -       if (IS_ERR(vport))
> +       if (IS_ERR(vport)) {
> +               if (err == -EAGAIN)
> +                       goto restart;
>                 goto exit_unlock_free;
> +       }
>
>         err = ovs_vport_cmd_fill_info(vport, reply, info->snd_portid,
>                                       info->snd_seq, 0, OVS_VPORT_CMD_NEW);
> @@ -2112,12 +2117,18 @@ static int __init dp_init(void)
>         if (err)
>                 goto error_netns_exit;
>
> +       err = ovs_netdev_init();
> +       if (err)
> +               goto error_unreg_notifier;
> +
>         err = dp_register_genl();
>         if (err < 0)
> -               goto error_unreg_notifier;
> +               goto error_unreg_netdev;
>
>         return 0;
>
> +error_unreg_netdev:
> +       ovs_netdev_exit();
>  error_unreg_notifier:
>         unregister_netdevice_notifier(&ovs_dp_device_notifier);
>  error_netns_exit:
> @@ -2137,6 +2148,7 @@ error:
>  static void dp_cleanup(void)
>  {
>         dp_unregister_genl(ARRAY_SIZE(dp_genl_families));
> +       ovs_netdev_exit();
>         unregister_netdevice_notifier(&ovs_dp_device_notifier);
>         unregister_pernet_device(&ovs_net_ops);
>         rcu_barrier();
> diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
> index 106a9d8..70c9765 100644
> --- a/net/openvswitch/vport-geneve.c
> +++ b/net/openvswitch/vport-geneve.c
> @@ -17,6 +17,7 @@
>  #include <linux/rculist.h>
>  #include <linux/udp.h>
>  #include <linux/if_vlan.h>
> +#include <linux/module.h>
>
>  #include <net/geneve.h>
>  #include <net/icmp.h>
> @@ -28,6 +29,8 @@
>  #include "datapath.h"
>  #include "vport.h"
>
> +static struct vport_ops ovs_geneve_vport_ops;
> +
>  /**
>   * struct geneve_port - Keeps track of open UDP ports
>   * @gs: The socket created for this port number.
> @@ -225,11 +228,29 @@ static const char *geneve_get_name(const struct vport *vport)
>         return geneve_port->name;
>  }
>
> -const struct vport_ops ovs_geneve_vport_ops = {
> +static struct vport_ops ovs_geneve_vport_ops = {
>         .type           = OVS_VPORT_TYPE_GENEVE,
>         .create         = geneve_tnl_create,
>         .destroy        = geneve_tnl_destroy,
>         .get_name       = geneve_get_name,
>         .get_options    = geneve_get_options,
>         .send           = geneve_tnl_send,
> +       .owner          = THIS_MODULE,
>  };
> +
> +static int __init ovs_geneve_tnl_init(void)
> +{
> +       return ovs_vport_ops_register(&ovs_geneve_vport_ops);
> +}
> +
> +static void __exit ovs_geneve_tnl_exit(void)
> +{
> +       ovs_vport_ops_unregister(&ovs_geneve_vport_ops);
> +}
> +
> +module_init(ovs_geneve_tnl_init);
> +module_exit(ovs_geneve_tnl_exit);
> +
> +MODULE_DESCRIPTION("OVS: Geneve swiching port");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("vport-type-5");
> diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
> index 108b82d..00270b6 100644
> --- a/net/openvswitch/vport-gre.c
> +++ b/net/openvswitch/vport-gre.c
> @@ -29,6 +29,7 @@
>  #include <linux/jhash.h>
>  #include <linux/list.h>
>  #include <linux/kernel.h>
> +#include <linux/module.h>
>  #include <linux/workqueue.h>
>  #include <linux/rculist.h>
>  #include <net/route.h>
> @@ -45,6 +46,8 @@
>  #include "datapath.h"
>  #include "vport.h"
>
> +static struct vport_ops ovs_gre_vport_ops;
> +
>  /* Returns the least-significant 32 bits of a __be64. */
>  static __be32 be64_get_low32(__be64 x)
>  {
> @@ -281,10 +284,28 @@ static void gre_tnl_destroy(struct vport *vport)
>         gre_exit();
>  }
>
> -const struct vport_ops ovs_gre_vport_ops = {
> +static struct vport_ops ovs_gre_vport_ops = {
>         .type           = OVS_VPORT_TYPE_GRE,
>         .create         = gre_create,
>         .destroy        = gre_tnl_destroy,
>         .get_name       = gre_get_name,
>         .send           = gre_tnl_send,
> +       .owner          = THIS_MODULE,
>  };
> +
> +static int __init ovs_gre_tnl_init(void)
> +{
> +       return ovs_vport_ops_register(&ovs_gre_vport_ops);
> +}
> +
> +static void __exit ovs_gre_tnl_exit(void)
> +{
> +       ovs_vport_ops_unregister(&ovs_gre_vport_ops);
> +}
> +
> +module_init(ovs_gre_tnl_init);
> +module_exit(ovs_gre_tnl_exit);
> +
> +MODULE_DESCRIPTION("OVS: GRE switching port");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("vport-type-3");
> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
> index 8451612..10dc07e 100644
> --- a/net/openvswitch/vport-internal_dev.c
> +++ b/net/openvswitch/vport-internal_dev.c
> @@ -36,6 +36,8 @@ struct internal_dev {
>         struct vport *vport;
>  };
>
> +static struct vport_ops ovs_internal_vport_ops;
> +
>  static struct internal_dev *internal_dev_priv(struct net_device *netdev)
>  {
>         return netdev_priv(netdev);
> @@ -238,7 +240,7 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb)
>         return len;
>  }
>
> -const struct vport_ops ovs_internal_vport_ops = {
> +static struct vport_ops ovs_internal_vport_ops = {
>         .type           = OVS_VPORT_TYPE_INTERNAL,
>         .create         = internal_dev_create,
>         .destroy        = internal_dev_destroy,
> @@ -261,10 +263,21 @@ struct vport *ovs_internal_dev_get_vport(struct net_device *netdev)
>
>  int ovs_internal_dev_rtnl_link_register(void)
>  {
> -       return rtnl_link_register(&internal_dev_link_ops);
> +       int err;
> +
> +       err = rtnl_link_register(&internal_dev_link_ops);
> +       if (err < 0)
> +               return err;
> +
> +       err = ovs_vport_ops_register(&ovs_internal_vport_ops);
> +       if (err < 0)
> +               rtnl_link_unregister(&internal_dev_link_ops);
> +
> +       return err;
>  }
>
>  void ovs_internal_dev_rtnl_link_unregister(void)
>  {
> +       ovs_vport_ops_unregister(&ovs_internal_vport_ops);
>         rtnl_link_unregister(&internal_dev_link_ops);
>  }
> diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
> index d21f77d..877ee74 100644
> --- a/net/openvswitch/vport-netdev.c
> +++ b/net/openvswitch/vport-netdev.c
> @@ -33,6 +33,8 @@
>  #include "vport-internal_dev.h"
>  #include "vport-netdev.h"
>
> +static struct vport_ops ovs_netdev_vport_ops;
> +
>  /* Must be called with rcu_read_lock. */
>  static void netdev_port_receive(struct vport *vport, struct sk_buff *skb)
>  {
> @@ -224,10 +226,20 @@ struct vport *ovs_netdev_get_vport(struct net_device *dev)
>                 return NULL;
>  }
>
> -const struct vport_ops ovs_netdev_vport_ops = {
> +static struct vport_ops ovs_netdev_vport_ops = {
>         .type           = OVS_VPORT_TYPE_NETDEV,
>         .create         = netdev_create,
>         .destroy        = netdev_destroy,
>         .get_name       = ovs_netdev_get_name,
>         .send           = netdev_send,
>  };
> +
> +int __init ovs_netdev_init(void)
> +{
> +       return ovs_vport_ops_register(&ovs_netdev_vport_ops);
> +}
> +
> +void ovs_netdev_exit(void)
> +{
> +       ovs_vport_ops_unregister(&ovs_netdev_vport_ops);
> +}
> diff --git a/net/openvswitch/vport-netdev.h b/net/openvswitch/vport-netdev.h
> index 8df01c11..6f7038e 100644
> --- a/net/openvswitch/vport-netdev.h
> +++ b/net/openvswitch/vport-netdev.h
> @@ -41,4 +41,7 @@ netdev_vport_priv(const struct vport *vport)
>  const char *ovs_netdev_get_name(const struct vport *);
>  void ovs_netdev_detach_dev(struct vport *);
>
> +int __init ovs_netdev_init(void);
> +void ovs_netdev_exit(void);
> +
>  #endif /* vport_netdev.h */
> diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
> index 2735e01..965e750 100644
> --- a/net/openvswitch/vport-vxlan.c
> +++ b/net/openvswitch/vport-vxlan.c
> @@ -24,6 +24,7 @@
>  #include <linux/net.h>
>  #include <linux/rculist.h>
>  #include <linux/udp.h>
> +#include <linux/module.h>
>
>  #include <net/icmp.h>
>  #include <net/ip.h>
> @@ -50,6 +51,8 @@ struct vxlan_port {
>         char name[IFNAMSIZ];
>  };
>
> +static struct vport_ops ovs_vxlan_vport_ops;
> +
>  static inline struct vxlan_port *vxlan_vport(const struct vport *vport)
>  {
>         return vport_priv(vport);
> @@ -192,11 +195,29 @@ static const char *vxlan_get_name(const struct vport *vport)
>         return vxlan_port->name;
>  }
>
> -const struct vport_ops ovs_vxlan_vport_ops = {
> +static struct vport_ops ovs_vxlan_vport_ops = {
>         .type           = OVS_VPORT_TYPE_VXLAN,
>         .create         = vxlan_tnl_create,
>         .destroy        = vxlan_tnl_destroy,
>         .get_name       = vxlan_get_name,
>         .get_options    = vxlan_get_options,
>         .send           = vxlan_tnl_send,
> +       .owner          = THIS_MODULE,
>  };
> +
> +static int __init ovs_vxlan_tnl_init(void)
> +{
> +       return ovs_vport_ops_register(&ovs_vxlan_vport_ops);
> +}
> +
> +static void __exit ovs_vxlan_tnl_exit(void)
> +{
> +       ovs_vport_ops_unregister(&ovs_vxlan_vport_ops);
> +}
> +
> +module_init(ovs_vxlan_tnl_init);
> +module_exit(ovs_vxlan_tnl_exit);
> +
> +MODULE_DESCRIPTION("OVS: VXLAN switching port");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("vport-type-4");
> diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
> index 6015802..8168ef0 100644
> --- a/net/openvswitch/vport.c
> +++ b/net/openvswitch/vport.c
> @@ -28,6 +28,7 @@
>  #include <linux/rtnetlink.h>
>  #include <linux/compat.h>
>  #include <net/net_namespace.h>
> +#include <linux/module.h>
>
>  #include "datapath.h"
>  #include "vport.h"
> @@ -36,22 +37,7 @@
>  static void ovs_vport_record_error(struct vport *,
>                                    enum vport_err_type err_type);
>
> -/* List of statically compiled vport implementations.  Don't forget to also
> - * add yours to the list at the bottom of vport.h. */
> -static const struct vport_ops *vport_ops_list[] = {
> -       &ovs_netdev_vport_ops,
> -       &ovs_internal_vport_ops,
> -
> -#ifdef CONFIG_OPENVSWITCH_GRE
> -       &ovs_gre_vport_ops,
> -#endif
> -#ifdef CONFIG_OPENVSWITCH_VXLAN
> -       &ovs_vxlan_vport_ops,
> -#endif
> -#ifdef CONFIG_OPENVSWITCH_GENEVE
> -       &ovs_geneve_vport_ops,
> -#endif
> -};
> +static LIST_HEAD(vport_ops_list);
>
>  /* Protected by RCU read lock for reading, ovs_mutex for writing. */
>  static struct hlist_head *dev_table;
> @@ -88,6 +74,32 @@ static struct hlist_head *hash_bucket(struct net *net, const char *name)
>         return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)];
>  }
>
> +int ovs_vport_ops_register(struct vport_ops *ops)
> +{
> +       int err = -EEXIST;
> +       struct vport_ops *o;
> +
> +       ovs_lock();
> +       list_for_each_entry(o, &vport_ops_list, list)
> +               if (ops->type == o->type)
> +                       goto errout;
> +
> +       list_add_tail(&ops->list, &vport_ops_list);
> +       err = 0;
> +errout:
> +       ovs_unlock();
> +       return err;
> +}
> +EXPORT_SYMBOL(ovs_vport_ops_register);
> +
> +void ovs_vport_ops_unregister(struct vport_ops *ops)
> +{
> +       ovs_lock();
> +       list_del(&ops->list);
> +       ovs_unlock();
> +}
> +EXPORT_SYMBOL(ovs_vport_ops_unregister);
> +
>  /**
>   *     ovs_vport_locate - find a port that has already been created
>   *
> @@ -153,6 +165,7 @@ struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *ops,
>
>         return vport;
>  }
> +EXPORT_SYMBOL(ovs_vport_alloc);
>
>  /**
>   *     ovs_vport_free - uninitialize and free vport
> @@ -173,6 +186,18 @@ void ovs_vport_free(struct vport *vport)
>         free_percpu(vport->percpu_stats);
>         kfree(vport);
>  }
> +EXPORT_SYMBOL(ovs_vport_free);
> +
> +static struct vport_ops *ovs_vport_lookup(const struct vport_parms *parms)
> +{
> +       struct vport_ops *ops;
> +
> +       list_for_each_entry(ops, &vport_ops_list, list)
> +               if (ops->type == parms->type)
> +                       return ops;
> +
> +       return NULL;
> +}
>
>  /**
>   *     ovs_vport_add - add vport device (for kernel callers)
> @@ -184,31 +209,40 @@ void ovs_vport_free(struct vport *vport)
>   */
>  struct vport *ovs_vport_add(const struct vport_parms *parms)
>  {
> +       struct vport_ops *ops;
>         struct vport *vport;
> -       int err = 0;
> -       int i;
>
> -       for (i = 0; i < ARRAY_SIZE(vport_ops_list); i++) {
> -               if (vport_ops_list[i]->type == parms->type) {
> -                       struct hlist_head *bucket;
> +       ops = ovs_vport_lookup(parms);
> +       if (ops) {
> +               struct hlist_head *bucket;
>
> -                       vport = vport_ops_list[i]->create(parms);
> -                       if (IS_ERR(vport)) {
> -                               err = PTR_ERR(vport);
> -                               goto out;
> -                       }
> +               if (!try_module_get(ops->owner))
> +                       return ERR_PTR(-EAFNOSUPPORT);
>
> -                       bucket = hash_bucket(ovs_dp_get_net(vport->dp),
> -                                            vport->ops->get_name(vport));
> -                       hlist_add_head_rcu(&vport->hash_node, bucket);
> +               vport = ops->create(parms);
> +               if (IS_ERR(vport)) {
> +                       module_put(ops->owner);
>                         return vport;
>                 }
> +
> +               bucket = hash_bucket(ovs_dp_get_net(vport->dp),
> +                                    vport->ops->get_name(vport));
> +               hlist_add_head_rcu(&vport->hash_node, bucket);
> +               return vport;
>         }
>
> -       err = -EAFNOSUPPORT;
> +       /* Unlock to attempt module load and return -EAGAIN if load
> +        * was successful as we need to restart the port addition
> +        * workflow.
> +        */
> +       ovs_unlock();
> +       request_module("vport-type-%d", parms->type);
> +       ovs_lock();
>
> -out:
> -       return ERR_PTR(err);
> +       if (!ovs_vport_lookup(parms))
> +               return ERR_PTR(-EAFNOSUPPORT);
> +       else
> +               return ERR_PTR(-EAGAIN);
>  }
>
>  /**
> @@ -242,6 +276,8 @@ void ovs_vport_del(struct vport *vport)
>         hlist_del_rcu(&vport->hash_node);
>
>         vport->ops->destroy(vport);
> +
> +       module_put(vport->ops->owner);
>  }
>
>  /**
> @@ -457,6 +493,7 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
>         }
>         ovs_dp_process_packet(skb, &key);
>  }
> +EXPORT_SYMBOL(ovs_vport_receive);
>
>  /**
>   *     ovs_vport_send - send a packet on a device
> @@ -535,3 +572,4 @@ void ovs_vport_deferred_free(struct vport *vport)
>
>         call_rcu(&vport->rcu, free_vport_rcu);
>  }
> +EXPORT_SYMBOL(ovs_vport_deferred_free);
> diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
> index 8942125..e41c3fa 100644
> --- a/net/openvswitch/vport.h
> +++ b/net/openvswitch/vport.h
> @@ -161,6 +161,9 @@ struct vport_ops {
>         const char *(*get_name)(const struct vport *);
>
>         int (*send)(struct vport *, struct sk_buff *);
> +
> +       struct module *owner;
> +       struct list_head list;
>  };
>
>  enum vport_err_type {
> @@ -209,14 +212,6 @@ static inline struct vport *vport_from_priv(void *priv)
>  void ovs_vport_receive(struct vport *, struct sk_buff *,
>                        struct ovs_tunnel_info *);
>
> -/* List of statically compiled vport implementations.  Don't forget to also
> - * add yours to the list at the top of vport.c. */
> -extern const struct vport_ops ovs_netdev_vport_ops;
> -extern const struct vport_ops ovs_internal_vport_ops;
> -extern const struct vport_ops ovs_gre_vport_ops;
> -extern const struct vport_ops ovs_vxlan_vport_ops;
> -extern const struct vport_ops ovs_geneve_vport_ops;
> -
>  static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
>                                       const void *start, unsigned int len)
>  {
> @@ -224,4 +219,7 @@ static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
>                 skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
>  }
>
> +int ovs_vport_ops_register(struct vport_ops *ops);
> +void ovs_vport_ops_unregister(struct vport_ops *ops);
> +
>  #endif /* vport.h */
> --
> 1.9.3
>
> --
> 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
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply

* Re: [PATCH net] net/sched: Fix use of wild pointer in mq_destroy() when qdisc_alloc fail
From: John Fastabend @ 2014-10-24 17:49 UTC (permalink / raw)
  To: wang.bo116; +Cc: davem, kaber, netdev, cui.yunfeng
In-Reply-To: <OF7A403C69.2C35464E-ON48257D7B.002E24AA-48257D7B.002F2A62@zte.com.cn>

On 10/24/2014 01:34 AM, wang.bo116@zte.com.cn wrote:
>

[...]

>
> --------------------------------------------------------------------------------
>
> This patch  fix this problem, base on linux 3.18-rc-1:
>
> Signed-off-by: Wang Bo <wang.bo116@zte.com.cn>
> Tested-by: Ma Chenggong <ma.chenggong@zte.com.cn>
> diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c
> index 42f72f1..a0c90e7 100755
> --- a/net/sched/sch_mq.c
> +++ b/net/sched/sch_mq.c
> @@ -33,6 +33,7 @@ static void mq_destroy(struct Qdisc *sch)
>   	for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++)
>   		qdisc_destroy(priv->qdiscs[ntx]);
>   	kfree(priv->qdiscs);
> +	priv->qdiscs = NULL;
>   }
>
>   static int mq_init(struct Qdisc *sch, struct nlattr *opt)
>

Acked-by: John Fastabend <john.r.fastabend@intel.com>

Patch looks fine, another way to fix this would be drop the
mq_destroy() call in the error path. I'm not convinced one
is any better than the other but maybe some other folks have
opinions, it seems a bit wrong to call mq_destroy twice so in
that sense it may be a bit nicer to drop the mq_destroy().

Also same bug in mqprio do you want to submit a patch for
that qdisc as well? Otherwise I can.

Thanks!


-- 
John Fastabend         Intel Corporation

^ permalink raw reply

* [PATCH net 3/3] cdc-ether: handle promiscuous mode with a set_rx_mode callback
From: Olivier Blin @ 2014-10-24 17:43 UTC (permalink / raw)
  To: netdev; +Cc: oneukum, hayeswang, bjorn, davem, Olivier Blin
In-Reply-To: <1414172582-30844-1-git-send-email-olivier.blin@softathome.com>

Promiscuous mode was not supported anymore with my Lenovo adapters
(RTL8153) since commit c472ab68ad67db23c9907a27649b7dc0899b61f9
(cdc-ether: clean packet filter upon probe).

It was not possible to use them in a bridge anymore.

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Also-analyzed-by: Loïc Yhuel <loic.yhuel@softathome.com>
---
 drivers/net/usb/cdc_ether.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index bee3689..d3920b5 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -76,6 +76,9 @@ static void usbnet_cdc_update_filter(struct usbnet *dev)
 	    USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED |
 	    USB_CDC_PACKET_TYPE_BROADCAST;
 
+	if (dev->net->flags & IFF_PROMISC)
+		cdc_filter |= USB_CDC_PACKET_TYPE_PROMISCUOUS;
+
 	/* FIXME cdc-ether has some multicast code too, though it complains
 	 * in routine cases.  info->ether describes the multicast support.
 	 * Implement that here, manipulating the cdc filter as needed.
@@ -496,6 +499,7 @@ static const struct driver_info	cdc_info = {
 	.bind =		usbnet_cdc_bind,
 	.unbind =	usbnet_cdc_unbind,
 	.status =	usbnet_cdc_status,
+	.set_rx_mode =	usbnet_cdc_update_filter,
 	.manage_power =	usbnet_manage_power,
 };
 
@@ -505,6 +509,7 @@ static const struct driver_info wwan_info = {
 	.bind =		usbnet_cdc_bind,
 	.unbind =	usbnet_cdc_unbind,
 	.status =	usbnet_cdc_status,
+	.set_rx_mode =	usbnet_cdc_update_filter,
 	.manage_power =	usbnet_manage_power,
 };
 
-- 
2.1.2

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

^ permalink raw reply related

* [PATCH net 2/3] cdc-ether: extract usbnet_cdc_update_filter function
From: Olivier Blin @ 2014-10-24 17:43 UTC (permalink / raw)
  To: netdev; +Cc: oneukum, hayeswang, bjorn, davem, Olivier Blin
In-Reply-To: <1414172582-30844-1-git-send-email-olivier.blin@softathome.com>

This will be used by the set_rx_mode callback.

Also move a comment about multicast filtering in this new function.

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
---
 drivers/net/usb/cdc_ether.c | 42 ++++++++++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 2a32d91..bee3689 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -67,6 +67,32 @@ static const u8 mbm_guid[16] = {
 	0xa6, 0x07, 0xc0, 0xff, 0xcb, 0x7e, 0x39, 0x2a,
 };
 
+static void usbnet_cdc_update_filter(struct usbnet *dev)
+{
+	struct cdc_state	*info = (void *) &dev->data;
+	struct usb_interface	*intf = info->control;
+
+	u16 cdc_filter =
+	    USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED |
+	    USB_CDC_PACKET_TYPE_BROADCAST;
+
+	/* FIXME cdc-ether has some multicast code too, though it complains
+	 * in routine cases.  info->ether describes the multicast support.
+	 * Implement that here, manipulating the cdc filter as needed.
+	 */
+
+	usb_control_msg(dev->udev,
+			usb_sndctrlpipe(dev->udev, 0),
+			USB_CDC_SET_ETHERNET_PACKET_FILTER,
+			USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+			cdc_filter,
+			intf->cur_altsetting->desc.bInterfaceNumber,
+			NULL,
+			0,
+			USB_CTRL_SET_TIMEOUT
+		);
+}
+
 /* probes control interface, claims data interface, collects the bulk
  * endpoints, activates data interface (if needed), maybe sets MTU.
  * all pure cdc, except for certain firmware workarounds, and knowing
@@ -347,16 +373,8 @@ next_desc:
 	 * don't do reset all the way. So the packet filter should
 	 * be set to a sane initial value.
 	 */
-	usb_control_msg(dev->udev,
-			usb_sndctrlpipe(dev->udev, 0),
-			USB_CDC_SET_ETHERNET_PACKET_FILTER,
-			USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-			USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | USB_CDC_PACKET_TYPE_BROADCAST,
-			intf->cur_altsetting->desc.bInterfaceNumber,
-			NULL,
-			0,
-			USB_CTRL_SET_TIMEOUT
-		);
+	usbnet_cdc_update_filter(dev);
+
 	return 0;
 
 bad_desc:
@@ -468,10 +486,6 @@ int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
 		return status;
 	}
 
-	/* FIXME cdc-ether has some multicast code too, though it complains
-	 * in routine cases.  info->ether describes the multicast support.
-	 * Implement that here, manipulating the cdc filter as needed.
-	 */
 	return 0;
 }
 EXPORT_SYMBOL_GPL(usbnet_cdc_bind);
-- 
2.1.2

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

^ permalink raw reply related

* [PATCH net 0/3] cdc-ether: handle promiscuous mode
From: Olivier Blin @ 2014-10-24 17:42 UTC (permalink / raw)
  To: netdev; +Cc: oneukum, hayeswang, bjorn, davem, Olivier Blin

Hi,

Since kernel 3.16, my Lenovo USB network adapters (RTL8153) using
cdc-ether are not working anymore in a bridge.

This is due to commit c472ab68ad67db23c9907a27649b7dc0899b61f9, which
resets the packet filter when the device is bound.

The default packet filter set by cdc-ether does not include
promiscuous, while the adapter seemed to have promiscuous enabled by
default.

This patch series allows to support promiscuous mode for cdc-ether, by
hooking into set_rx_mode.

Incidentally, maybe this device should be handled by the r8152 driver,
but this patch series is still nice for other adapters.

Thanks

Olivier Blin (3):
  usbnet: add a callback for set_rx_mode
  cdc-ether: extract usbnet_cdc_update_filter function
  cdc-ether: handle promiscuous mode with a set_rx_mode callback

 drivers/net/usb/cdc_ether.c | 47 +++++++++++++++++++++++++++++++--------------
 drivers/net/usb/usbnet.c    | 20 +++++++++++++++++++
 include/linux/usb/usbnet.h  |  4 ++++
 3 files changed, 57 insertions(+), 14 deletions(-)

-- 
2.1.2

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

^ permalink raw reply

* [PATCH net 1/3] usbnet: add a callback for set_rx_mode
From: Olivier Blin @ 2014-10-24 17:43 UTC (permalink / raw)
  To: netdev; +Cc: oneukum, hayeswang, bjorn, davem, Olivier Blin
In-Reply-To: <1414172582-30844-1-git-send-email-olivier.blin@softathome.com>

To delegate promiscuous mode and multicast filtering to the subdriver.

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
---
 drivers/net/usb/usbnet.c   | 20 ++++++++++++++++++++
 include/linux/usb/usbnet.h |  4 ++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 5173821..53f51fc 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1051,6 +1051,21 @@ static void __handle_link_change(struct usbnet *dev)
 	clear_bit(EVENT_LINK_CHANGE, &dev->flags);
 }
 
+static void usbnet_set_rx_mode(struct net_device *net)
+{
+	struct usbnet		*dev = netdev_priv(net);
+
+	usbnet_defer_kevent(dev, EVENT_SET_RX_MODE);
+}
+
+static void __handle_set_rx_mode(struct usbnet *dev)
+{
+	if (dev->driver_info->set_rx_mode)
+		(dev->driver_info->set_rx_mode)(dev);
+
+	clear_bit(EVENT_SET_RX_MODE, &dev->flags);
+}
+
 /* work that cannot be done in interrupt context uses keventd.
  *
  * NOTE:  with 2.5 we could do more of this using completion callbacks,
@@ -1156,6 +1171,10 @@ skip_reset:
 	if (test_bit (EVENT_LINK_CHANGE, &dev->flags))
 		__handle_link_change(dev);
 
+	if (test_bit (EVENT_SET_RX_MODE, &dev->flags))
+		__handle_set_rx_mode(dev);
+
+
 	if (dev->flags)
 		netdev_dbg(dev->net, "kevent done, flags = 0x%lx\n", dev->flags);
 }
@@ -1523,6 +1542,7 @@ static const struct net_device_ops usbnet_netdev_ops = {
 	.ndo_stop		= usbnet_stop,
 	.ndo_start_xmit		= usbnet_start_xmit,
 	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_set_rx_mode	= usbnet_set_rx_mode,
 	.ndo_change_mtu		= usbnet_change_mtu,
 	.ndo_set_mac_address 	= eth_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 26088fe..d9a4905 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -78,6 +78,7 @@ struct usbnet {
 #		define EVENT_NO_RUNTIME_PM	9
 #		define EVENT_RX_KILL	10
 #		define EVENT_LINK_CHANGE	11
+#		define EVENT_SET_RX_MODE	12
 };
 
 static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -159,6 +160,9 @@ struct driver_info {
 	/* called by minidriver when receiving indication */
 	void	(*indication)(struct usbnet *dev, void *ind, int indlen);
 
+	/* rx mode change (device changes address list filtering) */
+	void	(*set_rx_mode)(struct usbnet *dev);
+
 	/* for new devices, use the descriptor-reading code instead */
 	int		in;		/* rx endpoint */
 	int		out;		/* tx endpoint */
-- 
2.1.2

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

^ permalink raw reply related

* Re: [PATCH net] net/sched: Fix use of wild pointer in mq_destroy() when qdisc_alloc fail
From: Cong Wang @ 2014-10-24 18:13 UTC (permalink / raw)
  To: John Fastabend
  Cc: wang.bo116, David Miller, Patrick McHardy, netdev, cui.yunfeng
In-Reply-To: <544A913A.1060100@gmail.com>

On Fri, Oct 24, 2014 at 10:49 AM, John Fastabend
<john.fastabend@gmail.com> wrote:
>
> Patch looks fine, another way to fix this would be drop the
> mq_destroy() call in the error path. I'm not convinced one
> is any better than the other but maybe some other folks have
> opinions, it seems a bit wrong to call mq_destroy twice so in
> that sense it may be a bit nicer to drop the mq_destroy().

Dropping mq_destroy() in error path is indeed better,
because upper layer does cleanup intentionally.
Look at what other qdisc's do. :)

^ permalink raw reply

* Re: [PATCH V3.18] rtlwifi: Add check for get_btc_status callback
From: Murilo Opsfelder Araujo @ 2014-10-24 18:13 UTC (permalink / raw)
  To: Larry Finger, Mike Galbraith
  Cc: linville, linux-wireless, troy_tan, netdev, Thadeu Cascardo
In-Reply-To: <544A80B5.1090604@lwfinger.net>

On 10/24/2014 02:39 PM, Larry Finger wrote:
[...]
>
> Please try the attached patch. It replaces the second one I sent you. I
> will probably redo it before submitting the final copy, but this should
> work.
>
> Larry
>
Hi, Larry.

I've tried your patch on top of next-20141023 and it is still crashing 
on my laptop:

http://opsfelder.com/~murilo/lkml/next-20141023_plus_larry_patch_v2.jpg

-- 
Murilo

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Jay Vosburgh @ 2014-10-24 18:20 UTC (permalink / raw)
  To: paulmck
  Cc: Yanko Kaneti, Josh Boyer, Eric W. Biederman, Cong Wang,
	Kevin Fenzi, netdev, Linux-Kernel@Vger. Kernel. Org
In-Reply-To: <20141024145028.GN4977@linux.vnet.ibm.com>

Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

>On Thu, Oct 23, 2014 at 09:48:34PM -0700, Jay Vosburgh wrote:
>> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
[...]
>> >Either way, my patch assumed that 39953dfd4007 (rcu: Avoid misordering in
>> >__call_rcu_nocb_enqueue()) would work and that 1772947bd012 (rcu: Handle
>> >NOCB callbacks from irq-disabled idle code) would fail.  Is that the case?
>> >If not, could you please bisect the commits between 11ed7f934cb8 (rcu:
>> >Make nocb leader kthreads process pending callbacks after spawning)
>> >and c847f14217d5 (rcu: Avoid misordering in nocb_leader_wait())?
>> 
>> 	Just a note to add that I am also reliably inducing what appears
>> to be this issue on a current -net tree, when configuring openvswitch
>> via script.  I am available to test patches or bisect tomorrow (Friday)
>> US time if needed.
>
>Thank you, Jay!  Could you please check to see if reverting this commit
>fixes things for you?
>
>35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
>
>Reverting is not a long-term fix, as this commit is itself a bug fix,
>but would be good to check to see if you are seeing the same thing that
>Yanko is.  ;-)

	Just to confirm what Yanko found, reverting this commit makes
the problem go away for me.

	-J

---
	-Jay Vosburgh, jay.vosburgh@canonical.com

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Paul E. McKenney @ 2014-10-24 18:33 UTC (permalink / raw)
  To: Jay Vosburgh
  Cc: Yanko Kaneti, Josh Boyer, Eric W. Biederman, Cong Wang,
	Kevin Fenzi, netdev, Linux-Kernel@Vger. Kernel. Org
In-Reply-To: <5677.1414174811@famine>

On Fri, Oct 24, 2014 at 11:20:11AM -0700, Jay Vosburgh wrote:
> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> 
> >On Thu, Oct 23, 2014 at 09:48:34PM -0700, Jay Vosburgh wrote:
> >> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> [...]
> >> >Either way, my patch assumed that 39953dfd4007 (rcu: Avoid misordering in
> >> >__call_rcu_nocb_enqueue()) would work and that 1772947bd012 (rcu: Handle
> >> >NOCB callbacks from irq-disabled idle code) would fail.  Is that the case?
> >> >If not, could you please bisect the commits between 11ed7f934cb8 (rcu:
> >> >Make nocb leader kthreads process pending callbacks after spawning)
> >> >and c847f14217d5 (rcu: Avoid misordering in nocb_leader_wait())?
> >> 
> >> 	Just a note to add that I am also reliably inducing what appears
> >> to be this issue on a current -net tree, when configuring openvswitch
> >> via script.  I am available to test patches or bisect tomorrow (Friday)
> >> US time if needed.
> >
> >Thank you, Jay!  Could you please check to see if reverting this commit
> >fixes things for you?
> >
> >35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
> >
> >Reverting is not a long-term fix, as this commit is itself a bug fix,
> >but would be good to check to see if you are seeing the same thing that
> >Yanko is.  ;-)
> 
> 	Just to confirm what Yanko found, reverting this commit makes
> the problem go away for me.

Thank you!

I take it that the patches that don't help Yanko also don't help you?

							Thanx, Paul

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Paul E. McKenney @ 2014-10-24 18:32 UTC (permalink / raw)
  To: Yanko Kaneti
  Cc: Josh Boyer, Eric W. Biederman, Cong Wang, Kevin Fenzi, netdev,
	Linux-Kernel@Vger. Kernel. Org, jay.vosburgh, mroos
In-Reply-To: <20141024173526.GA26058@declera.com>

On Fri, Oct 24, 2014 at 08:35:26PM +0300, Yanko Kaneti wrote:
> On Fri-10/24/14-2014 10:20, Paul E. McKenney wrote:
> > On Fri, Oct 24, 2014 at 08:09:31PM +0300, Yanko Kaneti wrote:
> > > On Fri-10/24/14-2014 09:54, Paul E. McKenney wrote:
> > > > On Fri, Oct 24, 2014 at 07:29:43PM +0300, Yanko Kaneti wrote:
> > > > > On Fri-10/24/14-2014 08:40, Paul E. McKenney wrote:
> > > > > > On Fri, Oct 24, 2014 at 12:08:57PM +0300, Yanko Kaneti wrote:
> > > > > > > On Thu-10/23/14-2014 15:04, Paul E. McKenney wrote:
> > > > > > > > On Fri, Oct 24, 2014 at 12:45:40AM +0300, Yanko Kaneti wrote:
> > > > > > > > > 
> > > > > > > > > On Thu, 2014-10-23 at 13:05 -0700, Paul E. McKenney wrote:
> > > > > > > > > > On Thu, Oct 23, 2014 at 10:51:59PM +0300, Yanko Kaneti wrote:
> > > > 
> > > > [ . . . ]
> > > > 
> > > > > > > Ok, unless I've messsed up something major, bisecting points to:
> > > > > > > 
> > > > > > > 35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
> > > > > > > 
> > > > > > > Makes any sense ?
> > > > > > 
> > > > > > Good question.  ;-)
> > > > > > 
> > > > > > Are any of your online CPUs missing rcuo kthreads?  There should be
> > > > > > kthreads named rcuos/0, rcuos/1, rcuos/2, and so on for each online CPU.
> > > > > 
> > > > > Its a Phenom II X6. With 3.17 and linux-tip with 35ce7f29a44a reverted, the rcuos are 8
> > > > > and the modprobe ppp_generic testcase reliably works, libvirt also manages
> > > > > to setup its bridge.
> > > > > 
> > > > > Just with linux-tip , the rcuos are 6 but the failure is as reliable as
> > > > > before.
> > > 
> > > > Thank you, very interesting.  Which 6 of the rcuos are present?
> > > 
> > > Well, the rcuos are 0 to 5. Which sounds right for a 6 core CPU like this   
> > > Phenom II.
> > 
> > Ah, you get 8 without the patch because it creates them for potential
> > CPUs as well as real ones.  OK, got it.
> > 
> > > > > Awating instructions: :)
> > > > 
> > > > Well, I thought I understood the problem until you found that only 6 of
> > > > the expected 8 rcuos are present with linux-tip without the revert.  ;-)
> > > > 
> > > > I am putting together a patch for the part of the problem that I think
> > > > I understand, of course, but it would help a lot to know which two of
> > > > the rcuos are missing.  ;-)
> > > 
> > > Ready to test
> > 
> > Well, if you are feeling aggressive, give the following patch a spin.
> > I am doing sanity tests on it in the meantime.
> 
> Doesn't seem to make a difference here

OK, inspection isn't cutting it, so time for tracing.  Does the system
respond to user input?  If so, please enable rcu:rcu_barrier ftrace before
the problem occurs, then dump the trace buffer after the problem occurs.

							Thanx, Paul

> > ------------------------------------------------------------------------
> > 
> > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> > index 29fb23f33c18..927c17b081c7 100644
> > --- a/kernel/rcu/tree_plugin.h
> > +++ b/kernel/rcu/tree_plugin.h
> > @@ -2546,9 +2546,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
> >  			rdp->nocb_leader = rdp_spawn;
> >  			if (rdp_last && rdp != rdp_spawn)
> >  				rdp_last->nocb_next_follower = rdp;
> > -			rdp_last = rdp;
> > -			rdp = rdp->nocb_next_follower;
> > -			rdp_last->nocb_next_follower = NULL;
> > +			if (rdp == rdp_spawn) {
> > +				rdp = rdp->nocb_next_follower;
> > +			} else {
> > +				rdp_last = rdp;
> > +				rdp = rdp->nocb_next_follower;
> > +				rdp_last->nocb_next_follower = NULL;
> > +			}
> >  		} while (rdp);
> >  		rdp_spawn->nocb_next_follower = rdp_old_leader;
> >  	}
> > 
> 

^ permalink raw reply

* netfilter
From: Jamal Hadi Salim @ 2014-10-24 18:43 UTC (permalink / raw)
  To: netdev@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: call_for_sponsors3.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 46534 bytes --]

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Jay Vosburgh @ 2014-10-24 18:49 UTC (permalink / raw)
  To: paulmck
  Cc: Yanko Kaneti, Josh Boyer, Eric W. Biederman, Cong Wang,
	Kevin Fenzi, netdev, Linux-Kernel@Vger. Kernel. Org, mroos
In-Reply-To: <20141024183226.GW4977@linux.vnet.ibm.com>

Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

>On Fri, Oct 24, 2014 at 08:35:26PM +0300, Yanko Kaneti wrote:
>> On Fri-10/24/14-2014 10:20, Paul E. McKenney wrote:
>> > On Fri, Oct 24, 2014 at 08:09:31PM +0300, Yanko Kaneti wrote:
>> > > On Fri-10/24/14-2014 09:54, Paul E. McKenney wrote:
>> > > > On Fri, Oct 24, 2014 at 07:29:43PM +0300, Yanko Kaneti wrote:
>> > > > > On Fri-10/24/14-2014 08:40, Paul E. McKenney wrote:
>> > > > > > On Fri, Oct 24, 2014 at 12:08:57PM +0300, Yanko Kaneti wrote:
>> > > > > > > On Thu-10/23/14-2014 15:04, Paul E. McKenney wrote:
>> > > > > > > > On Fri, Oct 24, 2014 at 12:45:40AM +0300, Yanko Kaneti wrote:
>> > > > > > > > > 
>> > > > > > > > > On Thu, 2014-10-23 at 13:05 -0700, Paul E. McKenney wrote:
>> > > > > > > > > > On Thu, Oct 23, 2014 at 10:51:59PM +0300, Yanko Kaneti wrote:
>> > > > 
>> > > > [ . . . ]
>> > > > 
>> > > > > > > Ok, unless I've messsed up something major, bisecting points to:
>> > > > > > > 
>> > > > > > > 35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
>> > > > > > > 
>> > > > > > > Makes any sense ?
>> > > > > > 
>> > > > > > Good question.  ;-)
>> > > > > > 
>> > > > > > Are any of your online CPUs missing rcuo kthreads?  There should be
>> > > > > > kthreads named rcuos/0, rcuos/1, rcuos/2, and so on for each online CPU.
>> > > > > 
>> > > > > Its a Phenom II X6. With 3.17 and linux-tip with 35ce7f29a44a reverted, the rcuos are 8
>> > > > > and the modprobe ppp_generic testcase reliably works, libvirt also manages
>> > > > > to setup its bridge.
>> > > > > 
>> > > > > Just with linux-tip , the rcuos are 6 but the failure is as reliable as
>> > > > > before.
>> > > 
>> > > > Thank you, very interesting.  Which 6 of the rcuos are present?
>> > > 
>> > > Well, the rcuos are 0 to 5. Which sounds right for a 6 core CPU like this   
>> > > Phenom II.
>> > 
>> > Ah, you get 8 without the patch because it creates them for potential
>> > CPUs as well as real ones.  OK, got it.
>> > 
>> > > > > Awating instructions: :)
>> > > > 
>> > > > Well, I thought I understood the problem until you found that only 6 of
>> > > > the expected 8 rcuos are present with linux-tip without the revert.  ;-)
>> > > > 
>> > > > I am putting together a patch for the part of the problem that I think
>> > > > I understand, of course, but it would help a lot to know which two of
>> > > > the rcuos are missing.  ;-)
>> > > 
>> > > Ready to test
>> > 
>> > Well, if you are feeling aggressive, give the following patch a spin.
>> > I am doing sanity tests on it in the meantime.
>> 
>> Doesn't seem to make a difference here
>
>OK, inspection isn't cutting it, so time for tracing.  Does the system
>respond to user input?  If so, please enable rcu:rcu_barrier ftrace before
>the problem occurs, then dump the trace buffer after the problem occurs.

	My system is up and responsive when the problem occurs, so this
shouldn't be a problem.

	Do you want the ftrace with your patch below, or unmodified tip
of tree?

	-J


>							Thanx, Paul
>
>> > ------------------------------------------------------------------------
>> > 
>> > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
>> > index 29fb23f33c18..927c17b081c7 100644
>> > --- a/kernel/rcu/tree_plugin.h
>> > +++ b/kernel/rcu/tree_plugin.h
>> > @@ -2546,9 +2546,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
>> >  			rdp->nocb_leader = rdp_spawn;
>> >  			if (rdp_last && rdp != rdp_spawn)
>> >  				rdp_last->nocb_next_follower = rdp;
>> > -			rdp_last = rdp;
>> > -			rdp = rdp->nocb_next_follower;
>> > -			rdp_last->nocb_next_follower = NULL;
>> > +			if (rdp == rdp_spawn) {
>> > +				rdp = rdp->nocb_next_follower;
>> > +			} else {
>> > +				rdp_last = rdp;
>> > +				rdp = rdp->nocb_next_follower;
>> > +				rdp_last->nocb_next_follower = NULL;
>> > +			}
>> >  		} while (rdp);
>> >  		rdp_spawn->nocb_next_follower = rdp_old_leader;
>> >  	}
>> > 

---
	-Jay Vosburgh, jay.vosburgh@canonical.com

^ permalink raw reply

* Re: [PATCH 1/2] staging: lustre: lnet: lnet: do not initialise 0
From: Dmitry Voytik @ 2014-10-24 18:57 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Balavasu, netdev, linux-kernel
In-Reply-To: <54429DAB.4060906@cogentembedded.com>

On Sat, Oct 18, 2014 at 09:04:43PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 10/18/2014 8:03 AM, Balavasu wrote:
> 
> >-static int check_routers_before_use = 0;
> >+static int check_routers_before_use = {0};
> 
>    Eh? I thought {} is only for arrays/structures...

It seems like this is from C++. In C++11 you can even drop '=' like
this:
	int i {0};
;)

WBR,
voyt

^ permalink raw reply

* Re: localed stuck in recent 3.18 git in copy_net_ns?
From: Paul E. McKenney @ 2014-10-24 18:57 UTC (permalink / raw)
  To: Jay Vosburgh
  Cc: Yanko Kaneti, Josh Boyer, Eric W. Biederman, Cong Wang,
	Kevin Fenzi, netdev, Linux-Kernel@Vger. Kernel. Org, mroos
In-Reply-To: <6050.1414176588@famine>

On Fri, Oct 24, 2014 at 11:49:48AM -0700, Jay Vosburgh wrote:
> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> 
> >On Fri, Oct 24, 2014 at 08:35:26PM +0300, Yanko Kaneti wrote:
> >> On Fri-10/24/14-2014 10:20, Paul E. McKenney wrote:
> >> > On Fri, Oct 24, 2014 at 08:09:31PM +0300, Yanko Kaneti wrote:
> >> > > On Fri-10/24/14-2014 09:54, Paul E. McKenney wrote:
> >> > > > On Fri, Oct 24, 2014 at 07:29:43PM +0300, Yanko Kaneti wrote:
> >> > > > > On Fri-10/24/14-2014 08:40, Paul E. McKenney wrote:
> >> > > > > > On Fri, Oct 24, 2014 at 12:08:57PM +0300, Yanko Kaneti wrote:
> >> > > > > > > On Thu-10/23/14-2014 15:04, Paul E. McKenney wrote:
> >> > > > > > > > On Fri, Oct 24, 2014 at 12:45:40AM +0300, Yanko Kaneti wrote:
> >> > > > > > > > > 
> >> > > > > > > > > On Thu, 2014-10-23 at 13:05 -0700, Paul E. McKenney wrote:
> >> > > > > > > > > > On Thu, Oct 23, 2014 at 10:51:59PM +0300, Yanko Kaneti wrote:
> >> > > > 
> >> > > > [ . . . ]
> >> > > > 
> >> > > > > > > Ok, unless I've messsed up something major, bisecting points to:
> >> > > > > > > 
> >> > > > > > > 35ce7f29a44a rcu: Create rcuo kthreads only for onlined CPUs
> >> > > > > > > 
> >> > > > > > > Makes any sense ?
> >> > > > > > 
> >> > > > > > Good question.  ;-)
> >> > > > > > 
> >> > > > > > Are any of your online CPUs missing rcuo kthreads?  There should be
> >> > > > > > kthreads named rcuos/0, rcuos/1, rcuos/2, and so on for each online CPU.
> >> > > > > 
> >> > > > > Its a Phenom II X6. With 3.17 and linux-tip with 35ce7f29a44a reverted, the rcuos are 8
> >> > > > > and the modprobe ppp_generic testcase reliably works, libvirt also manages
> >> > > > > to setup its bridge.
> >> > > > > 
> >> > > > > Just with linux-tip , the rcuos are 6 but the failure is as reliable as
> >> > > > > before.
> >> > > 
> >> > > > Thank you, very interesting.  Which 6 of the rcuos are present?
> >> > > 
> >> > > Well, the rcuos are 0 to 5. Which sounds right for a 6 core CPU like this   
> >> > > Phenom II.
> >> > 
> >> > Ah, you get 8 without the patch because it creates them for potential
> >> > CPUs as well as real ones.  OK, got it.
> >> > 
> >> > > > > Awating instructions: :)
> >> > > > 
> >> > > > Well, I thought I understood the problem until you found that only 6 of
> >> > > > the expected 8 rcuos are present with linux-tip without the revert.  ;-)
> >> > > > 
> >> > > > I am putting together a patch for the part of the problem that I think
> >> > > > I understand, of course, but it would help a lot to know which two of
> >> > > > the rcuos are missing.  ;-)
> >> > > 
> >> > > Ready to test
> >> > 
> >> > Well, if you are feeling aggressive, give the following patch a spin.
> >> > I am doing sanity tests on it in the meantime.
> >> 
> >> Doesn't seem to make a difference here
> >
> >OK, inspection isn't cutting it, so time for tracing.  Does the system
> >respond to user input?  If so, please enable rcu:rcu_barrier ftrace before
> >the problem occurs, then dump the trace buffer after the problem occurs.
> 
> 	My system is up and responsive when the problem occurs, so this
> shouldn't be a problem.

Nice!  ;-)

> 	Do you want the ftrace with your patch below, or unmodified tip
> of tree?

Let's please start with the patch.

							Thanx, Paul

> 	-J
> 
> 
> >							Thanx, Paul
> >
> >> > ------------------------------------------------------------------------
> >> > 
> >> > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> >> > index 29fb23f33c18..927c17b081c7 100644
> >> > --- a/kernel/rcu/tree_plugin.h
> >> > +++ b/kernel/rcu/tree_plugin.h
> >> > @@ -2546,9 +2546,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
> >> >  			rdp->nocb_leader = rdp_spawn;
> >> >  			if (rdp_last && rdp != rdp_spawn)
> >> >  				rdp_last->nocb_next_follower = rdp;
> >> > -			rdp_last = rdp;
> >> > -			rdp = rdp->nocb_next_follower;
> >> > -			rdp_last->nocb_next_follower = NULL;
> >> > +			if (rdp == rdp_spawn) {
> >> > +				rdp = rdp->nocb_next_follower;
> >> > +			} else {
> >> > +				rdp_last = rdp;
> >> > +				rdp = rdp->nocb_next_follower;
> >> > +				rdp_last->nocb_next_follower = NULL;
> >> > +			}
> >> >  		} while (rdp);
> >> >  		rdp_spawn->nocb_next_follower = rdp_old_leader;
> >> >  	}
> >> > 
> 
> ---
> 	-Jay Vosburgh, jay.vosburgh@canonical.com
> 

^ permalink raw reply

* Re: [PATCH net] net/sched: Fix use of wild pointer in mq_destroy() when qdisc_alloc fail
From: Cong Wang @ 2014-10-24 18:58 UTC (permalink / raw)
  To: John Fastabend
  Cc: wang.bo116, David Miller, Patrick McHardy, netdev, cui.yunfeng
In-Reply-To: <CAHA+R7P+nGXc93e_-u5Bvmr5Ri8CCg9FAgc+R7fJT7mJ5sBFwQ@mail.gmail.com>

On Fri, Oct 24, 2014 at 11:13 AM, Cong Wang <cwang@twopensource.com> wrote:
> On Fri, Oct 24, 2014 at 10:49 AM, John Fastabend
> <john.fastabend@gmail.com> wrote:
>>
>> Patch looks fine, another way to fix this would be drop the
>> mq_destroy() call in the error path. I'm not convinced one
>> is any better than the other but maybe some other folks have
>> opinions, it seems a bit wrong to call mq_destroy twice so in
>> that sense it may be a bit nicer to drop the mq_destroy().
>
> Dropping mq_destroy() in error path is indeed better,
> because upper layer does cleanup intentionally.
> Look at what other qdisc's do. :)


Anyway, I am fixing other qdisc's now, will leave mq and
mq_prio to you.

Thanks.

^ permalink raw reply

* Re: [PATCH V3.18] rtlwifi: Add check for get_btc_status callback
From: Murilo Opsfelder Araujo @ 2014-10-24 19:09 UTC (permalink / raw)
  To: Larry Finger, Mike Galbraith
  Cc: linville-2XuSBdqkA4R54TAoqtyWWQ,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	troy_tan-kXabqFNEczNtrwSWzY7KCg, netdev-u79uwXL29TY76Z2rM5mHXA,
	Thadeu Cascardo
In-Reply-To: <544A96C0.8030107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 10/24/2014 04:13 PM, Murilo Opsfelder Araujo wrote:
> On 10/24/2014 02:39 PM, Larry Finger wrote:
> [...]
>>
>> Please try the attached patch. It replaces the second one I sent you. I
>> will probably redo it before submitting the final copy, but this should
>> work.
>>
>> Larry
>>
> Hi, Larry.
>
> I've tried your patch on top of next-20141023 and it is still crashing
> on my laptop:
>
> http://opsfelder.com/~murilo/lkml/next-20141023_plus_larry_patch_v2.jpg
>
It seems a get_btc_status() check was still missing:

diff --git a/drivers/net/wireless/rtlwifi/pci.c 
b/drivers/net/wireless/rtlwifi/pci.c
index a5a350a..ed3364d 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1796,7 +1796,8 @@ static int rtl_pci_start(struct ieee80211_hw *hw)
         rtl_pci_reset_trx_ring(hw);

         rtlpci->driver_is_goingto_unload = false;
-       if (rtlpriv->cfg->ops->get_btc_status()) {
+       if (rtlpriv->cfg->ops->get_btc_status &&
+           rtlpriv->cfg->ops->get_btc_status()) {
                 rtlpriv->btcoexist.btc_ops->btc_init_variables(rtlpriv);
                 rtlpriv->btcoexist.btc_ops->btc_init_hal_vars(rtlpriv);
         }

With this minor change and Larry's latest fix_misc_desc patch, 
next-20141023 booted normally and kernel panic disappeared.

Now, there is no wifi network available or found by wlan0.

-- 
Murilo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH net] net/sched: Fix use of wild pointer in mq_destroy() when qdisc_alloc fail
From: Patrick McHardy @ 2014-10-24 19:14 UTC (permalink / raw)
  To: Cong Wang; +Cc: John Fastabend, wang.bo116, David Miller, netdev, cui.yunfeng
In-Reply-To: <CAHA+R7P+nGXc93e_-u5Bvmr5Ri8CCg9FAgc+R7fJT7mJ5sBFwQ@mail.gmail.com>

On Fri, Oct 24, 2014 at 11:13:56AM -0700, Cong Wang wrote:
> On Fri, Oct 24, 2014 at 10:49 AM, John Fastabend
> <john.fastabend@gmail.com> wrote:
> >
> > Patch looks fine, another way to fix this would be drop the
> > mq_destroy() call in the error path. I'm not convinced one
> > is any better than the other but maybe some other folks have
> > opinions, it seems a bit wrong to call mq_destroy twice so in
> > that sense it may be a bit nicer to drop the mq_destroy().
> 
> Dropping mq_destroy() in error path is indeed better,
> because upper layer does cleanup intentionally.
> Look at what other qdisc's do. :)

I would argue that the qdisc_destroy() call in qdisc_create_dflt()
is wrong, it should instead free the qdisc and release the module
reference manually as done in qdisc_create().

qdisc_destroy() should only be called for fully initialized qdiscs.

^ permalink raw reply

* Re: [PATCH v2 0/9] Marvell PXA168 libphy handling and Berlin Ethernet
From: David Miller @ 2014-10-24 19:50 UTC (permalink / raw)
  To: sebastian.hesselbarth
  Cc: antoine.tenart, f.fainelli, eric.y.miao, haojian.zhuang,
	linux-arm-kernel, netdev, devicetree, linux-kernel
In-Reply-To: <1414002412-13615-1-git-send-email-sebastian.hesselbarth@gmail.com>

From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date: Wed, 22 Oct 2014 20:26:43 +0200

> This patch series deals with a removing a IP feature that can be found
> on all currently supported Marvell Ethernet IP (pxa168_eth, mv643xx_eth,
> mvneta). The MAC IP allows to automatically perform PHY auto-negotiation
> without software interaction.
> 
> However, this feature (a) fundamentally clashes with the way libphy works
> and (b) is unable to deal with quirky PHYs that require special treatment.
> In this series, pxa168_eth driver is rewritten to completely disable that
> feature and properly deal with libphy provided PHYs.
> 
> As usual, a branch on top of v3.18-rc1 can be found at
> 
> git://git.infradead.org/users/hesselba/linux-berlin.git devel/bg2-bg2cd-eth-v2
> 
> Patches 1-5 should go through David's net tree, I'll pick up the DT patches
> 6-9.

Patches 1-5 applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH 1/1 net-next] lapb: move EXPORT_SYMBOL after functions.
From: David Miller @ 2014-10-24 19:51 UTC (permalink / raw)
  To: fabf; +Cc: linux-kernel, linux-x25, netdev
In-Reply-To: <1414004501-7715-1-git-send-email-fabf@skynet.be>

From: Fabian Frederick <fabf@skynet.be>
Date: Wed, 22 Oct 2014 21:01:41 +0200

> See Documentation/CodingStyle Chapter 6
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Applied.

^ permalink raw reply

* Re: [PATCH 1/1 net-next] net: llc: include linux/errno.h instead of asm/errno.h
From: David Miller @ 2014-10-24 19:52 UTC (permalink / raw)
  To: fabf; +Cc: linux-kernel, acme, netdev
In-Reply-To: <1414004787-7936-1-git-send-email-fabf@skynet.be>

From: Fabian Frederick <fabf@skynet.be>
Date: Wed, 22 Oct 2014 21:06:26 +0200

> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Applied.

^ permalink raw reply

* [PATCH net-next 0/4] net: bcmgenet: switch to TX NAPI
From: Florian Fainelli @ 2014-10-24 20:02 UTC (permalink / raw)
  To: netdev; +Cc: davem, pgynther, Florian Fainelli

Hi David, Petri,

This patch set updates the GENET driver to switch the transmit to NAPI instead
of using a mix of hard interrupt + RX NAPI reclaim.

Florian Fainelli (4):
  net: bcmgenet: consistently use UMAC_IRQ_RXDMA_MASK
  net: bcmgenet: return number of packets completed in TX reclaim
  net: bcmgenet: reclaim transmitted buffers in NAPI context
  net: bcmgenet: update ring producer index and buffer count in xmit

 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 71 ++++++++++++--------------
 1 file changed, 32 insertions(+), 39 deletions(-)

-- 
1.9.1

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox