* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: Eric Dumazet @ 2014-10-03 20:57 UTC (permalink / raw)
To: David Miller
Cc: brouer, netdev, therbert, hannes, fw, dborkman, jhs,
alexander.duyck, john.r.fastabend, dave.taht, toke
In-Reply-To: <20141003.123806.183331913071081861.davem@davemloft.net>
On Fri, 2014-10-03 at 12:38 -0700, David Miller wrote:
> From: Jesper Dangaard Brouer <brouer@redhat.com>
> Date: Wed, 01 Oct 2014 22:35:31 +0200
>
> > This patchset uses DaveM's recent API changes to dev_hard_start_xmit(),
> > from the qdisc layer, to implement dequeue bulking.
>
> Series applied, thanks for all of your hard work!
I thinks its possible to make all validate_xmit_skb() calls outside of
qdisc lock. GSO segmentation of TX checksuming should not prevent other
cpus from queueing other skbs in the qdisc.
I will spend some time on this.
^ permalink raw reply
* [PATCH iputils] iputils: use syntax compatible with busybox date in Makefile
From: Aaro Koskinen @ 2014-10-03 20:49 UTC (permalink / raw)
To: YOSHIFUJI Hideaki, David Heidelberger; +Cc: netdev, Aaro Koskinen
Use syntax compatible with busybox date in Makefile. This fixes an error
message during the build under busybox.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 54e5a6d..f5f1101 100644
--- a/Makefile
+++ b/Makefile
@@ -115,9 +115,9 @@ LDLIBS=$(LDLIB) $(ADDLIB)
UNAME_N:=$(shell uname -n)
LASTTAG:=$(shell git describe HEAD | sed -e 's/-.*//')
-TODAY=$(shell date +%Y/%m/%d)
-DATE=$(shell date --date $(TODAY) +%Y%m%d)
-TAG:=$(shell date --date=$(TODAY) +s%Y%m%d)
+TODAY=$(shell date +%Y-%m-%d)
+DATE=$(shell date -d $(TODAY) +%Y%m%d)
+TAG:=$(shell date -d $(TODAY) +s%Y%m%d)
# -------------------------------------
--
2.1.2
^ permalink raw reply related
* Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support
From: Luis R. Rodriguez @ 2014-10-03 21:12 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: gregkh, dmitry.torokhov, tiwai, tj, arjan, teg, rmilasan, werner,
oleg, hare, bpoirier, santosh, pmladek, dbueso, linux-kernel,
Tetsuo Handa, Joseph Salisbury, Kay Sievers, One Thousand Gnomes,
Tim Gardner, Pierre Fersing, Andrew Morton, Nagalakshmi Nandigama,
Praveen Krishnamoorthy, Sreekanth Reddy, Abhijit Mahajan,
Casey Leedom, Hariprasad S <haripra
In-Reply-To: <20141003201126.GW14081@wotan.suse.de>
On Fri, Oct 03, 2014 at 10:11:26PM +0200, Luis R. Rodriguez wrote:
> On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote:
> > + queue_work(system_unbound_wq, &priv->attach_work->work);
>
> Tejun,
>
> based on my testing so far using system_highpri_wq instead of
> system_unbound_wq yields close to par / better boot times
> than synchronous probe support for all modules. How set are
> you on using system_unbound_wq? About to punt out a new
> series which also addresses built-in.
Nevermind, folks can change this later with better empirical
testing than I can provide and right now the differences I
see are not too conclusive and I suspect we'll see more of
a difference once the right built-in drivers are selected
to probe asynchrounously.
Luis
^ permalink raw reply
* Re: [net 0/8] gianfar: ARM port driver updates (1/2)
From: Kim Phillips @ 2014-10-03 21:20 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: netdev, David S. Miller, Xiubo Li, Shruti Kanetkar
In-Reply-To: <1412352169-14414-1-git-send-email-claudiu.manoil@freescale.com>
On Fri, 3 Oct 2014 19:02:41 +0300
Claudiu Manoil <claudiu.manoil@freescale.com> wrote:
> Claudiu Manoil (8):
> net/fsl_pq_mdio: Fix asm/ucc.h compile error for ARM
> net/fsl_pq_mdio: Use ioread/iowrite32be() portable accessors
> net/fsl_pq_mdio: Replace spin_event_timeout() with arch independent
> gianfar: Include missing headers for ARM builds
> gianfar: Exclude PPC specific errata handling from ARM builds
> gianfar: Make MAC addr setup endian safe, cleanup
> gianfar: Replace spin_event_timeout() with arch independent
> gianfar: Replace eieio with wmb for non-PPC archs
>
> drivers/net/ethernet/freescale/fsl_pq_mdio.c | 56 ++++++++++++++---------
> drivers/net/ethernet/freescale/gianfar.c | 68 +++++++++++++++-------------
> drivers/net/ethernet/freescale/gianfar.h | 31 +++++++++++++
> 3 files changed, 102 insertions(+), 53 deletions(-)
this series:
Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
Thanks,
Kim
^ permalink raw reply
* [PATCH v2 net-next 1/1] net: fec: fix build error at m68k platform
From: Frank Li @ 2014-10-03 21:29 UTC (permalink / raw)
To: davem, lznuaa; +Cc: netdev, b38611, Frank Li
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 1b7bde6d659d30f171259cc2dfba8e5dab34e735
make.cross ARCH=m68k m5275evb_defconfig
make.cross ARCH=m68k
All error/warnings:
drivers/net/ethernet/freescale/fec_main.c: In function 'fec_enet_rx_queue':
>> drivers/net/ethernet/freescale/fec_main.c:1470:3: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
prefetch(skb->data - NET_IP_ALIGN);
^
cc1: some warnings being treated as errors
missed included prefetch.h
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
Change from v1 to V2
- add reported by
- add make config
drivers/net/ethernet/freescale/fec_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 1f07db8..e190eb0 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -57,6 +57,7 @@
#include <linux/regulator/consumer.h>
#include <linux/if_vlan.h>
#include <linux/pinctrl/consumer.h>
+#include <linux/prefetch.h>
#include <asm/cacheflush.h>
--
1.9.1
^ permalink raw reply related
* Re: [net-next] fm10k: Add CONFIG_FM10K_VXLAN configuration option
From: Alexander Duyck @ 2014-10-03 21:40 UTC (permalink / raw)
To: Andy Zhou, davem; +Cc: netdev
In-Reply-To: <1412370352-17680-1-git-send-email-azhou@nicira.com>
On 10/03/2014 02:05 PM, Andy Zhou wrote:
> Compiling with CONFIG_FM10K=y and VXLAN=m resulting in linking error:
>
> drivers/built-in.o: In function `fm10k_open':
> (.text+0x1f9d7a): undefined reference to `vxlan_get_rx_port'
> make: *** [vmlinux] Error 1
>
> The fix follows the same strategy as I40E.
>
> Signed-off-by: Andy Zhou <azhou@nicira.com>
> ---
> drivers/net/ethernet/intel/Kconfig | 11 +++++++++++
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 +++---
> 2 files changed, 14 insertions(+), 3 deletions(-)
Looks good to me. Thanks for resolving this.
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
^ permalink raw reply
* [PATCH v2 6/7] driver-core: add driver module asynchronous probe support
From: Luis R. Rodriguez @ 2014-10-03 21:44 UTC (permalink / raw)
To: gregkh, dmitry.torokhov, tiwai, tj, arjan
Cc: teg, rmilasan, werner, oleg, hare, bpoirier, santosh, pmladek,
dbueso, mcgrof, linux-kernel, Tetsuo Handa, Joseph Salisbury,
Kay Sievers, One Thousand Gnomes, Tim Gardner, Pierre Fersing,
Andrew Morton, Nagalakshmi Nandigama, Praveen Krishnamoorthy,
Sreekanth Reddy, Abhijit Mahajan, Casey Leedom, Hariprasad S,
MPT-FusionLinux.pdl, linux-scsi, netdev
In-Reply-To: <1412372683-2003-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@suse.com>
Some init systems may wish to express the desire to have
device drivers run their device driver's bus probe() run
asynchronously. This implements support for this and
allows userspace to request async probe as a preference
through a generic shared device driver module parameter,
async_probe. Implemention for async probe is supported
through a module parameter given that since synchronous
probe has been prevalent for years some userspace might
exist which relies on the fact that the device driver will
probe synchronously and the assumption that devices it
provides will be immediately available after this.
Some device driver might not be able to run async probe
so we enable device drivers to annotate this to prevent
this module parameter from having any effect on them.
This implementation uses queue_work(system_unbound_wq)
to queue async probes, this should enable probe to run
slightly *faster* if the driver's probe path did not
have much interaction with other workqueues otherwise
it may run _slightly_ slower. Tests were done with cxgb4,
which is known to take long on probe, both without
having to run request_firmware() [0] and then by
requiring it to use request_firmware() [1]. The
difference in run time are only measurable in microseconds:
=====================================================================|
strategy fw (usec) no-fw (usec) |
---------------------------------------------------------------------|
synchronous 24472569 1307563 |
kthread 25066415.5 1309868.5 |
queue_work(system_unbound_wq) 24913661.5 1307631 |
---------------------------------------------------------------------|
In practice, in seconds, the difference is barely noticeable:
=====================================================================|
strategy fw (s) no-fw (s) |
---------------------------------------------------------------------|
synchronous 24.47 1.31 |
kthread 25.07 1.31 |
queue_work(system_unbound_wq) 24.91 1.31 |
---------------------------------------------------------------------|
[0] http://ftp.suse.com/pub/people/mcgrof/async-probe/probe-cgxb4-no-firmware.png
[1] http://ftp.suse.com/pub/people/mcgrof/async-probe/probe-cgxb4-firmware.png
Systemd should consider enabling async probe on device drivers
it loads through systemd-udev but probably does not want to
enable it for modules loaded through systemd-modules-load
(modules-load.d). At least on my booting enabling async probe
for all modules fails to boot as such in order to make this
a bit more useful we whitelist a few buses where it should be
at least in theory safe to try to enable async probe. This
way even if systemd tried to ask to enable async probe for all
its device drivers the kernel won't blindly do this. We also
have the sync_probe flag which device drivers can themselves
enable *iff* its known the device driver should never async
probe.
In order to help *test* things folks can use the kernel parameter
bus.__DEBUG__module_safe_mod_async_probe=1 which will work as if
userspace would have requested all modules to load with async probe.
Daring folks can also use bus.__DEBUG__module_force_mod_async_probe=1
which will enable asynch probe even on buses not tested in any way yet,
if you use that though you're on your own. Both of these flag taint
the kernel as being in a debug intrusive mode to avoid spurious bug
reports while this mechanism gets tested.
Cc: Tejun Heo <tj@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Pierre Fersing <pierre-fersing@pierref.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Benjamin Poirier <bpoirier@suse.de>
Cc: Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
Cc: Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
Cc: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Cc: Abhijit Mahajan <abhijit.mahajan@avagotech.com>
Cc: Casey Leedom <leedom@chelsio.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Cc: Santosh Rastapur <santosh@chelsio.com>
Cc: MPT-FusionLinux.pdl@avagotech.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Acked-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
Documentation/kernel-parameters.txt | 7 +++
drivers/base/base.h | 6 +++
drivers/base/bus.c | 104 ++++++++++++++++++++++++++++++++++--
drivers/base/dd.c | 7 +++
include/linux/module.h | 2 +
kernel/module.c | 12 ++++-
6 files changed, 133 insertions(+), 5 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 10d51c2..e4be3b8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -914,6 +914,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Enable debug messages at boot time. See
Documentation/dynamic-debug-howto.txt for details.
+ module.async_probe [KNL]
+ Enable asynchronous probe on this module.
+ bus.__DEBUG__module_force_mod_async_probe=1 [KNL]
+ Enable asynchronous probe on all modules. This is
+ testing parameter and using it will taint your
+ kernel.
+
early_ioremap_debug [KNL]
Enable debug messages in early_ioremap support. This
is useful for tracking down temporary early mappings
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 251c5d3..24836f1 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -43,11 +43,17 @@ struct subsys_private {
};
#define to_subsys_private(obj) container_of(obj, struct subsys_private, subsys.kobj)
+struct driver_attach_work {
+ struct work_struct work;
+ struct device_driver *driver;
+};
+
struct driver_private {
struct kobject kobj;
struct klist klist_devices;
struct klist_node knode_bus;
struct module_kobject *mkobj;
+ struct driver_attach_work *attach_work;
struct device_driver *driver;
};
#define to_driver(obj) container_of(obj, struct driver_private, kobj)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index a5f41e4..ec203d6 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -85,6 +85,7 @@ static void driver_release(struct kobject *kobj)
struct driver_private *drv_priv = to_driver(kobj);
pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__);
+ kfree(drv_priv->attach_work);
kfree(drv_priv);
}
@@ -662,10 +663,93 @@ static void remove_driver_private(struct device_driver *drv)
struct driver_private *priv = drv->p;
kobject_put(&priv->kobj);
+ kfree(priv->attach_work);
kfree(priv);
drv->p = NULL;
}
+static void driver_attach_workfn(struct work_struct *work)
+{
+ struct driver_attach_work *attach_work =
+ container_of(work, struct driver_attach_work, work);
+ struct device_driver *drv = attach_work->driver;
+ int ret;
+
+ ret = driver_attach(drv);
+ if (ret != 0) {
+ remove_driver_private(drv);
+ bus_put(drv->bus);
+ }
+}
+
+int bus_driver_async_probe(struct device_driver *drv)
+{
+ struct driver_private *priv = drv->p;
+
+ priv->attach_work = kzalloc(sizeof(struct driver_attach_work),
+ GFP_KERNEL);
+ if (!priv->attach_work)
+ return -ENOMEM;
+
+ priv->attach_work->driver = drv;
+ INIT_WORK(&priv->attach_work->work, driver_attach_workfn);
+
+ /* Keep this as pr_info() until this is prevalent */
+ pr_info("bus: '%s': probe for driver %s is run asynchronously\n",
+ drv->bus->name, drv->name);
+
+ queue_work(system_unbound_wq, &priv->attach_work->work);
+
+ return 0;
+}
+
+static bool force_mod_async = false;
+module_param_named(__DEBUG__module_force_mod_async_probe, force_mod_async, bool, 0400);
+MODULE_PARM_DESC(__DEBUG__module_force_mod_async_probe,
+ "Force async probe on all modules");
+
+/**
+ * drv_enable_async_probe - evaluates if async probe should be used
+ * @drv: device driver to evaluate
+ * @bus: the bus for the device driver
+ *
+ * The driver core supports enabling asynchronous probe on device drivers
+ * through a few mechanisms. We're careful to ensure that async probe can
+ * only be used by userspace that is prepared and has been vetted to support
+ * async probe support given that the driver core has historically only
+ * supported synchronous probe. If any driver is known to not work well with
+ * async probe the @drv can enable sync_probe and asynchronous probe will never
+ * be used on it.
+ *
+ * Drivers can be built-in or modules. Userspace can inform the kernel that
+ * it is prepared for async probe by passing the module parameter
+ * async_probe on each module it wishes to load. The async_probe parameter is
+ * module specific and gives userspace the flexibility to opt out of using
+ * async probe for certain types of modules. Built-in drivers are currently
+ * not supported for async probe.
+ *
+ * If you'd like to test enabling async probe for all modules you can enable
+ * the bus.__DEBUG__module_force_mod_async_probe=1 kernel parameter. This
+ * parameter should only be used to help test and should be used with caution.
+ */
+static bool drv_enable_async_probe(struct device_driver *drv,
+ struct bus_type *bus)
+{
+ struct module *mod;
+
+ if (!drv->owner || drv->sync_probe)
+ return false;
+
+ if (force_mod_async)
+ return true;
+
+ mod = drv->owner;
+ if (!mod->async_probe_requested)
+ return false;
+
+ return true;
+}
+
/**
* bus_add_driver - Add a driver to the bus.
* @drv: driver.
@@ -675,6 +759,7 @@ int bus_add_driver(struct device_driver *drv)
struct bus_type *bus;
struct driver_private *priv;
int error = 0;
+ bool async_probe = false;
bus = bus_get(drv->bus);
if (!bus)
@@ -696,11 +781,19 @@ int bus_add_driver(struct device_driver *drv)
if (error)
goto out_unregister;
+ async_probe = drv_enable_async_probe(drv, bus);
+
klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers);
if (drv->bus->p->drivers_autoprobe) {
- error = driver_attach(drv);
- if (error)
- goto out_unregister;
+ if (async_probe) {
+ error = bus_driver_async_probe(drv);
+ if (error)
+ goto out_unregister;
+ } else {
+ error = driver_attach(drv);
+ if (error)
+ goto out_unregister;
+ }
}
module_add_driver(drv->owner, drv);
@@ -1267,6 +1360,11 @@ EXPORT_SYMBOL_GPL(subsys_virtual_register);
int __init buses_init(void)
{
+ if (unlikely(force_mod_async)) {
+ pr_info("Enabling force_mod_async -- you're on your own!\n");
+ add_taint(TAINT_DEBUG, LOCKDEP_STILL_OK);
+ }
+
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
if (!bus_kset)
return -ENOMEM;
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index e4ffbcf..7999aba 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -507,6 +507,13 @@ static void __device_release_driver(struct device *dev)
drv = dev->driver;
if (drv) {
+ if (drv->owner && !drv->sync_probe) {
+ struct module *mod = drv->owner;
+ struct driver_private *priv = drv->p;
+
+ if (mod->async_probe_requested)
+ flush_work(&priv->attach_work->work);
+ }
pm_runtime_get_sync(dev);
driver_sysfs_remove(dev);
diff --git a/include/linux/module.h b/include/linux/module.h
index 71f282a..1e9e017 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -271,6 +271,8 @@ struct module {
bool sig_ok;
#endif
+ bool async_probe_requested;
+
/* symbols that will be GPL-only in the near future. */
const struct kernel_symbol *gpl_future_syms;
const unsigned long *gpl_future_crcs;
diff --git a/kernel/module.c b/kernel/module.c
index 6a07671..f5f709d 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3175,8 +3175,16 @@ out:
static int unknown_module_param_cb(char *param, char *val, const char *modname,
void *arg)
{
+ struct module *mod = arg;
+ int ret;
+
+ if (strcmp(param, "async_probe") == 0) {
+ mod->async_probe_requested = true;
+ return 0;
+ }
+
/* Check for magic 'dyndbg' arg */
- int ret = ddebug_dyndbg_module_param_cb(param, val, modname);
+ ret = ddebug_dyndbg_module_param_cb(param, val, modname);
if (ret != 0)
pr_warn("%s: unknown parameter '%s' ignored\n", modname, param);
return 0;
@@ -3278,7 +3286,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
/* Module is ready to execute: parsing args may do that. */
after_dashes = parse_args(mod->name, mod->args, mod->kp, mod->num_kp,
- -32768, 32767, NULL,
+ -32768, 32767, mod,
unknown_module_param_cb);
if (IS_ERR(after_dashes)) {
err = PTR_ERR(after_dashes);
--
2.1.1
^ permalink raw reply related
* [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules
From: Luis R. Rodriguez @ 2014-10-03 21:44 UTC (permalink / raw)
To: gregkh, dmitry.torokhov, tiwai, tj, arjan
Cc: teg, rmilasan, werner, oleg, hare, bpoirier, santosh, pmladek,
dbueso, mcgrof, linux-kernel, Tetsuo Handa, Joseph Salisbury,
Kay Sievers, One Thousand Gnomes, Tim Gardner, Pierre Fersing,
Andrew Morton, Nagalakshmi Nandigama, Praveen Krishnamoorthy,
Sreekanth Reddy, Abhijit Mahajan, Casey Leedom, Hariprasad S,
MPT-FusionLinux.pdl, linux-scsi, netdev
In-Reply-To: <1412372683-2003-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@suse.com>
At times we may wish to express the desire to prefer to have
a device driver probe asynchronously by default. We cannot
simply enable all device drivers to do this without vetting
that userspace is prepared for this though given that some
old userspace is expected to exist which is not equipped to
deal with broad async probe support. This defines a new kernel
parameter, bus.enable_kern_async=1, to help address this both to
help enable async probe support for built-in drivers and to
enable drivers to specify a preference to opt in for async
probe support.
If you have a device driver that should use async probe
support when possible enable the prefer_async_probe bool.
Folks wishing to test enabling async probe for all built-in
drivers can enable bus.__DEBUG__kernel_force_mod_async_probe=1,
if you use that though you are on your own.
Cc: Tejun Heo <tj@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Pierre Fersing <pierre-fersing@pierref.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Benjamin Poirier <bpoirier@suse.de>
Cc: Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
Cc: Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
Cc: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Cc: Abhijit Mahajan <abhijit.mahajan@avagotech.com>
Cc: Casey Leedom <leedom@chelsio.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Cc: Santosh Rastapur <santosh@chelsio.com>
Cc: MPT-FusionLinux.pdl@avagotech.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
Documentation/kernel-parameters.txt | 9 +++++++
drivers/base/bus.c | 52 ++++++++++++++++++++++++++++++-------
include/linux/device.h | 9 +++++++
3 files changed, 60 insertions(+), 10 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e4be3b8..56f4d4e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -914,12 +914,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Enable debug messages at boot time. See
Documentation/dynamic-debug-howto.txt for details.
+ bus.enable_kern_async=1 [KNL]
+ This tells the kernel userspace has been vetted for
+ asynchronous probe support and can listen to the device
+ driver prefer_async_probe flag for both built-in device
+ drivers and modules.
module.async_probe [KNL]
Enable asynchronous probe on this module.
bus.__DEBUG__module_force_mod_async_probe=1 [KNL]
Enable asynchronous probe on all modules. This is
testing parameter and using it will taint your
kernel.
+ bus.__DEBUG__kernel_force_mod_async_probe=1 [KNL]
+ Enable asynchronous probe on all built-in drivers. This
+ is testing parameter and using it will taint your
+ kernel.
early_ioremap_debug [KNL]
Enable debug messages in early_ioremap support. This
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ec203d6..25d0412 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -695,8 +695,10 @@ int bus_driver_async_probe(struct device_driver *drv)
INIT_WORK(&priv->attach_work->work, driver_attach_workfn);
/* Keep this as pr_info() until this is prevalent */
- pr_info("bus: '%s': probe for driver %s is run asynchronously\n",
- drv->bus->name, drv->name);
+ pr_info("bus: '%s': probe for %s driver %s is run asynchronously\n",
+ drv->bus->name,
+ drv->owner ? "module" : "built-in",
+ drv->name);
queue_work(system_unbound_wq, &priv->attach_work->work);
@@ -708,6 +710,16 @@ module_param_named(__DEBUG__module_force_mod_async_probe, force_mod_async, bool,
MODULE_PARM_DESC(__DEBUG__module_force_mod_async_probe,
"Force async probe on all modules");
+static bool force_kern_async = false;
+module_param_named(__DEBUG__kernel_force_mod_async_probe, force_kern_async, bool, 0400);
+MODULE_PARM_DESC(__DEBUG__kernel_force_mod_async_probe,
+ "Force async probe on all modules");
+
+static bool enable_kern_async = false;
+module_param_named(enable_kern_async, enable_kern_async, bool, 0400);
+MODULE_PARM_DESC(enable_kern_async,
+ "Userspace is vetted to handle driver async probe");
+
/**
* drv_enable_async_probe - evaluates if async probe should be used
* @drv: device driver to evaluate
@@ -722,25 +734,41 @@ MODULE_PARM_DESC(__DEBUG__module_force_mod_async_probe,
* be used on it.
*
* Drivers can be built-in or modules. Userspace can inform the kernel that
- * it is prepared for async probe by passing the module parameter
- * async_probe on each module it wishes to load. The async_probe parameter is
+ * it is prepared for async probe by either passing the module parameter
+ * async_probe on each module it wishes to load or by enabling the
+ * bus.enable_kern_async=1 kernel parameter. The async_probe parameter is
* module specific and gives userspace the flexibility to opt out of using
- * async probe for certain types of modules. Built-in drivers are currently
- * not supported for async probe.
+ * async probe for certain types of modules. Built-in drivers and modules which
+ * are known to work well with async probe can enable @drv->prefer_async_probe,
+ * async probe will be used for it if the kernel parameter but only if the
+ * kernel parameter bus.enable_kern_async=1 has been set.
*
* If you'd like to test enabling async probe for all modules you can enable
- * the bus.__DEBUG__module_force_mod_async_probe=1 kernel parameter. This
- * parameter should only be used to help test and should be used with caution.
+ * the bus.__DEBUG__module_force_mod_async_probe=1 kernel parameter. If you'd
+ * like to test enabling async probe for all built-in drivers you can enable
+ * the bus.__DEBUG__kernel_force_mod_async_probe=1 kernel parameter. These
+ * parameters should only be used to help test and should be used with caution.
*/
static bool drv_enable_async_probe(struct device_driver *drv,
struct bus_type *bus)
{
struct module *mod;
- if (!drv->owner || drv->sync_probe)
+ if (drv->sync_probe)
+ return false;
+
+ /* built-in drivers */
+ if (!drv->owner) {
+ if (!enable_kern_async)
+ return false;
+ if (drv->prefer_async_probe || force_kern_async)
+ return true;
return false;
+ }
- if (force_mod_async)
+ /* modules */
+ if ((enable_kern_async && drv->prefer_async_probe) ||
+ force_mod_async)
return true;
mod = drv->owner;
@@ -1364,6 +1392,10 @@ int __init buses_init(void)
pr_info("Enabling force_mod_async -- you're on your own!\n");
add_taint(TAINT_DEBUG, LOCKDEP_STILL_OK);
}
+ if (unlikely(force_kern_async)) {
+ pr_info("Enabling force_kern_async -- you're on your own!\n");
+ add_taint(TAINT_DEBUG, LOCKDEP_STILL_OK);
+ }
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
if (!bus_kset)
diff --git a/include/linux/device.h b/include/linux/device.h
index aa14b95..058a8e0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -202,6 +202,14 @@ extern struct klist *bus_get_device_klist(struct bus_type *bus);
* @suppress_bind_attrs: Disables bind/unbind via sysfs.
* @sync_probe: Use this to annotate drivers which don't work well with
* async probe.
+ * @prefer_async_probe: if userspace is vetted for async probe support enable
+ * async probe on this device driver whether module or built-in.
+ * Userspace expresses it is vetted for async probe support by
+ * enabling the bus.enable_kern_async=1 kernel parameter. Without
+ * this option enabled userspace can still request modules to be
+ * loaded asynchronously by using the shared async_probe module
+ * parameter. Built-in drivers must however enable
+ * prefer_async_probe and cope with bus.enable_kern_async=1
* @of_match_table: The open firmware table.
* @acpi_match_table: The ACPI match table.
* @probe: Called to query the existence of a specific device,
@@ -236,6 +244,7 @@ struct device_driver {
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
bool sync_probe;
+ bool prefer_async_probe;
const struct of_device_id *of_match_table;
const struct acpi_device_id *acpi_match_table;
--
2.1.1
^ permalink raw reply related
* [PATCH] Update Intel Ethernet Driver maintainers list
From: Alexander Duyck @ 2014-10-03 21:45 UTC (permalink / raw)
To: netdev; +Cc: matthew.vick, jeffrey.t.kirsher, alexander.duyck
I will no longer be working for Intel as of today. As such I am removing
myself from the maintainers list and adding my replacement, Matthew Vick
as he will be taking over maintenance of the fm10k driver.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
Just wanted to send this out as a notice, I have internally submitted a copy
of this for Jeff Kirsher's tree to have submitted via a pull request. I
should only be without a corporate email for a day or two and will likely be
back up on my new email account early next week. In the meantime I will still
be on the netdev list via my gmail account.
MAINTAINERS | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index c2e7a06..e36f464 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4784,14 +4784,14 @@ M: Deepak Saxena <dsaxena@plexity.net>
S: Maintained
F: drivers/char/hw_random/ixp4xx-rng.c
-INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
+INTEL ETHERNET DRIVERS (e100/e1000/e1000e/fm10k/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
M: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
M: Jesse Brandeburg <jesse.brandeburg@intel.com>
M: Bruce Allan <bruce.w.allan@intel.com>
M: Carolyn Wyborny <carolyn.wyborny@intel.com>
M: Don Skidmore <donald.c.skidmore@intel.com>
M: Greg Rose <gregory.v.rose@intel.com>
-M: Alex Duyck <alexander.h.duyck@intel.com>
+M: Matthew Vick <matthew.vick@intel.com>
M: John Ronciak <john.ronciak@intel.com>
M: Mitch Williams <mitch.a.williams@intel.com>
M: Linux NICS <linux.nics@intel.com>
^ permalink raw reply related
* Re: [net-next PATCH] veth: don't assign a qdisc to veth
From: David Miller @ 2014-10-03 21:56 UTC (permalink / raw)
To: eric.dumazet; +Cc: brouer, cwang, netdev, jpirko, mpatel
In-Reply-To: <1412369519.17245.2.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Oct 2014 13:51:59 -0700
> On Fri, 2014-10-03 at 22:38 +0200, Jesper Dangaard Brouer wrote:
>> On Fri, 3 Oct 2014 09:53:16 -0700
>> Cong Wang <cwang@twopensource.com> wrote:
>>
>> > On Fri, Oct 3, 2014 at 3:48 AM, Jesper Dangaard Brouer
>> > <brouer@redhat.com> wrote:
>> > > The veth driver is a virtual device, and should not have assigned
>> > > the default qdisc. Verified (ndo_start_xmit) veth_xmit can only
>> > > return NETDEV_TX_OK, thus this should be safe to bypass qdisc.
>> > >
>> > > Not assigning a qdisc is subtly done by setting tx_queue_len to zero.
>> > >
>> >
>> > Huh?? Maybe your $subject is too misleading, but we do use HTB
>> > on veth, this will break our code since we will have to set tx_queue_len
>> > after your patch, no?
>>
>> No, you HTB setup should still work.
>
> Unfortunately no....
>
> Default htb classes are pfifo, and this uses device txqueuelen as
> default limit.
>
> So your change should have been done years ago.
>
> Now its too late as it can break existing user scripts.
Agreed, this change cannot be made.
^ permalink raw reply
* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: David Miller @ 2014-10-03 21:56 UTC (permalink / raw)
To: eric.dumazet
Cc: brouer, netdev, therbert, hannes, fw, dborkman, jhs,
alexander.duyck, john.r.fastabend, dave.taht, toke
In-Reply-To: <1412369869.17245.4.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Oct 2014 13:57:49 -0700
> On Fri, 2014-10-03 at 12:38 -0700, David Miller wrote:
>> From: Jesper Dangaard Brouer <brouer@redhat.com>
>> Date: Wed, 01 Oct 2014 22:35:31 +0200
>>
>> > This patchset uses DaveM's recent API changes to dev_hard_start_xmit(),
>> > from the qdisc layer, to implement dequeue bulking.
>>
>> Series applied, thanks for all of your hard work!
>
>
> I thinks its possible to make all validate_xmit_skb() calls outside of
> qdisc lock.
I completely agree, and I sort of intended this to happen when
I split all the code into that new function.
GSO segmentation of TX checksuming should not prevent other
> cpus from queueing other skbs in the qdisc.
>
> I will spend some time on this.
Thanks!
^ permalink raw reply
* Re: [PATCH] drivers:ethernet:davinci_emac.c:Fixes flaw in mac address handling.
From: David Miller @ 2014-10-03 21:55 UTC (permalink / raw)
To: mwelling; +Cc: tony, netdev, linux-kernel
In-Reply-To: <20141003204359.GA10110@sysresccd>
From: Michael Welling <mwelling@ieee.org>
Date: Fri, 3 Oct 2014 15:43:59 -0500
> On Fri, Oct 03, 2014 at 01:03:05PM -0700, David Miller wrote:
>> From: Michael Welling <mwelling@ieee.org>
>> Date: Wed, 1 Oct 2014 21:32:05 -0500
>>
>> > The code currently checks the mac_addr variable that is clearly
>> > zero'd out during allocation.
>> >
>> > Further code is added to bring the mac_addr from the partial pdata.
>> >
>> > Signed-off-by: Michael Welling <mwelling@ieee.org>
>>
>> I don't see anyone specifying a MAC address in the partial pdata,
>> so better to just delete that field.
>>
>> Even if people did, I am not so sure that the partial pdata should
>> unconditionally trump an OF provided MAC address.
>
> So should I just leave the code for handling the mac_addr field from the
> partial pdata out or make it such that the mac_addr field is overriden
> if specified from the devicetree?
I'm saying the partial pdata mac_addr is completely unused and should
be removed.
^ permalink raw reply
* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: Eric Dumazet @ 2014-10-03 21:57 UTC (permalink / raw)
To: David Miller
Cc: brouer, netdev, therbert, hannes, fw, dborkman, jhs,
alexander.duyck, john.r.fastabend, dave.taht, toke
In-Reply-To: <20141003.145647.1980640682969765484.davem@davemloft.net>
On Fri, 2014-10-03 at 14:56 -0700, David Miller wrote:
> I completely agree, and I sort of intended this to happen when
> I split all the code into that new function.
>
> GSO segmentation of TX checksuming should not prevent other
> > cpus from queueing other skbs in the qdisc.
> >
> > I will spend some time on this.
>
> Thanks!
I just did my first reboot, will make sure everything is working well
before sending the patch ;)
^ permalink raw reply
* Re: [net-next] fm10k: Add CONFIG_FM10K_VXLAN configuration option
From: David Miller @ 2014-10-03 22:01 UTC (permalink / raw)
To: alexander.h.duyck; +Cc: azhou, netdev, jeffrey.t.kirsher
In-Reply-To: <542F17B7.80706@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Fri, 03 Oct 2014 14:40:07 -0700
> On 10/03/2014 02:05 PM, Andy Zhou wrote:
>> Compiling with CONFIG_FM10K=y and VXLAN=m resulting in linking error:
>>
>> drivers/built-in.o: In function `fm10k_open':
>> (.text+0x1f9d7a): undefined reference to `vxlan_get_rx_port'
>> make: *** [vmlinux] Error 1
>>
>> The fix follows the same strategy as I40E.
>>
>> Signed-off-by: Andy Zhou <azhou@nicira.com>
>> ---
>> drivers/net/ethernet/intel/Kconfig | 11 +++++++++++
>> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 +++---
>> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> Looks good to me. Thanks for resolving this.
>
> Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
I expect this will go via Jeff Kirsher, CC:'d.
^ permalink raw reply
* Re: [PATCH] Update Intel Ethernet Driver maintainers list
From: Jeff Kirsher @ 2014-10-03 22:04 UTC (permalink / raw)
To: Alexander Duyck; +Cc: netdev, matthew.vick, alexander.duyck
In-Reply-To: <20141003213835.147369.71088.stgit@ahduyck-cp2.jf.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]
On Fri, 2014-10-03 at 14:45 -0700, Alexander Duyck wrote:
> I will no longer be working for Intel as of today. As such I am removing
> myself from the maintainers list and adding my replacement, Matthew Vick
> as he will be taking over maintenance of the fm10k driver.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Dave, no need to wait for a pull request on this one. :-) We will miss
you Alex.
> ---
>
> Just wanted to send this out as a notice, I have internally submitted a copy
> of this for Jeff Kirsher's tree to have submitted via a pull request. I
> should only be without a corporate email for a day or two and will likely be
> back up on my new email account early next week. In the meantime I will still
> be on the netdev list via my gmail account.
>
> MAINTAINERS | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c2e7a06..e36f464 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4784,14 +4784,14 @@ M: Deepak Saxena <dsaxena@plexity.net>
> S: Maintained
> F: drivers/char/hw_random/ixp4xx-rng.c
>
> -INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
> +INTEL ETHERNET DRIVERS (e100/e1000/e1000e/fm10k/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
> M: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> M: Jesse Brandeburg <jesse.brandeburg@intel.com>
> M: Bruce Allan <bruce.w.allan@intel.com>
> M: Carolyn Wyborny <carolyn.wyborny@intel.com>
> M: Don Skidmore <donald.c.skidmore@intel.com>
> M: Greg Rose <gregory.v.rose@intel.com>
> -M: Alex Duyck <alexander.h.duyck@intel.com>
> +M: Matthew Vick <matthew.vick@intel.com>
> M: John Ronciak <john.ronciak@intel.com>
> M: Mitch Williams <mitch.a.williams@intel.com>
> M: Linux NICS <linux.nics@intel.com>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH net-next] r8152: nway reset after setting eee
From: David Miller @ 2014-10-03 22:08 UTC (permalink / raw)
To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb
In-Reply-To: <1394712342-15778-54-Taiwan-albertk@realtek.com>
From: Hayes Wang <hayeswang@realtek.com>
Date: Thu, 2 Oct 2014 16:01:22 +0800
> @@ -3480,6 +3480,9 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
>
> ret = tp->rtl_ops.eee_set(tp, edata);
>
> + if (ret == 0)
> + ret = mii_nway_restart(&tp->mii);
Please test this canonically as "if (!ret)" and delete the empty line between the function
call and the return value test.
Thank you.
^ permalink raw reply
* Re: [net-next] fm10k: Add CONFIG_FM10K_VXLAN configuration option
From: Jeff Kirsher @ 2014-10-03 22:10 UTC (permalink / raw)
To: David Miller; +Cc: alexander.h.duyck, azhou, netdev
In-Reply-To: <20141003.150100.2093419669359736448.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
On Fri, 2014-10-03 at 15:01 -0700, David Miller wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
> Date: Fri, 03 Oct 2014 14:40:07 -0700
>
> > On 10/03/2014 02:05 PM, Andy Zhou wrote:
> >> Compiling with CONFIG_FM10K=y and VXLAN=m resulting in linking error:
> >>
> >> drivers/built-in.o: In function `fm10k_open':
> >> (.text+0x1f9d7a): undefined reference to `vxlan_get_rx_port'
> >> make: *** [vmlinux] Error 1
> >>
> >> The fix follows the same strategy as I40E.
> >>
> >> Signed-off-by: Andy Zhou <azhou@nicira.com>
> >> ---
> >> drivers/net/ethernet/intel/Kconfig | 11 +++++++++++
> >> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 +++---
> >> 2 files changed, 14 insertions(+), 3 deletions(-)
> >
> > Looks good to me. Thanks for resolving this.
> >
> > Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
>
> I expect this will go via Jeff Kirsher, CC:'d.
Thanks, I will add the patch to my queue.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH RFC net 2/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit case
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
In-Reply-To: <1412374332-26657-1-git-send-email-kafai@fb.com>
When there is a RTF_CACHE hit, no need to redo fib6_lookup()
with reachable=0.
---
net/ipv6/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d53dc4f..e40b5dc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -937,7 +937,7 @@ restart:
rt = rt6_multipath_select(rt, fl6, oif, strict | reachable);
BACKTRACK(net, &fl6->saddr);
if (rt->rt6i_flags & RTF_CACHE)
- goto out;
+ goto out1;
dst_hold(&rt->dst);
read_unlock_bh(&table->tb6_lock);
@@ -974,6 +974,7 @@ out:
reachable = 0;
goto restart_2;
}
+out1:
dst_hold(&rt->dst);
read_unlock_bh(&table->tb6_lock);
out2:
--
1.8.1
^ permalink raw reply related
* [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
I am trying to understand why there is a need to restart fib6_lookup() after
getting rt with RTF_CACHE.
I have adapted the davem's udpflood test
(https://git.kernel.org/pub/scm/linux/kernel/git/davem/net_test_tools.git) to
support IPv6 and here is the result:
#root > time ./udpflood -l 20000000 -c 250 2401:db00:face:face::2
Before:
real 0m33.224s
user 0m2.941s
sys 0m30.232s
After:
real 0m31.517s
user 0m2.938s
sys 0m28.536s
^ permalink raw reply
* [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
In-Reply-To: <1412374332-26657-1-git-send-email-kafai@fb.com>
The above BACKTRACK have already caught the rt == net->ipv6.ip6_null_entry case
---
net/ipv6/route.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index bafde82..d53dc4f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -936,8 +936,7 @@ restart:
if (rt->rt6i_nsiblings)
rt = rt6_multipath_select(rt, fl6, oif, strict | reachable);
BACKTRACK(net, &fl6->saddr);
- if (rt == net->ipv6.ip6_null_entry ||
- rt->rt6i_flags & RTF_CACHE)
+ if (rt->rt6i_flags & RTF_CACHE)
goto out;
dst_hold(&rt->dst);
--
1.8.1
^ permalink raw reply related
* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: Eric Dumazet @ 2014-10-03 22:15 UTC (permalink / raw)
To: David Miller
Cc: brouer, netdev, therbert, hannes, fw, dborkman, jhs,
alexander.duyck, john.r.fastabend, dave.taht, toke
In-Reply-To: <1412373477.17245.5.camel@edumazet-glaptop2.roam.corp.google.com>
On Fri, 2014-10-03 at 14:57 -0700, Eric Dumazet wrote:
> On Fri, 2014-10-03 at 14:56 -0700, David Miller wrote:
>
> > I completely agree, and I sort of intended this to happen when
> > I split all the code into that new function.
> >
> > GSO segmentation of TX checksuming should not prevent other
> > > cpus from queueing other skbs in the qdisc.
> > >
> > > I will spend some time on this.
> >
> > Thanks!
>
> I just did my first reboot, will make sure everything is working well
> before sending the patch ;)
This is awesome...
40Gb rate, with TSO=on or TSO=off, it does not matter anymore.
^ permalink raw reply
* [PATCH] sctp: handle association restarts when the socket is closed.
From: Vladislav Yasevich @ 2014-10-03 22:16 UTC (permalink / raw)
To: netdev; +Cc: Vlad Yasevich
From: Vlad Yasevich <vyasevich@gmail.com>
Currently association restarts do not take into consideration the
state of the socket. When a restart happens, the current assocation
simply transitions into established state. This creates a condition
where a remote system, through a the restart procedure, may create a
local association that is no way reachable by user. The conditions
to trigger this are as follows:
1) Remote does not acknoledge some data causing data to remain
outstanding.
2) Local application calls close() on the socket. Since data
is still outstanding, the association is placed in SHUTDOWN_PENDING
state. However, the socket is closed.
3) The remote tries to create a new association, triggering a restart
on the local system. The association moves from SHUTDOWN_PENDING
to ESTABLISHED. At this point, it is no longer reachable by
any socket on the local system.
This patch addresses the above situation by moving the newly ESTABLISHED
association into SHUTDOWN-SENT state and bundling a SHUTDOWN after
the COOKIE-ACK chunk. This way, the restarted associate immidiately
enters the shutdown procedure and forces the termination of the
unreachable association.
Reported-by: David Laight <David.Laight@aculab.com>
Signed-off-by: Vlad Yasevich <vyasevich@gmail.com>
---
include/net/sctp/command.h | 2 +-
net/sctp/sm_statefuns.c | 19 ++++++++++++++++---
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index f22538e..2487676 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -115,7 +115,7 @@ typedef enum {
* analysis of the state functions, but in reality just taken from
* thin air in the hopes othat we don't trigger a kernel panic.
*/
-#define SCTP_MAX_NUM_COMMANDS 14
+#define SCTP_MAX_NUM_COMMANDS 20
typedef union {
void *zero_all; /* Set to NULL to clear the entire union */
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index d3f1ea4..c8f6063 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1775,9 +1775,22 @@ static sctp_disposition_t sctp_sf_do_dupcook_a(struct net *net,
/* Update the content of current association. */
sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_ASSOC, SCTP_ASOC(new_asoc));
sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
- sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
- SCTP_STATE(SCTP_STATE_ESTABLISHED));
- sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
+ if (sctp_state(asoc, SHUTDOWN_PENDING) &&
+ (sctp_sstate(asoc->base.sk, CLOSING) ||
+ sock_flag(asoc->base.sk, SOCK_DEAD))) {
+ /* if were currently in SHUTDOWN_PENDING, but the socket
+ * has been closed by user, don't transition to ESTABLISHED.
+ * Instead trigger SHUTDOWN bundled with COOKIE_ACK.
+ */
+ sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
+ return sctp_sf_do_9_2_start_shutdown(net, ep, asoc,
+ SCTP_ST_CHUNK(0), NULL,
+ commands);
+ } else {
+ sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
+ SCTP_STATE(SCTP_STATE_ESTABLISHED));
+ sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
+ }
return SCTP_DISPOSITION_CONSUME;
nomem_ev:
--
1.9.3
^ permalink raw reply related
* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: Tom Herbert @ 2014-10-03 22:19 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, Jesper Dangaard Brouer, Linux Netdev List,
Hannes Frederic Sowa, Florian Westphal, Daniel Borkmann,
Jamal Hadi Salim, Alexander Duyck, John Fastabend, Dave Taht,
Toke Høiland-Jørgensen
In-Reply-To: <1412374535.17245.7.camel@edumazet-glaptop2.roam.corp.google.com>
On Fri, Oct 3, 2014 at 3:15 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Fri, 2014-10-03 at 14:57 -0700, Eric Dumazet wrote:
>> On Fri, 2014-10-03 at 14:56 -0700, David Miller wrote:
>>
>> > I completely agree, and I sort of intended this to happen when
>> > I split all the code into that new function.
>> >
>> > GSO segmentation of TX checksuming should not prevent other
>> > > cpus from queueing other skbs in the qdisc.
>> > >
>> > > I will spend some time on this.
>> >
>> > Thanks!
>>
>> I just did my first reboot, will make sure everything is working well
>> before sending the patch ;)
>
> This is awesome...
>
> 40Gb rate, with TSO=on or TSO=off, it does not matter anymore.
>
This is with or without GSO?
>
>
^ permalink raw reply
* Re: [PATCH] net: sched: suspicious RCU usage in qdisc_watchdog
From: Cong Wang @ 2014-10-03 22:22 UTC (permalink / raw)
To: John Fastabend; +Cc: David Miller, Cong Wang, Eric Dumazet, netdev
In-Reply-To: <20141003054306.20821.48420.stgit@nitbit.x32>
On Thu, Oct 2, 2014 at 10:43 PM, John Fastabend
<john.fastabend@gmail.com> wrote:
> Suspicious RCU usage in qdisc_watchdog call needs to be done inside
> rcu_read_lock/rcu_read_unlock. And then Qdisc destroy operations
> need to ensure timer is cancelled before removing qdisc structure.
More precisely, qdisc_root().
>
> [ 3992.191339] ===============================
> [ 3992.191340] [ INFO: suspicious RCU usage. ]
> [ 3992.191343] 3.17.0-rc6net-next+ #72 Not tainted
> [ 3992.191345] -------------------------------
> [ 3992.191347] include/net/sch_generic.h:272 suspicious rcu_dereference_check() usage!
> [ 3992.191348]
> [ 3992.191348] other info that might help us debug this:
> [ 3992.191348]
> [ 3992.191351]
> [ 3992.191351] rcu_scheduler_active = 1, debug_locks = 1
> [ 3992.191353] no locks held by swapper/1/0.
> [ 3992.191355]
> [ 3992.191355] stack backtrace:
> [ 3992.191358] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.17.0-rc6net-next+ #72
> [ 3992.191360] Hardware name: /DZ77RE-75K, BIOS GAZ7711H.86A.0060.2012.1115.1750 11/15/2012
> [ 3992.191362] 0000000000000001 ffff880235803e48 ffffffff8178f92c 0000000000000000
> [ 3992.191366] ffff8802322224a0 ffff880235803e78 ffffffff810c9966 ffff8800a5fe3000
> [ 3992.191370] ffff880235803f30 ffff8802359cd768 ffff8802359cd6e0 ffff880235803e98
> [ 3992.191374] Call Trace:
> [ 3992.191376] <IRQ> [<ffffffff8178f92c>] dump_stack+0x4e/0x68
> [ 3992.191387] [<ffffffff810c9966>] lockdep_rcu_suspicious+0xe6/0x130
> [ 3992.191392] [<ffffffff8167213a>] qdisc_watchdog+0x8a/0xb0
> [ 3992.191396] [<ffffffff810f93f2>] __run_hrtimer+0x72/0x420
> [ 3992.191399] [<ffffffff810f9bcd>] ? hrtimer_interrupt+0x7d/0x240
> [ 3992.191403] [<ffffffff816720b0>] ? tc_classify+0xc0/0xc0
> [ 3992.191406] [<ffffffff810f9c4f>] hrtimer_interrupt+0xff/0x240
> [ 3992.191410] [<ffffffff8109e4a5>] ? __atomic_notifier_call_chain+0x5/0x140
> [ 3992.191415] [<ffffffff8103577b>] local_apic_timer_interrupt+0x3b/0x60
> [ 3992.191419] [<ffffffff8179c2b5>] smp_apic_timer_interrupt+0x45/0x60
> [ 3992.191422] [<ffffffff8179a6bf>] apic_timer_interrupt+0x6f/0x80
> [ 3992.191424] <EOI> [<ffffffff815ed233>] ? cpuidle_enter_state+0x73/0x2e0
> [ 3992.191432] [<ffffffff815ed22e>] ? cpuidle_enter_state+0x6e/0x2e0
> [ 3992.191437] [<ffffffff815ed567>] cpuidle_enter+0x17/0x20
> [ 3992.191441] [<ffffffff810c0741>] cpu_startup_entry+0x3d1/0x4a0
> [ 3992.191445] [<ffffffff81106fc6>] ? clockevents_config_and_register+0x26/0x30
> [ 3992.191448] [<ffffffff81033c16>] start_secondary+0x1b6/0x260
>
> Fixes: b26b0d1e8b1 ("net: qdisc: use rcu prefix and silence sparse warnings")
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Cong Wang <cwang@twopensource.com>
^ permalink raw reply
* Re: [net-next PATCH V6 0/2] qdisc: bulk dequeue support
From: David Miller @ 2014-10-03 22:30 UTC (permalink / raw)
To: eric.dumazet
Cc: brouer, netdev, therbert, hannes, fw, dborkman, jhs,
alexander.duyck, john.r.fastabend, dave.taht, toke
In-Reply-To: <1412374535.17245.7.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Oct 2014 15:15:35 -0700
> On Fri, 2014-10-03 at 14:57 -0700, Eric Dumazet wrote:
>> On Fri, 2014-10-03 at 14:56 -0700, David Miller wrote:
>>
>> > I completely agree, and I sort of intended this to happen when
>> > I split all the code into that new function.
>> >
>> > GSO segmentation of TX checksuming should not prevent other
>> > > cpus from queueing other skbs in the qdisc.
>> > >
>> > > I will spend some time on this.
>> >
>> > Thanks!
>>
>> I just did my first reboot, will make sure everything is working well
>> before sending the patch ;)
>
> This is awesome...
>
> 40Gb rate, with TSO=on or TSO=off, it does not matter anymore.
Kick ass!
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox