Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 4/8] net: dsa: cleanup resources upon module removal
From: Florian Fainelli @ 2015-01-12 21:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, buytenh, Florian Fainelli
In-Reply-To: <1421099866-3184-1-git-send-email-f.fainelli@gmail.com>

We were not doing anything while removing the dsa module, which means
that we were leaving dangling network devices without any sort of driver
backing them, leading to all sorts of crashes. Make sure that we do
cleanup the slave network devices, slave MII bus we created, and
unassign the master_netdev dsa_ptr to make the packet processing go
through the regulard Ethernet receive path.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/dsa.c      | 19 +++++++++++++++++++
 net/dsa/dsa_priv.h |  1 +
 net/dsa/slave.c    | 14 ++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index de77c83cfd9a..df7ec066ac64 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -316,10 +316,22 @@ out:
 
 static void dsa_switch_destroy(struct dsa_switch *ds)
 {
+	int i;
 #ifdef CONFIG_NET_DSA_HWMON
 	if (ds->hwmon_dev)
 		hwmon_device_unregister(ds->hwmon_dev);
 #endif
+
+	for (i = 0; i < DSA_MAX_PORTS; i++) {
+		if (!(ds->phys_port_mask & (1 << i)))
+			continue;
+
+		dsa_slave_destroy(ds->ports[i]);
+	}
+
+	mdiobus_unregister(ds->slave_mii_bus);
+	mdiobus_free(ds->slave_mii_bus);
+	kfree(ds);
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -754,6 +766,13 @@ static int dsa_remove(struct platform_device *pdev)
 			dsa_switch_destroy(ds);
 	}
 
+	dst->master_netdev->dsa_ptr = NULL;
+	/* If we used a tagging format that doesn't have an ethertype
+	 * field, make sure that all packets from this point get sent
+	 * without the tag and go through the regular receive path.
+	 */
+	wmb();
+
 	dsa_of_remove(pdev);
 
 	return 0;
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 1397b2894c1f..1773b2a20d90 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -61,6 +61,7 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds);
 struct net_device *dsa_slave_create(struct dsa_switch *ds,
 				    struct device *parent,
 				    int port, char *name);
+void dsa_slave_destroy(struct net_device *slave_dev);
 int dsa_slave_suspend(struct net_device *slave_dev);
 int dsa_slave_resume(struct net_device *slave_dev);
 
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 515569ffde8a..043cffcb1a3a 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -690,3 +690,17 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
 
 	return slave_dev;
 }
+
+void dsa_slave_destroy(struct net_device *slave_dev)
+{
+	struct dsa_slave_priv *p = netdev_priv(slave_dev);
+
+	if (p->phy) {
+		/* Prevent further updates */
+		fixed_phy_set_link_update(p->phy, NULL);
+		phy_disconnect(p->phy);
+	}
+
+	unregister_netdev(slave_dev);
+	free_netdev(slave_dev);
+}
-- 
2.1.0

^ permalink raw reply related

* [PATCH net-next 3/8] net: phy: fixed: allow setting no update_link callback
From: Florian Fainelli @ 2015-01-12 21:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, buytenh, Florian Fainelli
In-Reply-To: <1421099866-3184-1-git-send-email-f.fainelli@gmail.com>

