Netdev List
 help / color / mirror / Atom feed
* [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver
From: Alistair Popple @ 2013-11-05  5:31 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Alistair Popple, David S. Miller, netdev
In-Reply-To: <1383629471-16979-1-git-send-email-alistair@popple.id.au>

The IBM Akebono board uses a different ethernet PHY that has wake on
lan (WOL) support with the IBM emac. This patch adds suppot to the IBM
emac driver for this new PHY.

At this stage the wake on lan functionality has not been implemented.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
 .../devicetree/bindings/powerpc/4xx/emac.txt       |    9 +
 drivers/net/ethernet/ibm/emac/Kconfig              |    4 +
 drivers/net/ethernet/ibm/emac/Makefile             |    1 +
 drivers/net/ethernet/ibm/emac/core.c               |   50 +++-
 drivers/net/ethernet/ibm/emac/core.h               |   12 +
 drivers/net/ethernet/ibm/emac/rgmii_wol.c          |  262 ++++++++++++++++++++
 drivers/net/ethernet/ibm/emac/rgmii_wol.h          |   62 +++++
 7 files changed, 394 insertions(+), 6 deletions(-)
 create mode 100644 drivers/net/ethernet/ibm/emac/rgmii_wol.c
 create mode 100644 drivers/net/ethernet/ibm/emac/rgmii_wol.h

diff --git a/Documentation/devicetree/bindings/powerpc/4xx/emac.txt b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt
index 712baf6..9928d9d 100644
--- a/Documentation/devicetree/bindings/powerpc/4xx/emac.txt
+++ b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt
@@ -61,6 +61,8 @@
 			  Fox Axon: present, whatever value is appropriate for each
 			  EMAC, that is the content of the current (bogus) "phy-port"
 			  property.
+    - rgmii-wol-device  : 1 cell, required iff conntect to a RGMII in the WKUP
+                          power domain. phandle of the RGMII-WOL device node.
 
     Optional properties:
     - phy-address       : 1 cell, optional, MDIO address of the PHY. If absent,
@@ -146,3 +148,10 @@
 			   available.
 			   For Axon: 0x0000012a
 
+      iv) RGMII-WOL node
+
+    Required properties:
+    - compatible         : compatible list, containing 2 entries, first is
+			   "ibm,rgmii-wol-CHIP" where CHIP is the host ASIC (like
+			   EMAC) and the second is "ibm,rgmii-wol".
+    - reg                : <registers mapping>
diff --git a/drivers/net/ethernet/ibm/emac/Kconfig b/drivers/net/ethernet/ibm/emac/Kconfig
index 3f44a30..7425c27 100644
--- a/drivers/net/ethernet/ibm/emac/Kconfig
+++ b/drivers/net/ethernet/ibm/emac/Kconfig
@@ -55,6 +55,10 @@ config IBM_EMAC_RGMII
 	bool
 	default n
 
+config IBM_EMAC_RGMII_WOL
+	bool
+	default n
+
 config IBM_EMAC_TAH
 	bool
 	default n
diff --git a/drivers/net/ethernet/ibm/emac/Makefile b/drivers/net/ethernet/ibm/emac/Makefile
index eba2183..8843803 100644
--- a/drivers/net/ethernet/ibm/emac/Makefile
+++ b/drivers/net/ethernet/ibm/emac/Makefile
@@ -7,5 +7,6 @@ obj-$(CONFIG_IBM_EMAC) += ibm_emac.o
 ibm_emac-y := mal.o core.o phy.o
 ibm_emac-$(CONFIG_IBM_EMAC_ZMII) += zmii.o
 ibm_emac-$(CONFIG_IBM_EMAC_RGMII) += rgmii.o
+ibm_emac-$(CONFIG_IBM_EMAC_RGMII_WOL) += rgmii_wol.o
 ibm_emac-$(CONFIG_IBM_EMAC_TAH) += tah.o
 ibm_emac-$(CONFIG_IBM_EMAC_DEBUG) += debug.o
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 6b5c722..fc1a775 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -630,6 +630,8 @@ static int emac_configure(struct emac_instance *dev)
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_set_speed(dev->rgmii_dev, dev->rgmii_port,
 				dev->phy.speed);
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_set_speed(dev->rgmii_wol_dev, dev->phy.speed);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII))
 		zmii_set_speed(dev->zmii_dev, dev->zmii_port, dev->phy.speed);
 
@@ -797,6 +799,8 @@ static int __emac_mdio_read(struct emac_instance *dev, u8 id, u8 reg)
 		zmii_get_mdio(dev->zmii_dev, dev->zmii_port);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_get_mdio(dev->rgmii_wol_dev);
 
 	/* Wait for management interface to become idle */
 	n = 20;
@@ -844,6 +848,8 @@ static int __emac_mdio_read(struct emac_instance *dev, u8 id, u8 reg)
 	DBG2(dev, "mdio_read -> %04x" NL, r);
 	err = 0;
  bail:
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_put_mdio(dev->rgmii_wol_dev);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_put_mdio(dev->rgmii_dev, dev->rgmii_port);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII))
@@ -869,6 +875,8 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg,
 		zmii_get_mdio(dev->zmii_dev, dev->zmii_port);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_get_mdio(dev->rgmii_wol_dev);
 
 	/* Wait for management interface to be idle */
 	n = 20;
@@ -907,6 +915,8 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg,
 	}
 	err = 0;
  bail:
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_put_mdio(dev->rgmii_wol_dev);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_put_mdio(dev->rgmii_dev, dev->rgmii_port);
 	if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII))
@@ -2275,10 +2285,11 @@ struct emac_depentry {
 #define	EMAC_DEP_MAL_IDX	0
 #define	EMAC_DEP_ZMII_IDX	1
 #define	EMAC_DEP_RGMII_IDX	2
-#define	EMAC_DEP_TAH_IDX	3
-#define	EMAC_DEP_MDIO_IDX	4
-#define	EMAC_DEP_PREV_IDX	5
-#define	EMAC_DEP_COUNT		6
+#define EMAC_DEP_RGMII_WOL_IDX  3
+#define	EMAC_DEP_TAH_IDX	4
+#define	EMAC_DEP_MDIO_IDX	5
+#define	EMAC_DEP_PREV_IDX	6
+#define	EMAC_DEP_COUNT		7
 
 static int emac_check_deps(struct emac_instance *dev,
 			   struct emac_depentry *deps)
@@ -2356,6 +2367,7 @@ static int emac_wait_deps(struct emac_instance *dev)
 	deps[EMAC_DEP_MAL_IDX].phandle = dev->mal_ph;
 	deps[EMAC_DEP_ZMII_IDX].phandle = dev->zmii_ph;
 	deps[EMAC_DEP_RGMII_IDX].phandle = dev->rgmii_ph;
+	deps[EMAC_DEP_RGMII_WOL_IDX].phandle = dev->rgmii_wol_ph;
 	if (dev->tah_ph)
 		deps[EMAC_DEP_TAH_IDX].phandle = dev->tah_ph;
 	if (dev->mdio_ph)
@@ -2378,6 +2390,7 @@ static int emac_wait_deps(struct emac_instance *dev)
 		dev->mal_dev = deps[EMAC_DEP_MAL_IDX].ofdev;
 		dev->zmii_dev = deps[EMAC_DEP_ZMII_IDX].ofdev;
 		dev->rgmii_dev = deps[EMAC_DEP_RGMII_IDX].ofdev;
+		dev->rgmii_wol_dev = deps[EMAC_DEP_RGMII_WOL_IDX].ofdev;
 		dev->tah_dev = deps[EMAC_DEP_TAH_IDX].ofdev;
 		dev->mdio_dev = deps[EMAC_DEP_MDIO_IDX].ofdev;
 	}
@@ -2583,6 +2596,8 @@ static int emac_init_config(struct emac_instance *dev)
 		dev->rgmii_ph = 0;
 	if (emac_read_uint_prop(np, "rgmii-channel", &dev->rgmii_port, 0))
 		dev->rgmii_port = 0xffffffff;
+	if (emac_read_uint_prop(np, "rgmii-wol-device", &dev->rgmii_wol_ph, 0))
+		dev->rgmii_wol_ph = 0;
 	if (emac_read_uint_prop(np, "fifo-entry-size", &dev->fifo_entry_size, 0))
 		dev->fifo_entry_size = 16;
 	if (emac_read_uint_prop(np, "mal-burst-size", &dev->mal_burst_size, 0))
@@ -2669,6 +2684,16 @@ static int emac_init_config(struct emac_instance *dev)
 #endif
 	}
 
+	if (dev->rgmii_wol_ph != 0) {
+#ifdef CONFIG_IBM_EMAC_RGMII_WOL
+		dev->features |= EMAC_FTR_HAS_RGMII_WOL;
+#else
+		printk(KERN_ERR "%s: RGMII WOL support not enabled !\n",
+		       np->full_name);
+		return -ENXIO;
+#endif
+	}
+
 	/* Read MAC-address */
 	p = of_get_property(np, "local-mac-address", NULL);
 	if (p == NULL) {
@@ -2842,10 +2867,15 @@ static int emac_probe(struct platform_device *ofdev)
 	    (err = rgmii_attach(dev->rgmii_dev, dev->rgmii_port, dev->phy_mode)) != 0)
 		goto err_detach_zmii;
 
+	/* Attach to RGMII_WOL, if needed */
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL) &&
+	    (err = rgmii_wol_attach(dev->rgmii_wol_dev, dev->phy_mode)) != 0)
+		goto err_detach_rgmii;
+
 	/* Attach to TAH, if needed */
 	if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) &&
 	    (err = tah_attach(dev->tah_dev, dev->tah_port)) != 0)
-		goto err_detach_rgmii;
+		goto err_detach_rgmii_wol;
 
 	/* Set some link defaults before we can find out real parameters */
 	dev->phy.speed = SPEED_100;
@@ -2918,6 +2948,9 @@ static int emac_probe(struct platform_device *ofdev)
  err_detach_tah:
 	if (emac_has_feature(dev, EMAC_FTR_HAS_TAH))
 		tah_detach(dev->tah_dev, dev->tah_port);
+ err_detach_rgmii_wol:
+	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII_WOL))
+		rgmii_wol_detach(dev->rgmii_wol_dev);
  err_detach_rgmii:
 	if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII))
 		rgmii_detach(dev->rgmii_dev, dev->rgmii_port);
@@ -3079,12 +3112,17 @@ static int __init emac_init(void)
 	rc = tah_init();
 	if (rc)
 		goto err_rgmii;
-	rc = platform_driver_register(&emac_driver);
+	rc = rgmii_wol_init();
 	if (rc)
 		goto err_tah;
+	rc = platform_driver_register(&emac_driver);
+	if (rc)
+		goto err_rgmii_wol;
 
 	return 0;
 
+ err_rgmii_wol:
+	rgmii_wol_exit();
  err_tah:
 	tah_exit();
  err_rgmii:
diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h
index 7007479..930a6f6 100644
--- a/drivers/net/ethernet/ibm/emac/core.h
+++ b/drivers/net/ethernet/ibm/emac/core.h
@@ -43,6 +43,7 @@
 #include "phy.h"
 #include "zmii.h"
 #include "rgmii.h"
+#include "rgmii_wol.h"
 #include "mal.h"
 #include "tah.h"
 #include "debug.h"
