* Re: [bug?] r8169: hangs under heavy load
From: Eric Dumazet @ 2011-11-25 20:32 UTC (permalink / raw)
To: Jonathan Nieder
Cc: netdev, nic_swsd, Francois Romieu, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <20111125201936.GA26692@elie.hsd1.il.comcast.net>
Le vendredi 25 novembre 2011 à 14:19 -0600, Jonathan Nieder a écrit :
> Hi,
>
> Gerd writes[1]:
>
> > Today I installed the 3.1 kernel and did some testing by copying files
> > with samba.
> [...]
> > Now the CPU hangs during the interrupts:
> [...]
> > r8169 0000:02:00.0: eth0: link up
> > ------------[ cut here ]------------
> > WARNING: at [...]/net/core/dev.c:3827 net_rx_action+0xda/0x17e()
> >
> > Hardware name: CM-iAM/SBC-FITPC2i
> > Modules linked in: cpufreq_userspace cpufreq_conservative cpufreq_stats nfsd lockd nfs_acl auth_rpcgss sunrpc speedstep_lib cpufreq_powersave fuse ext2 coretemp acpi_cpufreq mperf loop arc4 snd_hda_codec_realtek rt2800usb rt2800lib crc_ccitt rt2x00usb rt2x00lib mac80211 psb_gfx(C) snd_hda_intel cfg80211 snd_hda_codec drm_kms_helper i2c_isch drm snd_hwdep rfkill tpm_tis tpm tpm_bios lpc_sch mfd_core evdev snd_pcm snd_seq snd_timer snd_seq_device battery processor button psmouse snd pcspkr serio_raw ac i2c_algo_bit power_supply i2c_core soundcore snd_page_alloc video usbhid ext4 hid mbcache jbd2 crc16 sd_mod crc_t10dif ata_generic uhci_hcd pata_sch libata ehci_hcd scsi_mod usbcore sdhci_pci sdhci r8169 mii thermal thermal_sys mmc_core [last unloaded: scsi_wait_scan]
> > Pid: 0, comm: swapper Tainted: G C 3.1.0-1-686-pae #1
> > Call Trace:
> > [<c1037698>] ? warn_slowpath_common+0x68/0x79
> > [<c120d061>] ? net_rx_action+0xda/0x17e
> > [<c10376b6>] ? warn_slowpath_null+0xd/0x10
> > [<c120d061>] ? net_rx_action+0xda/0x17e
> > [<c103c05d>] ? local_bh_enable+0x2/0x2
> > [<c103c0f1>] ? __do_softirq+0x94/0x12f
> > [<c103c05d>] ? local_bh_enable+0x2/0x2
> > <IRQ> [<c103c2e2>] ? irq_exit+0x32/0x80
> > [<c100ca6e>] ? do_IRQ+0x65/0x76
> > [<c12b2a30>] ? common_interrupt+0x30/0x38
> > [<c103007b>] ? sched_debug_show+0x165/0xb17
> > [<c118519b>] ? intel_idle+0xb9/0xde
> > [<c11f54d2>] ? cpuidle_idle_call+0xcd/0x140
> > [<c100aef1>] ? cpu_idle+0x86/0xaa
> > [<c143e708>] ? start_kernel+0x32a/0x32f
> > ---[ end trace 6d03368d0e01d4ae ]---
> > r8169 0000:02:00.0: eth0: link up
> > r8169 0000:02:00.0: eth0: link up
> > r8169 0000:02:00.0: eth0: link up
> > r8169 0000:02:00.0: eth0: link up
> [...]
> > If you need any more information or log files please send me a mail.
>
> This is
>
> work = n->poll(n, weight);
> [...]
> WARN_ON_ONCE(work > weight);
>
> From the same log:
>
> > [ 1.478652] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> > [ 1.478722] r8169 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> > [ 1.478779] r8169 0000:02:00.0: setting latency timer to 64
> > [ 1.478850] r8169 0000:02:00.0: irq 40 for MSI/MSI-X
> [...]
> > [ 1.509507] r8169 0000:02:00.0: eth0: RTL8168c/8111c at 0xf82c2000, 00:01:c0:08:aa:31, XID 1c4000c0 IRQ 40
> > [ 1.509569] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> > [ 1.509633] r8169 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> > [ 1.509691] r8169 0000:03:00.0: setting latency timer to 64
> > [ 1.509765] r8169 0000:03:00.0: irq 41 for MSI/MSI-X
> > [ 1.511188] r8169 0000:03:00.0: eth1: RTL8168c/8111c at 0xf82d0000, 00:01:c0:08:aa:32, XID 1c4000c0 IRQ 41
>
> From another log, using a kernel without pae support:
>
> > [ 844.056012] BUG: soft lockup - CPU#0 stuck for 23s! [smbd:2770]
> [...]
> > [ 872.056011] BUG: soft lockup - CPU#0 stuck for 23s! [smbd:2770]
> [...]
> > [ 900.056011] BUG: soft lockup - CPU#0 stuck for 23s! [smbd:2770]
>
> Gerd previously was getting transmit queue timeouts with a v2.6.32-based
> kernel; with Debian's 3.1.1-1 kernel, the system hangs instead. See [1]
> for the details, including full logs.
>
> Thanks for keeping the r8169 driver well maintained. Any ideas for
> tracking this down?
>
> Looking forward to your thoughts,
> Jonathan
>
> [1] http://bugs.debian.org/642911
> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=34;filename=dmesg_20111125_kernel_3.1-pae.txt;att=2;bug=642911
rtl8169_rx_interrupt(..., budget) can return budget + 1 sometimes
because of :
/* Work around for AMD plateform. */
if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
(tp->mac_version == RTL_GIGA_MAC_VER_05)) {
desc->opts2 = 0;
cur_rx++;
}
Sorry, I wont patch this today, its black Friday, and David said to
patch submitters :
"stick to turkey and wine you're better at it"
:)
^ permalink raw reply
* Re: [bug?] r8169: hangs under heavy load
From: Jonathan Nieder @ 2011-11-25 20:54 UTC (permalink / raw)
To: Eric Dumazet
Cc: netdev, nic_swsd, Francois Romieu, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <1322253122.2550.3.camel@edumazet-laptop>
Eric Dumazet wrote:
> rtl8169_rx_interrupt(..., budget) can return budget + 1 sometimes
> because of :
>
> /* Work around for AMD plateform. */
> if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
> (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
> desc->opts2 = 0;
> cur_rx++;
> }
>
> Sorry, I wont patch this today, its black Friday, and David said to
> patch submitters :
>
> "stick to turkey and wine you're better at it"
:) Sensible enough. Thanks for the quick response!
^ permalink raw reply
* Re: [bug?] r8169: hangs under heavy load
From: Eric Dumazet @ 2011-11-25 21:05 UTC (permalink / raw)
To: Jonathan Nieder
Cc: netdev, nic_swsd, Francois Romieu, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <20111125205451.GG26692@elie.hsd1.il.comcast.net>
Le vendredi 25 novembre 2011 à 14:54 -0600, Jonathan Nieder a écrit :
> Eric Dumazet wrote:
>
> > rtl8169_rx_interrupt(..., budget) can return budget + 1 sometimes
> > because of :
> >
> > /* Work around for AMD plateform. */
> > if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
> > (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
> > desc->opts2 = 0;
> > cur_rx++;
> > }
> >
> > Sorry, I wont patch this today, its black Friday, and David said to
> > patch submitters :
> >
> > "stick to turkey and wine you're better at it"
>
> :) Sensible enough. Thanks for the quick response!
;)
You could try this non official patch, if you are in a hurry ;)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f06aa1..b8a537f 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5710,6 +5710,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
{
unsigned int cur_rx, rx_left;
unsigned int count;
+ unsigned int workaround = 0;
cur_rx = tp->cur_rx;
rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;
@@ -5780,6 +5781,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
(tp->mac_version == RTL_GIGA_MAC_VER_05)) {
desc->opts2 = 0;
cur_rx++;
+ workaround++;
}
}
@@ -5788,7 +5790,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
tp->dirty_rx += count;
- return count;
+ return count - workaround;
}
static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
^ permalink raw reply related
* Re: [bug?] r8169: hangs under heavy load
From: Francois Romieu @ 2011-11-25 22:22 UTC (permalink / raw)
To: Eric Dumazet
Cc: Jonathan Nieder, netdev, nic_swsd, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <1322253122.2550.3.camel@edumazet-laptop>
Eric Dumazet <eric.dumazet@gmail.com> :
[...]
> rtl8169_rx_interrupt(..., budget) can return budget + 1 sometimes
> because of :
>
> /* Work around for AMD plateform. */
> if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
> (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
> desc->opts2 = 0;
> cur_rx++;
> }
It needs fixing but RTL_GIGA_MAC_VER_05 is an old PCI 8169sc while
debian's bug #642911 is about a 8168c (aka RTL_GIGA_MAC_VER_{19 .. 22}).
This path is not used.
--
Ueimor
^ permalink raw reply
* [PATCH iproute2] utils: add s32 parser
From: Hagen Paul Pfeifer @ 2011-11-25 23:00 UTC (permalink / raw)
To: netdev; +Cc: David.Laight, Stephen Hemminger, Hagen Paul Pfeifer
In-Reply-To: <20111125174751.GA3751@hell>
This should be enough "security", tc users have root capabilities
anyway.
Not sure if we should save errno and restore afterwards:
errno_save = errno;
errno = 0;
[...]
errno = errno_save;
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
include/utils.h | 1 +
lib/utils.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/utils.h b/include/utils.h
index 47f8e07..496db68 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -85,6 +85,7 @@ extern int get_time_rtt(unsigned *val, const char *arg, int *raw);
#define get_short get_s16
extern int get_u64(__u64 *val, const char *arg, int base);
extern int get_u32(__u32 *val, const char *arg, int base);
+extern int get_s32(__s32 *val, const char *arg, int base);
extern int get_u16(__u16 *val, const char *arg, int base);
extern int get_s16(__s16 *val, const char *arg, int base);
extern int get_u8(__u8 *val, const char *arg, int base);
diff --git a/lib/utils.c b/lib/utils.c
index efaf377..9cd45e4 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -25,6 +25,7 @@
#include <linux/pkt_sched.h>
#include <time.h>
#include <sys/time.h>
+#include <errno.h>
#include "utils.h"
@@ -198,6 +199,24 @@ int get_u8(__u8 *val, const char *arg, int base)
return 0;
}
+int get_s32(__s32 *val, const char *arg, int base)
+{
+ long res;
+ char *ptr;
+
+ errno = 0;
+
+ if (!arg || !*arg)
+ return -1;
+ res = strtol(arg, &ptr, base);
+ if (ptr == arg || *ptr ||
+ ((res = LONG_MIN || res == LONG_MAX) && errno == ERANGE) ||
+ res > INT32_MAX || res < INT32_MIN)
+ return -1;
+ *val = res;
+ return 0;
+}
+
int get_s16(__s16 *val, const char *arg, int base)
{
long res;
--
1.7.7
^ permalink raw reply related
* Re: [bug?] r8169: hangs under heavy load
From: Eric Dumazet @ 2011-11-25 23:05 UTC (permalink / raw)
To: Francois Romieu
Cc: Jonathan Nieder, netdev, nic_swsd, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <20111125222211.GA13719@electric-eye.fr.zoreil.com>
Le vendredi 25 novembre 2011 à 23:22 +0100, Francois Romieu a écrit :
> Eric Dumazet <eric.dumazet@gmail.com> :
> [...]
> > rtl8169_rx_interrupt(..., budget) can return budget + 1 sometimes
> > because of :
> >
> > /* Work around for AMD plateform. */
> > if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
> > (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
> > desc->opts2 = 0;
> > cur_rx++;
> > }
>
> It needs fixing but RTL_GIGA_MAC_VER_05 is an old PCI 8169sc while
> debian's bug #642911 is about a 8168c (aka RTL_GIGA_MAC_VER_{19 .. 22}).
>
> This path is not used.
>
OK, then we receive a RxFIFOOver indication while napi handler is
running (quite possible if machine under network load)
This (hard) interrupt calls rtl8169_tx_timeout()
-> rtl8169_hw_reset()
-> rtl_hw_reset()
-> rtl8169_init_ring_indexes()
tp->dirty_tx = tp->dirty_rx = tp->cur_tx = tp->cur_rx = 0;
When control returns to softirq handler (rtl8169_rx_interrupt())
it can then catch tp->cur_rx being now 0 instead of value at start of
handler.
count = cur_rx - tp->cur_rx; // too big
Really, calling rtl8169_init_ring_indexes() from hardirq is killing us.
^ permalink raw reply
* [PATCH net-next 1/8] dsa: Change dsa_uses_{dsa,trailer}_tags() into inline functions
From: Ben Hutchings @ 2011-11-26 0:32 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
eth_type_trans() will use these functions if DSA is enabled, which
blocks building DSA as a module.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
include/linux/netdevice.h | 2 +-
include/net/dsa.h | 53 +++++++++++++++++++++++++++++++++++++++++++-
net/dsa/dsa.c | 23 -------------------
net/dsa/dsa_priv.h | 33 ----------------------------
4 files changed, 52 insertions(+), 59 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 999bb26..63721a6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1080,7 +1080,7 @@ struct net_device {
struct vlan_group __rcu *vlgrp; /* VLAN group */
#endif
#ifdef CONFIG_NET_DSA
- void *dsa_ptr; /* dsa specific data */
+ struct dsa_switch_tree *dsa_ptr; /* dsa specific data */
#endif
void *atalk_ptr; /* AppleTalk link */
struct in_device __rcu *ip_ptr; /* IPv4 specific data */
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 839f768..32a1b49 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -11,6 +11,9 @@
#ifndef __LINUX_NET_DSA_H
#define __LINUX_NET_DSA_H
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+
#define DSA_MAX_SWITCHES 4
#define DSA_MAX_PORTS 12
@@ -54,8 +57,54 @@ struct dsa_platform_data {
struct dsa_chip_data *chip;
};
-extern bool dsa_uses_dsa_tags(void *dsa_ptr);
-extern bool dsa_uses_trailer_tags(void *dsa_ptr);
+struct dsa_switch_tree {
+ /*
+ * Configuration data for the platform device that owns
+ * this dsa switch tree instance.
+ */
+ struct dsa_platform_data *pd;
+
+ /*
+ * Reference to network device to use, and which tagging
+ * protocol to use.
+ */
+ struct net_device *master_netdev;
+ __be16 tag_protocol;
+
+ /*
+ * The switch and port to which the CPU is attached.
+ */
+ s8 cpu_switch;
+ s8 cpu_port;
+
+ /*
+ * Link state polling.
+ */
+ int link_poll_needed;
+ struct work_struct link_poll_work;
+ struct timer_list link_poll_timer;
+
+ /*
+ * Data for the individual switch chips.
+ */
+ struct dsa_switch *ds[DSA_MAX_SWITCHES];
+};
+
+/*
+ * The original DSA tag format and some other tag formats have no
+ * ethertype, which means that we need to add a little hack to the
+ * networking receive path to make sure that received frames get
+ * the right ->protocol assigned to them when one of those tag
+ * formats is in use.
+ */
+static inline bool dsa_uses_dsa_tags(struct dsa_switch_tree *dst)
+{
+ return !!(dst->tag_protocol == htons(ETH_P_DSA));
+}
+static inline bool dsa_uses_trailer_tags(struct dsa_switch_tree *dst)
+{
+ return !!(dst->tag_protocol == htons(ETH_P_TRAILER));
+}
#endif
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 0dc1589..66f5c04 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -199,29 +199,6 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
}
-/* hooks for ethertype-less tagging formats *********************************/
-/*
- * The original DSA tag format and some other tag formats have no
- * ethertype, which means that we need to add a little hack to the
- * networking receive path to make sure that received frames get
- * the right ->protocol assigned to them when one of those tag
- * formats is in use.
- */
-bool dsa_uses_dsa_tags(void *dsa_ptr)
-{
- struct dsa_switch_tree *dst = dsa_ptr;
-
- return !!(dst->tag_protocol == htons(ETH_P_DSA));
-}
-
-bool dsa_uses_trailer_tags(void *dsa_ptr)
-{
- struct dsa_switch_tree *dst = dsa_ptr;
-
- return !!(dst->tag_protocol == htons(ETH_P_TRAILER));
-}
-
-
/* link polling *************************************************************/
static void dsa_link_poll_work(struct work_struct *ugly)
{
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 4b0ea05..a45186cb 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -48,39 +48,6 @@ struct dsa_switch {
struct net_device *ports[DSA_MAX_PORTS];
};
-struct dsa_switch_tree {
- /*
- * Configuration data for the platform device that owns
- * this dsa switch tree instance.
- */
- struct dsa_platform_data *pd;
-
- /*
- * Reference to network device to use, and which tagging
- * protocol to use.
- */
- struct net_device *master_netdev;
- __be16 tag_protocol;
-
- /*
- * The switch and port to which the CPU is attached.
- */
- s8 cpu_switch;
- s8 cpu_port;
-
- /*
- * Link state polling.
- */
- int link_poll_needed;
- struct work_struct link_poll_work;
- struct timer_list link_poll_timer;
-
- /*
- * Data for the individual switch chips.
- */
- struct dsa_switch *ds[DSA_MAX_SWITCHES];
-};
-
static inline bool dsa_is_cpu_port(struct dsa_switch *ds, int p)
{
return !!(ds->index == ds->dst->cpu_switch && p == ds->dst->cpu_port);
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 2/8] dsa: Export functions from core to modules
From: Ben Hutchings @ 2011-11-26 0:34 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/dsa/dsa.c | 2 ++
net/dsa/slave.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 66f5c04..fc93088 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -29,6 +29,7 @@ void register_switch_driver(struct dsa_switch_driver *drv)
list_add_tail(&drv->list, &dsa_switch_drivers);
mutex_unlock(&dsa_switch_drivers_mutex);
}
+EXPORT_SYMBOL_GPL(register_switch_driver);
void unregister_switch_driver(struct dsa_switch_driver *drv)
{
@@ -36,6 +37,7 @@ void unregister_switch_driver(struct dsa_switch_driver *drv)
list_del_init(&drv->list);
mutex_unlock(&dsa_switch_drivers_mutex);
}
+EXPORT_SYMBOL_GPL(unregister_switch_driver);
static struct dsa_switch_driver *
dsa_switch_probe(struct mii_bus *bus, int sw_addr, char **_name)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 56cf9b8..c9d52ca 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -45,6 +45,7 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds)
ds->master_mii_bus->id, ds->pd->sw_addr);
ds->slave_mii_bus->parent = &ds->master_mii_bus->dev;
}
+EXPORT_SYMBOL_GPL(dsa_slave_mii_bus_init);
/* slave device handling ****************************************************/
@@ -402,3 +403,4 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
return slave_dev;
}
+EXPORT_SYMBOL_GPL(dsa_slave_create);
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 3/8] dsa: Combine core and tagging code
From: Ben Hutchings @ 2011-11-26 0:35 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
These files have circular dependencies, so if we make DSA modular then
they must be built into the same module. Therefore, link them
together and merge their respective module init and exit functions.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/dsa/Makefile | 13 +++++++------
net/dsa/dsa.c | 26 +++++++++++++++++++++++++-
net/dsa/dsa_priv.h | 3 +++
net/dsa/tag_dsa.c | 15 +--------------
net/dsa/tag_edsa.c | 15 +--------------
net/dsa/tag_trailer.c | 15 +--------------
6 files changed, 38 insertions(+), 49 deletions(-)
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 2374faf..5431b4a 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -1,13 +1,14 @@
+# the core
+obj-$(CONFIG_NET_DSA) += dsa_core.o
+dsa_core-y += dsa.o slave.o
+
# tagging formats
-obj-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
-obj-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
-obj-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
+dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
+dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
+dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
# switch drivers
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
obj-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
obj-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
-
-# the core
-obj-$(CONFIG_NET_DSA) += dsa.o slave.o
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index fc93088..88e7c2f 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -398,12 +398,36 @@ static struct platform_driver dsa_driver = {
static int __init dsa_init_module(void)
{
- return platform_driver_register(&dsa_driver);
+ int rc;
+
+ rc = platform_driver_register(&dsa_driver);
+ if (rc)
+ return rc;
+
+#ifdef CONFIG_NET_DSA_TAG_DSA
+ dev_add_pack(&dsa_packet_type);
+#endif
+#ifdef CONFIG_NET_DSA_TAG_EDSA
+ dev_add_pack(&edsa_packet_type);
+#endif
+#ifdef CONFIG_NET_DSA_TAG_TRAILER
+ dev_add_pack(&trailer_packet_type);
+#endif
+ return 0;
}
module_init(dsa_init_module);
static void __exit dsa_cleanup_module(void)
{
+#ifdef CONFIG_NET_DSA_TAG_TRAILER
+ dev_remove_pack(&trailer_packet_type);
+#endif
+#ifdef CONFIG_NET_DSA_TAG_EDSA
+ dev_remove_pack(&edsa_packet_type);
+#endif
+#ifdef CONFIG_NET_DSA_TAG_DSA
+ dev_remove_pack(&dsa_packet_type);
+#endif
platform_driver_unregister(&dsa_driver);
}
module_exit(dsa_cleanup_module);
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index a45186cb..89a2eb4 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -137,12 +137,15 @@ struct net_device *dsa_slave_create(struct dsa_switch *ds,
/* tag_dsa.c */
netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev);
+extern struct packet_type dsa_packet_type;
/* tag_edsa.c */
netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev);
+extern struct packet_type edsa_packet_type;
/* tag_trailer.c */
netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev);
+extern struct packet_type trailer_packet_type;
#endif
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c
index 98dfe80..cacce1e 100644
--- a/net/dsa/tag_dsa.c
+++ b/net/dsa/tag_dsa.c
@@ -186,20 +186,7 @@ out:
return 0;
}
-static struct packet_type dsa_packet_type __read_mostly = {
+struct packet_type dsa_packet_type __read_mostly = {
.type = cpu_to_be16(ETH_P_DSA),
.func = dsa_rcv,
};
-
-static int __init dsa_init_module(void)
-{
- dev_add_pack(&dsa_packet_type);
- return 0;
-}
-module_init(dsa_init_module);
-
-static void __exit dsa_cleanup_module(void)
-{
- dev_remove_pack(&dsa_packet_type);
-}
-module_exit(dsa_cleanup_module);
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
index 6f38332..e70c43c 100644
--- a/net/dsa/tag_edsa.c
+++ b/net/dsa/tag_edsa.c
@@ -205,20 +205,7 @@ out:
return 0;
}
-static struct packet_type edsa_packet_type __read_mostly = {
+struct packet_type edsa_packet_type __read_mostly = {
.type = cpu_to_be16(ETH_P_EDSA),
.func = edsa_rcv,
};
-
-static int __init edsa_init_module(void)
-{
- dev_add_pack(&edsa_packet_type);
- return 0;
-}
-module_init(edsa_init_module);
-
-static void __exit edsa_cleanup_module(void)
-{
- dev_remove_pack(&edsa_packet_type);
-}
-module_exit(edsa_cleanup_module);
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index d6d7d0a..94bc260 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -114,20 +114,7 @@ out:
return 0;
}
-static struct packet_type trailer_packet_type __read_mostly = {
+struct packet_type trailer_packet_type __read_mostly = {
.type = cpu_to_be16(ETH_P_TRAILER),
.func = trailer_rcv,
};
-
-static int __init trailer_init_module(void)
-{
- dev_add_pack(&trailer_packet_type);
- return 0;
-}
-module_init(trailer_init_module);
-
-static void __exit trailer_cleanup_module(void)
-{
- dev_remove_pack(&trailer_packet_type);
-}
-module_exit(trailer_cleanup_module);
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 4/8] mv88e6xxx: Combine mv88e6131 and mv88e612_61_65 drivers
From: Ben Hutchings @ 2011-11-26 0:36 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
These drivers share a lot of code, so if we make them modular they
should be built into the same module. Therefore, link them together
and merge their respective module init and exit functions.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/dsa/Makefile | 7 ++++---
net/dsa/mv88e6123_61_65.c | 15 +--------------
net/dsa/mv88e6131.c | 15 +--------------
net/dsa/mv88e6xxx.c | 23 +++++++++++++++++++++++
net/dsa/mv88e6xxx.h | 3 +++
5 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 5431b4a..5c48ac5 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -8,7 +8,8 @@ dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
# switch drivers
-obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
-obj-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
-obj-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
+obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx_drv.o
+mv88e6xxx_drv-y += mv88e6xxx.o
+mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
+mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
diff --git a/net/dsa/mv88e6123_61_65.c b/net/dsa/mv88e6123_61_65.c
index 52faaa2..7951a6c 100644
--- a/net/dsa/mv88e6123_61_65.c
+++ b/net/dsa/mv88e6123_61_65.c
@@ -419,7 +419,7 @@ static int mv88e6123_61_65_get_sset_count(struct dsa_switch *ds)
return ARRAY_SIZE(mv88e6123_61_65_hw_stats);
}
-static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
+struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.tag_protocol = cpu_to_be16(ETH_P_EDSA),
.priv_size = sizeof(struct mv88e6xxx_priv_state),
.probe = mv88e6123_61_65_probe,
@@ -432,16 +432,3 @@ static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.get_ethtool_stats = mv88e6123_61_65_get_ethtool_stats,
.get_sset_count = mv88e6123_61_65_get_sset_count,
};
-
-static int __init mv88e6123_61_65_init(void)
-{
- register_switch_driver(&mv88e6123_61_65_switch_driver);
- return 0;
-}
-module_init(mv88e6123_61_65_init);
-
-static void __exit mv88e6123_61_65_cleanup(void)
-{
- unregister_switch_driver(&mv88e6123_61_65_switch_driver);
-}
-module_exit(mv88e6123_61_65_cleanup);
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 9bd1061..45f4123 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -415,7 +415,7 @@ static int mv88e6131_get_sset_count(struct dsa_switch *ds)
return ARRAY_SIZE(mv88e6131_hw_stats);
}
-static struct dsa_switch_driver mv88e6131_switch_driver = {
+struct dsa_switch_driver mv88e6131_switch_driver = {
.tag_protocol = cpu_to_be16(ETH_P_DSA),
.priv_size = sizeof(struct mv88e6xxx_priv_state),
.probe = mv88e6131_probe,
@@ -428,16 +428,3 @@ static struct dsa_switch_driver mv88e6131_switch_driver = {
.get_ethtool_stats = mv88e6131_get_ethtool_stats,
.get_sset_count = mv88e6131_get_sset_count,
};
-
-static int __init mv88e6131_init(void)
-{
- register_switch_driver(&mv88e6131_switch_driver);
- return 0;
-}
-module_init(mv88e6131_init);
-
-static void __exit mv88e6131_cleanup(void)
-{
- unregister_switch_driver(&mv88e6131_switch_driver);
-}
-module_exit(mv88e6131_cleanup);
diff --git a/net/dsa/mv88e6xxx.c b/net/dsa/mv88e6xxx.c
index efe661a..50fd860 100644
--- a/net/dsa/mv88e6xxx.c
+++ b/net/dsa/mv88e6xxx.c
@@ -520,3 +520,26 @@ void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
mutex_unlock(&ps->stats_mutex);
}
+
+static int __init mv88e6xxx_init(void)
+{
+#if IS_ENABLED(CONFIG_NET_DSA_MV88E6131)
+ register_switch_driver(&mv88e6131_switch_driver);
+#endif
+#if IS_ENABLED(CONFIG_NET_DSA_MV88E6123_61_65)
+ register_switch_driver(&mv88e6123_61_65_switch_driver);
+#endif
+ return 0;
+}
+module_init(mv88e6xxx_init);
+
+static void __exit mv88e6xxx_cleanup(void)
+{
+#if IS_ENABLED(CONFIG_NET_DSA_MV88E6123_61_65)
+ unregister_switch_driver(&mv88e6123_61_65_switch_driver);
+#endif
+#if IS_ENABLED(CONFIG_NET_DSA_MV88E6131)
+ unregister_switch_driver(&mv88e6131_switch_driver);
+#endif
+}
+module_exit(mv88e6xxx_cleanup);
diff --git a/net/dsa/mv88e6xxx.h b/net/dsa/mv88e6xxx.h
index 61156ca2..fc2cd7b 100644
--- a/net/dsa/mv88e6xxx.h
+++ b/net/dsa/mv88e6xxx.h
@@ -71,6 +71,9 @@ void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
int nr_stats, struct mv88e6xxx_hw_stat *stats,
int port, uint64_t *data);
+extern struct dsa_switch_driver mv88e6131_switch_driver;
+extern struct dsa_switch_driver mv88e6123_61_65_switch_driver;
+
#define REG_READ(addr, reg) \
({ \
int __ret; \
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 5/8] dsa: Define module author, description, license and aliases for drivers
From: Ben Hutchings @ 2011-11-26 0:37 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/dsa/mv88e6060.c | 5 +++++
net/dsa/mv88e6123_61_65.c | 4 ++++
net/dsa/mv88e6131.c | 5 +++++
net/dsa/mv88e6xxx.c | 4 ++++
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/net/dsa/mv88e6060.c b/net/dsa/mv88e6060.c
index 8f4ff5a..0e028df 100644
--- a/net/dsa/mv88e6060.c
+++ b/net/dsa/mv88e6060.c
@@ -286,3 +286,8 @@ static void __exit mv88e6060_cleanup(void)
unregister_switch_driver(&mv88e6060_switch_driver);
}
module_exit(mv88e6060_cleanup);
+
+MODULE_AUTHOR("Lennert Buytenhek <buytenh@wantstofly.org>");
+MODULE_DESCRIPTION("Driver for Marvell 88E6060 ethernet switch chip");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:mv88e6060");
diff --git a/net/dsa/mv88e6123_61_65.c b/net/dsa/mv88e6123_61_65.c
index 7951a6c..6504405 100644
--- a/net/dsa/mv88e6123_61_65.c
+++ b/net/dsa/mv88e6123_61_65.c
@@ -432,3 +432,7 @@ struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.get_ethtool_stats = mv88e6123_61_65_get_ethtool_stats,
.get_sset_count = mv88e6123_61_65_get_sset_count,
};
+
+MODULE_ALIAS("platform:mv88e6123");
+MODULE_ALIAS("platform:mv88e6161");
+MODULE_ALIAS("platform:mv88e6165");
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 45f4123..6786ba4 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -428,3 +428,8 @@ struct dsa_switch_driver mv88e6131_switch_driver = {
.get_ethtool_stats = mv88e6131_get_ethtool_stats,
.get_sset_count = mv88e6131_get_sset_count,
};
+
+MODULE_ALIAS("platform:mv88e6085");
+MODULE_ALIAS("platform:mv88e6095");
+MODULE_ALIAS("platform:mv88e6095f");
+MODULE_ALIAS("platform:mv88e6131");
diff --git a/net/dsa/mv88e6xxx.c b/net/dsa/mv88e6xxx.c
index 50fd860..cacd955 100644
--- a/net/dsa/mv88e6xxx.c
+++ b/net/dsa/mv88e6xxx.c
@@ -543,3 +543,7 @@ static void __exit mv88e6xxx_cleanup(void)
#endif
}
module_exit(mv88e6xxx_cleanup);
+
+MODULE_AUTHOR("Lennert Buytenhek <buytenh@wantstofly.org>");
+MODULE_DESCRIPTION("Driver for Marvell 88E6XXX ethernet switch chips");
+MODULE_LICENSE("GPL");
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 6/8] dsa: Allow core and drivers to be built as modules
From: Ben Hutchings @ 2011-11-26 0:38 UTC (permalink / raw)
To: David Miller; +Cc: Lennert Buytenhek, netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
Change the kconfig types to tristate and adjust the condition for
declaring net_device::dsa_ptr to allow for this.
Adjust the makefile so that if NET_DSA_MV88E6123_61_65=y and
NET_DSA_MV88E6131=m or vice versa then both drivers are built-in. We
could leave these options as bool and make NET_DSA_MV88E6XXX a
user-selected option, but that would break existing configurations.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
I've tested that the all-modules configuration works as far as building
and loading them, but no further.
Ben.
include/linux/netdevice.h | 2 +-
net/dsa/Kconfig | 10 +++++-----
net/dsa/Makefile | 8 ++++++--
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 63721a6..87f7353 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1079,7 +1079,7 @@ struct net_device {
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
struct vlan_group __rcu *vlgrp; /* VLAN group */
#endif
-#ifdef CONFIG_NET_DSA
+#if IS_ENABLED(CONFIG_NET_DSA)
struct dsa_switch_tree *dsa_ptr; /* dsa specific data */
#endif
void *atalk_ptr; /* AppleTalk link */
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index c53ded2..7e12303 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -1,5 +1,5 @@
menuconfig NET_DSA
- bool "Distributed Switch Architecture support"
+ tristate "Distributed Switch Architecture support"
default n
depends on EXPERIMENTAL && NETDEVICES && !S390
select PHYLIB
@@ -26,11 +26,11 @@ config NET_DSA_TAG_TRAILER
# switch drivers
config NET_DSA_MV88E6XXX
- bool
+ tristate
default n
config NET_DSA_MV88E6060
- bool "Marvell 88E6060 ethernet switch chip support"
+ tristate "Marvell 88E6060 ethernet switch chip support"
select NET_DSA_TAG_TRAILER
---help---
This enables support for the Marvell 88E6060 ethernet switch
@@ -41,7 +41,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU
default n
config NET_DSA_MV88E6131
- bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
+ tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
select NET_DSA_MV88E6XXX
select NET_DSA_MV88E6XXX_NEED_PPU
select NET_DSA_TAG_DSA
@@ -50,7 +50,7 @@ config NET_DSA_MV88E6131
ethernet switch chips.
config NET_DSA_MV88E6123_61_65
- bool "Marvell 88E6123/6161/6165 ethernet switch chip support"
+ tristate "Marvell 88E6123/6161/6165 ethernet switch chip support"
select NET_DSA_MV88E6XXX
select NET_DSA_TAG_EDSA
---help---
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 5c48ac5..191dd48 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -11,5 +11,9 @@ dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx_drv.o
mv88e6xxx_drv-y += mv88e6xxx.o
-mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
-mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
+ifdef CONFIG_NET_DSA_MV88E6123_61_65
+mv88e6xxx_drv-y += mv88e6123_61_65.o
+endif
+ifdef CONFIG_NET_DSA_MV88E6131
+mv88e6xxx_drv-y += mv88e6131.o
+endif
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 7/8] net: Revert ARCNET and PHYLIB to tristate options
From: Ben Hutchings @ 2011-11-26 0:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
commit 88491d8103498a6166f70d5999902fec70924314 ("drivers/net: Kconfig
& Makefile cleanup") changed the type of these options to bool, but
they select code that could (and still can) be built as modules.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
Yes David, they do still build this way. Even in an allmodconfig
configuration, now. And I still really want this in net.
Ben.
drivers/net/arcnet/Kconfig | 2 +-
drivers/net/phy/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
index a73d9dc..84fb634 100644
--- a/drivers/net/arcnet/Kconfig
+++ b/drivers/net/arcnet/Kconfig
@@ -4,7 +4,7 @@
menuconfig ARCNET
depends on NETDEVICES && (ISA || PCI || PCMCIA)
- bool "ARCnet support"
+ tristate "ARCnet support"
---help---
If you have a network card of this type, say Y and check out the
(arguably) beautiful poetry in
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index bb88e12..a702443 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -3,7 +3,7 @@
#
menuconfig PHYLIB
- bool "PHY Device support and infrastructure"
+ tristate "PHY Device support and infrastructure"
depends on !S390
depends on NETDEVICES
help
--
1.7.7.3
^ permalink raw reply related
* [PATCH net-next 8/8] net: Use IS_ENABLED() in netdevice.h as appropriate
From: Ben Hutchings @ 2011-11-26 0:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <1322267572.2839.381.camel@deadeye>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
include/linux/netdevice.h | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 87f7353..ac9a4b9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -144,22 +144,20 @@ static inline bool dev_xmit_complete(int rc)
* used.
*/
-#if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if defined(CONFIG_WLAN) || IS_ENABLED(CONFIG_AX25)
# if defined(CONFIG_MAC80211_MESH)
# define LL_MAX_HEADER 128
# else
# define LL_MAX_HEADER 96
# endif
-#elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
+#elif IS_ENABLED(CONFIG_TR)
# define LL_MAX_HEADER 48
#else
# define LL_MAX_HEADER 32
#endif
-#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \
- !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \
- !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \
- !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE)
+#if !IS_ENABLED(CONFIG_NET_IPIP) && !IS_ENABLED(CONFIG_NET_IPGRE) && \
+ !IS_ENABLED(CONFIG_IPV6_SIT) && !IS_ENABLED(CONFIG_IPV6_TUNNEL)
#define MAX_HEADER LL_MAX_HEADER
#else
#define MAX_HEADER (LL_MAX_HEADER + 48)
@@ -922,7 +920,7 @@ struct net_device_ops {
int (*ndo_get_vf_port)(struct net_device *dev,
int vf, struct sk_buff *skb);
int (*ndo_setup_tc)(struct net_device *dev, u8 tc);
-#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
+#if IS_ENABLED(CONFIG_FCOE)
int (*ndo_fcoe_enable)(struct net_device *dev);
int (*ndo_fcoe_disable)(struct net_device *dev);
int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
@@ -937,7 +935,7 @@ struct net_device_ops {
unsigned int sgc);
#endif
-#if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE)
+#if IS_ENABLED(CONFIG_LIBFCOE)
#define NETDEV_FCOE_WWNN 0
#define NETDEV_FCOE_WWPN 1
int (*ndo_fcoe_get_wwn)(struct net_device *dev,
@@ -1076,7 +1074,7 @@ struct net_device {
/* Protocol specific pointers */
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#if IS_ENABLED(CONFIG_VLAN_8021Q)
struct vlan_group __rcu *vlgrp; /* VLAN group */
#endif
#if IS_ENABLED(CONFIG_NET_DSA)
@@ -1242,7 +1240,7 @@ struct net_device {
struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE];
u8 prio_tc_map[TC_BITMASK + 1];
-#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
+#if IS_ENABLED(CONFIG_FCOE)
/* max exchange id for FCoE LRO by ddp */
unsigned int fcoe_ddp_xid;
#endif
--
1.7.7.3
^ permalink raw reply related
* Re: [bug?] r8169: hangs under heavy load
From: Francois Romieu @ 2011-11-26 0:44 UTC (permalink / raw)
To: Eric Dumazet
Cc: Jonathan Nieder, netdev, nic_swsd, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <1322262357.2550.12.camel@edumazet-laptop>
Eric Dumazet <eric.dumazet@gmail.com> :
> Le vendredi 25 novembre 2011 ?? 23:22 +0100, Francois Romieu a ??crit :
[...]
> > This path is not used.
>
> OK, then we receive a RxFIFOOver indication while napi handler is
> running (quite possible if machine under network load)
Welcome to the post 92fc43b4159b518f5baae57301f26d770b0834c9 world. :o/
The hack below could help (the XID matches RTL_GIGA_MAC_VER_22):
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f06aa1..4fcfb3f 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5818,7 +5818,6 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
switch (tp->mac_version) {
/* Work around for rx fifo overflow */
case RTL_GIGA_MAC_VER_11:
- case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_26:
netif_stop_queue(dev);
rtl8169_tx_timeout(dev);
@@ -5835,6 +5834,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
case RTL_GIGA_MAC_VER_31:
/* Experimental science. Pktgen proof. */
case RTL_GIGA_MAC_VER_12:
+ case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_25:
if (status == RxFIFOOver)
goto done;
Traffic may stop flowing though. The patch below should be better:
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f06aa1..54be9e1 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5820,8 +5820,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
case RTL_GIGA_MAC_VER_11:
case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_26:
- netif_stop_queue(dev);
- rtl8169_tx_timeout(dev);
+ rtl8169_schedule_work(dev, rtl8169_reset_task);
goto done;
/* Testers needed. */
case RTL_GIGA_MAC_VER_17:
--
Ueimor
^ permalink raw reply related
* Re: [PATCH iproute2] utils: add s32 parser
From: Stephen Hemminger @ 2011-11-26 0:50 UTC (permalink / raw)
To: Hagen Paul Pfeifer; +Cc: netdev, David.Laight
In-Reply-To: <1322262026-8561-1-git-send-email-hagen@jauu.net>
On Sat, 26 Nov 2011 00:00:26 +0100
Hagen Paul Pfeifer <hagen@jauu.net> wrote:
> Not sure if we should save errno and restore afterwards:
>
> errno_save = errno;
> errno = 0;
> [...]
> errno = errno_save;
Not worth it. errno is only meaningful after a failed library or syscall.
^ permalink raw reply
* Re: Open vSwitch Design
From: Jamal Hadi Salim @ 2011-11-26 1:11 UTC (permalink / raw)
To: Justin Pettit
Cc: dev-yBygre7rU0TnMu66kgdUjQ, Chris Wright, Herbert Xu,
Eric Dumazet, netdev, John Fastabend, Stephen Hemminger,
David Miller
In-Reply-To: <2DB44B16-598F-4414-8B35-8E322D705A9A-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
On Fri, 2011-11-25 at 11:52 -0800, Justin Pettit wrote:
> On Nov 24, 2011, at 9:20 PM, Stephen Hemminger wrote:
>
> A big difficulty is finding an appropriate hardware abstraction. I've worked on porting
> Open vSwitch to a few different vendors' switching ASICs, and they've all looked quite
> different from each other. Even within a vendor, there can be fairly substantial differences.
> Packet processing is broken up into stages (e.g., VLAN preprocessing, ingress ACL processing,
> L2 lookup, L3 lookup, packet modification, packet queuing, packet replication, egress ACL
> processing, etc.)
> and these can be done in different orders and have quite different behaviors.
Theres some discussion going on on how to get ASIC support on the
variety of chips with different offloads (qos, L2 etc); you may wanna
share your experiences.
Having said that - in the kernel we have all the mechanisms you describe
above with quiet a good fit. Speaking from experience of working on some
vendors ASICs (of which i am sure at least one you are working on).
As an example, the ACL can be applied before or after L2 or L3. We can
support wildcard matching to user space and exact-matches in the kernel.
> Also, the size of the various tables varies widely between ASICs--even within the same
> family.
>
> Hardware typically makes use of TCAMs, which support fast lookups of wildcarded flows.
> They're expensive, though, so they're typically limited to entries in the very low thousands.
Those are problems with most merchant silicon - small tables; but there
are some which are easily expandable via DRAM to support a full BGP
table for example.
> In software, we can trivially store 100,000s of entries, but supporting wildcarded lookups
> is very slow. If we only use exact-match flows in the kernel (and leave the wildcarding
> in userspace for kernel misses), we can do extremely fast lookups with hashing on what
> becomes the fastpath.
Justin - theres nothing new you need in the kernel to have that feature.
Let me rephrase that, that has not been a new feature for at least a
decade in Linux.
Add exact match filters with higher priority. Have the lowest priority
filter to redirect to user space. Let user space lookup some service
rule; have it download to the kernel one or more exact matches.
Let the packet proceed on its way down the kernel to its destination if
thats what is defined.
> Using exact-match entries has another big advantage: we can innovate the userspace portion
> without requiring changes to the kernel. For example, we recently went from supporting a
> single OpenFlow table to 255 without any kernel changes. This has an added benefit that
> a flow requiring multiple table lookups becomes a single hash lookup in the kernel, which
> is a huge performance gain in the fastpath. Another example is our introduction of a number
> of metadata "registers" between tables that are never seen in the kernel, but open up a lot
> of interesting applications for OpenFlow controller writers.
That bit sounds interesting - I will look at your spec.
> If you're interested, we include a porting guide in the distribution that describes how one
> would go about bringing Open vSwitch to a new hardware or software platform:
>
> http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob;f=PORTING
>
> Obviously, it's not that relevant here, since there's already a port to Linux. :-)
Does this mean i can have a 24x10G switch sitting in hardware with Linux
hardware support if i use your kernel switch?
Do the vendors agree to some common interface?
> But we've
> iterated over a few different designs and worked on other ports, and we've found this
> hardware/software abstraction layer to work pretty well. In fact, multiple ports of
> Open vSwitch have been done by name-brand third party vendors (this is the avenue most
> vendors use to get their OpenFlow support) and are now shipping.
>
> We're always open to discussing ways that we can improve this interfaces, too, of course!
Make these vendor switches work with plain Linux. The Intel folks are
producing interfaces with L2, ACLs, VIs and are putting some effort to
integrate them into plain Linux. I should be able to set the qos rules
with tc on an intel chip.
You guys can still take advantage of all that and still have your nice
control plane.
cheers,
jamal
^ permalink raw reply
* Re: Open vSwitch Design
From: Jamal Hadi Salim @ 2011-11-26 1:23 UTC (permalink / raw)
To: Jesse Gross
Cc: dev-yBygre7rU0TnMu66kgdUjQ, chrisw-H+wXaHxf7aLQT0dZR+AlfA,
Eric Dumazet, netdev-u79uwXL29TY76Z2rM5mHXA, Florian Westphal,
john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w,
herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw,
shemminger-ZtmgI6mnKB3QT0dZR+AlfA, David Miller
In-Reply-To: <CAEP_g=9tcH9kJrVsHc26kXWZEUS8G-U=U7y6k8xaZG5MD0OTyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, 2011-11-25 at 12:20 -0800, Jesse Gross wrote:
> The flow classifier isn't really designed to do rule lookup in the way
> that OpenFlow/Open vSwitch does, since it's more about choosing which
> fields are considered significant to the flow. I'm sure that it could
> be extended in some way but it seems that the better approach would be
> to factor out the common pieces (such as the header extraction
> mentioned before) than try to cram both models into one component.
Yes, it would need a tweak or two.
But u32 would. And the action subsystem does.
> I understand that you see some commonalities with various parts of the
> system but often there are enough conceptual differences that you end
> up trying to shove a square peg into a round hole.
I have done this for years. I have very good knowledge of merchant
sillicom and i have programmed them on Linux; i know this space a lot
more than you are assuming.
If you can point me to _one_, just _one_ thing, that you do in the
classifier action piece that cannot be done in Linux today and is
more flexible in your setup than it is on Linux we can have a
useful discussion.
> As Stephen
> mentioned about the bridge, many of these components are already
> fairly complex and combining more functionality into them isn't always
> a win.
I think the bridge started on a bad foot for not properly integrating
with Vlans and tightly integrating STP control in the kernel.
cheers,
jamal
^ permalink raw reply
* Re: [bug?] r8169: hangs under heavy load
From: Eric Dumazet @ 2011-11-26 4:07 UTC (permalink / raw)
To: Francois Romieu
Cc: Jonathan Nieder, netdev, nic_swsd, linux-kernel, Armin Kazmi,
Gerd
In-Reply-To: <20111126004447.GA14744@electric-eye.fr.zoreil.com>
Le samedi 26 novembre 2011 à 01:44 +0100, Francois Romieu a écrit :
> Eric Dumazet <eric.dumazet@gmail.com> :
> > Le vendredi 25 novembre 2011 ?? 23:22 +0100, Francois Romieu a ??crit :
> [...]
> > > This path is not used.
> >
> > OK, then we receive a RxFIFOOver indication while napi handler is
> > running (quite possible if machine under network load)
>
> Welcome to the post 92fc43b4159b518f5baae57301f26d770b0834c9 world. :o/
>
> The hack below could help (the XID matches RTL_GIGA_MAC_VER_22):
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 6f06aa1..4fcfb3f 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -5818,7 +5818,6 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
> switch (tp->mac_version) {
> /* Work around for rx fifo overflow */
> case RTL_GIGA_MAC_VER_11:
> - case RTL_GIGA_MAC_VER_22:
> case RTL_GIGA_MAC_VER_26:
> netif_stop_queue(dev);
> rtl8169_tx_timeout(dev);
> @@ -5835,6 +5834,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
> case RTL_GIGA_MAC_VER_31:
> /* Experimental science. Pktgen proof. */
> case RTL_GIGA_MAC_VER_12:
> + case RTL_GIGA_MAC_VER_22:
> case RTL_GIGA_MAC_VER_25:
> if (status == RxFIFOOver)
> goto done;
>
>
> Traffic may stop flowing though. The patch below should be better:
>
Yes, this is a workaround, and following _is_ the way to go...
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 6f06aa1..54be9e1 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -5820,8 +5820,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
> case RTL_GIGA_MAC_VER_11:
> case RTL_GIGA_MAC_VER_22:
> case RTL_GIGA_MAC_VER_26:
> - netif_stop_queue(dev);
> - rtl8169_tx_timeout(dev);
> + rtl8169_schedule_work(dev, rtl8169_reset_task);
> goto done;
> /* Testers needed. */
> case RTL_GIGA_MAC_VER_17:
>
Please Jonathan, Gerd, try this fix !
^ permalink raw reply
* Re: [PATCH] l2tp: ensure sk->dst is still valid
From: Eric Dumazet @ 2011-11-26 4:30 UTC (permalink / raw)
To: Florian Westphal; +Cc: netdev, James Chapman
In-Reply-To: <1322239636-1839-1-git-send-email-fw@strlen.de>
Le vendredi 25 novembre 2011 à 17:47 +0100, Florian Westphal a écrit :
> When using l2tp over ipsec, the tunnel will hang when rekeying
> occurs. Reason is that the transformer bundle attached to the dst entry
> is now in STATE_DEAD and thus xfrm_output_one() drops all packets
> (XfrmOutStateExpired increases).
>
> Fix this by calling __sk_dst_check (which drops the stale dst
> if xfrm dst->check callback finds that the bundle is no longer valid).
>
> Cc: James Chapman <jchapman@katalix.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> net/l2tp/l2tp_core.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
> index cf0f308..89ff8c6 100644
> --- a/net/l2tp/l2tp_core.c
> +++ b/net/l2tp/l2tp_core.c
> @@ -1072,7 +1072,7 @@ int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len
>
> /* Get routing info from the tunnel socket */
> skb_dst_drop(skb);
> - skb_dst_set(skb, dst_clone(__sk_dst_get(sk)));
> + skb_dst_set(skb, dst_clone(__sk_dst_check(sk, 0)));
>
> inet = inet_sk(sk);
> fl = &inet->cork.fl;
Seems good to me, although we could use RCU and skb_dst_set_noref() to
avoid dirtying dst refcount. I'll send a patch for net-next later.
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: Open vSwitch Design
From: Stephen Hemminger @ 2011-11-26 4:38 UTC (permalink / raw)
To: Jamal Hadi Salim
Cc: dev-yBygre7rU0TnMu66kgdUjQ, Chris Wright, Herbert Xu,
Eric Dumazet, netdev, John Fastabend, David Miller
In-Reply-To: <1322269906.7338.23.camel@mojatatu>
Not sure how Openvswitch implementation relates to Openflow specification.
There are a few switches supporting Openflow already:
http://www.openflow.org/wp/switch-nec/
http://www-03.ibm.com/systems/x/options/networking/bnt8264/index.html
The standard(s) are here:
http://www.openflow.org/wp/documents/
Good info from recent symposium:
http://opennetsummit.org/past_conferences.html
^ permalink raw reply
* Re: Open vSwitch Design
From: Martin Casado @ 2011-11-26 8:05 UTC (permalink / raw)
To: Stephen Hemminger
Cc: dev-yBygre7rU0TnMu66kgdUjQ, Chris Wright, Herbert Xu,
Eric Dumazet, netdev, Jamal Hadi Salim, John Fastabend,
David Miller
In-Reply-To: <ec23d63d-27c9-4761-bdd3-e3f54bdb5e77-bX68f012229Xuxj3zoTs5AC/G2K4zDHf@public.gmane.org>
> Not sure how Openvswitch implementation relates to Openflow specification.
The short answer is that Open vSwitch serves as one of the standard
reference implementations for OpenFlow (in fact, the primary developers
of Open vSwitch were some of the original designers of OpenFlow).
Multiple hardware switches on the market use Open vSwitch as the basis
for their OpenFlow support.
>
> There are a few switches supporting Openflow already:
> http://www.openflow.org/wp/switch-nec/
> http://www-03.ibm.com/systems/x/options/networking/bnt8264/index.html
There are many other ports announced or available from vendors such as
HP, Brocade, Pica8, Extreme, Juniper, and NetGear. Cisco has even
announced support support for OpenFlow on the Nexus 3k
(http://www.lightreading.com/document.asp?doc_id=213545).
.martin
>
> The standard(s) are here:
> http://www.openflow.org/wp/documents/
>
> Good info from recent symposium:
> http://opennetsummit.org/past_conferences.html
> _______________________________________________
> dev mailing list
> dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org
> http://openvswitch.org/mailman/listinfo/dev
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Casado
Nicira Networks, Inc.
www.nicira.com
cell: 650-776-1457
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply
* RE: ebtables on a stick
From: Greg Scott @ 2011-11-26 8:27 UTC (permalink / raw)
To: netdev
In-Reply-To: <925A849792280C4E80C5461017A4B8A2A04879@mail733.InfraSupportEtc.com>
I have a situation that needs to route mostly and bridge only a little bit.
I have a private internal LAN, 192.168.10.nnn. But one host in the internal side needs a real public IP Address, call it 1.2.115.157.
I have a Linux firewall set up with ebtables. Interface eth0 faces the Internet and has an IP Address of 1.2.115.146. Interface eth1 is on the LAN side with IP Address 192.168.10.1. Bridge br0 currently has no IP Address and bridges eth0 and eth1. Everyone on the LAN side except my public IP Address host uses the private side of the firewall at 192.160.10.1 for default gateway. The public IP Address host uses the public side of the firewall at 1.2.115.146 for default gateway.
The challenge - I need my public IP Address host to communicate with everyone around the Internet, including the private LAN – and I’ll filter that appropriately with iptables. Everything else should route traditionally.
This mostly works, except I am having trouble communicating with hosts in the private LAN. I can communicate anywhere else on the Internet as long as I don’t try to use my own DNS servers in the private LAN to translate names. After studying ebtables examples and tons of trial and error, I still don’t get it. Here are the ebtables rules:
[root@ehac-fw2011 firewall-scripts]# ebtables -t broute -Lc
Bridge table: broute
Bridge chain: BROUTING, entries: 9, policy: ACCEPT
-p IPv4 --ip-src 1.2.115.157 -j ACCEPT
-p IPv4 --ip-dst 1.2.115.157 -j ACCEPT
-p ARP --arp-ip-src 1.2.115.157 -j ACCEPT
-p ARP --arp-ip-dst 1.2.115.157 -j ACCEPT
-j redirect --redirect-target DROP
[root@ehac-fw2011 firewall-scripts]#
When my public IP host pings the Internal LAN, the internal LAN host replies. Watching tcpdump from the firewall, I can see the echo request come in and go out on both br0 and eth1 and I see the echo reply come back on eth1. But then the reply dies and I never send it back out eth1 over the wire. And when a private host pings the public host, the echo request dies at the firewall. So somehow, I am having trouble getting private→public traffic out of br0 and onto eth1.
What am I missing?
Thanks
- Greg Scott
^ permalink raw reply
* [PATCH iproute2] utils: add s32 parser
From: Hagen Paul Pfeifer @ 2011-11-26 10:54 UTC (permalink / raw)
To: netdev; +Cc: David.Laight, Stephen Hemminger, Hagen Paul Pfeifer
In-Reply-To: <20111125165008.05f4dbf3@nehalam.linuxnetplumber.net>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
include/utils.h | 1 +
lib/utils.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/utils.h b/include/utils.h
index 47f8e07..496db68 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -85,6 +85,7 @@ extern int get_time_rtt(unsigned *val, const char *arg, int *raw);
#define get_short get_s16
extern int get_u64(__u64 *val, const char *arg, int base);
extern int get_u32(__u32 *val, const char *arg, int base);
+extern int get_s32(__s32 *val, const char *arg, int base);
extern int get_u16(__u16 *val, const char *arg, int base);
extern int get_s16(__s16 *val, const char *arg, int base);
extern int get_u8(__u8 *val, const char *arg, int base);
diff --git a/lib/utils.c b/lib/utils.c
index efaf377..d80f79b 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -25,6 +25,7 @@
#include <linux/pkt_sched.h>
#include <time.h>
#include <sys/time.h>
+#include <errno.h>
#include "utils.h"
@@ -198,6 +199,24 @@ int get_u8(__u8 *val, const char *arg, int base)
return 0;
}
+int get_s32(__s32 *val, const char *arg, int base)
+{
+ long res;
+ char *ptr;
+
+ errno = 0;
+
+ if (!arg || !*arg)
+ return -1;
+ res = strtol(arg, &ptr, base);
+ if (ptr == arg || *ptr ||
+ ((res == LONG_MIN || res == LONG_MAX) && errno == ERANGE) ||
+ res > INT32_MAX || res < INT32_MIN)
+ return -1;
+ *val = res;
+ return 0;
+}
+
int get_s16(__s16 *val, const char *arg, int base)
{
long res;
--
1.7.7
^ permalink raw reply related
* Re: [BUG] 3.2-rc2: BUG kmalloc-8: Redzone overwritten
From: Sasha Levin @ 2011-11-26 10:54 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, Matt Mackall, Christoph Lameter, Pekka Enberg,
linux-mm, linux-kernel, netdev
In-Reply-To: <1321870967.8173.1.camel@lappy>
On Mon, 2011-11-21 at 12:22 +0200, Sasha Levin wrote:
> On Mon, 2011-11-21 at 11:21 +0100, Eric Dumazet wrote:
> > Le lundi 21 novembre 2011 à 11:15 +0100, Eric Dumazet a écrit :
> >
> > >
> > > Hmm, trinity tries to crash decnet ;)
> > >
> > > Maybe we should remove this decnet stuff for good instead of tracking
> > > all bugs just for the record. Is there anybody still using decnet ?
> > >
> > > For example dn_start_slow_timer() starts a timer without holding a
> > > reference on struct sock, this is highly suspect.
> > >
> > > [PATCH] decnet: proper socket refcounting
> > >
> > > Better use sk_reset_timer() / sk_stop_timer() helpers to make sure we
> > > dont access already freed/reused memory later.
> > >
> > > Reported-by: Sasha Levin <levinsasha928@gmail.com>
> > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> >
> > Hmm, I forgot to remove the sock_hold(sk) call from dn_slow_timer(),
> > here is V2 :
> >
> > [PATCH] decnet: proper socket refcounting
> >
> > Better use sk_reset_timer() / sk_stop_timer() helpers to make sure we
> > dont access already freed/reused memory later.
> >
> > Reported-by: Sasha Levin <levinsasha928@gmail.com>
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> > ---
>
> [snip]
>
> Applied locally and running same tests as before, will update with
> results.
>
Looks ok after a couple days of testing.
Tested-by: Sasha Levin <levinsasha928@gmail.com>
--
Sasha.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ 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