fixed_phy_set_link_update() contains an early check against a NULL
callback pointer, which basically prevents us from removing any
previous callback we may have set. The users of the fp->link_update
callback deal with a NULL callback just fine.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/phy/fixed_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 3ad0e6e16c39..a08a3c78ba97 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -168,7 +168,7 @@ int fixed_phy_set_link_update(struct phy_device *phydev,
 	struct fixed_mdio_bus *fmb = &platform_fmb;
 	struct fixed_phy *fp;
 
-	if (!link_update || !phydev || !phydev->bus)
+	if (!phydev || !phydev->bus)
 		return -EINVAL;
 
 	list_for_each_entry(fp, &fmb->phys, node) {
-- 
2.1.0

^ permalink raw reply related

* [PATCH net-next 2/8] net: dsa: make module builds work
From: Florian Fainelli @ 2015-01-12 21:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, buytenh, Florian Fainelli
In-Reply-To: <1421099866-3184-1-git-send-email-f.fainelli@gmail.com>

Building any DSA driver as a module will work from a compilation/linking
perspective, but the resulting modules produced are not functional.

Any DSA driver references register_switch_driver and
unregister_switch_driver which are provided by net/dsa/dsa.c, so loading
any of these modules prior to dsa_core.ko being loaded will faill.

Unfortunately, loading dsa_core.ko will make us call dsa_switch_probe()
which will find no DSA switch driver and return an error so we are stuck
there because there is no switch driver available. So this is getting us
nowhere.

This patch introduces a separate module, named dsa_lib which contains
register_switch_driver, unregister_switch_driver and dsa_switch_probe
(to avoid exposing the list and mutex used for walking switch drivers),
such that the following can be done:

- load dsa_lib
- load the dsa switch driver, e.g: mv88e6060, bcm_sf2
- load the dsa_core module

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/Makefile   |  2 ++
 net/dsa/dsa.c      | 49 ---------------------------------------
 net/dsa/dsa_lib.c  | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net/dsa/dsa_priv.h |  4 ++++
 4 files changed, 74 insertions(+), 49 deletions(-)
 create mode 100644 net/dsa/dsa_lib.c

diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index da06ed1df620..17827194754d 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -2,6 +2,8 @@
 obj-$(CONFIG_NET_DSA) += dsa_core.o
 dsa_core-y += dsa.o slave.o
 
+obj-$(CONFIG_NET_DSA) += dsa_lib.o
+
 # tagging formats
 dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o
 dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 37317149f918..de77c83cfd9a 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -26,55 +26,6 @@
 char dsa_driver_version[] = "0.1";
 
 
-/* switch driver registration ***********************************************/
-static DEFINE_MUTEX(dsa_switch_drivers_mutex);
-static LIST_HEAD(dsa_switch_drivers);
-
-void register_switch_driver(struct dsa_switch_driver *drv)
-{
-	mutex_lock(&dsa_switch_drivers_mutex);
-	list_add_tail(&drv->list, &dsa_switch_drivers);
-	mutex_unlock(&dsa_switch_drivers_mutex);
-}
-EXPORT_SYMBOL_GPL(register_switch_driver);
-
-void unregister_switch_driver(struct dsa_switch_driver *drv)
-{
-	mutex_lock(&dsa_switch_drivers_mutex);
-	list_del_init(&drv->list);
-	mutex_unlock(&dsa_switch_drivers_mutex);
-}
-EXPORT_SYMBOL_GPL(unregister_switch_driver);
-
-static struct dsa_switch_driver *
-dsa_switch_probe(struct device *host_dev, int sw_addr, char **_name)
-{
-	struct dsa_switch_driver *ret;
-	struct list_head *list;
-	char *name;
-
-	ret = NULL;
-	name = NULL;
-
-	mutex_lock(&dsa_switch_drivers_mutex);
-	list_for_each(list, &dsa_switch_drivers) {
-		struct dsa_switch_driver *drv;
-
-		drv = list_entry(list, struct dsa_switch_driver, list);
-
-		name = drv->probe(host_dev, sw_addr);
-		if (name != NULL) {
-			ret = drv;
-			break;
-		}
-	}
-	mutex_unlock(&dsa_switch_drivers_mutex);
-
-	*_name = name;
-
-	return ret;
-}
-
 /* hwmon support ************************************************************/
 
 #ifdef CONFIG_NET_DSA_HWMON
diff --git a/net/dsa/dsa_lib.c b/net/dsa/dsa_lib.c
new file mode 100644
index 000000000000..2c496203c797
--- /dev/null
+++ b/net/dsa/dsa_lib.c
@@ -0,0 +1,68 @@
+/*
+ * net/dsa/dsa_lib.c - Hardware switch handling
+ * Copyright (c) 2008-2009 Marvell Semiconductor
+ * Copyright (c) 2015 Florian Fainelli <florian@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <net/dsa.h>
+#include "dsa_priv.h"
+
+/* switch driver registration ***********************************************/
+static DEFINE_MUTEX(dsa_switch_drivers_mutex);
+static LIST_HEAD(dsa_switch_drivers);
+
+void register_switch_driver(struct dsa_switch_driver *drv)
+{
+	mutex_lock(&dsa_switch_drivers_mutex);
+	list_add_tail(&drv->list, &dsa_switch_drivers);
+	mutex_unlock(&dsa_switch_drivers_mutex);
+}
+EXPORT_SYMBOL_GPL(register_switch_driver);
+
+void unregister_switch_driver(struct dsa_switch_driver *drv)
+{
+	mutex_lock(&dsa_switch_drivers_mutex);
+	list_del_init(&drv->list);
+	mutex_unlock(&dsa_switch_drivers_mutex);
+}
+EXPORT_SYMBOL_GPL(unregister_switch_driver);
+
+struct dsa_switch_driver *
+dsa_switch_probe(struct device *host_dev, int sw_addr, char **_name)
+{
+	struct dsa_switch_driver *ret;
+	struct list_head *list;
+	char *name;
+
+	ret = NULL;
+	name = NULL;
+
+	mutex_lock(&dsa_switch_drivers_mutex);
+	list_for_each(list, &dsa_switch_drivers) {
+		struct dsa_switch_driver *drv;
+
+		drv = list_entry(list, struct dsa_switch_driver, list);
+
+		name = drv->probe(host_dev, sw_addr);
+		if (name != NULL) {
+			ret = drv;
+			break;
+		}
+	}
+	mutex_unlock(&dsa_switch_drivers_mutex);
+
+	*_name = name;
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(dsa_switch_probe);
+
+MODULE_LICENSE("GPL");
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index e560ae53996c..1397b2894c1f 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -51,6 +51,10 @@ struct dsa_slave_priv {
 /* dsa.c */
 extern char dsa_driver_version[];
 
+/* dsa_lib.c */
+struct dsa_switch_driver *
+dsa_switch_probe(struct device *host_dev, int sw_addr, char **_name);
+
 /* slave.c */
 extern const struct dsa_device_ops notag_netdev_ops;
 void dsa_slave_mii_bus_init(struct dsa_switch *ds);
-- 
2.1.0

^ permalink raw reply related

* [PATCH net-next 1/8] net: dsa: add missing netdevice.h include
From: Florian Fainelli @ 2015-01-12 21:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, buytenh, Florian Fainelli
In-Reply-To: <1421099866-3184-1-git-send-email-f.fainelli@gmail.com>

dsa_priv.h contains function prototypes which use a netdev_tx_t return
type, include netdevice.h to get that definition.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/dsa_priv.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index dc9756d3154c..e560ae53996c 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -11,6 +11,7 @@
 #ifndef __DSA_PRIV_H
 #define __DSA_PRIV_H
 
+#include <linux/netdevice.h>
 #include <linux/phy.h>
 #include <linux/netdevice.h>
 
-- 
2.1.0

^ permalink raw reply related

* [PATCH net-next 0/8] net: dsa: modular build fixes and improvements
From: Florian Fainelli @ 2015-01-12 21:57 UTC (permalink / raw)
  To: netdev; +Cc: davem, buytenh, Florian Fainelli

Hi David,

This patch series fixes some problems seen when using DSA as a module. There was
a circular functional dependency which made it impossible to successfully load a
DSA switch driver module, and impossible re-insert it afterwards. Some other
problems appearing where the lack of resource cleanup, leading to various leaks
and -EEXIST errors upon module re-insertion.

Thanks!

Florian Fainelli (8):
  net: dsa: add missing netdevice.h include
  net: dsa: make module builds work
  net: phy: fixed: allow setting no update_link callback
  net: dsa: cleanup resources upon module removal
  net: dsa: allow switch drivers to cleanup their resources
  net: dsa: bcm_sf2: factor interrupt disabling in a function
  net: dsa: bcm_sf2: cleanup resources in remove callback
  net: dsa: free distributed switch tree pointer in dsa_remove

 drivers/net/dsa/bcm_sf2.c   | 44 ++++++++++++++++++++--------
 drivers/net/phy/fixed_phy.c |  2 +-
 include/net/dsa.h           |  1 +
 net/dsa/Makefile            |  2 ++
 net/dsa/dsa.c               | 71 ++++++++++++++-------------------------------
 net/dsa/dsa_lib.c           | 68 +++++++++++++++++++++++++++++++++++++++++++
 net/dsa/dsa_priv.h          |  6 ++++
 net/dsa/slave.c             | 14 +++++++++
 8 files changed, 146 insertions(+), 62 deletions(-)
 create mode 100644 net/dsa/dsa_lib.c

-- 
2.1.0

^ permalink raw reply

* Re: [PATCH 6/6] openvswitch: Support VXLAN Group Policy extension
From: Jesse Gross @ 2015-01-12 21:54 UTC (permalink / raw)
  To: Thomas Graf
  Cc: David Miller, Stephen Hemminger, Pravin Shelar, Tom Herbert,
	Alexei Starovoitov, dev@openvswitch.org, netdev
In-Reply-To: <60651d9355f4e34ed6686d95ad837467a1d2c888.1421064100.git.tgraf@suug.ch>

On Mon, Jan 12, 2015 at 4:26 AM, Thomas Graf <tgraf@suug.ch> wrote:
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index 457ccf3..cea492b 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> +static int vxlan_tun_opt_from_nlattr(const struct nlattr *a,
> +                                    struct sw_flow_match *match, bool is_mask,
> +                                    bool log)
> +{
> +       struct nlattr *tb[OVS_VXLAN_EXT_MAX+1];
> +       unsigned long opt_key_offset;
> +       struct ovs_vxlan_opts opts;
> +       int err;
> +
> +       BUILD_BUG_ON(sizeof(opts) > sizeof(match->key->tun_opts));
> +
> +       err = nla_parse_nested(tb, OVS_VXLAN_EXT_MAX, a, vxlan_opt_policy);
> +       if (err < 0)
> +               return err;
> +
> +       memset(&opts, 0, sizeof(opts));
> +
> +       if (tb[OVS_VXLAN_EXT_MAX])
> +               opts.gbp = nla_get_u32(tb[OVS_VXLAN_EXT_MAX]);

Shouldn't this be OVS_VXLAN_EXT_GBP instead of OVS_VXLAN_EXT_MAX?
(They have the same value.)

> +       if (!is_mask)
> +               SW_FLOW_KEY_PUT(match, tun_opts_len, sizeof(opts), false);
> +       else
> +               SW_FLOW_KEY_PUT(match, tun_opts_len, 0xff, true);

Have you thought carefully about how the masking model work as other
extensions are potentially added? This was a little tricky with Geneve
because I wanted to be able to match on both "no options present" as
well as wildcard all options. The other interesting thing is how you
serialize them back correctly to userspace, which was the genesis of
the TUNNEL_OPTIONS_PRESENT flag.

My guess is that this may basically work fine now that there is only
one extension present but it is important to think about how it might
work with multiple independent extensions in the future. (I haven't
thought about it, I'm just asking.)

> diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
> index 266c595..dbd6c75 100644
> --- a/net/openvswitch/vport-vxlan.c
> +++ b/net/openvswitch/vport-vxlan.c
> +static int vxlan_ext_gbp(struct sk_buff *skb)
> +{
> +       const struct ovs_tunnel_info *tun_info;
> +       const struct ovs_vxlan_opts *opts;
> +
> +       tun_info = OVS_CB(skb)->egress_tun_info;
> +       opts = tun_info->options;
> +
> +       if (tun_info->options_len >= sizeof(*opts))
> +               return opts->gbp;
> +       else
> +               return 0;
> +}

If you set Geneve options and output to a VXLAN port (or vice versa),
you will get garbage, right? Is there any way that we can sanity check
that?

^ permalink raw reply

* Re: [PATCH net-next v3 0/4] bridge: support for vlan range in setlink/dellink
From: David Miller @ 2015-01-12 21:47 UTC (permalink / raw)
  To: roopa; +Cc: netdev, shemminger, vyasevic, wkok, sfeldma
In-Reply-To: <1420903874-25528-1-git-send-email-roopa@cumulusnetworks.com>

From: roopa@cumulusnetworks.com
Date: Sat, 10 Jan 2015 07:31:11 -0800

> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> This series adds new flags in IFLA_BRIDGE_VLAN_INFO to indicate
> vlan range.
> 
> Will post corresponding iproute2 patches if these get accepted.
> 
> v1-> v2
>     - changed patches to use a nested list attribute
>     IFLA_BRIDGE_VLAN_INFO_LIST as suggested by scott feldman
>     - dropped notification changes from the series. Will post them
>     separately after this range message is accepted.
> 
> v2 -> v3
>     - incorporated some review feedback
>     - include patches to fill vlan ranges during getlink
>     - Dropped IFLA_BRIDGE_VLAN_INFO_LIST. I think it may get
>     confusing to userspace if we introduce yet another way to
>     send lists. With getlink already sending nested
>     IFLA_BRIDGE_VLAN_INFO in IFLA_AF_SPEC, It seems better to
>     use the existing format for lists and just use the flags from v2
>     to mark vlan ranges
> 
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>

This looks fine to me, series applied, thanks.

^ permalink raw reply

* Re: [PATCH net] drivers: net: xen-netfront: remove residual dead code
From: David Miller @ 2015-01-12 21:44 UTC (permalink / raw)
  To: v.maffione; +Cc: netdev, xen-devel, david.vrabel, boris.ostrovsky, konrad.wilk
In-Reply-To: <1420881625-4935-1-git-send-email-v.maffione@gmail.com>

From: Vincenzo Maffione <v.maffione@gmail.com>
Date: Sat, 10 Jan 2015 10:20:25 +0100

> This patch removes some unused arrays from the netfront private
> data structures. These arrays were used in "flip" receive mode.
> 
> Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>

Applied to net-next.

^ permalink raw reply

* Re: [PATCH net-next] Driver: Vmxnet3: Reinitialize vmxnet3 backend on wakeup from hibernate
From: David Miller @ 2015-01-12 21:44 UTC (permalink / raw)
  To: skhare; +Cc: sbhatewara, pv-drivers, netdev, linux-kernel, smurali
In-Reply-To: <1420845554-491-1-git-send-email-skhare@vmware.com>

From: Shrikrishna Khare <skhare@vmware.com>
Date: Fri,  9 Jan 2015 15:19:14 -0800

> Failing to reinitialize on wakeup results in loss of network connectivity for
> vmxnet3 interface.
> 
> Signed-off-by: Srividya Murali <smurali@vmware.com>
> Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
> Reviewed-by: Shreyas N Bhatewara <sbhatewara@vmware.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] bonding: cleanup bond_opts array
From: David Miller @ 2015-01-12 21:43 UTC (permalink / raw)
  To: jtoppins; +Cc: netdev, shm, gospo, nikolay
In-Reply-To: <1420828268-10360-1-git-send-email-jtoppins@cumulusnetworks.com>

From: Jonathan Toppins <jtoppins@cumulusnetworks.com>
Date: Fri,  9 Jan 2015 13:31:08 -0500

> Remove the empty array element initializer and size the array with
> BOND_OPT_LAST so the compiler will complain if more elements are in
> there than should be.
> 
> An interesting unwanted side effect of this initializer is that if one
> inserts new options into the middle of the array then this initializer
> will zero out the option that equals BOND_OPT_TLB_DYNAMIC_LB+1.
> 
> Example:
> Extend the OPTS enum:
> enum {
>    ...
>    BOND_OPT_TLB_DYNAMIC_LB,
>    BOND_OPT_LACP_NEW1,
>    BOND_OPT_LAST
> };
> 
> Now insert into bond_opts array:
> static const struct bond_option bond_opts[] = {
>       ...
>       [BOND_OPT_LACP_RATE] = { .... unchanged stuff .... },
>       [BOND_OPT_LACP_NEW1] = { ... new stuff ... },
>       ...
>       [BOND_OPT_TLB_DYNAMIC_LB] = { .... unchanged stuff ....},
>       { } // MARK A
> };
> 
> Since BOND_OPT_LACP_NEW1 = BOND_OPT_TLB_DYNAMIC_LB+1, the last
> initializer (MARK A) will overwrite the contents of BOND_OPT_LACP_NEW1
> and can be easily viewed with the crash utility.
> 
> Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>

Applied.

^ permalink raw reply

* Re: [PATCH] usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb()
From: David Miller @ 2015-01-12 21:43 UTC (permalink / raw)
  To: khoroshilov; +Cc: linux-usb, netdev, linux-kernel, ldv-project
In-Reply-To: <1420845382-25815-1-git-send-email-khoroshilov@ispras.ru>

From: Alexey Khoroshilov <khoroshilov@ispras.ru>
Date: Sat, 10 Jan 2015 02:16:22 +0300

> Commit e4c7f259c5be ("USB: kaweth.c: use GFP_ATOMIC under spin_lock")
> makes sure that kaweth_internal_control_msg() allocates memory with GFP_ATOMIC,
> but kaweth_internal_control_msg() also calls usb_start_wait_urb()
> that still allocates memory with GFP_NOIO.
> 
> The patch fixes usb_start_wait_urb() as well.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] MAINTAINERS: add me as ibmveth maintainer
From: David Miller @ 2015-01-12 21:42 UTC (permalink / raw)
  To: tlfalcon; +Cc: netdev, santi_leon, brking, nfont
In-Reply-To: <1420835380-2824-1-git-send-email-tlfalcon@linux.vnet.ibm.com>

From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Fri,  9 Jan 2015 14:29:40 -0600

> Adding myself as the ibmveth maintainer and replacing
> Santiago Leon.
> 
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

Applied.

^ permalink raw reply

* Re: [PATCH 4/6] openvswitch: Rename GENEVE_TUN_OPTS() to TUN_METADATA_OPTS()
From: Jesse Gross @ 2015-01-12 21:38 UTC (permalink / raw)
  To: Thomas Graf
  Cc: David Miller, Stephen Hemminger, Pravin Shelar, Tom Herbert,
	Alexei Starovoitov, dev@openvswitch.org, netdev
In-Reply-To: <c55f879e5dedb8ec3d6d06ce7d9d095e787e1c77.1421064100.git.tgraf@suug.ch>

On Mon, Jan 12, 2015 at 4:26 AM, Thomas Graf <tgraf@suug.ch> wrote:
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index d1eecf7..8980d32 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> +static int validate_and_copy_geneve_opts(struct sw_flow_key *key)
> +{

This function doesn't actually do any copying, so maybe there is a
more descriptive name for it?

^ permalink raw reply

* Re: [RFC net-next 0/3] devconf: New infrastructure for setting pre-load parameters for a module
From: Rob Herring @ 2015-01-12 21:02 UTC (permalink / raw)
  To: netdev
In-Reply-To: <CAPcc5PgyBh3Hn4_7kiche2VLFJRXGPUaBw1ycZgvXiR0TSToxw@mail.gmail.com>

Amir Vadai <amirv <at> mellanox.com> writes:
> On Thu, Jan 8, 2015 at 9:25 PM, Greg KH <gregkh <at> linuxfoundation.org> 
wrote:
> > On Thu, Jan 08, 2015 at 09:14:32PM +0200, Amir Vadai wrote:
> >> On Thu, Jan 8, 2015 at 7:47 PM, Greg KH <gregkh <at> 
linuxfoundation.org> wrote:
> >> > On Thu, Jan 08, 2015 at 07:11:04PM +0200, Amir Vadai wrote:
> >> >> On 1/8/2015 6:46 PM, Greg KH wrote:
> >> >> > On Thu, Jan 08, 2015 at 05:16:57PM +0200, Hadar Hen Zion wrote:
> >> >> >> Hi,
> >> >> >>
> >> >> >> When configuring a device at an early boot stage, most kernel 
drivers
> >> >> >> use module parameters (the parameters' settings can be determined 
in
> >> >> >> modprobe.d config files).
> >> >> >
> >> >> > Which is a bad idea, as you have learned :)
> 
> [...]
> 
> >
> > But you are talking about loading config info before the driver is
> > loaded, which goes backwards for how we automatically load modules when
> > the hardware is found.
> 
> I guess you're a busy man and getting tired of my nudges. And it is ok
> with us to make it a non-generic solution - so I won't bother you much
> more...
> I would like to understand the arguments here: Maybe there is a
> history that I missed - What are the arguments against having a config
> info before the driver is loaded? Assuming, that it will make the
> driver loading process simpler and faster.

DeviceTree does exactly this. Even discoverable buses sometimes need 
additional information. DT can be used to add additional properties to PCI 
devices for example. I'm not sure DT is a fit here. As a matter of policy to 
be OS independent, the configuration data should be tied to the hardware and 
not purely software configuration. The example of netdev vs. infiniband would 
fit, but I don't know about other cases. Traditionally, DT would be part of 
the firmware/bootloader rather than coupled to the kernel or distro. It is 
not clear to me in your case who does the configuration and when does it 
change. There is new support making its way into the kernel called DT 
overlays which allows loading additional DT data after or during boot. That 
may be a good fit for your use case.

Rob

^ permalink raw reply

* Re: [PATCH net-next 2/3] netlink: eliminate nl_sk_hash_lock
From: David Miller @ 2015-01-12 21:27 UTC (permalink / raw)
  To: tgraf; +Cc: ying.xue, netdev
In-Reply-To: <20150109105516.GA1600@casper.infradead.org>

From: Thomas Graf <tgraf@suug.ch>
Date: Fri, 9 Jan 2015 10:55:16 +0000

> Since this code can now run in parallel, there is a race between
> checking portid and then setting it. CPU#1 could overwrite portid after
> CPU#0 has already checked portid, this would then insert the socket on
> CPU#0 with the portid created on CPU#1. So this would need some kind
> of atomic operation.

Thomas, please review Ying's new version of this patch.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next 00/16] tipc: make tipc support namespace
From: David Miller @ 2015-01-12 21:24 UTC (permalink / raw)
  To: ying.xue
  Cc: jon.maloy, Tero.Aho, Paul.Gortmaker, erik.hugne, richard.alpe,
	netdev, tipc-discussion
In-Reply-To: <1420788433-17960-1-git-send-email-ying.xue@windriver.com>

From: Ying Xue <ying.xue@windriver.com>
Date: Fri, 9 Jan 2015 15:26:57 +0800

> This patchset aims to add net namespace support for TIPC stack.
> 
> Currently TIPC module declares the following global resources:
> - TIPC network idenfication number
> - TIPC node table
> - TIPC bearer list table
> - TIPC broadcast link
> - TIPC socket reference table
> - TIPC name service table
> - TIPC node address
> - TIPC service subscriber server
> - TIPC random value
> - TIPC netlink
> 
> In order that TIPC is aware of namespace, above each resource must be
> allocated, initialized and destroyed inside per namespace. Therefore,
> the major works of this patchset are to isolate these global resources
> and make them private for each namespace. However, before these changes
> come true, some necessary preparation works must be first done: convert
> socket reference table with generic rhashtable, cleanup core.c and
> core.h files, remove unnecessary wrapper functions for kernel timer
> interfaces and so on.
> 
> It should be noted that commit ##1 ("tipc: fix bug in broadcast
> retransmit code") was already submitted to 'net' tree, so please see
> below link:
> 
> http://patchwork.ozlabs.org/patch/426717/
> 
> Since it is prerequisite for the rest of the series to apply, I
> prepend them to the series.

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH net-next 0/2] All Chelsio drivers : Cleanup CPL messages macros
From: David Miller @ 2015-01-12 21:20 UTC (permalink / raw)
  To: anish-ut6Up61K2wZBDgjK7y7TUQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg,
	hch-wEGCiKHe2LqWVfeAwA7xHQ, jbottomley-bzQdu9zFT3WakBO8gow8eQ,
	hariprasad-ut6Up61K2wZBDgjK7y7TUQ,
	swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	kxie-ut6Up61K2wZBDgjK7y7TUQ, leedom-ut6Up61K2wZBDgjK7y7TUQ
In-Reply-To: <1420781896-25337-1-git-send-email-anish-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>

From: Anish Bhatt <anish-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Date: Thu,  8 Jan 2015 21:38:14 -0800

> This patch series cleans up all register defines/MACROS defined in t4_msg.h and
> affected files as part of the continuing cleanup effort
> 
> The patches series is created against 'net-next' tree and  includes patches 
> to the cxgb4, cxgb4vf, iw_cxgb4, cxgb4i and csiostor drivers.
> 
> We have included all the maintainers of respective drivers. Kindly review the
> change and let us know in case of any review comments.

Looks fine, applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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

* Re: [PATCH v2 net-next] bridge: Add ability to enable TSO
From: David Miller @ 2015-01-12 21:18 UTC (permalink / raw)
  To: makita.toshiaki; +Cc: netdev, bridge
In-Reply-To: <1420780600-11313-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Fri,  9 Jan 2015 14:16:40 +0900

> Currently a bridge device turns off TSO feature if no bridge ports
> support it. We can always enable it, since packets can be segmented on
> ports by software as well as on the bridge device.
> This will reduce the number of packets processed in the bridge.
> 
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> ---
> v2: Use an existing helper function.

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net-next v2 0/2 RESEND] r8152: adjust r8152_submit_rx
From: David Miller @ 2015-01-12 21:11 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb
In-Reply-To: <1394712342-15778-114-Taiwan-albertk@realtek.com>

From: Hayes Wang <hayeswang@realtek.com>
Date: Fri, 9 Jan 2015 10:26:34 +0800

> v2:
> Replace the patch #1 with "call rtl_start_rx after netif_carrier_on".
> 
> For patch #2, replace checking tp->speed with netif_carrier_ok.
> 
> v1:
> Avoid r8152_submit_rx() from submitting rx during unexpected
> moment. This could reduce the time of stopping rx.
> 
> For patch #1, the tp->speed should be updated early. Then,
> the patch #2 could use it to check the current linking status.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCHn net-next] vxlan: Improve support for header flags
From: David Miller @ 2015-01-12 21:06 UTC (permalink / raw)
  To: therbert; +Cc: tgraf, netdev
In-Reply-To: <1420749078-18913-1-git-send-email-therbert@google.com>

From: Tom Herbert <therbert@google.com>
Date: Thu,  8 Jan 2015 12:31:18 -0800

> This patch cleans up the header flags of VXLAN in anticipation of
> defining some new ones:
> 
> - Move header related definitions from vxlan.c to vxlan.h
> - Change VXLAN_FLAGS to be VXLAN_HF_VNI (only currently defined flag)
> - Move check for unknown flags to after we find vxlan_sock, this
>   assumes that some flags may be processed based on tunnel
>   configuration
> - Add a comment about why the stack treating unknown set flags as an
>   error instead of ignoring them
> 
> Signed-off-by: Tom Herbert <therbert@google.com>

Applied, thanks Tom.

^ permalink raw reply

* Re: [PATCH net 1/1] tipc: fix bug in broadcast retransmit code
From: David Miller @ 2015-01-12 21:02 UTC (permalink / raw)
  To: jon.maloy
  Cc: netdev, paul.gortmaker, erik.hugne, ying.xue, maloy,
	tipc-discussion
In-Reply-To: <1420738047-16466-1-git-send-email-jon.maloy@ericsson.com>

From: Jon Maloy <jon.maloy@ericsson.com>
Date: Thu,  8 Jan 2015 12:27:27 -0500

> In commit 58dc55f25631178ee74cd27185956a8f7dcb3e32 ("tipc: use generic
> SKB list APIs to manage link transmission queue") we replace all list
> traversal loops with the macros skb_queue_walk() or
> skb_queue_walk_safe(). While the previous loops were based on the
> assumption that the list was NULL-terminated, the standard macros
> stop when the iterator reaches the list head, which is non-NULL.
> 
> In the function bclink_retransmit_pkt() this macro replacement has
> lead to a bug. When we receive a BCAST STATE_MSG we unconditionally
> call the function bclink_retransmit_pkt(), whether there really is
> anything to retransmit or not, assuming that the sequence number
> comparisons will lead to the correct behavior. However, if the
> transmission queue is empty, or if there are no eligible buffers in
> the transmission queue, we will by mistake pass the list head pointer
> to the function tipc_link_retransmit(). Since the list head is not a
> valid sk_buff, this leads to a crash.
> 
> In this commit we fix this by only calling tipc_link_retransmit()
> if we actually found eligible buffers in the transmission queue.
> 
> Reviewed-by: Ying Xue <ying.xue@windriver.com>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>

Applied, thanks Jon.

^ permalink raw reply

* Re: [PATCH net-next] packet: make packet too small warning match condition
From: David Miller @ 2015-01-12 21:01 UTC (permalink / raw)
  To: willemb; +Cc: netdev, jkmalinen, dborkman
In-Reply-To: <1420734558-30979-1-git-send-email-willemb@google.com>

From: Willem de Bruijn <willemb@google.com>
Date: Thu,  8 Jan 2015 11:29:18 -0500

> From: Willem de Bruijn <willemb@google.com>
> 
> The expression in ll_header_truncated() tests less than or equal, but
> the warning prints less than. Update the warning.
> 
> Reported-by: Jouni Malinen <jkmalinen@gmail.com>
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Yeah that could be really confusing.  Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next v2] tg3: move init/deinit from open/close to probe/remove
From: David Miller @ 2015-01-12 20:59 UTC (permalink / raw)
  To: ivecera; +Cc: netdev, prashant, mchan
In-Reply-To: <1420729987-18476-1-git-send-email-ivecera@redhat.com>

From: Ivan Vecera <ivecera@redhat.com>
Date: Thu,  8 Jan 2015 16:13:07 +0100

> Move init and deinit of PTP support from open/close functions
> to probe/remove funcs to avoid removing/re-adding of associated PTP
> device(s) during ifup/ifdown.
> 
> v2: tg3_ptp_init call moved to correct place (thx. Prashant)
> 
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Applied, thank you.

^ permalink raw reply

* Re: [patch -next] net: eth: xgene: devm_ioremap() returns NULL on error
From: David Miller @ 2015-01-12 20:40 UTC (permalink / raw)
  To: dan.carpenter
  Cc: isubramanian, fkan, kchudgar, grant.likely, robh+dt, netdev,
	kernel-janitors
In-Reply-To: <20150108105211.GB10597@mwanda>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 8 Jan 2015 13:52:12 +0300

> devm_ioremap() returns NULL on failure, it doesn't return an ERR_PTR.
> 
> Fixes: de7b5b3d790a ('net: eth: xgene: change APM X-Gene SoC platform ethernet to support ACPI')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 1/1] update ip-sysctl.txt documentation (v2)
From: David Miller @ 2015-01-12 20:39 UTC (permalink / raw)
  To: ani; +Cc: corbet, edumazet, linux-doc, linux-kernel, P, netdev, fruggeri
In-Reply-To: <1420674356-32210-1-git-send-email-ani@arista.com>

From: Ani Sinha <ani@arista.com>
Date: Wed,  7 Jan 2015 15:45:56 -0800

> Update documentation to reflect the fact that
> /proc/sys/net/ipv4/route/max_size is no longer used for ipv4.
> 
> Signed-off-by: Ani Sinha <ani@arista.com>

Applied, thank you.

^ 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