* [PATCH 1/5] temac: Add Virtex4 address mappings
From: gfilip @ 2010-02-22 19:06 UTC (permalink / raw)
To: netdev; +Cc: glikely, Filip Gospodinov
This patch belongs to a set of patches which extends the temac driver to support Virtex4-FX. It was successfully tested on the ML403 evaluation board.
Signed-off-by: Filip Gospodinov <gfilip@ee.ethz.ch>
---
drivers/net/ll_temac.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ll_temac.h b/drivers/net/ll_temac.h
index 1af66a1..95dd650 100644
--- a/drivers/net/ll_temac.h
+++ b/drivers/net/ll_temac.h
@@ -56,7 +56,52 @@ This option defaults to enabled (set) */
XTE_OPTION_RXEN)
/* XPS_LL_TEMAC SDMA registers definition */
+#ifdef CONFIG_XILINX_VIRTEX_4_FX
+#define TX_NXTDESC_PTR 0x00 /* r */
+#define TX_CURBUF_ADDR 0x04 /* r */
+#define TX_CURBUF_LENGTH 0x08 /* r */
+#define TX_CURDESC_PTR 0x0C /* rw */
+#define TX_TAILDESC_PTR 0x10 /* rw */
+#define TX_CHNL_CTRL 0x14 /* rw */
+#define CHNL_CTRL_IRQ_IOE (1 << 9)
+#define CHNL_CTRL_IRQ_EN (1 << 7)
+#define CHNL_CTRL_IRQ_ERR_EN (1 << 2)
+#define CHNL_CTRL_IRQ_DLY_EN (1 << 1)
+#define CHNL_CTRL_IRQ_COAL_EN (1 << 0)
+#define TX_IRQ_REG 0x18 /* rw */
+#define TX_CHNL_STS 0x1C /* r */
+#define RX_NXTDESC_PTR 0x20 /* r */
+#define RX_CURBUF_ADDR 0x24 /* r */
+#define RX_CURBUF_LENGTH 0x28 /* r */
+#define RX_CURDESC_PTR 0x2C /* rw */
+#define RX_TAILDESC_PTR 0x30 /* rw */
+#define RX_CHNL_CTRL 0x34 /* rw */
+#define RX_IRQ_REG 0x38 /* rw */
+#define IRQ_COAL (1 << 0)
+#define IRQ_DLY (1 << 1)
+#define IRQ_ERR (1 << 2)
+#define IRQ_DMAERR (1 << 7) /* this is not documented ??? */
+#define RX_CHNL_STS 0x3C /* r */
+#define CHNL_STS_ENGBUSY (1 << 1)
+#define CHNL_STS_EOP (1 << 2)
+#define CHNL_STS_SOP (1 << 3)
+#define CHNL_STS_CMPLT (1 << 4)
+#define CHNL_STS_SOE (1 << 5)
+#define CHNL_STS_IOE (1 << 6)
+#define CHNL_STS_ERR (1 << 7)
+
+#define CHNL_STS_BSYWR (1 << 16)
+#define CHNL_STS_CURPERR (1 << 17)
+#define CHNL_STS_NXTPERR (1 << 18)
+#define CHNL_STS_ADDRERR (1 << 19)
+#define CHNL_STS_CMPERR (1 << 20)
+#define CHNL_STS_TAILERR (1 << 21)
+
+#define DMA_CONTROL_REG 0x40 /* rw */
+#define DMA_CONTROL_RST (1 << 0)
+#define DMA_TAIL_ENABLE (1 << 2)
+#else
#define TX_NXTDESC_PTR 0x00 /* r */
#define TX_CURBUF_ADDR 0x01 /* r */
#define TX_CURBUF_LENGTH 0x02 /* r */
@@ -182,6 +227,7 @@ This option defaults to enabled (set) */
#define DMA_CONTROL_REG 0x10 /* rw */
#define DMA_CONTROL_RST (1 << 0)
#define DMA_TAIL_ENABLE (1 << 2)
+#endif /*CONFIG_XILINX_VIRTEX_4_FX*/
/* XPS_LL_TEMAC direct registers definition */
--
1.6.4.4
^ permalink raw reply related
* [PATCH 3/5] temac: dma deinit
From: gfilip @ 2010-02-22 19:06 UTC (permalink / raw)
To: netdev; +Cc: glikely, Filip Gospodinov
In-Reply-To: <1266865621-28955-2-git-send-email-gfilip@ee.ethz.ch>
This patch belongs to a set of patches which extends the temac driver to support Virtex4-FX. It was successfully tested on the ML403 evaluation board.
Signed-off-by: Filip Gospodinov <gfilip@ee.ethz.ch>
---
drivers/net/ll_temac_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index 0d4b1c5..2e7421c 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -946,6 +946,9 @@ static int __devexit temac_of_remove(struct of_device *op)
if (lp->phy_node)
of_node_put(lp->phy_node);
lp->phy_node = NULL;
+#ifdef CONFIG_XILINX_VIRTEX_4_FX
+ iounmap((void *) lp->dma_regs);
+#endif
dev_set_drvdata(&op->dev, NULL);
free_netdev(ndev);
return 0;
--
1.6.4.4
^ permalink raw reply related
* [PATCH 5/5] temac: add missing mask
From: gfilip @ 2010-02-22 19:07 UTC (permalink / raw)
To: netdev; +Cc: glikely, Filip Gospodinov
In-Reply-To: <1266865621-28955-4-git-send-email-gfilip@ee.ethz.ch>
For Virtex4-FX this mask is necessary. I think this is also true for Virtex5. Please test.
Signed-off-by: Filip Gospodinov <gfilip@ee.ethz.ch>
---
drivers/net/ll_temac_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index 8b4e1b9..43d51b7 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -627,7 +627,7 @@ static void ll_temac_recv(struct net_device *ndev)
while ((bdstat & STS_CTRL_APP0_CMPLT)) {
skb = lp->rx_skb[lp->rx_bd_ci];
- length = cur_p->app4;
+ length = (cur_p->app4 & 0x3fff);
skb_vaddr = virt_to_bus(skb->data);
dma_unmap_single(ndev->dev.parent, skb_vaddr, length,
--
1.6.4.4
^ permalink raw reply related
* [net-next-2.6 PATCH] e1000: convert to use netdev_for_each_mc_addr
From: Jiri Pirko @ 2010-02-22 19:10 UTC (permalink / raw)
To: netdev; +Cc: davem
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/e1000/e1000_main.c | 37 +++++++++++++++++--------------------
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 3b14dd7..c99f95c 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2161,29 +2161,26 @@ static void e1000_set_rx_mode(struct net_device *netdev)
WARN_ON(i == rar_entries);
- mc_ptr = netdev->mc_list;
-
- for (; i < rar_entries; i++) {
- if (mc_ptr) {
- e1000_rar_set(hw, mc_ptr->da_addr, i);
- mc_ptr = mc_ptr->next;
- } else {
- E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0);
- E1000_WRITE_FLUSH();
- E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0);
- E1000_WRITE_FLUSH();
+ netdev_for_each_mc_addr(mc_ptr, netdev) {
+ if (i == rar_entries) {
+ /* load any remaining addresses into the hash table */
+ u32 hash_reg, hash_bit, mta;
+ hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr);
+ hash_reg = (hash_value >> 5) & 0x7F;
+ hash_bit = hash_value & 0x1F;
+ mta = (1 << hash_bit);
+ mcarray[hash_reg] |= mta;
+ }
+ else {
+ e1000_rar_set(hw, mc_ptr->da_addr, i++);
}
}
- /* load any remaining addresses into the hash table */
-
- for (; mc_ptr; mc_ptr = mc_ptr->next) {
- u32 hash_reg, hash_bit, mta;
- hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr);
- hash_reg = (hash_value >> 5) & 0x7F;
- hash_bit = hash_value & 0x1F;
- mta = (1 << hash_bit);
- mcarray[hash_reg] |= mta;
+ for (; i < rar_entries; i++) {
+ E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0);
+ E1000_WRITE_FLUSH();
+ E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0);
+ E1000_WRITE_FLUSH();
}
/* write the hash table completely, write from bottom to avoid
--
1.6.6
^ permalink raw reply related
* pull request: wireless-next-2.6 2010-02-22
From: John W. Linville @ 2010-02-22 18:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Here is one more big batch of wireless bits intended for 2.6.34. Along
with the usual variety of driver fixes are some mac80211 bits from
Johannes, a number of iwlwifi updates from Intel, and a big batch of of
wl1271 bits from Nokia.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 06c92ee6384c33dbb6e313c66272181db70abbb0:
Alexander Beregalov (1):
eepro: fix netdev_mc_count conversion
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Abhijeet Kolekar (2):
iwlwifi: cleanup return values
iwlwifi: indicate calib version for 6050 series
Darren Jenkins (1):
drivers/net/wireless/p54/txrx.c Fix off by one error
Felix Fietkau (2):
ath9k: fix rate control fallback rate selection
ath9k: fix beacon timer restart after a card reset
Frederic Leroy (1):
staging: rtl8192su: fix compile error from wireless-testing commit
Gertjan van Wingerde (4):
rt2x00: Introduce SoC interface type.
rt2x00: Reorganize RT chipset setting for PCI/SOC devices.
rt2x00: rework RT chipset and revision determination for PCI an SOC devices.
rt2x00: rt2800 - Make rt30xx and rt35xx chipsets configurable.
Hauke Mehrtens (3):
b43legacy: fix typo in ifdef comment
rtl8187: fix typo in ifdef comment
ssb: fix typo in ifdef comment
Jean-François Moine (1):
p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec
Johannes Berg (8):
mac80211: fix netdev rename
mac80211: reject unhandled action frames
mac80211: split ieee80211_drop_unencrypted
ar9170: convert to new station add/remove callbacks
p54: convert to new station add/remove callbacks
mac80211_hwsim: convert to new station add/remove callbacks
ath9k: convert to new station add/remove callbacks
mwl8k: convert to new station add/remove callbacks
John W. Linville (1):
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Jouni Malinen (2):
cfg80211/mac80211: allow registering for and sending action frames
ath9k: Use the Beacon TX rate from mac80211
Juuso Oikarinen (11):
wl1271: Fix PSM entry
wl1271: Fix channel changing code
wl1271: Add SSID configuration for JOIN in ad-hoc
wl1271: Use NVS INI file configuration
wl1271: Retrieve device mac address from the nvs file
wl1271: Fix random MAC address setting
wl1271: Optimized RX path packet retrieval
wl1271: Fix key-remove error
wl1271: Fix WEP key handling
wl1271: Fix ad-hoc SSID update
wl1271: Fix beacon filter table configuration
Kalle Valo (7):
nl80211: add power save commands
wl1271: modify wl1271_acx_ac_cfg() to use function parameters
wl1271: modify wl1271_acx_tid_cfg() to use function parameters
wl1271: implement WMM
wl1271: wakeup chip in op_conf_tx()
wl1271: add testmode support
MAINTAINERS: update Kalle's email address
Larry Finger (1):
ssb: Add PCI ID 0x4322 to PHU handling
Luciano Coelho (2):
wl1271: add most of the normal initialization commands to PLT mode
wl1271: skip 3 unused bytes from the NVS
Pavel Roskin (2):
mwl8k: disable softirqs when accessing sta_notify_list
Introduce PCMCIA_DEVICE_PROD_ID3
Randy Dunlap (1):
wireless: airo_cs build fixes
Reinette Chatre (4):
iwlwifi: fix scan race
iwlwifi: reset card during probe
iwl3945: remove STATUS macros from header
iwlwifi: enable serialization of synchronous commands
Shimada Hirofumi (1):
p54usb: Add usbid for Corega CG-WLUSB2GT.
Stanislaw Gruszka (1):
iwlwifi: use dma_alloc_coherent
Teemu Paasikivi (4):
wl1271: Moved common IO functions from wl271_spi.c to wl1271_io.c
wl1271: Renamed IO functions
wl1271: Added IO reset and init functions
wl1271: Added alloc and free hw functions
Thadeu Lima de Souza Cascardo (1):
nl80211: does not allow NEW_STATION and DEL_STATION for mesh
Trieu 'Andrew' Nguyen (2):
iwlwifi: Adjusting PLCP error threshold for 1000 NIC
iwlwifi: Monitor and recover the aggregation TX flow failure
Wey-Yi Guy (8):
iwlwifi: clear all tx queues when firmware ready
iwlwifi: multiple force reset mode
iwlwifi: add debug function to reset/reload radio/firmware
iwlwifi: check for aggregation frame and queue
iwlwifi: remove unused op-code in PHY Calibration command
iwlwifi: clear all the stop_queue flag after load firmware
iwlwifi: separated time check for different type of force reset
iwlwifi: add debugfs to monitor force reset parameters
MAINTAINERS | 2 +-
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/airo.c | 1 +
drivers/net/wireless/ath/ar9170/main.c | 70 ++--
drivers/net/wireless/ath/ath9k/beacon.c | 19 +-
drivers/net/wireless/ath/ath9k/main.c | 35 +-
drivers/net/wireless/ath/ath9k/rc.c | 15 +-
drivers/net/wireless/b43legacy/leds.h | 2 +-
drivers/net/wireless/hostap/hostap_cs.c | 17 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 18 -
drivers/net/wireless/iwlwifi/iwl-4965.c | 7 +
drivers/net/wireless/iwlwifi/iwl-5000.c | 7 +
drivers/net/wireless/iwlwifi/iwl-6000.c | 79 ++++-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 15 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 29 ++-
drivers/net/wireless/iwlwifi/iwl-commands.h | 4 -
drivers/net/wireless/iwlwifi/iwl-core.c | 59 ++-
drivers/net/wireless/iwlwifi/iwl-core.h | 11 +-
drivers/net/wireless/iwlwifi/iwl-csr.h | 2 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 60 +++-
drivers/net/wireless/iwlwifi/iwl-dev.h | 26 +-
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 80 +++-
drivers/net/wireless/iwlwifi/iwl-scan.c | 37 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 64 ++--
drivers/net/wireless/iwlwifi/iwl3945-base.c | 42 +-
drivers/net/wireless/mac80211_hwsim.c | 32 +-
drivers/net/wireless/mwl8k.c | 106 +----
drivers/net/wireless/orinoco/orinoco_cs.c | 9 +-
drivers/net/wireless/p54/main.c | 28 +-
drivers/net/wireless/p54/p54usb.c | 2 +
drivers/net/wireless/p54/txrx.c | 2 +-
drivers/net/wireless/rt2x00/Kconfig | 67 +++-
drivers/net/wireless/rt2x00/rt2400pci.c | 4 +-
drivers/net/wireless/rt2x00/rt2400pci.h | 1 +
drivers/net/wireless/rt2x00/rt2500pci.c | 4 +-
drivers/net/wireless/rt2x00/rt2500pci.h | 1 +
drivers/net/wireless/rt2x00/rt2500usb.c | 4 +-
drivers/net/wireless/rt2x00/rt2800.h | 14 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 115 +++--
drivers/net/wireless/rt2x00/rt2800pci.c | 49 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 306 ++++++++-----
drivers/net/wireless/rt2x00/rt2x00.h | 66 +--
drivers/net/wireless/rt2x00/rt2x00debug.c | 4 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 7 -
drivers/net/wireless/rt2x00/rt2x00pci.h | 1 +
drivers/net/wireless/rt2x00/rt2x00soc.c | 11 +-
drivers/net/wireless/rt2x00/rt2x00soc.h | 10 +-
drivers/net/wireless/rt2x00/rt61pci.c | 14 +-
drivers/net/wireless/rt2x00/rt61pci.h | 9 +
drivers/net/wireless/rt2x00/rt73usb.c | 7 +-
drivers/net/wireless/rt2x00/rt73usb.h | 2 +
drivers/net/wireless/rtl818x/rtl8187_leds.c | 2 +-
drivers/net/wireless/rtl818x/rtl8187_leds.h | 2 +-
drivers/net/wireless/wl12xx/Makefile | 4 +-
drivers/net/wireless/wl12xx/wl1271.h | 34 ++-
drivers/net/wireless/wl12xx/wl1271_acx.c | 62 ++--
drivers/net/wireless/wl12xx/wl1271_acx.h | 13 +-
drivers/net/wireless/wl12xx/wl1271_boot.c | 106 ++---
drivers/net/wireless/wl12xx/wl1271_cmd.c | 136 ++-----
drivers/net/wireless/wl12xx/wl1271_cmd.h | 88 +----
drivers/net/wireless/wl12xx/wl1271_conf.h | 144 +------
drivers/net/wireless/wl12xx/wl1271_event.c | 50 ++-
drivers/net/wireless/wl12xx/wl1271_init.c | 38 ++-
drivers/net/wireless/wl12xx/wl1271_init.h | 4 +
drivers/net/wireless/wl12xx/wl1271_io.c | 213 +++++++++
drivers/net/wireless/wl12xx/wl1271_io.h | 68 +++
drivers/net/wireless/wl12xx/wl1271_main.c | 481 ++++++++++++--------
drivers/net/wireless/wl12xx/wl1271_ps.c | 22 +-
drivers/net/wireless/wl12xx/wl1271_ps.h | 3 +-
drivers/net/wireless/wl12xx/wl1271_rx.c | 11 +-
drivers/net/wireless/wl12xx/wl1271_spi.c | 157 -------
drivers/net/wireless/wl12xx/wl1271_spi.h | 30 --
drivers/net/wireless/wl12xx/wl1271_testmode.c | 283 ++++++++++++
drivers/net/wireless/wl12xx/wl1271_testmode.h | 31 ++
drivers/net/wireless/wl12xx/wl1271_tx.c | 28 +-
drivers/net/wireless/wl12xx/wl1271_tx.h | 36 ++
drivers/ssb/driver_chipcommon_pmu.c | 7 +
drivers/ssb/ssb_private.h | 4 +-
drivers/staging/rtl8192su/ieee80211/ieee80211.h | 12 +-
.../staging/rtl8192su/ieee80211/ieee80211_r8192s.h | 2 +-
drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c | 18 +-
.../rtl8192su/ieee80211/ieee80211_softmac.c | 38 +-
.../staging/rtl8192su/ieee80211/rtl819x_BAProc.c | 4 +-
drivers/staging/rtl8192su/r8192U_core.c | 4 +-
include/linux/nl80211.h | 51 ++-
include/net/cfg80211.h | 54 ++-
include/net/mac80211.h | 6 +-
include/pcmcia/device_id.h | 5 +
net/mac80211/cfg.c | 12 +-
net/mac80211/ieee80211_i.h | 6 +-
net/mac80211/iface.c | 2 +-
net/mac80211/mlme.c | 35 ++
net/mac80211/rx.c | 140 ++++--
net/mac80211/status.c | 7 +-
net/wireless/core.c | 20 +-
net/wireless/core.h | 9 +
net/wireless/mlme.c | 166 +++++++
net/wireless/nl80211.c | 440 ++++++++++++++++--
net/wireless/nl80211.h | 8 +
net/wireless/wext-compat.c | 10 +-
104 files changed, 3097 insertions(+), 1621 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_io.c
create mode 100644 drivers/net/wireless/wl12xx/wl1271_io.h
create mode 100644 drivers/net/wireless/wl12xx/wl1271_testmode.c
create mode 100644 drivers/net/wireless/wl12xx/wl1271_testmode.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-02-22.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: ixgbe_clean_tx_irq: tx hang 1 detected, resetting adapter (2.6.32.8)
From: Jesper Krogh @ 2010-02-22 18:40 UTC (permalink / raw)
To: Jesse Brandeburg
Cc: linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
Jesse Brandeburg
In-Reply-To: <4807377b1002171453n277cfea3s6d7f3629bd43f674-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Jesse Brandeburg wrote:
> On Sun, Feb 14, 2010 at 8:29 AM, Jesper Krogh <jesper-Q2TZfHgGEy4@public.gmane.org> wrote:
>> Hi List.
>>
>> I have tried to get a dual bond of 2 x 10G NICs using the
>> Intel Corporation 82598EB 10-Gigabit AT2 Server Adapter (rev 01)
>> going. As first it looked like it "just worked" but when tried to fill
>> the links with data one of the NIC's (eth7) hang and did a reset of
>> itself, so all data was pushed through the other NIC in the bond (eth8)
>>
>> Full dmesg below, but I think the important part is this:
>>
>> [ 2162.745354] ixgbe: eth7: ixgbe_check_tx_hang: Detected Tx Unit Hang
>> [ 2162.745356] Tx Queue <4>
>> [ 2162.745356] TDH, TDT <e1>, <cc>
>> [ 2162.745357] next_to_use <cc>
>> [ 2162.745358] next_to_clean <e1>
>> [ 2162.745359] tx_buffer_info[next_to_clean]
>> [ 2162.745359] time_stamp <1000713d3>
>> [ 2162.745360] jiffies <10007152e>
>> [ 2163.162478] ixgbe: eth7: ixgbe_clean_tx_irq: tx hang 1 detected,
>> resetting adapter
>> [ 2163.357333] bonding: bond0: link status definitely down for interface
>> eth7, disabling it
>> [ 2168.670342] ixgbe: eth7 NIC Link is Up 10 Gbps, Flow Control: None
>
> Hi Jesper, my first thought was flow control, but I can see you have it off.
I didnt change it, so its default.
> Can we get some more details on the hardware and bios version?
Sun X4600, 128GB, 16 cores..
> What
> about some dmidecode output. I'm checking here if we have any
> hardware like this.
http://shrek.krogh.cc/~jesper/dmidecode.txt
> are you running ubuntu 9.10 or something else?
We're on Ubuntu 8.04 but we basically "only" use a filesystem, kernel
with a well-performing NFS-server and some NIC that work well :-)
> Wow, thats a monster machine, 8 nodes, 128GB ram. Can we get a full
> lspci -vvv output, as well as ethtool -e eth7 and eth8
http://shrek.krogh.cc/~jesper/lspci.txt
http://shrek.krogh.cc/~jesper/ethtool-eth7.txt
http://shrek.krogh.cc/~jesper/ethtool-eth8.txt
> 32 has ixgbe with a known issue of multiple mappings on transmit
> possibly causing some problems, could it be that you're running into
> this? can you apply commit e5a43549f7a58509a91b299a51337d386697b92c
> and see if it fixes your issue?
I'll do that the next time I can push a reboot through.
--
Jesper
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* pull request: wireless-2.6 2010-02-22
From: John W. Linville @ 2010-02-22 18:26 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel, torvalds
Dave,
I have a handful of late-breakers for iwlwifi. The one from Dan
Halperin moves a single line of code and is a fix for an 802.11n
regression introduced in the 2.6.33 cycle. The other two combine
to address a problem that causes the wireless LAN connection to
die without any error message. It has been developed and tested in
combination between the Intel wireless team and a contributor from
Red Hat. I hope you will consider including these for 2.6.33 if at
all possible.
Please let me know if there are problems!
Thanks,
John
P.S. The wireless-2.6 tree should be safe/clean for Linus to pull if
time is too short for a round-trip through net-2.6... :-)
---
The following changes since commit 242cc0547f3bcecc0b02ca6f3e9512760185727e:
Ben Hutchings (1):
sfc: SFE4002/SFN4112F: Widen temperature and voltage tolerances
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Dan Halperin (1):
iwlwifi: set HT flags after channel in rxon
Stanislaw Gruszka (1):
iwlwifi: sanity check before counting number of tfds can be free
Wey-Yi Guy (1):
iwlwifi: error checking for number of tfds in queue
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 8 +++-----
drivers/net/wireless/iwlwifi/iwl-core.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 2 ++
drivers/net/wireless/iwlwifi/iwl-tx.c | 22 ++++++++++++++++++++--
5 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 9b4b8b5..3146281 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2008,7 +2008,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
"%d index %d\n", scd_ssn , index);
freed = iwl_tx_queue_reclaim(priv, txq_id, index);
- priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark) &&
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index de45f30..cffaae7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1125,7 +1125,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
scd_ssn , index, txq_id, txq->swq_id);
freed = iwl_tx_queue_reclaim(priv, txq_id, index);
- priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark) &&
@@ -1153,16 +1153,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
tx_resp->failure_frame);
freed = iwl_tx_queue_reclaim(priv, txq_id, index);
- if (ieee80211_is_data_qos(tx_resp->frame_ctrl))
- priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
if (priv->mac80211_registered &&
(iwl_queue_space(&txq->q) > txq->q.low_mark))
iwl_wake_queue(priv, txq_id);
}
- if (ieee80211_is_data_qos(tx_resp->frame_ctrl))
- iwl_txq_check_empty(priv, sta_id, tid, txq_id);
+ iwl_txq_check_empty(priv, sta_id, tid, txq_id);
if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index d10bea6..f36f804 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2744,8 +2744,8 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
priv->staging_rxon.flags = 0;
- iwl_set_rxon_ht(priv, ht_conf);
iwl_set_rxon_channel(priv, conf->channel);
+ iwl_set_rxon_ht(priv, ht_conf);
iwl_set_flags_for_band(priv, conf->channel->band);
spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 675b7df..fe37d6a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -446,6 +446,8 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv);
int iwl_hw_tx_queue_init(struct iwl_priv *priv,
struct iwl_tx_queue *txq);
int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
+void iwl_free_tfds_in_queue(struct iwl_priv *priv,
+ int sta_id, int tid, int freed);
int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
int slots_num, u32 txq_id);
void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 87ce2bd..8f40715 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -120,6 +120,20 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
EXPORT_SYMBOL(iwl_txq_update_write_ptr);
+void iwl_free_tfds_in_queue(struct iwl_priv *priv,
+ int sta_id, int tid, int freed)
+{
+ if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
+ priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ else {
+ IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
+ priv->stations[sta_id].tid[tid].tfds_in_queue,
+ freed);
+ priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
+ }
+}
+EXPORT_SYMBOL(iwl_free_tfds_in_queue);
+
/**
* iwl_tx_queue_free - Deallocate DMA queue.
* @txq: Transmit queue to deallocate.
@@ -1131,6 +1145,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
struct iwl_queue *q = &txq->q;
struct iwl_tx_info *tx_info;
int nfreed = 0;
+ struct ieee80211_hdr *hdr;
if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
@@ -1145,13 +1160,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
tx_info = &txq->txb[txq->q.read_ptr];
iwl_tx_status(priv, tx_info->skb[0]);
+
+ hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data;
+ if (hdr && ieee80211_is_data_qos(hdr->frame_control))
+ nfreed++;
tx_info->skb[0] = NULL;
if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
priv->cfg->ops->lib->txq_free_tfd(priv, txq);
- nfreed++;
}
return nfreed;
}
@@ -1559,7 +1577,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
/* calculate mac80211 ampdu sw queue to wake */
int freed = iwl_tx_queue_reclaim(priv, scd_flow, index);
- priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+ iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
if ((iwl_queue_space(&txq->q) > txq->q.low_mark) &&
priv->mac80211_registered &&
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply related
* [PATCH 3/3] af_key: locking change
From: Stephen Hemminger @ 2010-02-22 17:57 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20100222175716.900955428@vyatta.com>
[-- Attachment #1: pfkey-rcu.patch --]
[-- Type: text/plain, Size: 4076 bytes --]
Get rid of custom locking that was using wait queue, lock, and atomic
to basically build a queued mutex. Use RCU for read side.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/key/af_key.c 2010-02-22 09:19:03.242742827 -0800
+++ b/net/key/af_key.c 2010-02-22 09:22:53.921492802 -0800
@@ -41,9 +41,7 @@ struct netns_pfkey {
struct hlist_head table;
atomic_t socks_nr;
};
-static DECLARE_WAIT_QUEUE_HEAD(pfkey_table_wait);
-static DEFINE_RWLOCK(pfkey_table_lock);
-static atomic_t pfkey_table_users = ATOMIC_INIT(0);
+static DEFINE_MUTEX(pfkey_mutex);
struct pfkey_sock {
/* struct sock must be the first member of struct pfkey_sock */
@@ -108,50 +106,6 @@ static void pfkey_sock_destruct(struct s
atomic_dec(&net_pfkey->socks_nr);
}
-static void pfkey_table_grab(void)
-{
- write_lock_bh(&pfkey_table_lock);
-
- if (atomic_read(&pfkey_table_users)) {
- DECLARE_WAITQUEUE(wait, current);
-
- add_wait_queue_exclusive(&pfkey_table_wait, &wait);
- for(;;) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- if (atomic_read(&pfkey_table_users) == 0)
- break;
- write_unlock_bh(&pfkey_table_lock);
- schedule();
- write_lock_bh(&pfkey_table_lock);
- }
-
- __set_current_state(TASK_RUNNING);
- remove_wait_queue(&pfkey_table_wait, &wait);
- }
-}
-
-static __inline__ void pfkey_table_ungrab(void)
-{
- write_unlock_bh(&pfkey_table_lock);
- wake_up(&pfkey_table_wait);
-}
-
-static __inline__ void pfkey_lock_table(void)
-{
- /* read_lock() synchronizes us to pfkey_table_grab */
-
- read_lock(&pfkey_table_lock);
- atomic_inc(&pfkey_table_users);
- read_unlock(&pfkey_table_lock);
-}
-
-static __inline__ void pfkey_unlock_table(void)
-{
- if (atomic_dec_and_test(&pfkey_table_users))
- wake_up(&pfkey_table_wait);
-}
-
-
static const struct proto_ops pfkey_ops;
static void pfkey_insert(struct sock *sk)
@@ -159,16 +113,16 @@ static void pfkey_insert(struct sock *sk
struct net *net = sock_net(sk);
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
- pfkey_table_grab();
- sk_add_node(sk, &net_pfkey->table);
- pfkey_table_ungrab();
+ mutex_lock(&pfkey_mutex);
+ sk_add_node_rcu(sk, &net_pfkey->table);
+ mutex_unlock(&pfkey_mutex);
}
static void pfkey_remove(struct sock *sk)
{
- pfkey_table_grab();
- sk_del_node_init(sk);
- pfkey_table_ungrab();
+ mutex_lock(&pfkey_mutex);
+ sk_del_node_init_rcu(sk);
+ mutex_unlock(&pfkey_mutex);
}
static struct proto key_proto = {
@@ -223,6 +177,8 @@ static int pfkey_release(struct socket *
sock_orphan(sk);
sock->sk = NULL;
skb_queue_purge(&sk->sk_write_queue);
+
+ synchronize_rcu();
sock_put(sk);
return 0;
@@ -277,8 +233,8 @@ static int pfkey_broadcast(struct sk_buf
if (!skb)
return -ENOMEM;
- pfkey_lock_table();
- sk_for_each(sk, node, &net_pfkey->table) {
+ rcu_read_lock();
+ sk_for_each_rcu(sk, node, &net_pfkey->table) {
struct pfkey_sock *pfk = pfkey_sk(sk);
int err2;
@@ -309,7 +265,7 @@ static int pfkey_broadcast(struct sk_buf
if ((broadcast_flags & BROADCAST_REGISTERED) && err)
err = err2;
}
- pfkey_unlock_table();
+ rcu_read_unlock();
if (one_sk != NULL)
err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
@@ -3702,8 +3658,8 @@ static void *pfkey_seq_start(struct seq_
struct net *net = seq_file_net(f);
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
- read_lock(&pfkey_table_lock);
- return seq_hlist_start_head(&net_pfkey->table, *ppos);
+ rcu_read_lock();
+ return seq_hlist_start_head_rcu(&net_pfkey->table, *ppos);
}
static void *pfkey_seq_next(struct seq_file *f, void *v, loff_t *ppos)
@@ -3711,12 +3667,12 @@ static void *pfkey_seq_next(struct seq_f
struct net *net = seq_file_net(f);
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
- return seq_hlist_next(v, &net_pfkey->table, ppos);
+ return seq_hlist_next_rcu(v, &net_pfkey->table, ppos);
}
static void pfkey_seq_stop(struct seq_file *f, void *v)
{
- read_unlock(&pfkey_table_lock);
+ rcu_read_unlock();
}
static const struct seq_operations pfkey_seq_ops = {
--
^ permalink raw reply
* [PATCH 2/3] packet: convert socket list to RCU (v3)
From: Stephen Hemminger @ 2010-02-22 17:57 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20100222175716.900955428@vyatta.com>
[-- Attachment #1: packet-list-rcu.patch --]
[-- Type: text/plain, Size: 6199 bytes --]
Convert AF_PACKET to use RCU, eliminating one more reader/writer lock.
There is no need for a real sk_del_node_init_rcu(), because sk_del_node_init
is doing the equivalent thing to hlst_del_init_rcu already; but added
some comments to try and make that obvious.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
include/net/netns/packet.h | 4 ++--
include/net/sock.h | 10 ++++++++++
net/packet/af_packet.c | 42 ++++++++++++++++++++----------------------
3 files changed, 32 insertions(+), 24 deletions(-)
--- a/include/net/netns/packet.h 2010-02-22 09:07:28.562430023 -0800
+++ b/include/net/netns/packet.h 2010-02-22 09:11:00.042269423 -0800
@@ -4,11 +4,11 @@
#ifndef __NETNS_PACKET_H__
#define __NETNS_PACKET_H__
-#include <linux/list.h>
+#include <linux/rculist.h>
#include <linux/spinlock.h>
struct netns_packet {
- rwlock_t sklist_lock;
+ spinlock_t sklist_lock;
struct hlist_head sklist;
};
--- a/net/packet/af_packet.c 2010-02-22 09:07:28.551185873 -0800
+++ b/net/packet/af_packet.c 2010-02-22 09:11:00.063367114 -0800
@@ -1262,24 +1262,22 @@ static int packet_release(struct socket
net = sock_net(sk);
po = pkt_sk(sk);
- write_lock_bh(&net->packet.sklist_lock);
- sk_del_node_init(sk);
+ spin_lock_bh(&net->packet.sklist_lock);
+ sk_del_node_init_rcu(sk);
sock_prot_inuse_add(net, sk->sk_prot, -1);
- write_unlock_bh(&net->packet.sklist_lock);
-
- /*
- * Unhook packet receive handler.
- */
+ spin_unlock_bh(&net->packet.sklist_lock);
+ spin_lock(&po->bind_lock);
if (po->running) {
/*
- * Remove the protocol hook
+ * Remove from protocol table
*/
- dev_remove_pack(&po->prot_hook);
po->running = 0;
po->num = 0;
+ __dev_remove_pack(&po->prot_hook);
__sock_put(sk);
}
+ spin_unlock(&po->bind_lock);
packet_flush_mclist(sk);
@@ -1291,10 +1289,10 @@ static int packet_release(struct socket
if (po->tx_ring.pg_vec)
packet_set_ring(sk, &req, 1, 1);
+ synchronize_net();
/*
* Now the socket is dead. No more input will appear.
*/
-
sock_orphan(sk);
sock->sk = NULL;
@@ -1478,10 +1476,11 @@ static int packet_create(struct net *net
po->running = 1;
}
- write_lock_bh(&net->packet.sklist_lock);
- sk_add_node(sk, &net->packet.sklist);
+ spin_lock_bh(&net->packet.sklist_lock);
+ sk_add_node_rcu(sk, &net->packet.sklist);
sock_prot_inuse_add(net, &packet_proto, 1);
- write_unlock_bh(&net->packet.sklist_lock);
+ spin_unlock_bh(&net->packet.sklist_lock);
+
return 0;
out:
return err;
@@ -2075,8 +2074,8 @@ static int packet_notifier(struct notifi
struct net_device *dev = data;
struct net *net = dev_net(dev);
- read_lock(&net->packet.sklist_lock);
- sk_for_each(sk, node, &net->packet.sklist) {
+ rcu_read_lock();
+ sk_for_each_rcu(sk, node, &net->packet.sklist) {
struct packet_sock *po = pkt_sk(sk);
switch (msg) {
@@ -2104,18 +2103,19 @@ static int packet_notifier(struct notifi
}
break;
case NETDEV_UP:
- spin_lock(&po->bind_lock);
- if (dev->ifindex == po->ifindex && po->num &&
- !po->running) {
- dev_add_pack(&po->prot_hook);
- sock_hold(sk);
- po->running = 1;
+ if (dev->ifindex == po->ifindex) {
+ spin_lock(&po->bind_lock);
+ if (po->num && !po->running) {
+ dev_add_pack(&po->prot_hook);
+ sock_hold(sk);
+ po->running = 1;
+ }
+ spin_unlock(&po->bind_lock);
}
- spin_unlock(&po->bind_lock);
break;
}
}
- read_unlock(&net->packet.sklist_lock);
+ rcu_read_unlock();
return NOTIFY_DONE;
}
@@ -2512,24 +2512,24 @@ static struct notifier_block packet_netd
#ifdef CONFIG_PROC_FS
static void *packet_seq_start(struct seq_file *seq, loff_t *pos)
- __acquires(seq_file_net(seq)->packet.sklist_lock)
+ __acquires(RCU)
{
struct net *net = seq_file_net(seq);
- read_lock(&net->packet.sklist_lock);
- return seq_hlist_start_head(&net->packet.sklist, *pos);
+
+ rcu_read_lock();
+ return seq_hlist_start_head_rcu(&net->packet.sklist, *pos);
}
static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct net *net = seq_file_net(seq);
- return seq_hlist_next(v, &net->packet.sklist, pos);
+ return seq_hlist_next_rcu(v, &net->packet.sklist, pos);
}
static void packet_seq_stop(struct seq_file *seq, void *v)
- __releases(seq_file_net(seq)->packet.sklist_lock)
+ __releases(RCU)
{
- struct net *net = seq_file_net(seq);
- read_unlock(&net->packet.sklist_lock);
+ rcu_read_unlock();
}
static int packet_seq_show(struct seq_file *seq, void *v)
@@ -2581,7 +2581,7 @@ static const struct file_operations pack
static int __net_init packet_net_init(struct net *net)
{
- rwlock_init(&net->packet.sklist_lock);
+ spin_lock_init(&net->packet.sklist_lock);
INIT_HLIST_HEAD(&net->packet.sklist);
if (!proc_net_fops_create(net, "packet", 0, &packet_seq_fops))
--- a/include/net/sock.h 2010-02-22 09:07:28.572429848 -0800
+++ b/include/net/sock.h 2010-02-22 09:11:00.063367114 -0800
@@ -381,6 +381,7 @@ static __inline__ void __sk_del_node(str
__hlist_del(&sk->sk_node);
}
+/* NB: equivalent to hlist_del_init_rcu */
static __inline__ int __sk_del_node_init(struct sock *sk)
{
if (sk_hashed(sk)) {
@@ -421,6 +422,7 @@ static __inline__ int sk_del_node_init(s
}
return rc;
}
+#define sk_del_node_init_rcu(sk) sk_del_node_init(sk)
static __inline__ int __sk_nulls_del_node_init_rcu(struct sock *sk)
{
@@ -454,6 +456,12 @@ static __inline__ void sk_add_node(struc
__sk_add_node(sk, list);
}
+static __inline__ void sk_add_node_rcu(struct sock *sk, struct hlist_head *list)
+{
+ sock_hold(sk);
+ hlist_add_head_rcu(&sk->sk_node, list);
+}
+
static __inline__ void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
{
hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);
@@ -478,6 +486,8 @@ static __inline__ void sk_add_bind_node(
#define sk_for_each(__sk, node, list) \
hlist_for_each_entry(__sk, node, list, sk_node)
+#define sk_for_each_rcu(__sk, node, list) \
+ hlist_for_each_entry_rcu(__sk, node, list, sk_node)
#define sk_nulls_for_each(__sk, node, list) \
hlist_nulls_for_each_entry(__sk, node, list, sk_nulls_node)
#define sk_nulls_for_each_rcu(__sk, node, list) \
--
^ permalink raw reply
* [PATCH 1/3] seq_file: add RCU versions of new hlist/list iterators (v3)
From: Stephen Hemminger @ 2010-02-22 17:57 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20100222175716.900955428@vyatta.com>
[-- Attachment #1: seq_hlist_rcu.patch --]
[-- Type: text/plain, Size: 4142 bytes --]
Many usages of seq_file use RCU protected lists, so non RCU
iterators will not work safely.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Add comment (same as other RCU functions)
fs/seq_file.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/rculist.h | 5 ++++
include/linux/seq_file.h | 12 +++++++---
3 files changed, 70 insertions(+), 3 deletions(-)
--- a/fs/seq_file.c 2010-02-22 09:17:18.362742798 -0800
+++ b/fs/seq_file.c 2010-02-22 09:20:54.481180584 -0800
@@ -750,3 +750,74 @@ struct hlist_node *seq_hlist_next(void *
return node->next;
}
EXPORT_SYMBOL(seq_hlist_next);
+
+/**
+ * seq_hlist_start_rcu - start an iteration of a hlist protected by RCU
+ * @head: the head of the hlist
+ * @pos: the start position of the sequence
+ *
+ * Called at seq_file->op->start().
+ *
+ * This list-traversal primitive may safely run concurrently with
+ * the _rcu list-mutation primitives such as hlist_add_head_rcu()
+ * as long as the traversal is guarded by rcu_read_lock().
+ */
+struct hlist_node *seq_hlist_start_rcu(struct hlist_head *head,
+ loff_t pos)
+{
+ struct hlist_node *node;
+
+ __hlist_for_each_rcu(node, head)
+ if (pos-- == 0)
+ return node;
+ return NULL;
+}
+EXPORT_SYMBOL(seq_hlist_start_rcu);
+
+/**
+ * seq_hlist_start_head_rcu - start an iteration of a hlist protected by RCU
+ * @head: the head of the hlist
+ * @pos: the start position of the sequence
+ *
+ * Called at seq_file->op->start(). Call this function if you want to
+ * print a header at the top of the output.
+ *
+ * This list-traversal primitive may safely run concurrently with
+ * the _rcu list-mutation primitives such as hlist_add_head_rcu()
+ * as long as the traversal is guarded by rcu_read_lock().
+ */
+struct hlist_node *seq_hlist_start_head_rcu(struct hlist_head *head,
+ loff_t pos)
+{
+ if (!pos)
+ return SEQ_START_TOKEN;
+
+ return seq_hlist_start_rcu(head, pos - 1);
+}
+EXPORT_SYMBOL(seq_hlist_start_head_rcu);
+
+/**
+ * seq_hlist_next_rcu - move to the next position of the hlist protected by RCU
+ * @v: the current iterator
+ * @head: the head of the hlist
+ * @pos: the current posision
+ *
+ * Called at seq_file->op->next().
+ *
+ * This list-traversal primitive may safely run concurrently with
+ * the _rcu list-mutation primitives such as hlist_add_head_rcu()
+ * as long as the traversal is guarded by rcu_read_lock().
+ */
+struct hlist_node *seq_hlist_next_rcu(void *v,
+ struct hlist_head *head,
+ loff_t *ppos)
+{
+ struct hlist_node *node = v;
+
+ ++*ppos;
+ if (v == SEQ_START_TOKEN)
+ return rcu_dereference(head->first);
+ else
+ return rcu_dereference(node->next);
+}
+EXPORT_SYMBOL(seq_hlist_next_rcu);
--- a/include/linux/seq_file.h 2010-02-22 09:17:18.382742869 -0800
+++ b/include/linux/seq_file.h 2010-02-22 09:21:10.841180579 -0800
@@ -140,10 +140,17 @@ extern struct list_head *seq_list_next(v
*/
extern struct hlist_node *seq_hlist_start(struct hlist_head *head,
- loff_t pos);
+ loff_t pos);
extern struct hlist_node *seq_hlist_start_head(struct hlist_head *head,
- loff_t pos);
+ loff_t pos);
extern struct hlist_node *seq_hlist_next(void *v, struct hlist_head *head,
- loff_t *ppos);
+ loff_t *ppos);
+extern struct hlist_node *seq_hlist_start_rcu(struct hlist_head *head,
+ loff_t pos);
+extern struct hlist_node *seq_hlist_start_head_rcu(struct hlist_head *head,
+ loff_t pos);
+extern struct hlist_node *seq_hlist_next_rcu(void *v,
+ struct hlist_head *head,
+ loff_t *ppos);
#endif
--- a/include/linux/rculist.h 2010-02-22 09:17:18.372742980 -0800
+++ b/include/linux/rculist.h 2010-02-22 09:17:26.771810143 -0800
@@ -406,6 +406,11 @@ static inline void hlist_add_after_rcu(s
n->next->pprev = &n->next;
}
+#define __hlist_for_each_rcu(pos, head) \
+ for (pos = rcu_dereference((head)->first); \
+ pos && ({ prefetch(pos->next); 1; }); \
+ pos = rcu_dereference(pos->next))
+
/**
* hlist_for_each_entry_rcu - iterate over rcu list of given type
* @tpos: the type * to use as a loop cursor.
--
^ permalink raw reply
* Re: udev and usb atm modems
From: Philippe De Muyter @ 2010-02-22 17:01 UTC (permalink / raw)
To: chas3; +Cc: netdev
In-Reply-To: <201002221654.o1MGsqkQ011451@thirdoffive.cmf.nrl.navy.mil>
Hi Chas,
On Mon, Feb 22, 2010 at 11:54:52AM -0500, Chas Williams (CONTRACTOR) wrote:
> In message <20100221145228.GB22165@frolo.macqel>,Philippe De Muyter writes:
> >This works perfectly, but /usr/local/bin/atm does busy waiting for the carrier
> >to appear. Do you know if the atm subsystem provides a event to udev when
> >carrier becomes 1 ?
>
> pretty sure it doesnt. if you would like to contribute a patch...
Currently, I know nothing about sysfs or internals of udev. But who knows ...
Philippe
^ permalink raw reply
* Re: udev and usb atm modems
From: Chas Williams (CONTRACTOR) @ 2010-02-22 16:54 UTC (permalink / raw)
To: Philippe De Muyter; +Cc: netdev
In-Reply-To: <20100221145228.GB22165@frolo.macqel>
In message <20100221145228.GB22165@frolo.macqel>,Philippe De Muyter writes:
>This works perfectly, but /usr/local/bin/atm does busy waiting for the carrier
>to appear. Do you know if the atm subsystem provides a event to udev when
>carrier becomes 1 ?
pretty sure it doesnt. if you would like to contribute a patch...
^ permalink raw reply
* Re: [net-next PATCH v5 2/3] sysctl: add proc_do_large_bitmap
From: Octavian Purdila @ 2010-02-22 16:29 UTC (permalink / raw)
To: Cong Wang
Cc: David Miller, Linux Kernel Network Developers,
Linux Kernel Developers, Eric W. Biederman
In-Reply-To: <4B81EFD8.8020202@redhat.com>
On Monday 22 February 2010 04:45:44 you wrote:
> Octavian Purdila wrote:
> > But I think its worth to keep the whitespaces in beetween, e.g. allow
> >
> > $ echo '1, 2 ,3 ' > ip_local_reserved_ports.
>
> Sure.
>
> >> Also, if I write an invalid value, it does reject this, but the previous
> >> value in that file is cleared, shouldn't we keep the previous one?
> >
> > The only way I see to fix this is to return EINVAL if we detect a write
> > with offset.
>
> Yeah, we shouldn't continue once we find any invalid value.
>
> > IMO we should do that for the other proc write routines as well, as
> > otherwise ther result is confusing, e.g.
> >
> > write("1 2"); write(" 3");
> >
> > will set first value in the vector to 1, than second value to 2 then
> > *first* value to 3.
> >
> > I am all for it, but again, this changes userspace ABI.
>
> Sorry, is this related with the problem I mentioned above? Both "1 2"
> and " 3" are valid values.
>
Never mind, please disregard my "return EINVAL if we detect a write
with offset", it breaks the ABI in a significant way.
Here is a new version of this patch which fixes both the comma and invalid
value issues, please give it a try.
[net-next PATCH v5 2/3] sysctl: add proc_do_large_bitmap
The new function can be used to read/write large bitmaps via /proc. A
comma separated range format is used for compact output and input
(e.g. 1,3-4,10-10).
Writing into the file will first reset the bitmap then update it
based on the given input.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Cc: WANG Cong <amwang@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
---
include/linux/sysctl.h | 2 +
kernel/sysctl.c | 134
++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 136 insertions(+), 0 deletions(-)
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index f66014c..7bb5cb6 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -980,6 +980,8 @@ extern int proc_doulongvec_minmax(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
void __user *, size_t *, loff_t *);
+extern int proc_do_large_bitmap(struct ctl_table *, int,
+ void __user *, size_t *, loff_t *);
/*
* Register a set of sysctl names by calling register_sysctl_table
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5259727..d8ea839 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2635,6 +2635,140 @@ static int proc_do_cad_pid(struct ctl_table *table,
int write,
return 0;
}
+/**
+ * proc_do_large_bitmap - read/write from/to a large bitmap
+ * @table: the sysctl table
+ * @write: %TRUE if this is a write to the sysctl file
+ * @buffer: the user buffer
+ * @lenp: the size of the user buffer
+ * @ppos: file position
+ *
+ * The bitmap is stored at table->data and the bitmap length (in bits)
+ * in table->maxlen.
+ *
+ * We use a range comma separated format (e.g. 1,3-4,10-10) so that
+ * large bitmaps may be represented in a compact manner. Writing into
+ * the file will clear the bitmap then update it with the given input.
+ *
+ * Returns 0 on success.
+ */
+int proc_do_large_bitmap(struct ctl_table *table, int write,
+ void __user *_buffer, size_t *lenp, loff_t *ppos)
+{
+ bool first = 1;
+ unsigned long *bitmap = (unsigned long *) table->data;
+ unsigned long bitmap_len = table->maxlen;
+ int left = *lenp, err = 0;
+ char __user *buffer = (char __user *) _buffer;
+ char tr_a[] = { '-', ',', 0 }, tr_b[] = { ',', 0 }, c;
+
+
+ if (!bitmap_len || !left || (*ppos && !write)) {
+ *lenp = 0;
+ return 0;
+ }
+
+ if (write) {
+ err = proc_skip_wspace(&buffer, &left);
+ while (!err && left) {
+ unsigned long val_a, val_b;
+ bool neg;
+
+ err = proc_get_ulong(&buffer, &left, tr_a,
+ &val_a, &neg, &c);
+ if (err)
+ break;
+
+ if (val_a >= bitmap_len || neg) {
+ err = -EINVAL;
+ break;
+ }
+
+ val_b = val_a;
+ if (left && c == '-') {
+ /* skip the - */
+ buffer++; left--;
+
+ err = proc_get_ulong(&buffer, &left, tr_b,
+ &val_b, &neg, &c);
+ if (err)
+ break;
+
+ if (val_b >= bitmap_len || neg ||
+ val_a > val_b) {
+ err = -EINVAL;
+ break;
+ }
+ }
+
+ if (left) {
+ err = proc_skip_wspace(&buffer, &left);
+ if (err)
+ break;
+ if (left) {
+ if (get_user(c, buffer)) {
+ err = -EFAULT;
+ break;
+ }
+ if (c != ',') {
+ err = -EINVAL;
+ break;
+ }
+ /* skip the , */
+ buffer++; left--;
+ }
+ }
+
+ if (first)
+ bitmap_clear(bitmap, 0, bitmap_len);
+
+ while (val_a <= val_b)
+ set_bit(val_a++, bitmap);
+
+ first = 0;
+ }
+ if (!err)
+ err = proc_skip_wspace(&buffer, &left);
+ } else {
+ unsigned long bit_a, bit_b = 0;
+
+ while (left) {
+ bit_a = find_next_bit(bitmap, bitmap_len, bit_b);
+ if (bit_a >= bitmap_len)
+ break;
+ bit_b = find_next_zero_bit(bitmap, bitmap_len,
+ bit_a + 1) - 1;
+
+ err = proc_put_ulong(&buffer, &left, bit_a, 0, first,
+ ',');
+ if (err)
+ break;
+ if (bit_a != bit_b) {
+ err = proc_put_char(&buffer, &left, '-');
+ if (err)
+ break;
+ err = proc_put_ulong(&buffer, &left, bit_b, 0,
+ 1, 0);
+ if (err)
+ break;
+ }
+
+ first = 0; bit_b++;
+ }
+ if (!err)
+ err = proc_put_char(&buffer, &left, '\n');
+ }
+
+ if (first) {
+ if (err)
+ return err;
+ bitmap_clear(bitmap, 0, bitmap_len);
+ }
+ *lenp -= left;
+ *ppos += *lenp;
+ return 0;
+}
+
#else /* CONFIG_PROC_FS */
int proc_dostring(struct ctl_table *table, int write,
--
1.5.6.5
^ permalink raw reply related
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: Hagen Paul Pfeifer @ 2010-02-22 16:06 UTC (permalink / raw)
To: Andi Kleen
Cc: Lars Eggert, David Miller, zimmermann, pavel, apetlund, netdev,
ilpo.jarvinen, eric.dumazet, Arnd.Hannemann, linux-kernel,
shemminger, william.allen.simpson, damian, ebiederm
In-Reply-To: <87k4u5mh9u.fsf@basil.nowhere.org>
On Mon, 22 Feb 2010 16:17:33 +0100, Andi Kleen <andi@firstfloor.org> wrote:
> Lars Eggert <lars.eggert@nokia.com> writes:
>
>> If it's off by default there is no issue.
>
> Still a sufficient large number of people might turn it on
> and then the network would melt.
Then we should apply the same policy as used for the congestion control
algorithms!? Restrict the usage to change the standard behavior via Kconfig
(e.g. menuconfig TCP_CONG_ADVANCED) or even more restricted demand for
CAP_NET_ADMIN.
Hagen
^ permalink raw reply
* Re: [PATCH 2/2] can: ti hecc module : add platform specific initialization callback.
From: Marc Kleine-Budde @ 2010-02-22 16:00 UTC (permalink / raw)
To: Sriramakrishnan; +Cc: socketcan-core, netdev
In-Reply-To: <1266845762-7809-1-git-send-email-srk@ti.com>
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
Sriramakrishnan wrote:
> CAN module on AM3517 requires programming of IO expander as part
> of init sequence - to enable CAN PHY. Added platform specific
> init callback to handle this.
Consider giving it a more descriptive name like "phy_switch" and adding
an argument to the function to enable/disable the phy. Put the routine
in the driver's open and close function.
Pleae also update the ti_hecc_platform_data documentation in the top of
ti_hecc.c
Have a look at the at91 for example.
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: Andreas Petlund @ 2010-02-22 15:51 UTC (permalink / raw)
To: Andi Kleen
Cc: Lars Eggert, David Miller, zimmermann@nets.rwth-aachen.de,
pavel@ucw.cz, netdev@vger.kernel.org, ilpo.jarvinen@helsinki.fi,
eric.dumazet@gmail.com, Arnd.Hannemann@nets.rwth-aachen.de,
linux-kernel@vger.kernel.org, shemminger@vyatta.com,
william.allen.simpson@gmail.com, damian@tvk.rwth-aachen.de,
ebiederm@xmission.com
In-Reply-To: <87k4u5mh9u.fsf@basil.nowhere.org>
On 22. feb. 2010 16:17, Andi Kleen wrote:
> Lars Eggert <lars.eggert@nokia.com> writes:
>
>> If it's off by default there is no issue.
>
> Still a sufficient large number of people might turn it on
> and then the network would melt.
>
> IMHO TCP changes with badly understood congestion behaviour
> should not be merged until the necessary analysis/simulation etc.
> is done.
>
> -Andi
>
I also encourage you to read the discussions from the first posted
version of the patch set, since I here reference a lot of the
supporting research and related material from other researchers.
http://thread.gmane.org/gmane.linux.network/141394
http://thread.gmane.org/gmane.linux.network/141395
http://thread.gmane.org/gmane.linux.network/141396
http://thread.gmane.org/gmane.linux.network/141397
Cheers,
Andreas
^ permalink raw reply
* Re: [PATCH][KS8695] Mark network interface as running on ifconfig up
From: Yegor Yefremov @ 2010-02-22 15:47 UTC (permalink / raw)
To: David Miller; +Cc: linux-arm-kernel, avictor.za, netdev
In-Reply-To: <20100216.160647.208330407.davem@davemloft.net>
David Miller schrieb:
> From: Yegor Yefremov <yegor_sub1@visionsystems.de>
> Date: Thu, 11 Feb 2010 12:12:43 +0100
>
>> [KS8695] Mark network interface as running on ifconfig up
>>
>> Without netif_carrier_on() network interface will not transmit any packets
>> after ifconfig down and subsequent ifconfig up.
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> Index: linux-2.6.33-rc7/drivers/net/arm/ks8695net.c
>> ===================================================================
>> --- linux-2.6.33-rc7.orig/drivers/net/arm/ks8695net.c
>> +++ linux-2.6.33-rc7/drivers/net/arm/ks8695net.c
>> @@ -1371,6 +1371,7 @@ ks8695_open(struct net_device *ndev)
>>
>> napi_enable(&ksp->napi);
>> netif_start_queue(ndev);
>> + netif_carrier_on(ndev);
>>
>> return 0;
>> }
>>
>
> Only ks8695_link_irq() should be setting the carrier state.
>
> If necessary, reset the PHY on device open so that the link up
> interrupt arrives and the code handling that event can set the carrier
> status properly.
>
> This is how every other driver handles this situation.
According to this guideline is it also wrong to call netif_carrier_on(ndev) within ndo_stop() routine? I removed this call and the ifconfig up/down is functioning properly. So the resulting patch could look like this:
[KS8695] Don't call netif_carrier_off() from ndo_stop()
netif_carrier_on() and netif_carrier_off() should be called from
link status interrupt handler
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Index: linux-2.6.33-rc7/drivers/net/arm/ks8695net.c
===================================================================
--- linux-2.6.33-rc7.orig/drivers/net/arm/ks8695net.c
+++ linux-2.6.33-rc7/drivers/net/arm/ks8695net.c
@@ -1335,7 +1335,6 @@ ks8695_stop(struct net_device *ndev)
netif_stop_queue(ndev);
napi_disable(&ksp->napi);
- netif_carrier_off(ndev);
ks8695_shutdown(ksp);
^ permalink raw reply
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: Andreas Petlund @ 2010-02-22 15:40 UTC (permalink / raw)
To: Andi Kleen
Cc: Lars Eggert, David Miller, zimmermann@nets.rwth-aachen.de,
pavel@ucw.cz, netdev@vger.kernel.org, ilpo.jarvinen@helsinki.fi,
eric.dumazet@gmail.com, Arnd.Hannemann@nets.rwth-aachen.de,
linux-kernel@vger.kernel.org, shemminger@vyatta.com,
william.allen.simpson@gmail.com, damian@tvk.rwth-aachen.de,
ebiederm@xmission.com
In-Reply-To: <87k4u5mh9u.fsf@basil.nowhere.org>
On 22. feb. 2010 16:17, Andi Kleen wrote:
> Lars Eggert <lars.eggert@nokia.com> writes:
>
>> If it's off by default there is no issue.
>
> Still a sufficient large number of people might turn it on
> and then the network would melt.
>
> IMHO TCP changes with badly understood congestion behaviour
> should not be merged until the necessary analysis/simulation etc.
> is done.
>
> -Andi
Graphs from our experiments can be found here:
http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file
Section 5.2.5 covers experiments on fairness-issues. We have found no
adverse effects of the modifications submitted in this patch set (mFR
and LT in the plot), but further testing cannot hurt.
Best regards,
Andreas
^ permalink raw reply
* RE: stress testing netfilter's hashlimit
From: Tadepalli, Hari K @ 2010-02-22 15:39 UTC (permalink / raw)
To: Jorrit Kronjee, netdev@vger.kernel.org
In-Reply-To: <4B8292C6.4000207@infopact.nl>
>> Each of these are separate machines. The sender has a Gigabit Ethernet
>> interface and sends ~410,000 packets per second (52 bytes Ethernet
>> frames). The bridge has two Gigabit Ethernet interfaces, a quad core
>> Xeon X3330 and is running Ubuntu 9.10 (Karmic Koala) with kernel
>> 2.6.31-19-generic-pae.
This is a Penryn class quad core processor, advertized at 2.66GHz. On this platform & with PCI express NICs, you can expect an IPv4 forwarding rate of ~1 Mpps per CPU core. Given the processing cost involved in forwarding/routing a packet, it is not possible to approach line rate forwarding line rate on stock kernels. Looks like, @ 52B packets, you are using a packet size that will NOT be sufficient to fill a full UDP header in the packet.
Coming to BRIDGING: I have not worked on bridging, but have seen anecdotal evidence that bridging costs far more CPU cycles than routing/forwarding (on a per packet basis). What you are observing seems to align well with this. You can play with a few platform level tunings; setting interrupt affinity of each NIC port to align with adjacent processor pair, as in:
echo 1 > /proc/irq/22/smp_affinity
echo 2 > /proc/irq/23/smp_affinity
- assuming your NIC ports are assigned IRQs of 22 and 23 respectively. This will balance the traffic from each NIC to be handled by a different CPU core, while minimizing the impact of inter-cpu cache thrashes.
- Hari
____________________________________
Intel/ Embedded Comms/ Chandler, AZ
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Jorrit Kronjee
Sent: Monday, February 22, 2010 7:21 AM
To: netdev@vger.kernel.org
Subject: stress testing netfilter's hashlimit
Dear list,
I'm not entirely sure if this is the right list for this question, but
if someone could me give me some pointers where to ask otherwise, it
would be most appreciated.
We're trying to stress test netfilter's hashlimit module. To do so,
we've built the following setup.
[ sender ] --> [ bridge ] --> [ receiver ]
Each of these are separate machines. The sender has a Gigabit Ethernet
interface and sends ~410,000 packets per second (52 bytes Ethernet
frames). The bridge has two Gigabit Ethernet interfaces, a quad core
Xeon X3330 and is running Ubuntu 9.10 (Karmic Koala) with kernel
2.6.31-19-generic-pae. The receiver is a non-descript machine with a
Gigabit Ethernet interface and is not really important for my question.
We disabled connection tracking (because the packets are UDP) on the
bridge as follows:
# iptables -t raw -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
NOTRACK all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
NOTRACK all -- 0.0.0.0/0 0.0.0.0/0
We used brctl to make a bridge between eth3 and eth4 (even though we
don't have a eth[0,1,2]):
# brctl show
bridge name bridge id STP enabled interfaces
br1 8000.001517b30cb3 no eth3
eth4
^ permalink raw reply
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: Alexander Zimmermann @ 2010-02-22 15:35 UTC (permalink / raw)
To: Andi Kleen
Cc: Lars Eggert, David Miller, pavel@ucw.cz, apetlund@simula.no,
netdev@vger.kernel.org, ilpo.jarvinen@helsinki.fi,
eric.dumazet@gmail.com, Arnd Hannemann,
linux-kernel@vger.kernel.org, shemminger@vyatta.com,
william.allen.simpson@gmail.com, damian@tvk.rwth-aachen.de,
ebiederm@xmission.com
In-Reply-To: <87k4u5mh9u.fsf@basil.nowhere.org>
Am 22.02.2010 um 16:17 schrieb Andi Kleen:
> Lars Eggert <lars.eggert@nokia.com> writes:
>
>> If it's off by default there is no issue.
>
> Still a sufficient large number of people might turn it on
> and then the network would melt.
>
> IMHO TCP changes with badly understood congestion behaviour
> should not be merged until the necessary analysis/simulation etc.
> is done.
>
> -Andi
100% ack.
See for example here: http://www.umic-mesh.net/~zimmermann/linux.png
It's a screenshot of the ps3mediaserver. Since it's a streaming server, it's
very useful to deactivate Nagle :-)
Alex
>
> --
> ak@linux.intel.com -- Speaking for myself only.
//
// Dipl.-Inform. Alexander Zimmermann
// Department of Computer Science, Informatik 4
// RWTH Aachen University
// Ahornstr. 55, 52056 Aachen, Germany
// phone: (49-241) 80-21422, fax: (49-241) 80-22220
// email: zimmermann@cs.rwth-aachen.de
// web: http://www.umic-mesh.net
//
^ permalink raw reply
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: Andi Kleen @ 2010-02-22 15:17 UTC (permalink / raw)
To: Lars Eggert
Cc: David Miller, zimmermann@nets.rwth-aachen.de, pavel@ucw.cz,
apetlund@simula.no, netdev@vger.kernel.org,
ilpo.jarvinen@helsinki.fi, eric.dumazet@gmail.com,
Arnd.Hannemann@nets.rwth-aachen.de, linux-kernel@vger.kernel.org,
shemminger@vyatta.com, william.allen.simpson@gmail.com,
damian@tvk.rwth-aachen.de, ebiederm@xmission.com
In-Reply-To: <FB5F656F-091A-4FB5-9586-15C6CB263D05@nokia.com>
Lars Eggert <lars.eggert@nokia.com> writes:
> If it's off by default there is no issue.
Still a sufficient large number of people might turn it on
and then the network would melt.
IMHO TCP changes with badly understood congestion behaviour
should not be merged until the necessary analysis/simulation etc.
is done.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply
* Re: [PATCH 1/2] can:ti_hecc: Add pm hook-up
From: Wolfgang Grandegger @ 2010-02-22 14:40 UTC (permalink / raw)
To: Daniel Baluta; +Cc: Sriramakrishnan, socketcan-core, netdev, K R Baalaaji
In-Reply-To: <413a6a951002220611j91b8da8ga670a3efbb1c1f08@mail.gmail.com>
Daniel Baluta wrote:
> On Mon, Feb 22, 2010 at 4:01 PM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>> Sriramakrishnan wrote:
>>> Added the suspend and resume implementation in the HECC (CAN)
>>> driver.
>>>
>>> Signed-off-by: K R Baalaaji <krbaalaaji@ti.com>
>>> Signed-off-by: Sriramakrishnan <srk@ti.com>
>>> Acked-by: Anant Gole <anantgole@ti.com>
>>> ---
>>> drivers/net/can/ti_hecc.c | 51 ++++++++++++++++++++++++++++++++++++++++++--
>>> 1 files changed, 48 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
>>> index 5c993c2..df27d82 100644
>>> --- a/drivers/net/can/ti_hecc.c
>>> +++ b/drivers/net/can/ti_hecc.c
>>> @@ -824,7 +824,6 @@ static int ti_hecc_open(struct net_device *ndev)
>>> return err;
>>> }
>>>
>>> - clk_enable(priv->clk);
>>> ti_hecc_start(ndev);
>>> napi_enable(&priv->napi);
>>> netif_start_queue(ndev);
>>> @@ -840,7 +839,6 @@ static int ti_hecc_close(struct net_device *ndev)
>>> napi_disable(&priv->napi);
>>> ti_hecc_stop(ndev);
>>> free_irq(ndev->irq, ndev);
>>> - clk_disable(priv->clk);
>>> close_candev(ndev);
>>>
>>> return 0;
>>> @@ -925,6 +923,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
>>> netif_napi_add(ndev, &priv->napi, ti_hecc_rx_poll,
>>> HECC_DEF_NAPI_WEIGHT);
>>>
>>> + clk_enable(priv->clk);
>>> err = register_candev(ndev);
>>> if (err) {
>>> dev_err(&pdev->dev, "register_candev() failed\n");
>>> @@ -953,6 +952,7 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)
>>> struct net_device *ndev = platform_get_drvdata(pdev);
>>> struct ti_hecc_priv *priv = netdev_priv(ndev);
>>>
>>> + clk_disable(priv->clk);
>>> clk_put(priv->clk);
>>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> iounmap(priv->base);
>>> @@ -964,6 +964,48 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)
>>> return 0;
>>> }
>>>
>>> +
>>> +#ifdef CONFIG_PM
>>> +static int ti_hecc_suspend(struct platform_device *pdev, pm_message_t state)
>>> +{
>>> + struct net_device *dev = platform_get_drvdata(pdev);
>>> + struct ti_hecc_priv *priv = netdev_priv(dev);
>>> +
>>> + if (netif_running(dev)) {
>>> + netif_stop_queue(dev);
>>> + netif_device_detach(dev);
>>> + }
>>> +
>>> + hecc_set_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
>>> + priv->can.state = CAN_STATE_SLEEPING;
>>> +
>>> + clk_disable(priv->clk);
>>> +
>>> + return 0;
>>> +}
>>> +
>>> +static int ti_hecc_resume(struct platform_device *pdev)
>>> +{
>>> + struct net_device *dev = platform_get_drvdata(pdev);
>>> + struct ti_hecc_priv *priv = netdev_priv(dev);
>>> +
>>> + clk_enable(priv->clk);
>>> +
>>> + hecc_clear_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
>>> + priv->can.state = CAN_STATE_ERROR_ACTIVE;
>>> +
>>> + if (netif_running(dev)) {
>>> + netif_device_attach(dev);
>>> + netif_start_queue(dev);
>>> + }
>>> +
>>> + return 0;
>>> +}
>>> +#else
>>> +#define ti_hecc_suspend NULL
>>> +#define ti_hecc_resume NULL
>>> +#endif
>>> +
>>> /* TI HECC netdevice driver: platform driver structure */
>>> static struct platform_driver ti_hecc_driver = {
>>> .driver = {
>>> @@ -972,6 +1014,8 @@ static struct platform_driver ti_hecc_driver = {
>>> },
>>> .probe = ti_hecc_probe,
>>> .remove = __devexit_p(ti_hecc_remove),
>>> + .suspend = ti_hecc_suspend,
>>> + .resume = ti_hecc_resume,
>>> };
>>>
>>> static int __init ti_hecc_init_driver(void)
>>> @@ -979,14 +1023,15 @@ static int __init ti_hecc_init_driver(void)
>>> printk(KERN_INFO DRV_DESC "\n");
>>> return platform_driver_register(&ti_hecc_driver);
>>> }
>>> -module_init(ti_hecc_init_driver);
>>>
>>> static void __exit ti_hecc_exit_driver(void)
>>> {
>>> printk(KERN_INFO DRV_DESC " unloaded\n");
>>> platform_driver_unregister(&ti_hecc_driver);
>>> }
>>> +
>>> module_exit(ti_hecc_exit_driver);
>>> +module_init(ti_hecc_init_driver);
>> What is the reason for moving around module_init? Please revert. Then
>> you can add my "Acked-by: Wolfgang Grandegger <wg@grandegger.com>".
>
> I think "revert" is not the most appropriate word.
> As you can see module_init was placed before ti_hecc_exit_driver function.
>
> The best way to do it is to have at the end:
>
> module_init(ti_hecc_init_driver);
> module_exit(ti_hecc_exit_driver);
I personally disagree! But it seems to be the most popular method. And
this change is not related to the subject nor is it described in the
patch description. Anyway, it's a minor issue and if Dave think it's OK,
I will not insist.
Wolfgang.
^ permalink raw reply
* stress testing netfilter's hashlimit
From: Jorrit Kronjee @ 2010-02-22 14:20 UTC (permalink / raw)
To: netdev
Dear list,
I'm not entirely sure if this is the right list for this question, but
if someone could me give me some pointers where to ask otherwise, it
would be most appreciated.
We're trying to stress test netfilter's hashlimit module. To do so,
we've built the following setup.
[ sender ] --> [ bridge ] --> [ receiver ]
Each of these are separate machines. The sender has a Gigabit Ethernet
interface and sends ~410,000 packets per second (52 bytes Ethernet
frames). The bridge has two Gigabit Ethernet interfaces, a quad core
Xeon X3330 and is running Ubuntu 9.10 (Karmic Koala) with kernel
2.6.31-19-generic-pae. The receiver is a non-descript machine with a
Gigabit Ethernet interface and is not really important for my question.
We disabled connection tracking (because the packets are UDP) on the
bridge as follows:
# iptables -t raw -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
NOTRACK all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
NOTRACK all -- 0.0.0.0/0 0.0.0.0/0
We used brctl to make a bridge between eth3 and eth4 (even though we
don't have a eth[0,1,2]):
# brctl show
bridge name bridge id STP enabled interfaces
br1 8000.001517b30cb3 no eth3
eth4
Even without hashlimit activated we noticed a few packet drops (~50 pps)
on the receiving interface of the bridge. Generating keyboard interrupts
(by switching tty's or just typing) would make the amount of packet
drops increase, sometimes even up to a ~1000 pps, while the load average
remained around 0.00. The sending interface did not show any packet drops.
Because one of the NICs is using the e1000 driver and the other the
e1000e driver and the whole machine is just a bridge anyway, we decided
to switch the cables around, but to no avail. Both NICs showed the same
problem.
I'm wondering if we've reached the limits of our hardware or if there
are ways to tweak it a little bit. Our goal is to be able to process
twice the amount (~800,000 pps) without any drops. Once we're able to do
that, we should be able to test the hashlimit module for our needs. Does
anyone have any ideas on what we should look into? How can I figure out
if this is a hardware limit? And if so, what kind of hardware do I need
to make this work? Theoretically a Gigabit Ethernet NIC should be able
to process a lot more (since 410k * 52 bytes * 8 bits is much smaller
than 1 Gigabit).
I hope someone is able to help me. If there's any additional testing
required then please tell me.
Thanks in advance!
Regards,
Jorrit Kronjee
Oh, by the way, here is some information about the bridge:
# ethtool -i eth3
driver: e1000
version: 7.3.21-k3-NAPI
firmware-version: N/A
bus-info: 0000:04:02.0
# ethtool -i eth4
driver: e1000e
version: 1.1.2.1a-NAPI
firmware-version: 1.3-0
bus-info: 0000:00:19.0
# lspci
00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller
00:01.0 PCI bridge: Intel Corporation 3200/3210 Chipset Host-Primary PCI
Express Bridge
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network
Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI
Controller #2 (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express
Port 1 (rev 02)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express
Port 5 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI
Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface
Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4
port SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller
(rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port
SATA IDE Controller (rev 02)
01:00.0 RAID bus controller: Areca Technology Corp. Unknown device 1201
03:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200e
[Pilot] ServerEngines (SEP1) (rev 02)
04:02.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet
Controller (rev 05)
# ethtool -S eth3
NIC statistics:
rx_packets: 2053904136
tx_packets: 136751343
rx_bytes: 131449844380
tx_bytes: 8752131643
rx_broadcast: 29
tx_broadcast: 374
rx_multicast: 2635
tx_multicast: 261
rx_errors: 0
tx_errors: 0
tx_dropped: 0
multicast: 2635
collisions: 0
rx_length_errors: 0
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_no_buffer_count: 1263333
rx_missed_errors: 242487
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
tx_window_errors: 0
tx_abort_late_coll: 0
tx_deferred_ok: 0
tx_single_coll_ok: 0
tx_multi_coll_ok: 0
tx_timeout_count: 2
tx_restart_queue: 628451
rx_long_length_errors: 0
rx_short_length_errors: 0
rx_align_errors: 0
tx_tcp_seg_good: 0
tx_tcp_seg_failed: 0
rx_flow_control_xon: 0
rx_flow_control_xoff: 0
tx_flow_control_xon: 0
tx_flow_control_xoff: 0
rx_long_byte_count: 131449844380
rx_csum_offload_good: 0
rx_csum_offload_errors: 0
rx_header_split: 0
alloc_rx_buff_failed: 0
tx_smbus: 0
rx_smbus: 0
dropped_smbus: 0
# ethtool -S eth4
NIC statistics:
rx_packets: 154443470
tx_packets: 2050030020
rx_bytes: 9884436894
tx_bytes: 131201969861
rx_broadcast: 392
tx_broadcast: 29
rx_multicast: 310
tx_multicast: 2596
rx_errors: 0
tx_errors: 0
tx_dropped: 0
multicast: 310
collisions: 0
rx_length_errors: 0
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_no_buffer_count: 4825441
rx_missed_errors: 14717022
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
tx_window_errors: 0
tx_abort_late_coll: 0
tx_deferred_ok: 0
tx_single_coll_ok: 0
tx_multi_coll_ok: 0
tx_timeout_count: 0
tx_restart_queue: 18404766
rx_long_length_errors: 0
rx_short_length_errors: 0
rx_align_errors: 0
tx_tcp_seg_good: 0
tx_tcp_seg_failed: 0
rx_flow_control_xon: 0
rx_flow_control_xoff: 0
tx_flow_control_xon: 0
tx_flow_control_xoff: 0
rx_long_byte_count: 9884436894
rx_csum_offload_good: 0
rx_csum_offload_errors: 0
rx_header_split: 0
alloc_rx_buff_failed: 0
tx_smbus: 0
rx_smbus: 0
dropped_smbus: 0
rx_dma_failed: 0
tx_dma_failed: 0
^ permalink raw reply
* Re: [PATCH 1/2] can:ti_hecc: Add pm hook-up
From: Daniel Baluta @ 2010-02-22 14:11 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: Sriramakrishnan, socketcan-core, netdev, K R Baalaaji
In-Reply-To: <4B828E3C.40203@grandegger.com>
On Mon, Feb 22, 2010 at 4:01 PM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Sriramakrishnan wrote:
>> Added the suspend and resume implementation in the HECC (CAN)
>> driver.
>>
>> Signed-off-by: K R Baalaaji <krbaalaaji@ti.com>
>> Signed-off-by: Sriramakrishnan <srk@ti.com>
>> Acked-by: Anant Gole <anantgole@ti.com>
>> ---
>> drivers/net/can/ti_hecc.c | 51 ++++++++++++++++++++++++++++++++++++++++++--
>> 1 files changed, 48 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
>> index 5c993c2..df27d82 100644
>> --- a/drivers/net/can/ti_hecc.c
>> +++ b/drivers/net/can/ti_hecc.c
>> @@ -824,7 +824,6 @@ static int ti_hecc_open(struct net_device *ndev)
>> return err;
>> }
>>
>> - clk_enable(priv->clk);
>> ti_hecc_start(ndev);
>> napi_enable(&priv->napi);
>> netif_start_queue(ndev);
>> @@ -840,7 +839,6 @@ static int ti_hecc_close(struct net_device *ndev)
>> napi_disable(&priv->napi);
>> ti_hecc_stop(ndev);
>> free_irq(ndev->irq, ndev);
>> - clk_disable(priv->clk);
>> close_candev(ndev);
>>
>> return 0;
>> @@ -925,6 +923,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
>> netif_napi_add(ndev, &priv->napi, ti_hecc_rx_poll,
>> HECC_DEF_NAPI_WEIGHT);
>>
>> + clk_enable(priv->clk);
>> err = register_candev(ndev);
>> if (err) {
>> dev_err(&pdev->dev, "register_candev() failed\n");
>> @@ -953,6 +952,7 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)
>> struct net_device *ndev = platform_get_drvdata(pdev);
>> struct ti_hecc_priv *priv = netdev_priv(ndev);
>>
>> + clk_disable(priv->clk);
>> clk_put(priv->clk);
>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> iounmap(priv->base);
>> @@ -964,6 +964,48 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)
>> return 0;
>> }
>>
>> +
>> +#ifdef CONFIG_PM
>> +static int ti_hecc_suspend(struct platform_device *pdev, pm_message_t state)
>> +{
>> + struct net_device *dev = platform_get_drvdata(pdev);
>> + struct ti_hecc_priv *priv = netdev_priv(dev);
>> +
>> + if (netif_running(dev)) {
>> + netif_stop_queue(dev);
>> + netif_device_detach(dev);
>> + }
>> +
>> + hecc_set_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
>> + priv->can.state = CAN_STATE_SLEEPING;
>> +
>> + clk_disable(priv->clk);
>> +
>> + return 0;
>> +}
>> +
>> +static int ti_hecc_resume(struct platform_device *pdev)
>> +{
>> + struct net_device *dev = platform_get_drvdata(pdev);
>> + struct ti_hecc_priv *priv = netdev_priv(dev);
>> +
>> + clk_enable(priv->clk);
>> +
>> + hecc_clear_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
>> + priv->can.state = CAN_STATE_ERROR_ACTIVE;
>> +
>> + if (netif_running(dev)) {
>> + netif_device_attach(dev);
>> + netif_start_queue(dev);
>> + }
>> +
>> + return 0;
>> +}
>> +#else
>> +#define ti_hecc_suspend NULL
>> +#define ti_hecc_resume NULL
>> +#endif
>> +
>> /* TI HECC netdevice driver: platform driver structure */
>> static struct platform_driver ti_hecc_driver = {
>> .driver = {
>> @@ -972,6 +1014,8 @@ static struct platform_driver ti_hecc_driver = {
>> },
>> .probe = ti_hecc_probe,
>> .remove = __devexit_p(ti_hecc_remove),
>> + .suspend = ti_hecc_suspend,
>> + .resume = ti_hecc_resume,
>> };
>>
>> static int __init ti_hecc_init_driver(void)
>> @@ -979,14 +1023,15 @@ static int __init ti_hecc_init_driver(void)
>> printk(KERN_INFO DRV_DESC "\n");
>> return platform_driver_register(&ti_hecc_driver);
>> }
>> -module_init(ti_hecc_init_driver);
>>
>> static void __exit ti_hecc_exit_driver(void)
>> {
>> printk(KERN_INFO DRV_DESC " unloaded\n");
>> platform_driver_unregister(&ti_hecc_driver);
>> }
>> +
>> module_exit(ti_hecc_exit_driver);
>> +module_init(ti_hecc_init_driver);
>
> What is the reason for moving around module_init? Please revert. Then
> you can add my "Acked-by: Wolfgang Grandegger <wg@grandegger.com>".
I think "revert" is not the most appropriate word.
As you can see module_init was placed before ti_hecc_exit_driver function.
The best way to do it is to have at the end:
module_init(ti_hecc_init_driver);
module_exit(ti_hecc_exit_driver);
^ permalink raw reply
* Re: [net-next-2.6 PATCH 1/7] xfrm: introduce basic mark infrastructure
From: jamal @ 2010-02-22 14:09 UTC (permalink / raw)
To: David Miller; +Cc: timo.teras, kaber, herbert, netdev
In-Reply-To: <20100221.222612.112587589.davem@davemloft.net>
I will fix both and resubmit. Thanks for taking the time Dave.
cheers,
jamal
^ 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