@@ -210,6 +211,10 @@ struct emac_instance {
 	u32				rgmii_port;
 	struct platform_device		*rgmii_dev;
 
+	/* RGMII WOL infos if any */
+	u32				rgmii_wol_ph;
+	struct platform_device		*rgmii_wol_dev;
+
 	/* TAH infos if any */
 	u32				tah_ph;
 	u32				tah_port;
@@ -333,6 +338,10 @@ struct emac_instance {
  * APM821xx does not support Half Duplex mode
  */
 #define EMAC_FTR_APM821XX_NO_HALF_DUPLEX	0x00001000
+/*
+ * Set if we have a RGMII with wake on LAN.
+ */
+#define EMAC_FTR_HAS_RGMII_WOL		0x00020000
 
 /* Right now, we don't quite handle the always/possible masks on the
  * most optimal way as we don't have a way to say something like
@@ -356,6 +365,9 @@ enum {
 #ifdef CONFIG_IBM_EMAC_RGMII
 	    EMAC_FTR_HAS_RGMII	|
 #endif
+#ifdef CONFIG_IBM_EMAC_RGMII_WOL
+	    EMAC_FTR_HAS_RGMII_WOL	|
+#endif
 #ifdef CONFIG_IBM_EMAC_NO_FLOW_CTRL
 	    EMAC_FTR_NO_FLOW_CONTROL_40x |
 #endif
diff --git a/drivers/net/ethernet/ibm/emac/rgmii_wol.c b/drivers/net/ethernet/ibm/emac/rgmii_wol.c
new file mode 100644
index 0000000..8e0dcf6
--- /dev/null
+++ b/drivers/net/ethernet/ibm/emac/rgmii_wol.c
@@ -0,0 +1,262 @@
+/* drivers/net/ethernet/ibm/emac/rgmii_wol.c
+ *
+ * Driver for PowerPC 4xx on-chip ethernet controller, RGMII bridge with
+ * wake on LAN support.
+ *
+ * Copyright 2013 Alistair Popple, IBM Corp.
+ *                <alistair@popple.id.au>
+ *
+ * Based on rgmii.h:
+ * Copyright 2007 Benjamin Herrenschmidt, IBM Corp.
+ *                <benh@kernel.crashing.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/slab.h>
+#include <linux/kernel.h>
+#include <linux/ethtool.h>
+#include <linux/io.h>
+
+#include "emac.h"
+#include "debug.h"
+
+/* RGMII_WOL_REG */
+
+#define WKUP_ETH_RGSPD      0xC0000000
+#define WKUP_ETH_FCSEN      0x20000000
+#define WKUP_ETH_CRSEN      0x02000000
+#define WKUP_ETH_COLEN      0x01000000
+#define WKUP_ETH_TX_OE      0x00040000
+#define WKUP_ETH_RX_IE      0x00020000
+#define WKUP_ETH_RGMIIEN    0x00010000
+
+#define WKUP_ETH_RGSPD_10   0x00000000
+#define WKUP_ETH_RGSPD_100  0x40000000
+#define WKUP_ETH_RGSPD_1000 0x80000000
+
+/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */
+static inline int rgmii_valid_mode(int phy_mode)
+{
+	return  phy_mode == PHY_MODE_GMII ||
+		phy_mode == PHY_MODE_MII ||
+		phy_mode == PHY_MODE_RGMII ||
+		phy_mode == PHY_MODE_TBI ||
+		phy_mode == PHY_MODE_RTBI;
+}
+
+static inline const char *rgmii_mode_name(int mode)
+{
+	switch (mode) {
+	case PHY_MODE_RGMII:
+		return "RGMII";
+	case PHY_MODE_TBI:
+		return "TBI";
+	case PHY_MODE_GMII:
+		return "GMII";
+	case PHY_MODE_MII:
+		return "MII";
+	case PHY_MODE_RTBI:
+		return "RTBI";
+	default:
+		BUG();
+	}
+}
+
+int rgmii_wol_attach(struct platform_device *ofdev, int mode)
+{
+	struct rgmii_wol_instance *dev = platform_get_drvdata(ofdev);
+
+	dev_dbg(&ofdev->dev, "attach\n");
+
+	/* Check if we need to attach to a RGMII */
+	if (!rgmii_valid_mode(mode)) {
+		dev_err(&ofdev->dev, "unsupported settings !\n");
+		return -ENODEV;
+	}
+
+	mutex_lock(&dev->lock);
+
+	/* Enable this input */
+	out_be32(dev->reg, in_be32(dev->reg) | WKUP_ETH_RGMIIEN
+		 | WKUP_ETH_TX_OE | WKUP_ETH_RX_IE);
+	dev_notice(&ofdev->dev, "in %s mode\n", rgmii_mode_name(mode));
+
+	++dev->users;
+
+	mutex_unlock(&dev->lock);
+
+	return 0;
+}
+
+void rgmii_wol_set_speed(struct platform_device *ofdev, int speed)
+{
+	struct rgmii_wol_instance *dev = platform_get_drvdata(ofdev);
+	u32 reg;
+
+	mutex_lock(&dev->lock);
+
+	reg = in_be32(dev->reg) & ~WKUP_ETH_RGSPD;
+
+	dev_dbg(&ofdev->dev, "speed(%d)\n", speed);
+
+	switch (speed) {
+	case SPEED_1000:
+		reg |= WKUP_ETH_RGSPD_1000;
+		break;
+	case SPEED_100:
+		reg |= WKUP_ETH_RGSPD_100;
+		break;
+	case SPEED_10:
+		reg |= WKUP_ETH_RGSPD_10;
+		break;
+	default:
+		dev_err(&ofdev->dev, "invalid speed set!\n");
+	}
+
+	out_be32(dev->reg, reg);
+
+	mutex_unlock(&dev->lock);
+}
+
+void rgmii_wol_get_mdio(struct platform_device *ofdev)
+{
+	/* MDIO is always enabled when RGMII_WOL is enabled, so we
+	 * don't have to do anything here.
+	 */
+	dev_dbg(&ofdev->dev, "get_mdio\n");
+}
+
+void rgmii_wol_put_mdio(struct platform_device *ofdev)
+{
+	dev_dbg(&ofdev->dev, "put_mdio\n");
+}
+
+void rgmii_wol_detach(struct platform_device *ofdev)
+{
+	struct rgmii_wol_instance *dev = platform_get_drvdata(ofdev);
+
+	BUG_ON(!dev || dev->users == 0);
+
+	mutex_lock(&dev->lock);
+
+	dev_dbg(&ofdev->dev, "detach\n");
+
+	/* Disable this input */
+	out_be32(dev->reg, 0);
+
+	--dev->users;
+
+	mutex_unlock(&dev->lock);
+}
+
+int rgmii_wol_get_regs_len(struct platform_device *ofdev)
+{
+	return sizeof(struct emac_ethtool_regs_subhdr) +
+		sizeof(u32);
+}
+
+void *rgmii_wol_dump_regs(struct platform_device *ofdev, void *buf)
+{
+	struct rgmii_wol_instance *dev = platform_get_drvdata(ofdev);
+	struct emac_ethtool_regs_subhdr *hdr = buf;
+	u32 *regs = (u32 *)(hdr + 1);
+
+	hdr->version = 0;
+	hdr->index = 0; /* for now, are there chips with more than one
+			 * rgmii ? if yes, then we'll add a cell_index
+			 * like we do for emac
+			 */
+	memcpy_fromio(regs, dev->reg, sizeof(u32));
+	return regs + 1;
+}
+
+
+static int rgmii_wol_probe(struct platform_device *ofdev)
+{
+	struct device_node *np = ofdev->dev.of_node;
+	struct rgmii_wol_instance *dev;
+	int rc;
+
+	rc = -ENOMEM;
+	dev = kzalloc(sizeof(struct rgmii_wol_instance), GFP_KERNEL);
+	if (dev == NULL)
+		goto err_gone;
+
+	mutex_init(&dev->lock);
+
+	dev->reg = of_iomap(np, 0);
+	if (!dev->reg) {
+		dev_err(&ofdev->dev, "Can't map registers\n");
+		rc = -ENXIO;
+		goto err_free;
+	}
+
+	/* Check for RGMII flags */
+	if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL))
+		dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
+
+	dev_dbg(&ofdev->dev, " Boot REG = 0x%08x\n", in_be32(dev->reg));
+
+	/* Disable all inputs by default */
+	out_be32(dev->reg, 0);
+
+	dev_info(&ofdev->dev,
+	       "RGMII %s initialized with%s MDIO support\n",
+	       ofdev->dev.of_node->full_name,
+	       (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out");
+
+	wmb();
+	platform_set_drvdata(ofdev, dev);
+
+	return 0;
+
+ err_free:
+	kfree(dev);
+ err_gone:
+	return rc;
+}
+
+static int rgmii_wol_remove(struct platform_device *ofdev)
+{
+	struct rgmii_wol_instance *dev = platform_get_drvdata(ofdev);
+
+	WARN_ON(dev->users != 0);
+
+	iounmap(dev->reg);
+	kfree(dev);
+
+	return 0;
+}
+
+static struct of_device_id rgmii_wol_match[] = {
+	{
+		.compatible	= "ibm,rgmii-wol",
+	},
+	{
+		.type		= "emac-rgmii-wol",
+	},
+	{},
+};
+
+static struct platform_driver rgmii_wol_driver = {
+	.driver = {
+		.name = "emac-rgmii-wol",
+		.owner = THIS_MODULE,
+		.of_match_table = rgmii_wol_match,
+	},
+	.probe = rgmii_wol_probe,
+	.remove = rgmii_wol_remove,
+};
+
+int __init rgmii_wol_init(void)
+{
+	return platform_driver_register(&rgmii_wol_driver);
+}
+
+void rgmii_wol_exit(void)
+{
+	platform_driver_unregister(&rgmii_wol_driver);
+}
diff --git a/drivers/net/ethernet/ibm/emac/rgmii_wol.h b/drivers/net/ethernet/ibm/emac/rgmii_wol.h
new file mode 100644
index 0000000..44ce268
--- /dev/null
+++ b/drivers/net/ethernet/ibm/emac/rgmii_wol.h
@@ -0,0 +1,62 @@
+/* drivers/net/ethernet/ibm/emac/rgmii_wol.h
+ *
+ * Driver for PowerPC 4xx on-chip ethernet controller, RGMII bridge with
+ * wake on LAN support.
+ *
+ * Copyright 2013 Alistair Popple, IBM Corp.
+ *                <alistair@popple.id.au>
+ *
+ * Based on rgmii.h:
+ * Copyright 2007 Benjamin Herrenschmidt, IBM Corp.
+ *                <benh@kernel.crashing.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.
+ */
+
+#ifndef __IBM_NEWEMAC_RGMII_WOL_H
+#define __IBM_NEWEMAC_RGMII_WOL_H
+
+/* RGMII device */
+struct rgmii_wol_instance {
+	u32 __iomem			*reg;
+
+	/* RGMII bridge flags */
+	int				flags;
+#define EMAC_RGMII_FLAG_HAS_MDIO	0x00000001
+
+	/* Only one EMAC whacks us at a time */
+	struct mutex			lock;
+
+	/* number of EMACs using this RGMII bridge */
+	int				users;
+};
+
+#ifdef CONFIG_IBM_EMAC_RGMII_WOL
+
+extern int rgmii_wol_init(void);
+extern void rgmii_wol_exit(void);
+extern int rgmii_wol_attach(struct platform_device *ofdev, int mode);
+extern void rgmii_wol_detach(struct platform_device *ofdev);
+extern void rgmii_wol_get_mdio(struct platform_device *ofdev);
+extern void rgmii_wol_put_mdio(struct platform_device *ofdev);
+extern void rgmii_wol_set_speed(struct platform_device *ofdev, int speed);
+extern int rgmii_wol_get_regs_len(struct platform_device *ofdev);
+extern void *rgmii_wol_dump_regs(struct platform_device *ofdev, void *buf);
+
+#else
+
+# define rgmii_wol_init()		0
+# define rgmii_wol_exit()		do { } while (0)
+# define rgmii_wol_attach(x, y, z)	(-ENXIO)
+# define rgmii_wol_detach(x, y)	do { } while (0)
+# define rgmii_wol_get_mdio(o, i)	do { } while (0)
+# define rgmii_wol_put_mdio(o, i)	do { } while (0)
+# define rgmii_wol_set_speed(x, y, z)	do { } while (0)
+# define rgmii_wol_get_regs_len(x)	0
+# define rgmii_wol_dump_regs(x, buf)	(buf)
+#endif				/* !CONFIG_IBM_EMAC_RGMII_WOL */
+
+#endif /* __IBM_NEWEMAC_RGMII_WOL_H */
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH net] net: sch_red: Fix race between timer and red_destroy()
From: Vijay Subramanian @ 2013-11-05  2:08 UTC (permalink / raw)
  To: netdev; +Cc: davem, shemminger, eric.dumazet, Vijay Subramanian

Make sure timer does not fire once qdisc is destroyed.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
---
 net/sched/sch_red.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 633e32d..380507e 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -39,6 +39,7 @@
 struct red_sched_data {
 	u32			limit;		/* HARD maximal queue length */
 	unsigned char		flags;
+	bool			timeron;	/* to prevent race on destroy*/
 	struct timer_list	adapt_timer;
 	struct red_parms	parms;
 	struct red_vars		vars;
@@ -166,6 +167,7 @@ static void red_destroy(struct Qdisc *sch)
 {
 	struct red_sched_data *q = qdisc_priv(sch);
 
+	q->timeron = false;
 	del_timer_sync(&q->adapt_timer);
 	qdisc_destroy(q->qdisc);
 }
@@ -241,7 +243,8 @@ static inline void red_adaptative_timer(unsigned long arg)
 
 	spin_lock(root_lock);
 	red_adaptative_algo(&q->parms, &q->vars);
-	mod_timer(&q->adapt_timer, jiffies + HZ/2);
+	if (q->timeron)
+		mod_timer(&q->adapt_timer, jiffies + HZ/2);
 	spin_unlock(root_lock);
 }
 
@@ -250,6 +253,7 @@ static int red_init(struct Qdisc *sch, struct nlattr *opt)
 	struct red_sched_data *q = qdisc_priv(sch);
 
 	q->qdisc = &noop_qdisc;
+	q->timeron = true;
 	setup_timer(&q->adapt_timer, red_adaptative_timer, (unsigned long)sch);
 	return red_change(sch, opt);
 }
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH net] ipv6: fix headroom calculation in udp6_ufo_fragment
From: Hannes Frederic Sowa @ 2013-11-05  1:41 UTC (permalink / raw)
  To: Saran Neti, netdev@vger.kernel.org, pshelar,
	dl TSL Vulnerability Research Team
In-Reply-To: <20131103033207.GF30284@order.stressinduktion.org>

Commit 1e2bd517c108816220f262d7954b697af03b5f9c ("udp6: Fix udp
fragmentation for tunnel traffic.") changed the calculation if
there is enough space to include a fragment header in the skb from a
skb->mac_header dervived one to skb_headroom. Because we already peeled
off the skb to transport_header this is wrong. Change this back to check
if we have enough room before the mac_header.

This fixes a panic Saran Neti reported. He used the tbf scheduler which
skb_gso_segments the skb. The offsets get negative and we panic in memcpy
because the skb was erroneously not expanded at the head.

Reported-by: Saran Neti <Saran.Neti@telus.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 net/ipv6/udp_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 08e23b0..e7359f9 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -90,7 +90,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
 
 		/* Check if there is enough headroom to insert fragment header. */
 		tnl_hlen = skb_tnl_header_len(skb);
-		if (skb_headroom(skb) < (tnl_hlen + frag_hdr_sz)) {
+		if (skb->mac_header < (tnl_hlen + frag_hdr_sz)) {
 			if (gso_pskb_expand_head(skb, tnl_hlen + frag_hdr_sz))
 				goto out;
 		}
-- 
1.8.3.1

^ permalink raw reply related

* [PATCH net-next] ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE
From: Hannes Frederic Sowa @ 2013-11-05  1:24 UTC (permalink / raw)
  To: netdev; +Cc: davem, fweimer

Sockets marked with IP_PMTUDISC_INTERFACE won't do path mtu discovery,
their sockets won't accept and install new path mtu information and they
will always use the interface mtu for outgoing packets. It is guaranteed
that the packet is not fragmented locally. But we won't set the DF-Flag
on the outgoing frames.

Florian Weimer had the idea to use this flag to ensure DNS servers are
never generating outgoing fragments. They may well be fragmented on the
path, but the server never stores or usees path mtu values, which could
well be forged in an attack.

(The root of the problem with path MTU discovery is that there is
no reliable way to authenticate ICMP Fragmentation Needed But DF Set
messages because they are sent from intermediate routers with their
source addresses, and the IMCP payload will not always contain sufficient
information to identify a flow.)

Recent research in the DNS community showed that it is possible to
implement an attack where DNS cache poisoning is feasible by spoofing
fragments. This work was done by Amir Herzberg and Haya Shulman:
<https://sites.google.com/site/hayashulman/files/fragmentation-poisoning.pdf>

This issue was previously discussed among the DNS community, e.g.
<http://www.ietf.org/mail-archive/web/dnsext/current/msg01204.html>,
without leading to fixes.

This patch depends on the patch "ipv4: fix DO and PROBE pmtu mode
regarding local fragmentation with UFO/CORK" for the enforcement of the
non-fragmentable checks. If other users than ip_append_page/data should
use this semantic too, we have to add a new flag to IPCB(skb)->flags to
suppress local fragmentation and check for this in ip_finish_output.

Many thanks to Florian Weimer for the idea and feedback while implementing
this patch.

Cc: David S. Miller <davem@davemloft.net>
Suggested-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 include/net/route.h     | 16 ++++++++++++----
 include/uapi/linux/in.h |  5 +++++
 net/dccp/ipv4.c         |  1 +
 net/ipv4/ip_output.c    |  8 ++++----
 net/ipv4/ip_sockglue.c  |  2 +-
 net/ipv4/route.c        |  4 ++++
 net/ipv4/tcp_ipv4.c     |  1 +
 7 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/include/net/route.h b/include/net/route.h
index dd4ae00..f68c167 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -313,12 +313,20 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
 	return hoplimit;
 }
 
-static inline int ip_skb_dst_mtu(struct sk_buff *skb)
+static inline bool ip_sk_accept_pmtu(const struct sock *sk)
 {
-	struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL;
+	return inet_sk(sk)->pmtudisc != IP_PMTUDISC_INTERFACE;
+}
 
-	return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ?
-	       skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb));
+static inline bool ip_sk_use_pmtu(const struct sock *sk)
+{
+	return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE;
+}
+
+static inline int ip_skb_dst_mtu(const struct sk_buff *skb)
+{
+	return (!skb->sk || ip_sk_use_pmtu(skb->sk)) ?
+	       dst_mtu(skb_dst(skb)) : skb_dst(skb)->dev->mtu;
 }
 
 #endif	/* _ROUTE_H */
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index f9e8e49..393c5de 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -115,6 +115,11 @@ struct in_addr {
 #define IP_PMTUDISC_WANT		1	/* Use per route hints	*/
 #define IP_PMTUDISC_DO			2	/* Always DF		*/
 #define IP_PMTUDISC_PROBE		3       /* Ignore dst pmtu      */
+/* Always use interface mtu (ignores dst pmtu) but don't set DF flag.
+ * Also incoming ICMP frag_needed notifications will be ignored on
+ * this socket to prevent accepting spoofed ones.
+ */
+#define IP_PMTUDISC_INTERFACE		4
 
 #define IP_MULTICAST_IF			32
 #define IP_MULTICAST_TTL 		33
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 720c362..d9f65fc 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -174,6 +174,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
 	mtu = dst_mtu(dst);
 
 	if (inet->pmtudisc != IP_PMTUDISC_DONT &&
+	    ip_sk_accept_pmtu(sk) &&
 	    inet_csk(sk)->icsk_pmtu_cookie > mtu) {
 		dccp_sync_mss(sk, mtu);
 
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 51be64e..9124027 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1037,7 +1037,6 @@ error:
 static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
 			 struct ipcm_cookie *ipc, struct rtable **rtp)
 {
-	struct inet_sock *inet = inet_sk(sk);
 	struct ip_options_rcu *opt;
 	struct rtable *rt;
 
@@ -1063,8 +1062,8 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
 	 * We steal reference to this route, caller should not release it
 	 */
 	*rtp = NULL;
-	cork->fragsize = inet->pmtudisc == IP_PMTUDISC_PROBE ?
-			 rt->dst.dev->mtu : dst_mtu(&rt->dst);
+	cork->fragsize = ip_sk_use_pmtu(sk) ?
+			 dst_mtu(&rt->dst) : rt->dst.dev->mtu;
 	cork->dst = &rt->dst;
 	cork->length = 0;
 	cork->ttl = ipc->ttl;
@@ -1315,7 +1314,8 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
 	/* DF bit is set when we want to see DF on outgoing frames.
 	 * If local_df is set too, we still allow to fragment this frame
 	 * locally. */
-	if (inet->pmtudisc >= IP_PMTUDISC_DO ||
+	if (inet->pmtudisc == IP_PMTUDISC_DO ||
+	    inet->pmtudisc == IP_PMTUDISC_PROBE ||
 	    (skb->len <= dst_mtu(&rt->dst) &&
 	     ip_dont_fragment(sk, &rt->dst)))
 		df = htons(IP_DF);
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 0626f2c..3f85826 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -627,7 +627,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
 		inet->nodefrag = val ? 1 : 0;
 		break;
 	case IP_MTU_DISCOVER:
-		if (val < IP_PMTUDISC_DONT || val > IP_PMTUDISC_PROBE)
+		if (val < IP_PMTUDISC_DONT || val > IP_PMTUDISC_INTERFACE)
 			goto e_inval;
 		inet->pmtudisc = val;
 		break;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index d2d3253..f428935 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1036,6 +1036,10 @@ void ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu)
 	bool new = false;
 
 	bh_lock_sock(sk);
+
+	if (!ip_sk_accept_pmtu(sk))
+		goto out;
+
 	rt = (struct rtable *) __sk_dst_get(sk);
 
 	if (sock_owned_by_user(sk) || !rt) {
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 300ab2c..14bba8a 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -288,6 +288,7 @@ static void tcp_v4_mtu_reduced(struct sock *sk)
 	mtu = dst_mtu(dst);
 
 	if (inet->pmtudisc != IP_PMTUDISC_DONT &&
+	    ip_sk_accept_pmtu(sk) &&
 	    inet_csk(sk)->icsk_pmtu_cookie > mtu) {
 		tcp_sync_mss(sk, mtu);
 
-- 
1.8.3.1

^ permalink raw reply related

* Re: [PATCH net-next V3 2/2] virtio-net: coalesce rx frags when possible during rx
From: David Miller @ 2013-11-05  1:04 UTC (permalink / raw)
  To: jasowang
  Cc: mwdalton, mst, netdev, linux-kernel, virtualization, kmindg,
	edumazet
In-Reply-To: <1383286068-10421-2-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Fri,  1 Nov 2013 14:07:48 +0800

> Commit 2613af0ed18a11d5c566a81f9a6510b73180660a (virtio_net: migrate mergeable
> rx buffers to page frag allocators) try to increase the payload/truesize for
> MTU-sized traffic. But this will introduce the extra overhead for GSO packets
> received because of the frag list. This commit tries to reduce this issue by
> coalesce the possible rx frags when possible during rx. Test result shows the
> about 15% improvement on full size GSO packet receiving (and even better than
> before commit 2613af0ed18a11d5c566a81f9a6510b73180660a).
...
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Michael Dalton <mwdalton@google.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Acked-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> Changes from V2:
> - call put_page() instead of depending on skb_coalesce_rx_frag()

Looks fantastic, applied, thanks Jason!

^ permalink raw reply

* Re: [PATCH net-next V3 1/2] net: introduce skb_coalesce_rx_frag()
From: David Miller @ 2013-11-05  1:04 UTC (permalink / raw)
  To: jasowang
  Cc: mwdalton, mst, netdev, linux-kernel, virtualization, kmindg,
	edumazet
In-Reply-To: <1383286068-10421-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Fri,  1 Nov 2013 14:07:47 +0800

> Sometimes we need to coalesce the rx frags to avoid frag list. One example is
> virtio-net driver which tries to use small frags for both MTU sized packet and
> GSO packet. So this patch introduce skb_coalesce_rx_frag() to do this.
> 
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Michael Dalton <mwdalton@google.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> Changes from V2:
> - remove the skb_frag_unref() and let the called to put the page reference
> Changes from V1:
> - remove the useless off parameter.

Applied.

^ permalink raw reply

* Re: [PATCH net-next] vxlan: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
From: David Miller @ 2013-11-05  1:03 UTC (permalink / raw)
  To: duanj.fnst; +Cc: netdev
In-Reply-To: <52733797.3010305@cn.fujitsu.com>

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Fri, 01 Nov 2013 13:09:43 +0800

> trivial patch converting ERR_PTR(PTR_ERR()) into ERR_CAST().
> No functional changes.
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>

Applied, thank you.

^ permalink raw reply

* Re: [net-next PATCH V2] net: codel: Avoid undefined behavior from signed overflow
From: David Miller @ 2013-11-05  1:01 UTC (permalink / raw)
  To: brouer; +Cc: netdev, eric.dumazet, paulmck, dave.taht
In-Reply-To: <20131031211055.10355.98182.stgit@dragon>

From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Thu, 31 Oct 2013 22:10:55 +0100

> From: Jesper Dangaard Brouer <netoptimizer@brouer.com>
> 
> As described in commit 5a581b367 (jiffies: Avoid undefined
> behavior from signed overflow), according to the C standard
> 3.4.3p3, overflow of a signed integer results in undefined
> behavior.
> 
> To fix this, do as the above commit, and do an unsigned
> subtraction, and interpreting the result as a signed
> two's-complement number.  This is based on the theory from
> RFC 1982 and is nicely described in wikipedia here:
>  https://en.wikipedia.org/wiki/Serial_number_arithmetic#General_Solution
> 
> A side-note, I have seen practical issues with the previous logic
> when dealing with 16-bit, on a 64-bit machine (gcc version
> 4.4.5). This were 32-bit, which I have not observed issues with.
> 
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com>

Applied, thanks for working through this Jesper.

^ permalink raw reply

* Re: pull-request: can-next 2013-10-31
From: David Miller @ 2013-11-05  1:00 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can, kernel
In-Reply-To: <5272B844.9010100@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Thu, 31 Oct 2013 21:06:28 +0100

> here's a pull request for net-next.
> 
> It includes a patch by Oliver Hartkopp et al. that adds documentation
> for the broadcast manager to Documentation/networking/can.txt. Three
> patches by me that clean up the netlink handling code in the CAN core.
> And another patch that removes a not needed function from the ti_hecc
> driver.

Pulled, thanks a lot Marc.

^ permalink raw reply

* Re: [PATCH net-next] ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE
From: Hannes Frederic Sowa @ 2013-11-05  0:58 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, fweimer
In-Reply-To: <20131104.195230.1532629606565920528.davem@davemloft.net>

On Mon, Nov 04, 2013 at 07:52:30PM -0500, David Miller wrote:
> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Tue, 5 Nov 2013 00:25:41 +0100
> 
> > Sorry for being so pushy about this patch! :|
> 
> I haven't ruled out applying your original patch, could you please
> just repost it so that it gets queued up anew in patchwork?

Ok, will do, thanks!

> I'll get to resolving this, please be patient.

Sorry, I did not want to rush you.

Greetings,

  Hannes

^ permalink raw reply

* Re: [PATCH net-next] tcp: properly handle stretch acks in slow start
From: David Miller @ 2013-11-05  0:58 UTC (permalink / raw)
  To: ycheng; +Cc: netdev, edumazet, ncardwell, vanj
In-Reply-To: <1383242851-26748-1-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Thu, 31 Oct 2013 11:07:31 -0700

> Slow start now increases cwnd by 1 if an ACK acknowledges some packets,
> regardless the number of packets. Consequently slow start performance
> is highly dependent on the degree of the stretch ACKs caused by
> receiver or network ACK compression mechanisms (e.g., delayed-ACK,
> GRO, etc).  But slow start algorithm is to send twice the amount of
> packets of packets left so it should process a stretch ACK of degree
> N as if N ACKs of degree 1, then exits when cwnd exceeds ssthresh. A
> follow up patch will use the remainder of the N (if greater than 1)
> to adjust cwnd in the congestion avoidance phase.
> 
> In addition this patch retires the experimental limited slow start
> (LSS) feature. LSS has multiple drawbacks but questionable benefit. The
> fractional cwnd increase in LSS requires a loop in slow start even
> though it's rarely used. Configuring such an increase step via a global
> sysctl on different BDPS seems hard. Finally and most importantly the
> slow start overshoot concern is now better covered by the Hybrid slow
> start (hystart) enabled by default.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] tcp: enable sockets to use MSG_FASTOPEN by default
From: David Miller @ 2013-11-05  0:58 UTC (permalink / raw)
  To: ycheng; +Cc: edumazet, netdev, ncardwell, sivasankar
In-Reply-To: <1383236372-1317-1-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Thu, 31 Oct 2013 09:19:32 -0700

> Applications have started to use Fast Open (e.g., Chrome browser has
> such an optional flag) and the feature has gone through several
> generations of kernels since 3.7 with many real network tests. It's
> time to enable this flag by default for applications to test more
> conveniently and extensively.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE
From: David Miller @ 2013-11-05  0:52 UTC (permalink / raw)
  To: hannes; +Cc: netdev, fweimer
In-Reply-To: <20131104232541.GD8832@order.stressinduktion.org>

From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Tue, 5 Nov 2013 00:25:41 +0100

> Sorry for being so pushy about this patch! :|

I haven't ruled out applying your original patch, could you please
just repost it so that it gets queued up anew in patchwork?

I'll get to resolving this, please be patient.

Thanks.

^ permalink raw reply

* Re: [PATCH 0/5] nf_tables updates for net-next
From: David Miller @ 2013-11-05  0:49 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, netdev
In-Reply-To: <1383602721-5728-1-git-send-email-pablo@netfilter.org>

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon,  4 Nov 2013 23:05:16 +0100

> This batch contains fives nf_tables patches for your net-next tree,
> they are:
> 
> * Fix possible use after free in the module removal path of the
>   x_tables compatibility layer, from Dan Carpenter.
> 
> * Add filter chain type for the bridge family, from myself.
> 
> * Fix Kconfig dependencies of the nf_tables bridge family with
>   the core, from myself.
> 
> * Fix sparse warnings in nft_nat, from Tomasz Bursztyka.
> 
> * Remove duplicated include in the IPv4 family support for nf_tables,
>   from Wei Yongjun.
> 
> You can pull these changes from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables.git master

Also looks fine, pulled, thanks!

^ permalink raw reply

* Re: [PATCH 00/20] Netfilter/IPVS updates for net-next
From: David Miller @ 2013-11-05  0:47 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, netdev
In-Reply-To: <1383601842-4570-1-git-send-email-pablo@netfilter.org>

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon,  4 Nov 2013 22:50:22 +0100

> This is another batch containing Netfilter/IPVS updates for your net-next
> tree, they are:
 ...
> You can pull these changes from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master

Looks good, pulled, thanks Pablo.

^ permalink raw reply

* Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode
From: Jason Cooper @ 2013-11-05  0:36 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Andrew Lunn, netdev, linux-kernel, linux-arm-kernel,
	Benjamin Herrenschmidt, linuxppc-dev, David Miller,
	Lennert Buytenhek, Sebastian Hesselbarth
In-Reply-To: <1383611239-14556-1-git-send-email-jgunthorpe@obsidianresearch.com>

Jason,

On Mon, Nov 04, 2013 at 05:27:19PM -0700, Jason Gunthorpe wrote:
> Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node

fyi: set core.abbrev = 12 in your git config, according to Linus, 7/8
was a bad decision...

> present' made the call to phy_scan optional, if the DT has a link to
> the phy node.
> 
> However phy_scan has the side effect of calling phy_addr_set, which
> writes the phy MDIO address to the ethernet controller. If phy_addr_set
> is not called, and the bootloader has not set the correct address then
> the driver will fail to function.
> 
> Tested on Kirkwood.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

Fixes: cc9d459894b0 "net: mv643xx_eth: use of_phy_connect if phy_node present"
Acked-by: Jason Cooper <jason@lakedaemon.net>

And it should be suitable for v3.11+

thx,

Jason.

^ permalink raw reply

* [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode
From: Jason Gunthorpe @ 2013-11-05  0:27 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Andrew Lunn, Jason Cooper, netdev, linux-kernel, linux-arm-kernel,
	linuxppc-dev, David Miller, Lennert Buytenhek

Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node
present' made the call to phy_scan optional, if the DT has a link to
the phy node.

However phy_scan has the side effect of calling phy_addr_set, which
writes the phy MDIO address to the ethernet controller. If phy_addr_set
is not called, and the bootloader has not set the correct address then
the driver will fail to function.

Tested on Kirkwood.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
Cc: David Miller <davem@davemloft.net>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/ethernet/marvell/mv643xx_eth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 2c210ec..00e43b5 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2890,6 +2890,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 					 PHY_INTERFACE_MODE_GMII);
 		if (!mp->phy)
 			err = -ENODEV;
+		phy_addr_set(mp, mp->phy->addr);
 	} else if (pd->phy_addr != MV643XX_ETH_PHY_NONE) {
 		mp->phy = phy_scan(mp, pd->phy_addr);
 
-- 
1.8.1.2

^ permalink raw reply related

* 3.10.16 general protection fault kmem_cache_alloc+0x67/0x170
From: Shawn Bohrer @ 2013-11-04 23:54 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, netdev

I had a machine crash this weekend running a 3.10.16 kernel that
additionally has a few backported networking patches for performance
improvements.  At this point I can't rule out that the bug isn't from
those patches, and I haven't yet tried to see if I can reproduce the
crash.  I did happen to have kdump configured so I've got a crash dump
that I've been poking at but I'm not an expert here so hopefully
someone can provide some guidance on what I'm looking at and/or where
the bug might be.

Below is the more detailed info with some of my comments interspersed.
If anyone has any questions or suggestions I'd appreciate it.

[1448642.601229] general protection fault: 0000 [#1] SMP 
[1448642.602448] Modules linked in: mpt2sas scsi_transport_sas raid_class mptctl mptbase dell_rbu ipmi_devintf ipmi_si ipmi_msghandler lockd 8021q mrp garp stp llc ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_addr iw_cxgb3 mlx4_ib ib_sa ib_mad ib_core mlx4_en ext4 jbd2 mbcache joydev fuse ses bnx2 coretemp mlx4_core cxgb3 hwmon mdio enclosure iTCO_wdt iTCO_vendor_support freq_table mperf wmi ehci_pci ehci_hcd dcdbas serio_raw microcode lpc_ich mfd_core sunrpc ipv6 autofs4 crc32c_intel megaraid_sas uhci_hcd dm_mirror dm_region_hash dm_log dm_mod
[1448642.616810] CPU: 11 PID: 27807 Comm: primary_nic_is_ Not tainted 3.10.16-1.rgm.fc16.x86_64 #1
[1448642.618941] Hardware name: Dell Inc. PowerEdge R610/0XDN97, BIOS 6.3.0 07/24/2012
[1448642.620639] task: ffff8806628c3880 ti: ffff880604370000 task.ti: ffff880604370000
[1448642.622335] RIP: 0010:[<ffffffff8112b117>]  [<ffffffff8112b117>] kmem_cache_alloc+0x67/0x170
[1448642.624286] RSP: 0018:ffff880604371d70  EFLAGS: 00010282
[1448642.625500] RAX: 0000000000000000 RBX: ffff8806628c3880 RCX: 000000007ecb996a
[1448642.627415] RDX: 000000007ecb9969 RSI: 00000000000000d0 RDI: 0000000000015900
[1448642.629077] RBP: ffff880604371dc0 R08: ffff880667d55900 R09: 0000000000000000
[1448642.630697] R10: 0000000000000000 R11: 0000000000015ea8 R12: ffff880c67003800
[1448642.632316] R13: d17b94d6641aebfb R14: ffffffff81064d68 R15: 00000000000000d0
[1448642.633936] FS:  00007f8018827700(0000) GS:ffff880667d40000(0000) knlGS:0000000000000000
[1448642.635768] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[1448642.637497] CR2: 00000000006eded4 CR3: 000000066368b000 CR4: 00000000000007e0
[1448642.639230] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[1448642.640849] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[1448642.642468] Stack:
[1448642.642950]  00000000ffffff9c ffff8806628c3880 ffff8806628c3880 0000000000000002
[1448642.644780]  ffff8806628c3880 ffff8806628c3880 0000000000000000 0000000001200011
[1448642.646848]  0000000000000000 00007f80188279d0 ffff880604371de0 ffffffff81064d68
[1448642.648987] Call Trace:
[1448642.649568]  [<ffffffff81064d68>] prepare_creds+0x28/0x160
[1448642.650822]  [<ffffffff81065436>] copy_creds+0x36/0x160
[1448642.652019]  [<ffffffff810393e0>] copy_process+0x310/0x14b0
[1448642.653295]  [<ffffffff811534f5>] ? __alloc_fd+0x45/0x110
[1448642.654529]  [<ffffffff8103a64c>] do_fork+0x9c/0x280
[1448642.655668]  [<ffffffff811535f0>] ? get_unused_fd_flags+0x30/0x40
[1448642.657473]  [<ffffffff8114147f>] ? __do_pipe_flags+0x7f/0xc0
[1448642.658808]  [<ffffffff8115362b>] ? __fd_install+0x2b/0x60
[1448642.660062]  [<ffffffff8103a8b6>] SyS_clone+0x16/0x20
[1448642.661222]  [<ffffffff814c2429>] stub_clone+0x69/0x90
[1448642.662399]  [<ffffffff814c2182>] ? system_call_fastpath+0x16/0x1b
[1448642.663807] Code: 00 49 8b 50 08 4d 8b 28 49 8b 40 10 4d 85 ed 0f 84 f7 00 00 00 48 85 c0 0f 84 ee 00 00 00 49 63 44 24 20 48 8d 4a 01 49 8b 3c 24 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0f 0f 94 c0 84 c0 74 b5 49 
[1448642.671081] RIP  [<ffffffff8112b117>] kmem_cache_alloc+0x67/0x170
[1448642.672508]  RSP <ffff880604371d70>
[1448642.673330] ---[ end trace fe4b503d6f77c801 ]---
[1448642.674408] general protection fault: 0000 [#2] SMP 
[1448642.675623] Modules linked in: mpt2sas scsi_transport_sas raid_class mptctl mptbase dell_rbu ipmi_devintf ipmi_si ipmi_msghandler lockd 8021q mrp garp stp llc ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_addr iw_cxgb3 mlx4_ib ib_sa ib_mad ib_core mlx4_en ext4 jbd2 mbcache joydev fuse ses bnx2 coretemp mlx4_core cxgb3 hwmon mdio enclosure iTCO_wdt iTCO_vendor_support freq_table mperf wmi ehci_pci ehci_hcd dcdbas serio_raw microcode lpc_ich mfd_core sunrpc ipv6 autofs4 crc32c_intel megaraid_sas uhci_hcd dm_mirror dm_region_hash dm_log dm_mod
[1448642.690185] CPU: 11 PID: 27807 Comm: primary_nic_is_ Tainted: G      D      3.10.16-1.rgm.fc16.x86_64 #1
[1448642.692328] Hardware name: Dell Inc. PowerEdge R610/0XDN97, BIOS 6.3.0 07/24/2012
[1448642.694027] task: ffff8806628c3880 ti: ffff880604370000 task.ti: ffff880604370000
[1448642.695726] RIP: 0010:[<ffffffff8112b117>]  [<ffffffff8112b117>] kmem_cache_alloc+0x67/0x170
[1448642.698133] RSP: 0018:ffff880667d43ad0  EFLAGS: 00010282
[1448642.792981] RAX: 0000000000000000 RBX: ffffffff81a9c580 RCX: 000000007ecb996a
[1448642.889673] RDX: 000000007ecb9969 RSI: 0000000000000020 RDI: 0000000000015900
[1448642.994115] RBP: ffff880667d43b20 R08: ffff880667d55900 R09: ffffffff81a9e5a0
[1448643.090682] R10: 00000000000043c7 R11: 000000003430080a R12: ffff880c67003800
[1448643.188603] R13: d17b94d6641aebfb R14: ffffffff81412f2a R15: 0000000000000020
[1448643.285514] FS:  00007f8018827700(0000) GS:ffff880667d40000(0000) knlGS:0000000000000000
[1448643.383646] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[1448643.492593] CR2: 00000000006eded4 CR3: 000000066368b000 CR4: 00000000000007e0
[1448643.611447] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[1448643.725885] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[1448643.842044] Stack:
[1448643.951844]  ffff880c623d6300 0000000000000000 000000000000003c ffffffff81ac3470
[1448644.064382]  0000000000000002 ffffffff81a9c580 ffff880664ba8800 0000000000000001
[1448644.172037]  00000000ffffffff 0000000000000011 ffff880667d43b70 ffffffff81412f2a
[1448644.275773] Call Trace:
[1448644.381953]  <IRQ> 
[1448644.382607] 
[1448644.481603]  [<ffffffff81412f2a>] dst_alloc+0x5a/0x180
[1448644.582555]  [<ffffffff8143c08c>] rt_dst_alloc+0x4c/0x50
[1448644.682248]  [<ffffffff8143d6af>] ip_route_input_noref+0x58f/0x930
[1448644.780543]  [<ffffffff8146e28c>] ? udp_v4_early_demux+0x19c/0x400
[1448644.876777]  [<ffffffff8143f98a>] ip_rcv_finish+0x18a/0x320
[1448644.971530]  [<ffffffff814400cb>] ip_rcv+0x1fb/0x300
[1448645.065453]  [<ffffffff8140aee2>] __netif_receive_skb_core+0x622/0x7b0
[1448645.154238]  [<ffffffff8140b091>] __netif_receive_skb+0x21/0x70
[1448645.232660]  [<ffffffff8140b281>] netif_receive_skb+0x31/0xb0
[1448645.309863]  [<ffffffffa05ff6da>] mlx4_en_process_rx_cq+0x3aa/0x860 [mlx4_en]
[1448645.387368]  [<ffffffffa05ffc2f>] mlx4_en_poll_rx_cq+0x3f/0x80 [mlx4_en]
[1448645.466734]  [<ffffffff8140b989>] net_rx_action+0x119/0x220
[1448645.545289]  [<ffffffff81043158>] __do_softirq+0xd8/0x280
[1448645.621214]  [<ffffffff8107e524>] ? tick_program_event+0x24/0x30
[1448645.696725]  [<ffffffff81062c31>] ? hrtimer_interrupt+0x141/0x240
[1448645.772942]  [<ffffffff814c333c>] call_softirq+0x1c/0x30
[1448645.849316]  [<ffffffff81004105>] do_softirq+0x55/0x90
[1448645.925047]  [<ffffffff81043435>] irq_exit+0x65/0x70
[1448646.004842]  [<ffffffff814c394e>] smp_apic_timer_interrupt+0x6e/0x99
[1448646.080536]  [<ffffffff814c2cca>] apic_timer_interrupt+0x6a/0x70
[1448646.155253]  <EOI> 
[1448646.155756] 
[1448646.230661]  [<ffffffff8103d8e6>] ? vprintk_emit+0x1d6/0x520
[1448646.304905]  [<ffffffff814b103a>] printk+0x4d/0x4f
[1448646.379754]  [<ffffffff8103b313>] print_oops_end_marker+0x23/0x30
[1448646.455985]  [<ffffffff8103b49f>] oops_exit+0x1f/0x30
[1448646.533918]  [<ffffffff814baceb>] oops_end+0x7b/0xf0
[1448646.608695]  [<ffffffff81005758>] die+0x58/0x90
[1448646.682638]  [<ffffffff81064d68>] ? prepare_creds+0x28/0x160
[1448646.757149]  [<ffffffff814ba80c>] do_general_protection+0xdc/0x160
[1448646.832144]  [<ffffffff814ba202>] general_protection+0x22/0x30
[1448646.908595]  [<ffffffff81064d68>] ? prepare_creds+0x28/0x160
[1448646.988953]  [<ffffffff8112b117>] ? kmem_cache_alloc+0x67/0x170
[1448647.065142]  [<ffffffff81064d68>] prepare_creds+0x28/0x160
[1448647.138887]  [<ffffffff81065436>] copy_creds+0x36/0x160
[1448647.211415]  [<ffffffff810393e0>] copy_process+0x310/0x14b0
[1448647.283149]  [<ffffffff811534f5>] ? __alloc_fd+0x45/0x110
[1448647.353624]  [<ffffffff8103a64c>] do_fork+0x9c/0x280
[1448647.423532]  [<ffffffff811535f0>] ? get_unused_fd_flags+0x30/0x40
[1448647.497069]  [<ffffffff8114147f>] ? __do_pipe_flags+0x7f/0xc0
[1448647.568373]  [<ffffffff8115362b>] ? __fd_install+0x2b/0x60
[1448647.633917]  [<ffffffff8103a8b6>] SyS_clone+0x16/0x20
[1448647.697775]  [<ffffffff814c2429>] stub_clone+0x69/0x90
[1448647.758626]  [<ffffffff814c2182>] ? system_call_fastpath+0x16/0x1b
[1448647.818728] Code: 00 49 8b 50 08 4d 8b 28 49 8b 40 10 4d 85 ed 0f 84 f7 00 00 00 48 85 c0 0f 84 ee 00 00 00 49 63 44 24 20 48 8d 4a 01 49 8b 3c 24 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0f 0f 94 c0 84 c0 74 b5 49 
[1448647.948966] RIP  [<ffffffff8112b117>] kmem_cache_alloc+0x67/0x170
[1448648.021914]  RSP <ffff880667d43ad0>

Here is the same backtrace from crash:

crash> bt
PID: 27807  TASK: ffff8806628c3880  CPU: 11  COMMAND: "primary_nic_is_"
 #0 [ffff880667d43870] machine_kexec at ffffffff81029c72
 #1 [ffff880667d438c0] crash_kexec at ffffffff8108cf98
 #2 [ffff880667d43990] oops_end at ffffffff814bad28
 #3 [ffff880667d439c0] die at ffffffff81005758
 #4 [ffff880667d439f0] do_general_protection at ffffffff814ba80c
 #5 [ffff880667d43a20] general_protection at ffffffff814ba202
    [exception RIP: kmem_cache_alloc+103]
    RIP: ffffffff8112b117  RSP: ffff880667d43ad0  RFLAGS: 00010282
    RAX: 0000000000000000  RBX: ffffffff81a9c580  RCX: 000000007ecb996a
    RDX: 000000007ecb9969  RSI: 0000000000000020  RDI: 0000000000015900
    RBP: ffff880667d43b20   R8: ffff880667d55900   R9: ffffffff81a9e5a0
    R10: 00000000000043c7  R11: 000000003430080a  R12: ffff880c67003800
    R13: d17b94d6641aebfb  R14: ffffffff81412f2a  R15: 0000000000000020
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #6 [ffff880667d43b28] dst_alloc at ffffffff81412f2a
 #7 [ffff880667d43b78] rt_dst_alloc at ffffffff8143c08c
 #8 [ffff880667d43b88] ip_route_input_noref at ffffffff8143d6af
 #9 [ffff880667d43c48] ip_rcv_finish at ffffffff8143f98a
#10 [ffff880667d43c78] ip_rcv at ffffffff814400cb
#11 [ffff880667d43cb8] __netif_receive_skb_core at ffffffff8140aee2
#12 [ffff880667d43d28] __netif_receive_skb at ffffffff8140b091
#13 [ffff880667d43d48] netif_receive_skb at ffffffff8140b281
#14 [ffff880667d43d78] mlx4_en_process_rx_cq at ffffffffa05ff6da [mlx4_en]
#15 [ffff880667d43e18] mlx4_en_poll_rx_cq at ffffffffa05ffc2f [mlx4_en]
#16 [ffff880667d43e58] net_rx_action at ffffffff8140b989
#17 [ffff880667d43ec8] __do_softirq at ffffffff81043158
#18 [ffff880667d43f48] call_softirq at ffffffff814c333c
#19 [ffff880667d43f60] do_softirq at ffffffff81004105
#20 [ffff880667d43f80] irq_exit at ffffffff81043435
#21 [ffff880667d43f90] smp_apic_timer_interrupt at ffffffff814c394e
#22 [ffff880667d43fb0] apic_timer_interrupt at ffffffff814c2cca
--- <IRQ stack> ---
#23 [ffff880604371a88] apic_timer_interrupt at ffffffff814c2cca
    [exception RIP: vprintk_emit+470]
    RIP: ffffffff8103d8e6  RSP: ffff880604371b38  RFLAGS: 00000246
    RAX: 0000000000000000  RBX: 0000000000000092  RCX: ffff880667d4e9e0
    RDX: 0000000000000000  RSI: ffff880667d4ce68  RDI: ffff880667d4ce60
    RBP: ffff880604371ba8   R8: 0000000000000000   R9: 0000000000000000
    R10: 00000000000003c7  R11: 0000000000000001  R12: 0000000000000004
    R13: 0000000000000001  R14: 0000000000000036  R15: ffffffff81abcf00
    ORIG_RAX: ffffffffffffff10  CS: 0010  SS: 0018
#24 [ffff880604371bb0] printk at ffffffff814b103a
#25 [ffff880604371c10] print_oops_end_marker at ffffffff8103b313
#26 [ffff880604371c20] oops_exit at ffffffff8103b49f
#27 [ffff880604371c30] oops_end at ffffffff814baceb
#28 [ffff880604371c60] die at ffffffff81005758
#29 [ffff880604371c90] do_general_protection at ffffffff814ba80c
#30 [ffff880604371cc0] general_protection at ffffffff814ba202
    [exception RIP: kmem_cache_alloc+103]
    RIP: ffffffff8112b117  RSP: ffff880604371d70  RFLAGS: 00010282
    RAX: 0000000000000000  RBX: ffff8806628c3880  RCX: 000000007ecb996a
    RDX: 000000007ecb9969  RSI: 00000000000000d0  RDI: 0000000000015900
    RBP: ffff880604371dc0   R8: ffff880667d55900   R9: 0000000000000000
    R10: 0000000000000000  R11: 0000000000015ea8  R12: ffff880c67003800
    R13: d17b94d6641aebfb  R14: ffffffff81064d68  R15: 00000000000000d0
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
#31 [ffff880604371dc8] prepare_creds at ffffffff81064d68
#32 [ffff880604371de8] copy_creds at ffffffff81065436
#33 [ffff880604371e28] copy_process at ffffffff810393e0
#34 [ffff880604371eb8] do_fork at ffffffff8103a64c
#35 [ffff880604371f38] sys_clone at ffffffff8103a8b6
#36 [ffff880604371f48] stub_clone at ffffffff814c2429
    RIP: 0000003ef6abd8a6  RSP: 00007fff494ae490  RFLAGS: 00000246
    RAX: 0000000000000038  RBX: 00007fff494ae490  RCX: ffffffffffffffff
    RDX: 0000000000000000  RSI: 0000000000000000  RDI: 0000000001200011
    RBP: 00007fff494ae510   R8: 0000000000006c9f   R9: 00007f8018827700
    R10: 00007f80188279d0  R11: 0000000000000246  R12: 0000000000000000
    R13: 0000000000006c9f  R14: 0000003199954fe3  R15: 0000000000000001
    ORIG_RAX: 0000000000000038  CS: 0033  SS: 002b

So it looks to me like the first fault was in a clone system call
when prepare_creds() called kmem_cache_alloc(), then shortly afterward
I received a network packet and faulted again when dst_alloc() called
kmem_cache_alloc().  Both events happened on CPU 11.

Looking at the arguments passed into kmem_cache_alloc:

crash> print cred_jar
$13 = (struct kmem_cache *) 0xffff880c67003800
crash> print ipv4_dst_ops.kmem_cachep
$15 = (struct kmem_cache *) 0xffff880c67003800

Both are using the same kmem_cache pointer.

crash> struct kmem_cache 0xffff880c67003800
struct kmem_cache {
  cpu_slab = 0x15900, 
  flags = 1073741824, 
  min_partial = 5, 
  size = 192, 
  object_size = 192, 
  offset = 0, 
  cpu_partial = 30, 
  oo = {
    x = 65578
  }, 
  max = {
    x = 65578
  }, 
  min = {
    x = 21
  }, 
  allocflags = 16384, 
  refcount = 10, 
  ctor = 0, 
  inuse = 192, 
  align = 8, 
  reserved = 0, 
  name = 0xffff880c67001010 "kmalloc-192", 
  list = {
    next = 0xffff880c67003968, 
    prev = 0xffff880c67003768
  }, 
  kobj = {
    name = 0xffff880662b84860 ":t-0000192", 
    entry = {
      next = 0xffff880c67003980, 
      prev = 0xffff880c67003780
    }, 
    parent = 0xffff880662b5f078, 
    kset = 0xffff880662b5f060, 
    ktype = 0xffffffff81a4fda0, 
    sd = 0xffff880662b9f150, 
    kref = {
      refcount = {
        counter = 1
      }
    }, 
    state_initialized = 1, 
    state_in_sysfs = 1, 
    state_add_uevent_sent = 1, 
    state_remove_uevent_sent = 0, 
    uevent_suppress = 0
  }, 
  remote_node_defrag_ratio = 1000, 
  node = {0xffff880c67000f00, 0xffff880667800f00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x158e0, 0x40000000, 0x5, 0x8000000080, 0x1e00000000, 0x20, 0x20, 0x20, 0x700000000, 0x0, 0x800000080, 0x0, 0xffff880c67001060, 0xffff880c67003a68, 0xffff880c67003868, 0xffff880662b84890, 0xffff880c67003a80, 0xffff880c67003880, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662ba8000, 0x700000001, 0x3e8, 0xffff880c67000100, 0xffff880667800100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x158c0, 0x40000000, 0x5, 0x6000000060, 0x1e00000000, 0x2a, 0x2a, 0x2a, 0x100000000, 0x0, 0x800000060, 0x0, 0xffff880c67001000, 0xffff880c67003b68, 0xffff880c67003968, 0xffff880662b848c0, 0xffff880c67003b80, 0xffff880c67003980, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662ba8e70, 0x700000001, 0x3e8, 0xffff880c67000f40, 0xffff880667800f40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x158a0, 0x40000000, 0x5, 0x4000000040, 0x1e00000000, 0x40, 0x40, 0x40, 0xa00000000, 0x0, 0x800000040, 0x0, 0xffff880c67001050, 0xffff880c67003c68, 0xffff880c67003a68, 0xffff880662b848f0, 0xffff880c67003c80, 0xffff880c67003a80, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662ba9d20, 0x700000001, 0x3e8, 0xffff880c670000c0, 0xffff8806678000c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15880, 0x40000000, 0x5, 0x2000000020, 0x1e00000000, 0x80, 0x80, 0x80, 0x600000000, 0x0, 0x800000020, 0x0, 0xffff880c67001040, 0xffff880c67003d68, 0xffff880c67003b68, 0xffff880662b84920, 0xffff880c67003d80, 0xffff880c67003b80, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662baabd0, 0x700000001, 0x3e8, 0xffff880c67000f80, 0xffff880667800f80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15860, 0x40000000, 0x5, 0x1000000010, 0x1e00000000, 0x100, 0x100, 0x100, 0x100000000, 0x0, 0x800000010, 0x0, 0xffff880c67001030, 0xffff880c67003e68, 0xffff880c67003c68, 0xffff880662b84950, 0xffff880c67003e80, 0xffff880c67003c80, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662baba80, 0x700000001, 0x3e8, 0xffff880c67000080, 0xffff880667800080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15840, 0x40000000, 0x5, 0x800000008, 0x1e00000000, 0x200, 0x200, 0x200, 0x100000000, 0x0, 0x800000008, 0x0, 0xffff880c67001020, 0xffff880c67003f68, 0xffff880c67003d68, 0xffff880662b84980, 0xffff880c67003f80, 0xffff880c67003d80, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662bac930, 0x700000001, 0x3e8, 0xffff880c67000fc0, 0xffff880667800fc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15800, 0x40002000, 0x5, 0x4000000040, 0x1e00000000, 0x40, 0x40, 0x40, 0xffffffff00000000, 0x0, 0x4000000040, 0x0, 0xffffffff817a9ba4, 0xffff880c67002068, 0xffff880c67003e68, 0xffff880662b849b0, 0xffff880c67002080, 0xffff880c67003e80, 0xffff880662b5f078, 0xffff880662b5f060, 0xffffffff81a4fda0, 0xffff880662bad7e0, 0x700000001, 0x3e8, 0xffff880c67000000, 0xffff880667800000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c616d6b2d616d64, 0x343230312d636f6c, 0x0, 0x0, 0x6c616d6b2d616d64, 0x383430322d636f6c, 0x0, 0x0, 0x6c616d6b2d616d64, 0x363930342d636f6c, 0x0, 0x0, 0x6c616d6b2d616d64, 0x323931382d636f6c, 0x0, 0x0, 0x705f646572616873, 0x6f6e5f7963696c6f, 0x6564, 0x0, 0x3000000000, 0x0, 0x0, 0x0...}
}

The cpu_slab pointer doesn't look valid to me and maybe that is the
problem.
crash> struct kmem_cache_cpu 0x15900
struct: invalid kernel virtual address: 0x15900

Here is the disassembly of the crash with source lines with should
match a stock 3.10.16:

crash> dis -lr kmem_cache_alloc+103
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2406
0xffffffff8112b0b0 <kmem_cache_alloc>:  data32 data32 data32 xchg %ax,%ax
0xffffffff8112b0b5 <kmem_cache_alloc+5>:        push   %rbp
0xffffffff8112b0b6 <kmem_cache_alloc+6>:        mov    %rsp,%rbp
0xffffffff8112b0b9 <kmem_cache_alloc+9>:        push   %r15
0xffffffff8112b0bb <kmem_cache_alloc+11>:       mov    %esi,%r15d
0xffffffff8112b0be <kmem_cache_alloc+14>:       push   %r14
0xffffffff8112b0c0 <kmem_cache_alloc+16>:       push   %r13
0xffffffff8112b0c2 <kmem_cache_alloc+18>:       push   %r12
0xffffffff8112b0c4 <kmem_cache_alloc+20>:       mov    %rdi,%r12
0xffffffff8112b0c7 <kmem_cache_alloc+23>:       push   %rbx
0xffffffff8112b0c8 <kmem_cache_alloc+24>:       sub    $0x28,%rsp
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 924
0xffffffff8112b0cc <kmem_cache_alloc+28>:       mov    0x9930de(%rip),%eax        # 0xffffffff81abe1b0
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2407
0xffffffff8112b0d2 <kmem_cache_alloc+34>:       mov    0x8(%rbp),%r14
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 924
0xffffffff8112b0d6 <kmem_cache_alloc+38>:       and    %esi,%eax
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 926
0xffffffff8112b0d8 <kmem_cache_alloc+40>:       test   $0x10,%al
0xffffffff8112b0da <kmem_cache_alloc+42>:       jne    0xffffffff8112b1e8 <kmem_cache_alloc+312>
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2348
0xffffffff8112b0e0 <kmem_cache_alloc+48>:       mov    (%r12),%r8
0xffffffff8112b0e4 <kmem_cache_alloc+52>:       add    %gs:0xcc28,%r8
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2356
0xffffffff8112b0ed <kmem_cache_alloc+61>:       mov    0x8(%r8),%rdx
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2359
0xffffffff8112b0f1 <kmem_cache_alloc+65>:       mov    (%r8),%r13
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2360
0xffffffff8112b0f4 <kmem_cache_alloc+68>:       mov    0x10(%r8),%rax
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2361
0xffffffff8112b0f8 <kmem_cache_alloc+72>:       test   %r13,%r13
0xffffffff8112b0fb <kmem_cache_alloc+75>:       je     0xffffffff8112b1f8 <kmem_cache_alloc+328>
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2046
0xffffffff8112b101 <kmem_cache_alloc+81>:       test   %rax,%rax
0xffffffff8112b104 <kmem_cache_alloc+84>:       je     0xffffffff8112b1f8 <kmem_cache_alloc+328>
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 251
0xffffffff8112b10a <kmem_cache_alloc+90>:       movslq 0x20(%r12),%rax
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 1683
0xffffffff8112b10f <kmem_cache_alloc+95>:       lea    0x1(%rdx),%rcx
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 2379
0xffffffff8112b113 <kmem_cache_alloc+99>:       mov    (%r12),%rdi
/usr/src/debug/kernel-3.10.fc16/linux-3.10.16-1.rgm.fc16.x86_64/mm/slub.c: 251
0xffffffff8112b117 <kmem_cache_alloc+103>:      mov    0x0(%r13,%rax,1),%rbx

The crash utility also has some macros to analyze the SLAB caches but
the output doesn't mean much to me.  The only thing that stood out to
me was that CPU 11 appears that everything is allocated.  The full
output of that is below for the cache in question.  I'm guessing the
problem here was the bad cpu_slab pointer but beyond that I'm not
sure.

CACHE            NAME                 OBJSIZE  ALLOCATED     TOTAL  SLABS  SSIZE
ffff880c67003800 kmalloc-192              192       8867     14910    355     8k
CPU 0 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0031740e80  ffff880c5d03a000     0     40         40     0
  FREE / [ALLOCATED]
  [ffff880c5d03a000]
   ffff880c5d03a0c0  (cpu 0 cache)
   ffff880c5d03a180  (cpu 0 cache)
   ffff880c5d03a240  (cpu 0 cache)
  [ffff880c5d03a300]
  [ffff880c5d03a3c0]
   ffff880c5d03a480  (cpu 0 cache)
   ffff880c5d03a540  (cpu 0 cache)
  [ffff880c5d03a600]
   ffff880c5d03a6c0  (cpu 0 cache)
   ffff880c5d03a780  (cpu 0 cache)
   ffff880c5d03a840  (cpu 0 cache)
   ffff880c5d03a900  (cpu 0 cache)
   ffff880c5d03a9c0  (cpu 0 cache)
  [ffff880c5d03aa80]
   ffff880c5d03ab40  (cpu 0 cache)
  [ffff880c5d03ac00]
  [ffff880c5d03acc0]
  [ffff880c5d03ad80]
   ffff880c5d03ae40  (cpu 0 cache)
   ffff880c5d03af00  (cpu 0 cache)
   ffff880c5d03afc0  (cpu 0 cache)
  [ffff880c5d03b080]
   ffff880c5d03b140  (cpu 0 cache)
   ffff880c5d03b200  (cpu 0 cache)
   ffff880c5d03b2c0  (cpu 0 cache)
   ffff880c5d03b380  (cpu 0 cache)
   ffff880c5d03b440  (cpu 0 cache)
  [ffff880c5d03b500]
   ffff880c5d03b5c0  (cpu 0 cache)
   ffff880c5d03b680  (cpu 0 cache)
  [ffff880c5d03b740]
  [ffff880c5d03b800]
   ffff880c5d03b8c0  (cpu 0 cache)
   ffff880c5d03b980  (cpu 0 cache)
   ffff880c5d03ba40  (cpu 0 cache)
   ffff880c5d03bb00  (cpu 0 cache)
   ffff880c5d03bbc0  (cpu 0 cache)
  [ffff880c5d03bc80]
  [ffff880c5d03bd40]
CPU 1 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea001311d080  ffff8804c4742000     1     29         29     0
  FREE / [ALLOCATED]
  [ffff8804c4742000]
   ffff8804c47420c0  (cpu 1 cache)
   ffff8804c4742180  (cpu 1 cache)
  [ffff8804c4742240]
  [ffff8804c4742300]
  [ffff8804c47423c0]
  [ffff8804c4742480]
   ffff8804c4742540  (cpu 1 cache)
   ffff8804c4742600  (cpu 1 cache)
  [ffff8804c47426c0]
  [ffff8804c4742780]
   ffff8804c4742840  (cpu 1 cache)
   ffff8804c4742900  (cpu 1 cache)
  [ffff8804c47429c0]
   ffff8804c4742a80  (cpu 1 cache)
   ffff8804c4742b40  (cpu 1 cache)
   ffff8804c4742c00  (cpu 1 cache)
  [ffff8804c4742cc0]
   ffff8804c4742d80  (cpu 1 cache)
   ffff8804c4742e40  (cpu 1 cache)
  [ffff8804c4742f00]
  [ffff8804c4742fc0]
   ffff8804c4743080  (cpu 1 cache)
   ffff8804c4743140  (cpu 1 cache)
   ffff8804c4743200  (cpu 1 cache)
   ffff8804c47432c0  (cpu 1 cache)
   ffff8804c4743380  (cpu 1 cache)
  [ffff8804c4743440]
  [ffff8804c4743500]
CPU 2 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea003161b980  ffff880c586e6000     0     37         37     0
  FREE / [ALLOCATED]
  [ffff880c586e6000]
   ffff880c586e60c0  (cpu 2 cache)
   ffff880c586e6180  (cpu 2 cache)
  [ffff880c586e6240]
   ffff880c586e6300  (cpu 2 cache)
   ffff880c586e63c0  (cpu 2 cache)
   ffff880c586e6480  (cpu 2 cache)
  [ffff880c586e6540]
   ffff880c586e6600  (cpu 2 cache)
  [ffff880c586e66c0]
   ffff880c586e6780  (cpu 2 cache)
   ffff880c586e6840  (cpu 2 cache)
   ffff880c586e6900  (cpu 2 cache)
   ffff880c586e69c0  (cpu 2 cache)
  [ffff880c586e6a80]
   ffff880c586e6b40  (cpu 2 cache)
   ffff880c586e6c00  (cpu 2 cache)
   ffff880c586e6cc0  (cpu 2 cache)
   ffff880c586e6d80  (cpu 2 cache)
   ffff880c586e6e40  (cpu 2 cache)
   ffff880c586e6f00  (cpu 2 cache)
   ffff880c586e6fc0  (cpu 2 cache)
  [ffff880c586e7080]
  [ffff880c586e7140]
   ffff880c586e7200  (cpu 2 cache)
   ffff880c586e72c0  (cpu 2 cache)
   ffff880c586e7380  (cpu 2 cache)
   ffff880c586e7440  (cpu 2 cache)
   ffff880c586e7500  (cpu 2 cache)
   ffff880c586e75c0  (cpu 2 cache)
   ffff880c586e7680  (cpu 2 cache)
   ffff880c586e7740  (cpu 2 cache)
   ffff880c586e7800  (cpu 2 cache)
   ffff880c586e78c0  (cpu 2 cache)
   ffff880c586e7980  (cpu 2 cache)
   ffff880c586e7a40  (cpu 2 cache)
   ffff880c586e7b00  (cpu 2 cache)
CPU 3 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea001270b280  ffff88049c2ca000     1     16         16     0
  FREE / [ALLOCATED]
   ffff88049c2ca000  (cpu 3 cache)
  [ffff88049c2ca0c0]
  [ffff88049c2ca180]
  [ffff88049c2ca240]
   ffff88049c2ca300  (cpu 3 cache)
  [ffff88049c2ca3c0]
   ffff88049c2ca480  (cpu 3 cache)
  [ffff88049c2ca540]
  [ffff88049c2ca600]
  [ffff88049c2ca6c0]
   ffff88049c2ca780  (cpu 3 cache)
  [ffff88049c2ca840]
   ffff88049c2ca900  (cpu 3 cache)
  [ffff88049c2ca9c0]
  [ffff88049c2caa80]
   ffff88049c2cab40  (cpu 3 cache)
CPU 4 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea002f0ab780  ffff880bc2ade000     0      7          7     0
  FREE / [ALLOCATED]
  [ffff880bc2ade000]
  [ffff880bc2ade0c0]
  [ffff880bc2ade180]
  [ffff880bc2ade240]
  [ffff880bc2ade300]
  [ffff880bc2ade3c0]
   ffff880bc2ade480  (cpu 4 cache)
CPU 5 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0012702780  ffff88049c09e000     1     12         12     0
  FREE / [ALLOCATED]
  [ffff88049c09e000]
  [ffff88049c09e0c0]
  [ffff88049c09e180]
   ffff88049c09e240  (cpu 5 cache)
  [ffff88049c09e300]
  [ffff88049c09e3c0]
  [ffff88049c09e480]
  [ffff88049c09e540]
  [ffff88049c09e600]
  [ffff88049c09e6c0]
   ffff88049c09e780  (cpu 5 cache)
   ffff88049c09e840  (cpu 5 cache)
CPU 6 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0031728880  ffff880c5ca22000     0     31         31     0
  FREE / [ALLOCATED]
  [ffff880c5ca22000]
   ffff880c5ca220c0  (cpu 6 cache)
   ffff880c5ca22180  (cpu 6 cache)
   ffff880c5ca22240  (cpu 6 cache)
   ffff880c5ca22300  (cpu 6 cache)
   ffff880c5ca223c0  (cpu 6 cache)
   ffff880c5ca22480  (cpu 6 cache)
   ffff880c5ca22540  (cpu 6 cache)
   ffff880c5ca22600  (cpu 6 cache)
  [ffff880c5ca226c0]
   ffff880c5ca22780  (cpu 6 cache)
  [ffff880c5ca22840]
  [ffff880c5ca22900]
   ffff880c5ca229c0  (cpu 6 cache)
  [ffff880c5ca22a80]
   ffff880c5ca22b40  (cpu 6 cache)
   ffff880c5ca22c00  (cpu 6 cache)
   ffff880c5ca22cc0  (cpu 6 cache)
  [ffff880c5ca22d80]
   ffff880c5ca22e40  (cpu 6 cache)
  [ffff880c5ca22f00]
   ffff880c5ca22fc0  (cpu 6 cache)
  [ffff880c5ca23080]
  [ffff880c5ca23140]
   ffff880c5ca23200  (cpu 6 cache)
   ffff880c5ca232c0  (cpu 6 cache)
   ffff880c5ca23380  (cpu 6 cache)
   ffff880c5ca23440  (cpu 6 cache)
   ffff880c5ca23500  (cpu 6 cache)
   ffff880c5ca235c0  (cpu 6 cache)
   ffff880c5ca23680  (cpu 6 cache)
CPU 7 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea003184aa00  ffff880c612a8000     0     19         19     0
  FREE / [ALLOCATED]
  [ffff880c612a8000]
   ffff880c612a80c0  (cpu 7 cache)
  [ffff880c612a8180]
   ffff880c612a8240  (cpu 7 cache)
  [ffff880c612a8300]
  [ffff880c612a83c0]
  [ffff880c612a8480]
  [ffff880c612a8540]
   ffff880c612a8600  (cpu 7 cache)
   ffff880c612a86c0  (cpu 7 cache)
  [ffff880c612a8780]
  [ffff880c612a8840]
  [ffff880c612a8900]
  [ffff880c612a89c0]
  [ffff880c612a8a80]
  [ffff880c612a8b40]
   ffff880c612a8c00  (cpu 7 cache)
  [ffff880c612a8cc0]
   ffff880c612a8d80  (cpu 7 cache)
CPU 8 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea001812c880  ffff880604b22000     1     31         31     0
  FREE / [ALLOCATED]
  [ffff880604b22000]
   ffff880604b220c0  (cpu 8 cache)
   ffff880604b22180  (cpu 8 cache)
   ffff880604b22240  (cpu 8 cache)
   ffff880604b22300  (cpu 8 cache)
   ffff880604b223c0  (cpu 8 cache)
   ffff880604b22480  (cpu 8 cache)
  [ffff880604b22540]
   ffff880604b22600  (cpu 8 cache)
  [ffff880604b226c0]
  [ffff880604b22780]
  [ffff880604b22840]
  [ffff880604b22900]
   ffff880604b229c0  (cpu 8 cache)
  [ffff880604b22a80]
   ffff880604b22b40  (cpu 8 cache)
  [ffff880604b22c00]
   ffff880604b22cc0  (cpu 8 cache)
  [ffff880604b22d80]
  [ffff880604b22e40]
  [ffff880604b22f00]
   ffff880604b22fc0  (cpu 8 cache)
   ffff880604b23080  (cpu 8 cache)
   ffff880604b23140  (cpu 8 cache)
  [ffff880604b23200]
   ffff880604b232c0  (cpu 8 cache)
  [ffff880604b23380]
  [ffff880604b23440]
   ffff880604b23500  (cpu 8 cache)
   ffff880604b235c0  (cpu 8 cache)
   ffff880604b23680  (cpu 8 cache)
CPU 9 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0015fa6700  ffff88057e99c000     1     26         26     0
  FREE / [ALLOCATED]
  [ffff88057e99c000]
  [ffff88057e99c0c0]
   ffff88057e99c180  (cpu 9 cache)
  [ffff88057e99c240]
  [ffff88057e99c300]
   ffff88057e99c3c0  (cpu 9 cache)
   ffff88057e99c480  (cpu 9 cache)
   ffff88057e99c540  (cpu 9 cache)
   ffff88057e99c600  (cpu 9 cache)
  [ffff88057e99c6c0]
   ffff88057e99c780  (cpu 9 cache)
   ffff88057e99c840  (cpu 9 cache)
  [ffff88057e99c900]
  [ffff88057e99c9c0]
   ffff88057e99ca80  (cpu 9 cache)
  [ffff88057e99cb40]
  [ffff88057e99cc00]
   ffff88057e99ccc0  (cpu 9 cache)
  [ffff88057e99cd80]
  [ffff88057e99ce40]
   ffff88057e99cf00  (cpu 9 cache)
  [ffff88057e99cfc0]
  [ffff88057e99d080]
   ffff88057e99d140  (cpu 9 cache)
   ffff88057e99d200  (cpu 9 cache)
  [ffff88057e99d2c0]
CPU 10 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea002fb1c480  ffff880bec712000     0     40         40     0
  FREE / [ALLOCATED]
   ffff880bec712000  (cpu 10 cache)
   ffff880bec7120c0  (cpu 10 cache)
   ffff880bec712180  (cpu 10 cache)
   ffff880bec712240  (cpu 10 cache)
   ffff880bec712300  (cpu 10 cache)
  [ffff880bec7123c0]
   ffff880bec712480  (cpu 10 cache)
   ffff880bec712540  (cpu 10 cache)
   ffff880bec712600  (cpu 10 cache)
  [ffff880bec7126c0]
   ffff880bec712780  (cpu 10 cache)
   ffff880bec712840  (cpu 10 cache)
   ffff880bec712900  (cpu 10 cache)
  [ffff880bec7129c0]
  [ffff880bec712a80]
  [ffff880bec712b40]
  [ffff880bec712c00]
   ffff880bec712cc0  (cpu 10 cache)
  [ffff880bec712d80]
   ffff880bec712e40  (cpu 10 cache)
  [ffff880bec712f00]
  [ffff880bec712fc0]
  [ffff880bec713080]
   ffff880bec713140  (cpu 10 cache)
  [ffff880bec713200]
   ffff880bec7132c0  (cpu 10 cache)
   ffff880bec713380  (cpu 10 cache)
  [ffff880bec713440]
   ffff880bec713500  (cpu 10 cache)
   ffff880bec7135c0  (cpu 10 cache)
   ffff880bec713680  (cpu 10 cache)
   ffff880bec713740  (cpu 10 cache)
   ffff880bec713800  (cpu 10 cache)
   ffff880bec7138c0  (cpu 10 cache)
   ffff880bec713980  (cpu 10 cache)
   ffff880bec713a40  (cpu 10 cache)
  [ffff880bec713b00]
   ffff880bec713bc0  (cpu 10 cache)
   ffff880bec713c80  (cpu 10 cache)
   ffff880bec713d40  (cpu 10 cache)
CPU 11 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0029197f80  ffff880a465fe000     0     40         40     0
  FREE / [ALLOCATED]
  [ffff880a465fe000]
  [ffff880a465fe0c0]
  [ffff880a465fe180]
  [ffff880a465fe240]
  [ffff880a465fe300]
  [ffff880a465fe3c0]
  [ffff880a465fe480]
  [ffff880a465fe540]
  [ffff880a465fe600]
  [ffff880a465fe6c0]
  [ffff880a465fe780]
  [ffff880a465fe840]
  [ffff880a465fe900]
  [ffff880a465fe9c0]
  [ffff880a465fea80]
  [ffff880a465feb40]
  [ffff880a465fec00]
  [ffff880a465fecc0]
  [ffff880a465fed80]
  [ffff880a465fee40]
  [ffff880a465fef00]
  [ffff880a465fefc0]
  [ffff880a465ff080]
  [ffff880a465ff140]
  [ffff880a465ff200]
  [ffff880a465ff2c0]
  [ffff880a465ff380]
  [ffff880a465ff440]
  [ffff880a465ff500]
  [ffff880a465ff5c0]
  [ffff880a465ff680]
  [ffff880a465ff740]
  [ffff880a465ff800]
  [ffff880a465ff8c0]
  [ffff880a465ff980]
  [ffff880a465ffa40]
  [ffff880a465ffb00]
  [ffff880a465ffbc0]
  [ffff880a465ffc80]
  [ffff880a465ffd40]
CPU 12 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0030443280  ffff880c110ca000     0     34         34     0
  FREE / [ALLOCATED]
   ffff880c110ca000  (cpu 12 cache)
   ffff880c110ca0c0  (cpu 12 cache)
  [ffff880c110ca180]
   ffff880c110ca240  (cpu 12 cache)
   ffff880c110ca300  (cpu 12 cache)
   ffff880c110ca3c0  (cpu 12 cache)
   ffff880c110ca480  (cpu 12 cache)
   ffff880c110ca540  (cpu 12 cache)
   ffff880c110ca600  (cpu 12 cache)
   ffff880c110ca6c0  (cpu 12 cache)
   ffff880c110ca780  (cpu 12 cache)
   ffff880c110ca840  (cpu 12 cache)
  [ffff880c110ca900]
  [ffff880c110ca9c0]
  [ffff880c110caa80]
  [ffff880c110cab40]
   ffff880c110cac00  (cpu 12 cache)
   ffff880c110cacc0  (cpu 12 cache)
   ffff880c110cad80  (cpu 12 cache)
   ffff880c110cae40  (cpu 12 cache)
   ffff880c110caf00  (cpu 12 cache)
  [ffff880c110cafc0]
   ffff880c110cb080  (cpu 12 cache)
   ffff880c110cb140  (cpu 12 cache)
  [ffff880c110cb200]
   ffff880c110cb2c0  (cpu 12 cache)
   ffff880c110cb380  (cpu 12 cache)
   ffff880c110cb440  (cpu 12 cache)
   ffff880c110cb500  (cpu 12 cache)
   ffff880c110cb5c0  (cpu 12 cache)
   ffff880c110cb680  (cpu 12 cache)
   ffff880c110cb740  (cpu 12 cache)
   ffff880c110cb800  (cpu 12 cache)
   ffff880c110cb8c0  (cpu 12 cache)
CPU 13 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0018068100  ffff880601a04000     1     32         32     0
  FREE / [ALLOCATED]
  [ffff880601a04000]
   ffff880601a040c0  (cpu 13 cache)
  [ffff880601a04180]
  [ffff880601a04240]
   ffff880601a04300  (cpu 13 cache)
  [ffff880601a043c0]
  [ffff880601a04480]
  [ffff880601a04540]
  [ffff880601a04600]
  [ffff880601a046c0]
  [ffff880601a04780]
  [ffff880601a04840]
  [ffff880601a04900]
  [ffff880601a049c0]
  [ffff880601a04a80]
  [ffff880601a04b40]
  [ffff880601a04c00]
   ffff880601a04cc0  (cpu 13 cache)
  [ffff880601a04d80]
  [ffff880601a04e40]
  [ffff880601a04f00]
  [ffff880601a04fc0]
  [ffff880601a05080]
  [ffff880601a05140]
  [ffff880601a05200]
  [ffff880601a052c0]
  [ffff880601a05380]
   ffff880601a05440  (cpu 13 cache)
  [ffff880601a05500]
   ffff880601a055c0  (cpu 13 cache)
  [ffff880601a05680]
  [ffff880601a05740]
CPU 14 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0031535c80  ffff880c54d72000     0     37         37     0
  FREE / [ALLOCATED]
   ffff880c54d72000  (cpu 14 cache)
   ffff880c54d720c0  (cpu 14 cache)
   ffff880c54d72180  (cpu 14 cache)
  [ffff880c54d72240]
   ffff880c54d72300  (cpu 14 cache)
   ffff880c54d723c0  (cpu 14 cache)
   ffff880c54d72480  (cpu 14 cache)
   ffff880c54d72540  (cpu 14 cache)
  [ffff880c54d72600]
   ffff880c54d726c0  (cpu 14 cache)
   ffff880c54d72780  (cpu 14 cache)
   ffff880c54d72840  (cpu 14 cache)
   ffff880c54d72900  (cpu 14 cache)
   ffff880c54d729c0  (cpu 14 cache)
   ffff880c54d72a80  (cpu 14 cache)
   ffff880c54d72b40  (cpu 14 cache)
   ffff880c54d72c00  (cpu 14 cache)
   ffff880c54d72cc0  (cpu 14 cache)
   ffff880c54d72d80  (cpu 14 cache)
   ffff880c54d72e40  (cpu 14 cache)
   ffff880c54d72f00  (cpu 14 cache)
   ffff880c54d72fc0  (cpu 14 cache)
   ffff880c54d73080  (cpu 14 cache)
   ffff880c54d73140  (cpu 14 cache)
   ffff880c54d73200  (cpu 14 cache)
   ffff880c54d732c0  (cpu 14 cache)
   ffff880c54d73380  (cpu 14 cache)
   ffff880c54d73440  (cpu 14 cache)
   ffff880c54d73500  (cpu 14 cache)
   ffff880c54d735c0  (cpu 14 cache)
   ffff880c54d73680  (cpu 14 cache)
   ffff880c54d73740  (cpu 14 cache)
   ffff880c54d73800  (cpu 14 cache)
   ffff880c54d738c0  (cpu 14 cache)
  [ffff880c54d73980]
   ffff880c54d73a40  (cpu 14 cache)
   ffff880c54d73b00  (cpu 14 cache)
CPU 15 SLAB:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0018064800  ffff880601920000     1     17         17     0
  FREE / [ALLOCATED]
  [ffff880601920000]
   ffff8806019200c0  (cpu 15 cache)
  [ffff880601920180]
  [ffff880601920240]
  [ffff880601920300]
  [ffff8806019203c0]
  [ffff880601920480]
  [ffff880601920540]
  [ffff880601920600]
  [ffff8806019206c0]
  [ffff880601920780]
  [ffff880601920840]
  [ffff880601920900]
  [ffff8806019209c0]
  [ffff880601920a80]
  [ffff880601920b40]
  [ffff880601920c00]
KMEM_CACHE_NODE   NODE  SLABS  PARTIAL  PER-CPU
ffff880c67000f00     0    118       16        9
NODE 0 PARTIAL:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0031611f80  ffff880c5847e000     0      2          2     0
  ffffea00295f5600  ffff880a57d58000     0     13         13     0
  ffffea00315b4a80  ffff880c56d2a000     0     37         37     0
  ffffea002d703080  ffff880b5c0c2000     0      1          1     0
  ffffea0031608c80  ffff880c58232000     0      1          1     0
  ffffea00318ab980  ffff880c62ae6000     0      9          9     0
  ffffea0031721800  ffff880c5c860000     0     12         12     0
  ffffea0031745d80  ffff880c5d176000     0      4          4     0
  ffffea003161ae80  ffff880c586ba000     0      4          4     0
  ffffea00318f8f00  ffff880c63e3c000     0      5          5     0
  ffffea003176c680  ffff880c5db1a000     0      1          1     0
  ffffea0031899e00  ffff880c62678000     0      5          5     0
  ffffea00318f6f00  ffff880c63dbc000     0     36         36     0
  ffffea0029196d00  ffff880a465b4000     0      2          2     0
  ffffea002f0a6c00  ffff880bc29b0000     0      2          2     0
  ffffea0029107f80  ffff880a441fe000     0      1          1     0
NODE 0 FULL:
  (not tracked)
KMEM_CACHE_NODE   NODE  SLABS  PARTIAL  PER-CPU
ffff880667800f00     1    237      140        7
NODE 1 PARTIAL:
  SLAB              MEMORY            NODE  TOTAL  ALLOCATED  FREE
  ffffea0011484c80  ffff880452132000     1      0          0     0
  ffffea0012727d80  ffff88049c9f6000     1      0          0     0
  ffffea000d770080  ffff88035dc02000     1      0          0     0
  ffffea00181c1b80  ffff88060706e000     1      0          0     0
  ffffea001311b880  ffff8804c46e2000     1     26         26     0
  ffffea0012632780  ffff880498c9e000     1      0          0     0
  ffffea00181ab880  ffff880606ae2000     1      1          1     0
  ffffea001825d380  ffff88060974e000     1     13         13     0
  ffffea00198ee080  ffff880663b82000     1      5          5     0
  ffffea0011485780  ffff88045215e000     1      1          1     0
  ffffea0018131800  ffff880604c60000     1      2          2     0
  ffffea000d8c9680  ffff88036325a000     1      2          2     0
  ffffea00180b9380  ffff880602e4e000     1      1          1     0
  ffffea0019878280  ffff880661e0a000     1      9          9     0
  ffffea0019926400  ffff880664990000     1     25         25     0
  ffffea00198b6780  ffff880662d9e000     1     40         40     0
  ffffea00198bfb00  ffff880662fec000     1     22         22     0
  ffffea001812a880  ffff880604aa2000     1      4          4     0
  ffffea00198eca00  ffff880663b28000     1     12         12     0
  ffffea000d3a7800  ffff88034e9e0000     1      1          1     0
  ffffea0019896180  ffff880662586000     1     11         11     0
  ffffea0019853200  ffff8806614c8000     1      2          2     0
  ffffea0011483200  ffff8804520c8000     1      2          2     0
  ffffea0019858000  ffff880661600000     1      3          3     0
  ffffea001148ff80  ffff8804523fe000     1     11         11     0
  ffffea000d3ac080  ffff88034eb02000     1      1          1     0
  ffffea0015fa8a80  ffff88057ea2a000     1      2          2     0
  ffffea0019851c80  ffff880661472000     1     32         32     0
  ffffea0018068880  ffff880601a22000     1      2          2     0
  ffffea0019901000  ffff880664040000     1     15         15     0
  ffffea0018167280  ffff8806059ca000     1      1          1     0
  ffffea001148bd80  ffff8804522f6000     1      2          2     0
  ffffea0019896d80  ffff8806625b6000     1      3          3     0
  ffffea0018094900  ffff880602524000     1      7          7     0
  ffffea00180bdd00  ffff880602f74000     1      2          2     0
  ffffea00181d6200  ffff880607588000     1     13         13     0
  ffffea0019925c80  ffff880664972000     1     34         34     0
  ffffea0012722600  ffff88049c898000     1      1          1     0
  ffffea001817cc80  ffff880605f32000     1      2          2     0
  ffffea0019852f00  ffff8806614bc000     1      2          2     0
  ffffea0018091000  ffff880602440000     1      1          1     0
  ffffea0012729e00  ffff88049ca78000     1      1          1     0
  ffffea001813df00  ffff880604f7c000     1      1          1     0
  ffffea001818e480  ffff880606392000     1      1          1     0
  ffffea001263d600  ffff880498f58000     1      1          1     0
  ffffea000d6e8c00  ffff88035ba30000     1      1          1     0
  ffffea001270fc80  ffff88049c3f2000     1      2          2     0
  ffffea0011f96700  ffff88047e59c000     1      1          1     0
  ffffea00180dd680  ffff88060375a000     1      1          1     0
  ffffea000d6e2600  ffff88035b898000     1      1          1     0
  ffffea00180ef080  ffff880603bc2000     1      1          1     0
  ffffea0018102000  ffff880604080000     1      2          2     0
  ffffea001810d900  ffff880604364000     1      1          1     0
  ffffea0011f98000  ffff88047e600000     1      1          1     0
  ffffea001812ca00  ffff880604b28000     1      2          2     0
  ffffea00067d7600  ffff88019f5d8000     1      2          2     0
  ffffea00180e9b00  ffff880603a6c000     1      2          2     0
  ffffea0018158f00  ffff88060563c000     1      1          1     0
  ffffea00181dc800  ffff880607720000     1      1          1     0
  ffffea00180e2e80  ffff8806038ba000     1      1          1     0
  ffffea00180b8080  ffff880602e02000     1      3          3     0
  ffffea0018118b00  ffff88060462c000     1      2          2     0
  ffffea0018193f00  ffff8806064fc000     1      1          1     0
  ffffea001270c500  ffff88049c314000     1      2          2     0
  ffffea001811d500  ffff880604754000     1      1          1     0
  ffffea001983e300  ffff880660f8c000     1     16         16     0
  ffffea0019901e80  ffff88066407a000     1     17         17     0
  ffffea0018060f00  ffff88060183c000     1      5          5     0
  ffffea000d3a5700  ffff88034e95c000     1      7          7     0
  ffffea00180b7400  ffff880602dd0000     1      2          2     0
  ffffea0012425400  ffff880490950000     1      1          1     0
  ffffea001806bb00  ffff880601aec000     1      1          1     0
  ffffea0018083b00  ffff8806020ec000     1      1          1     0
  ffffea00180f9400  ffff880603e50000     1      1          1     0
  ffffea0011484b80  ffff88045212e000     1      1          1     0
  ffffea00181a5b80  ffff88060696e000     1      1          1     0
  ffffea00181ec180  ffff880607b06000     1      1          1     0
  ffffea0019852780  ffff88066149e000     1      2          2     0
  ffffea00180dc180  ffff880603706000     1      1          1     0
  ffffea00067d5200  ffff88019f548000     1      1          1     0
  ffffea0015fa4100  ffff88057e904000     1      1          1     0
  ffffea00067d3180  ffff88019f4c6000     1      1          1     0
  ffffea0013fad680  ffff8804feb5a000     1      1          1     0
  ffffea0013fa0180  ffff8804fe806000     1      2          2     0
  ffffea0018064e80  ffff88060193a000     1      1          1     0
  ffffea0018176580  ffff880605d96000     1      1          1     0
  ffffea00067d5280  ffff88019f54a000     1      1          1     0
  ffffea0018107d80  ffff8806041f6000     1      1          1     0
  ffffea001311dc00  ffff8804c4770000     1      1          1     0
  ffffea000d779e00  ffff88035de78000     1      1          1     0
  ffffea001815e100  ffff880605784000     1      1          1     0
  ffffea0013faea00  ffff8804feba8000     1      1          1     0
  ffffea0018177d80  ffff880605df6000     1      1          1     0
  ffffea00067d3c00  ffff88019f4f0000     1      2          2     0
  ffffea001813c780  ffff880604f1e000     1      1          1     0
  ffffea0018084200  ffff880602108000     1      2          2     0
  ffffea0012635700  ffff880498d5c000     1      1          1     0
  ffffea0012717500  ffff88049c5d4000     1      1          1     0
  ffffea001242ea00  ffff880490ba8000     1      1          1     0
  ffffea000d6e7f00  ffff88035b9fc000     1      1          1     0
  ffffea001810d480  ffff880604352000     1      2          2     0
  ffffea001270eb00  ffff88049c3ac000     1      1          1     0
  ffffea001818db80  ffff88060636e000     1      1          1     0
  ffffea00067d6700  ffff88019f59c000     1      2          2     0
  ffffea0013fa0380  ffff8804fe80e000     1      2          2     0
  ffffea00181ad780  ffff880606b5e000     1      1          1     0
  ffffea0013fa6600  ffff8804fe998000     1      1          1     0
  ffffea000d3adc80  ffff88034eb72000     1      1          1     0
  ffffea0011f9cf80  ffff88047e73e000     1      3          3     0
  ffffea0012729100  ffff88049ca44000     1      1          1     0
  ffffea0013fae480  ffff8804feb92000     1      2          2     0
  ffffea00198d2e80  ffff8806634ba000     1      3          3     0
  ffffea0018194180  ffff880606506000     1      1          1     0
  ffffea0011f91a00  ffff88047e468000     1      1          1     0
  ffffea00180f7900  ffff880603de4000     1      1          1     0
  ffffea0018136280  ffff880604d8a000     1      1          1     0
  ffffea001987b500  ffff880661ed4000     1     18         18     0
  ffffea00181c7b80  ffff8806071ee000     1      2          2     0
  ffffea000d6e5000  ffff88035b940000     1      3          3     0
  ffffea0018172880  ffff880605ca2000     1     20         20     0
  ffffea0012632700  ffff880498c9c000     1      2          2     0
  ffffea0018151b80  ffff88060546e000     1      2          2     0
  ffffea0018119000  ffff880604640000     1      4          4     0
  ffffea00181aa600  ffff880606a98000     1      1          1     0
  ffffea00180f7f00  ffff880603dfc000     1      2          2     0
  ffffea00180dc200  ffff880603708000     1      1          1     0
  ffffea0018240800  ffff880609020000     1     18         18     0
  ffffea00198d5080  ffff880663542000     1      1          1     0
  ffffea00180cf080  ffff8806033c2000     1      1          1     0
  ffffea00198e3a80  ffff8806638ea000     1     17         17     0
  ffffea0018074380  ffff880601d0e000     1      1          1     0
  ffffea001807c900  ffff880601f24000     1      1          1     0
  ffffea0018144a00  ffff880605128000     1      2          2     0
  ffffea001148af80  ffff8804522be000     1      1          1     0
  ffffea0012422800  ffff8804908a0000     1     10         10     0
  ffffea000d8c7a80  ffff8803631ea000     1      1          1     0
  ffffea00180c5e00  ffff880603178000     1      2          2     0
  ffffea00180dcf80  ffff88060373e000     1      1          1     0
  ffffea001814ec80  ffff8806053b2000     1     32         32     0
  ffffea0019899e80  ffff88066267a000     1      4          4     0
NODE 1 FULL:
  (not tracked)

Thanks,
Shawn

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCH net-next] ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE
From: Hannes Frederic Sowa @ 2013-11-04 23:25 UTC (permalink / raw)
  To: David Miller, netdev, fweimer
In-Reply-To: <20131031094226.GB17210@order.stressinduktion.org>

Hi David!

On Thu, Oct 31, 2013 at 10:42:26AM +0100, Hannes Frederic Sowa wrote:
> On Thu, Oct 31, 2013 at 12:29:11AM -0400, David Miller wrote:
> > From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> > Date: Wed, 30 Oct 2013 23:58:51 +0100
> > 
> > > DNS resolver can fallback to TCP for querying where we can honour the
> > > path MTU because it won't do any harm and ensures connectivity.
> > > 
> > > Also for TCP the socket is matched on the whole 4-tuple and we may
> > > fallback to a 2-tuple lookup on unconnected UDP sockets. The new socket
> > > option would let an application programmer choose to do path mtu discovery
> > > because it knows it will only use a connected socket. On unconnected
> > > sockets one can specify IP_PMTUDISC_INTERFACE to suppress the path MTU
> > > updates and always use the interface MTU without the DF-bit set.
> > 
> > This still sounds like a route scope policy with two binary states,
> > one for connected sockets and one for unconnected ones.
> 
> Orthogonally a user may want to decide per protocol. Path MTU discovery
> may happen on protocols where I have protection against fragment poisoning
> because of the TCP 3-WHS and want to drop path mtu discovery information
> on simple UDP request-response protocols even if they are used in
> connected state (this is the specific case I want to protect in DNS).
> 
> Do we accept path MTU information if we just send a spoofed TCP SYN
> request and then just fire a spoofed ICMP path mtu packet afterwards? I
> guess (I really have not checked), yes. If the UDP stack would use this
> information we again generate fragments and are vulnerable to UDP based
> cache poisoning attacks. So when can we really say we can match and
> trust the full socket ID?
> 
> Please note, dropping the path MTU on those sockets is merely an
> optimization.  All I care about is that we don't fragment packets locally
> and have the possibility to not set the DF-bit (so IP_PMTUDISC_PROBE
> without DF). I could very well remove the ip_sk_accept_pmtu logic from
> the patch.
> 
> I still think this patch is the reasonable way to solve this problem. If
> you still think it should be on a per-route basis I will look down on
> how this can be achieved but would focus on multiplexing the MTU per
> protocol somehow.

Sorry for being so pushy about this patch! :|

I did a proof of concept of a per-route setting to suppress local
datagram fragmentation. It does work and would solve the problem. I did
not find a clean way to deal with sockets already using IP_MTU_DISCOVER,
so I just overwrite the setting and fallback to the safe mode and don't
allow local fragmentation (but I don't touch the DF-flag). This could have
implications to applications which already set a policy for their sockets
and expect a certain behaviour (e.g. traceroute in some circumstances). I
don't like the approach, but I would like to see this problem solved. If
you would accept this patch I would retest and do a clean submission
(with the iproute2 bits) then. UI currently looks like this:

# ip r change default via 10.0.0.254 dgram_dont_local_frag 1

After all, I still think this should be a per-application/per-socket
setting because the application must deal with the fact that no local
fragmentation is possible so it has to be more sensitive to EMSGSIZE
errors. DNS has to negotiate the UDP buffer size with its peers already
(with the help of EDNS), so there is already logic to deal with the
size of fragments and so it should not be done transparently IMHO.

With the per-route setting DNS implementations can work around this by
querying the IP_MTU or handle the socket errors but I don't know about
other UDP applications on the same host. Everything is ok as long as
the DNS server is the only application on that system.

This is not the same as e.g. TCP_QUICKACK which can transparently be
dealt with by applications and thus makes sense to be a per-route
setting. Applications will see different behaviour when using
dgram_dont_frag. This really is no tuning parameter.

I also tried per-protocol path MTUs and abandoned the patch earlier
today. It got too complex and had problems with how to emulate a common
mtu for old iproutes.

Also, I would be happy to support this patch and the per-socket approach.

I would love to hear your feedback.

diff --git a/include/net/route.h b/include/net/route.h
index dd4ae00..3f6b04b 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -313,12 +313,23 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
 	return hoplimit;
 }
 
+static inline bool ip_dgram_local_fragment(const struct dst_entry *dst,
+				      const struct sock *sk)
+{
+	if (sk->sk_protocol == IPPROTO_UDP &&
+	    dst_metric(dst, RTAX_DGRAM_DONT_LOCAL_FRAG))
+		return false;
+	return true;
+}
+
 static inline int ip_skb_dst_mtu(struct sk_buff *skb)
 {
 	struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL;
+	struct dst_entry *dst = skb_dst(skb);
 
-	return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ?
-	       skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb));
+	return (inet && (inet->pmtudisc == IP_PMTUDISC_PROBE ||
+			 !ip_dgram_local_fragment(dst, skb->sk))) ?
+	       dst->dev->mtu : dst_mtu(dst);
 }
 
 #endif	/* _ROUTE_H */
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index eb0f1a5..2e450f3 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -388,6 +388,8 @@ enum {
 #define RTAX_INITRWND RTAX_INITRWND
 	RTAX_QUICKACK,
 #define RTAX_QUICKACK RTAX_QUICKACK
+	RTAX_DGRAM_DONT_LOCAL_FRAG,
+#define RTAX_DGRAM_DONT_LOCAL_FRAG RTAX_DGRAM_DONT_LOCAL_FRAG
 	__RTAX_MAX
 };
 
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 51be64e..661c618 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -823,7 +823,8 @@ static int __ip_append_data(struct sock *sk,
 
 	fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);
 	maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen;
-	maxnonfragsize = (inet->pmtudisc >= IP_PMTUDISC_DO) ?
+	maxnonfragsize = ((inet->pmtudisc >= IP_PMTUDISC_DO) ||
+			  !ip_dgram_local_fragment(&rt->dst, sk)) ?
 			 mtu : 0xFFFF;
 
 	if (cork->length + length > maxnonfragsize - fragheaderlen) {
@@ -1063,7 +1064,8 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
 	 * We steal reference to this route, caller should not release it
 	 */
 	*rtp = NULL;
-	cork->fragsize = inet->pmtudisc == IP_PMTUDISC_PROBE ?
+	cork->fragsize = ((inet->pmtudisc == IP_PMTUDISC_PROBE) ||
+			  !ip_dgram_local_fragment(&rt->dst, sk)) ?
 			 rt->dst.dev->mtu : dst_mtu(&rt->dst);
 	cork->dst = &rt->dst;
 	cork->length = 0;
@@ -1148,8 +1150,9 @@ ssize_t	ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
 
 	fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);
 	maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen;
-	maxnonfragsize = (inet->pmtudisc >= IP_PMTUDISC_DO) ?
-			 mtu : 0xFFFF;
+	maxnonfragsize = ((inet->pmtudisc >= IP_PMTUDISC_DO) ||
+			  !ip_dgram_local_fragment(&rt->dst, sk)) ?
+		         mtu : 0xFFFF;
 
 	if (cork->length + size > maxnonfragsize - fragheaderlen) {
 		ip_local_error(sk, EMSGSIZE, fl4->daddr, inet->inet_dport, mtu);
@@ -1309,7 +1312,8 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
 	 * to fragment the frame generated here. No matter, what transforms
 	 * how transforms change size of the packet, it will come out.
 	 */
-	if (inet->pmtudisc < IP_PMTUDISC_DO)
+	if (inet->pmtudisc < IP_PMTUDISC_DO &&
+	    ip_dgram_local_fragment(&rt->dst, sk))
 		skb->local_df = 1;
 
 	/* DF bit is set when we want to see DF on outgoing frames.

Thank you,

  Hannes

^ permalink raw reply related

* Re: Bluetooth 6LoWPAN and routing
From: Alexander Aring @ 2013-11-04 22:53 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: Jukka Rissanen, netdev
In-Reply-To: <CAKT1EBeHs4T3YiFvze2RBbM537pXEj03gTcnCMEZprdBz882hg@mail.gmail.com>

On Mon, Nov 04, 2013 at 07:46:06PM -0200, Claudio Takahasi wrote:
> Hi Jukka,
> 
> On Thu, Oct 24, 2013 at 9:48 AM, Jukka Rissanen
> <jukka.rissanen@linux.intel.com> wrote:
> > Hi Alexander,
> >
> >
> > On 24.10.2013 15:25, Alexander Aring wrote:
> >>
> >> Hi Jukka,
> >>
> >> On Thu, Oct 24, 2013 at 09:45:40AM +0300, Jukka Rissanen wrote:
> >>>
> >>> Hi,
> >>>
> >>> I have been prototyping with BT 6LoWPAN support (using this draft
> >>> http://tools.ietf.org/html/draft-ietf-6lowpan-btle-12 as a
> >>> reference). I sent first version yesterday to linux-bluetooth ml
> >>> http://thread.gmane.org/gmane.linux.bluez.kernel/39394
> >>>
> >> I see you take many code from the 6lowpan ieee802154 implementation.
> >> (Just notice you drop the original authors from there)
> >
> >
> > Hmm, those got dropped, I am sorry about that. I will add the original
> > authors information of course.
> >
> >
> >>
> >> I have a couple of patches to fix a lot of bugs in the current 6LoWPAN
> >> ieee802154 implementation.
> >>
> >> Some bugs which I found:
> >>
> >>    - Fix race conditions in fragmentation handling
> >>    - Fix UDP compression/uncompressionm, which is completly broken
> >>    - Fragmentation handling isn't rfc4944 compatible
> >>
> >> And some other improvements. I see your rfc has the same issues (e.g.
> >> fragmentation race conditions).
> >>
> >> Currently I preparing these patches for mainlining.
> >
> >
> > Excellent news!
> 
> 
> Is it necessary to implement 6loWPAN fragmentation/reassembling? For
> Bluetooth, I thought L2CAP FAR (Fragmentation and Reassembling) could
> handle the transfer of IPv6 packets that doesn't fit in one single
> BTLE PDU.
> What am I missing here?
>
mhh, I look a little bit deeper in the 6LoWPAN bluetooth draft and indeed
it can be handled via L2CAP FAR. I saw the fragmentation struct in the
rfc implementation(struct lowpan_fragment) but it isn't used in any case
so Jukka can drop this from the rfc implementation. Sorry about that.

But I don't see udp compression/uncompression in Jukka's rfc
implementation. But this is a part of rfc 6282 which should blte 6LoWPAN
should use?

So the 6LoWPAN fragmentation thing (rfc4944) is only ieee802154 specific.

- Alex

^ permalink raw reply

* [patch v2] mlx5_core: delete some dead code
From: Dan Carpenter @ 2013-11-04 22:20 UTC (permalink / raw)
  To: Eli Cohen
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20131103070326.GA3051@mtldesk30>

The printk() looks like it is left over debug code.  I have removed it.

Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
v2:  Remove the printk instead of moving it infront of the return.

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
index ba816c2..9b79067 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
@@ -192,10 +192,8 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr)
 	struct fw_page *fp;
 	unsigned n;
 
-	if (list_empty(&dev->priv.free_list)) {
+	if (list_empty(&dev->priv.free_list))
 		return -ENOMEM;
-		mlx5_core_warn(dev, "\n");
-	}
 
 	fp = list_entry(dev->priv.free_list.next, struct fw_page, list);
 	n = find_first_bit(&fp->bitmask, 8 * sizeof(fp->bitmask));
--
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 related

* [PATCH 5/5] netfilter: nft_compat: use _safe version of list_for_each
From: Pablo Neira Ayuso @ 2013-11-04 22:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1383602721-5728-1-git-send-email-pablo@netfilter.org>

From: Dan Carpenter <dan.carpenter@oracle.com>

We need to use the _safe version of list_for_each_entry() here otherwise
we have a use after free bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nft_compat.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
index 4811f76..a82667c 100644
--- a/net/netfilter/nft_compat.c
+++ b/net/netfilter/nft_compat.c
@@ -634,9 +634,9 @@ nft_match_select_ops(const struct nft_ctx *ctx,
 
 static void nft_match_release(void)
 {
-	struct nft_xt *nft_match;
+	struct nft_xt *nft_match, *tmp;
 
-	list_for_each_entry(nft_match, &nft_match_list, head)
+	list_for_each_entry_safe(nft_match, tmp, &nft_match_list, head)
 		kfree(nft_match);
 }
 
@@ -705,9 +705,9 @@ nft_target_select_ops(const struct nft_ctx *ctx,
 
 static void nft_target_release(void)
 {
-	struct nft_xt *nft_target;
+	struct nft_xt *nft_target, *tmp;
 
-	list_for_each_entry(nft_target, &nft_target_list, head)
+	list_for_each_entry_safe(nft_target, tmp, &nft_target_list, head)
 		kfree(nft_target);
 }
 
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 1/5] netfilter: bridge: fix nf_tables bridge dependencies with main core
From: Pablo Neira Ayuso @ 2013-11-04 22:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1383602721-5728-1-git-send-email-pablo@netfilter.org>

when CONFIG_NF_TABLES[_MODULE] is not enabled,
but CONFIG_NF_TABLES_BRIDGE is enabled:

net/bridge/netfilter/nf_tables_bridge.c: In function 'nf_tables_bridge_init_net':
net/bridge/netfilter/nf_tables_bridge.c:24:5: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c:25:9: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c:28:2: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c:30:34: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c:35:11: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c: In function 'nf_tables_bridge_exit_net':
net/bridge/netfilter/nf_tables_bridge.c:41:27: error: 'struct net' has no member named 'nft'
net/bridge/netfilter/nf_tables_bridge.c:42:11: error: 'struct net' has no member named 'nft'

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/bridge/netfilter/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig
index 68f8128..5ca74a0 100644
--- a/net/bridge/netfilter/Kconfig
+++ b/net/bridge/netfilter/Kconfig
@@ -3,6 +3,7 @@
 #
 #
 config NF_TABLES_BRIDGE
+	depends on NF_TABLES
 	tristate "Ethernet Bridge nf_tables support"
 
 menuconfig BRIDGE_NF_EBTABLES
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 0/5] nf_tables updates for net-next
From: Pablo Neira Ayuso @ 2013-11-04 22:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

Hi David,

This batch contains fives nf_tables patches for your net-next tree,
they are:

* Fix possible use after free in the module removal path of the
  x_tables compatibility layer, from Dan Carpenter.

* Add filter chain type for the bridge family, from myself.

* Fix Kconfig dependencies of the nf_tables bridge family with
  the core, from myself.

* Fix sparse warnings in nft_nat, from Tomasz Bursztyka.

* Remove duplicated include in the IPv4 family support for nf_tables,
  from Wei Yongjun.

You can pull these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables.git master

Thanks!

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

The following changes since commit a5bb202b848c7962f942f81d93290a9ccdfb1a0f:

  netdev: inet_timewait_sock.h missing semi-colon when KMEMCHECK is enabled (2013-10-17 15:56:53 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables.git master

for you to fetch changes up to c359c4157cf0d852387aff2f2d83fef039aadc2c:

  netfilter: nft_compat: use _safe version of list_for_each (2013-11-04 22:58:30 +0100)

----------------------------------------------------------------
Dan Carpenter (1):
      netfilter: nft_compat: use _safe version of list_for_each

Pablo Neira Ayuso (2):
      netfilter: bridge: fix nf_tables bridge dependencies with main core
      netfilter: bridge: nf_tables: add filter chain type

Tomasz Bursztyka (1):
      netfilter: nft_nat: Fix endianness issue reported by sparse

Wei Yongjun (1):
      netfilter: nf_tables: remove duplicated include from nf_tables_ipv4.c

 net/bridge/netfilter/Kconfig            |    1 +
 net/bridge/netfilter/nf_tables_bridge.c |   41 +++++++++++++++++++++++++++++--
 net/ipv4/netfilter/nf_tables_ipv4.c     |    1 -
 net/netfilter/nft_compat.c              |    8 +++---
 net/netfilter/nft_nat.c                 |   12 ++++++---
 5 files changed, 52 insertions(+), 11 deletions(-)

^ permalink raw reply

* [PATCH 4/5] netfilter: nf_tables: remove duplicated include from nf_tables_ipv4.c
From: Pablo Neira Ayuso @ 2013-11-04 22:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1383602721-5728-1-git-send-email-pablo@netfilter.org>

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/ipv4/netfilter/nf_tables_ipv4.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/netfilter/nf_tables_ipv4.c b/net/ipv4/netfilter/nf_tables_ipv4.c
index 8f7536b..0f4cbfe 100644
--- a/net/ipv4/netfilter/nf_tables_ipv4.c
+++ b/net/ipv4/netfilter/nf_tables_ipv4.c
@@ -16,7 +16,6 @@
 #include <net/netfilter/nf_tables.h>
 #include <net/net_namespace.h>
 #include <net/ip.h>
-#include <net/net_namespace.h>
 #include <net/netfilter/nf_tables_ipv4.h>
 
 static unsigned int nft_ipv4_output(const struct nf_hook_ops *ops,
-- 
1.7.10.4


^ permalink raw reply related


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