Netdev List
 help / color / mirror / Atom feed
* [net 5/6] ixgbe: fix __ixgbe_notify_dca() bail out code
From: Jeff Kirsher @ 2011-08-04 12:18 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1312460298-20405-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Don Skidmore <donald.c.skidmore@intel.com>

The way __ixgbe_notify_dca() was currently set up it would not be
possible to add a requester. Both cases of the IXGBE_FLAG_DCA_ENABLED
bit being on and off would lead to the function exiting for a
DCA_PROVIDER_ADD.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ixgbe/ixgbe_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 26b132b..e86297b 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1006,7 +1006,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
 	struct ixgbe_adapter *adapter = dev_get_drvdata(dev);
 	unsigned long event = *(unsigned long *)data;
 
-	if (!(adapter->flags & IXGBE_FLAG_DCA_ENABLED))
+	if (!(adapter->flags & IXGBE_FLAG_DCA_CAPABLE))
 		return 0;
 
 	switch (event) {
-- 
1.7.6


^ permalink raw reply related

* [net 3/6] e1000e: minor re-order of #include files
From: Jeff Kirsher @ 2011-08-04 12:18 UTC (permalink / raw)
  To: davem; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1312460298-20405-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Bruce Allan <bruce.w.allan@intel.com>

The recent commit a6b7a407 when back-ported to the out-of-tree e1000e
driver caused a compilation error on older kernels which required a
re-ordering of the #include files.  This cosmetic patch syncs the two
drivers for easier maintainability.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by:  Aaron Brown  <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/e1000e/ethtool.c |    2 +-
 drivers/net/e1000e/netdev.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 72756e4..06d88f3 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -28,8 +28,8 @@
 
 /* ethtool support for e1000 */
 
-#include <linux/interrupt.h>
 #include <linux/netdevice.h>
+#include <linux/interrupt.h>
 #include <linux/ethtool.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4353ad5..ab4be80 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -31,12 +31,12 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/init.h>
-#include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/delay.h>
 #include <linux/netdevice.h>
+#include <linux/interrupt.h>
 #include <linux/tcp.h>
 #include <linux/ipv6.h>
 #include <linux/slab.h>
-- 
1.7.6


^ permalink raw reply related

* [net 4/6] igb: fix WOL on second port of i350 device
From: Jeff Kirsher @ 2011-08-04 12:18 UTC (permalink / raw)
  To: davem; +Cc: Carolyn Wyborny, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1312460298-20405-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch fixes a problem where WOL would fail on second port of i350
device.

Reported-by: Martin Wilck <martin.wilck@ts.fujitsu.com>
Reported-by: Stefan Assmann<sassmann@redhat.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by:  Aaron Brown  <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ae3937e..40d4c40 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2023,7 +2023,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 
 	if (hw->bus.func == 0)
 		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
-	else if (hw->mac.type == e1000_82580)
+	else if (hw->mac.type >= e1000_82580)
 		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
 		                 NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
 		                 &eeprom_data);
-- 
1.7.6


^ permalink raw reply related

* [net 0/6][pull request] Intel Wired LAN Driver Update
From: Jeff Kirsher @ 2011-08-04 12:18 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

The following series contains updates to e1000, e1000e, igb, igbvf,
ixgb and ixgbe.

The following are changes since commit d3e614577198757d5854caa912e88f2d4296479b:
  macb: restore wrap bit when performing underrun cleanup
and are available in the git repository at:
  master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net master

Bruce Allan (2):
  e1000e: remove unnecessary check for NULL pointer
  e1000e: minor re-order of #include files

Carolyn Wyborny (1):
  igb: fix WOL on second port of i350 device

Don Skidmore (1):
  ixgbe: fix __ixgbe_notify_dca() bail out code

Emil Tantilov (1):
  ixgbe: fix PHY link setup for 82599

Jesse Brandeburg (1):
  intel drivers: repair missing flush operations

 drivers/net/e1000/e1000_ethtool.c |    6 ++++++
 drivers/net/e1000/e1000_hw.c      |    3 +++
 drivers/net/e1000e/es2lan.c       |    2 ++
 drivers/net/e1000e/ethtool.c      |   11 ++++++++++-
 drivers/net/e1000e/ich8lan.c      |    7 +++++--
 drivers/net/e1000e/lib.c          |    1 +
 drivers/net/e1000e/netdev.c       |    2 +-
 drivers/net/e1000e/phy.c          |    2 ++
 drivers/net/igb/e1000_nvm.c       |    1 +
 drivers/net/igb/igb_ethtool.c     |    5 +++++
 drivers/net/igb/igb_main.c        |    4 +++-
 drivers/net/igbvf/netdev.c        |    2 ++
 drivers/net/ixgb/ixgb_ee.c        |    9 +++++++++
 drivers/net/ixgb/ixgb_hw.c        |    2 ++
 drivers/net/ixgbe/ixgbe_82599.c   |    1 +
 drivers/net/ixgbe/ixgbe_common.c  |    1 +
 drivers/net/ixgbe/ixgbe_ethtool.c |    5 +++++
 drivers/net/ixgbe/ixgbe_main.c    |    3 ++-
 drivers/net/ixgbe/ixgbe_phy.c     |    3 +++
 drivers/net/ixgbe/ixgbe_x540.c    |    1 +
 20 files changed, 65 insertions(+), 6 deletions(-)

-- 
1.7.6


^ permalink raw reply

* [net 2/6] e1000e: remove unnecessary check for NULL pointer
From: Jeff Kirsher @ 2011-08-04 12:18 UTC (permalink / raw)
  To: davem; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1312460298-20405-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Bruce Allan <bruce.w.allan@intel.com>

The array shadow_ram is never NULL.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by:  Aaron Brown  <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/e1000e/ich8lan.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index f7a75c1..4e36978 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -2137,8 +2137,7 @@ static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words,
 
 	ret_val = 0;
 	for (i = 0; i < words; i++) {
-		if ((dev_spec->shadow_ram) &&
-		    (dev_spec->shadow_ram[offset+i].modified)) {
+		if (dev_spec->shadow_ram[offset+i].modified) {
 			data[i] = dev_spec->shadow_ram[offset+i].value;
 		} else {
 			ret_val = e1000_read_flash_word_ich8lan(hw,
-- 
1.7.6


^ permalink raw reply related

* Re: return of ip_rt_bug()
From: Julian Anastasov @ 2011-08-04 12:20 UTC (permalink / raw)
  To: Dave Jones; +Cc: netdev, Tom London
In-Reply-To: <20110802170942.GA17164@redhat.com>


	Hello,

On Tue, 2 Aug 2011, Dave Jones wrote:

> Tom (CC'd) has been hitting that ip_rt_bug() WARN_ON() since 3.0rc
> 
> Here's the latest report.
> 
> ------------[ cut here]------------
> WARNING: atnet/ipv4/route.c:1714 ip_rt_bug+0x5c/0x62()
> Hardware name: 74585FU
> Modules linked in: fuse
> ip6table_filter ip6_tables ebtable_nat ebtables ppdev parport_pc lp parport
> ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state
> nf_conntrack xt_CHECKSUM iptable_mangle tun bridge stp llc sunrpc rfcomm bnep
> usblp arc4 uvcvideo videodev media snd_usb_audio snd_usbmidi_lib snd_rawmidi
> v4l2_compat_ioctl32 iwlagn microcode i2c_i801 btusb iTCO_wdt
> iTCO_vendor_support mac80211 bluetooth snd_hda_codec_conexant cfg80211
> thinkpad_acpi snd_hda_intel snd_hda_codec rfkill snd_hwdep snd_seq
> snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc e1000e virtio_net
> kvm_intel kvm uinput wmi i915 drm_kms_helper drm i2c_algo_bit i2c_core video[last unloaded: scsi_wait_scan]
> Pid: 5492, comm: xsane Not tainted 3.1.0-0.rc0.git12.1.fc17.x86_64 #1
> Call Trace:
>  [<ffffffff8105c5ec>] warn_slowpath_common+0x83/0x9b
>  [<ffffffff8105c61e>] warn_slowpath_null+0x1a/0x1c
>  [<ffffffff8142f485>] ip_rt_bug+0x5c/0x62
>  [<ffffffff81437091>] dst_output+0x19/0x1d
>  [<ffffffff814387c0>] ip_local_out+0x20/0x25
>  [<ffffffff81439695>] ip_send_skb+0x19/0x3e
>  [<ffffffff81455ea2>] udp_send_skb+0x239/0x29b
>  [<ffffffff8145763f>] udp_sendmsg+0x5a1/0x7d4
>  [<ffffffff813f67d5>] ? release_sock+0x35/0x155
>  [<ffffffff8143718c>] ? ip_select_ident+0x3d/0x3d
>  [<ffffffff81062703>] ? local_bh_enable_ip+0xe/0x10
>  [<ffffffff814f1231>] ? _raw_spin_unlock_bh+0x40/0x44
>  [<ffffffff813f68ec>] ? release_sock+0x14c/0x155
>  [<ffffffff8145eb58>] inet_sendmsg+0x66/0x6f
>  [<ffffffff813f1d92>] sock_sendmsg+0xe6/0x109
>  [<ffffffff8108f1c8>] ? lock_acquire+0x10f/0x13e
>  [<ffffffff8110dd34>] ? might_fault+0x5c/0xac
>  [<ffffffff8108f08c>] ? lock_release+0x1a4/0x1d1
>  [<ffffffff8110dd7d>] ? might_fault+0xa5/0xac
>  [<ffffffff813f2ad7>] ? copy_from_user+0x2f/0x31
>  [<ffffffff813f496d>] sys_sendto+0x132/0x174
>  [<ffffffff8124ef6e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>  [<ffffffff814f80c2>] system_call_fastpath+0x16/0x1b
> ---[ end trace 0e82aef47f8d8552 ]---
> ------------[ cut here ]------------
> 
> all the traces he's hit so far seem to be caused by udp, and they all seem to be
> going from 192.168.2.5 -> 255.255.255.255
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=712632 is his full report with similar traces.

	Tom, what kind of netfilter rules do you have in
LOCAL_OUT/OUTPUT hooks? We eliminated one ip_route_input call
from net/ipv4/netfilter.c (ip_route_me_harder) but it looks like
in your kernel ip_route_input is called again from this hook.
It is interesting why only broadcasts get such input route.

	I assume 192.168.2.5 is an existing local address that
is present during the test? Any additional modules that use
ip_route_input ? Are nf_queue, IPVS, br_netfilter or tproxy used?

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply

* [PATCH] mlx4: decreasing ref count when removing mac
From: Yevgeny Petrilin @ 2011-08-04 11:05 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, yevgenyp-VPRAkNaXOzVS1MOuV/RT9w


For older FW versions, when a Mac address removed from Mac table,
we should set 0 for reference count for the corresponding Mac index.
Fixes a bug where removing Mac from the table still left that entry as
invalid.

Signed-off-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
 drivers/net/mlx4/port.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c
index 1f95afd..609e0ec 100644
--- a/drivers/net/mlx4/port.c
+++ b/drivers/net/mlx4/port.c
@@ -258,9 +258,12 @@ void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn)
 	if (validate_index(dev, table, index))
 		goto out;
 
-	table->entries[index] = 0;
-	mlx4_set_port_mac_table(dev, port, table->entries);
-	--table->total;
+	/* Check whether this address has reference count */
+	if (!(--table->refs[index])) {
+		table->entries[index] = 0;
+		mlx4_set_port_mac_table(dev, port, table->entries);
+		--table->total;
+	}
 out:
 	mutex_unlock(&table->mutex);
 }
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH] macb: restore wrap bit when performing underrun cleanup
From: Nicolas Ferre @ 2011-08-04  8:58 UTC (permalink / raw)
  To: Tord Andersson, netdev; +Cc: linux-kernel
In-Reply-To: <1312445507-31382-1-git-send-email-tord.andersson@endian.se>

On 08/04/2011 09:11 AM, Tord Andersson wrote:
> When TX underrun occurs, a cleanup is performed that marks all buffers as used. As a side effect it also clears the wrap bit in the last buffer. This patch will restore the wrap bit.
>
> Signed-off-by: Tord Andersson<tord.andersson@endian.se>

Thanks for fixing this.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>   drivers/net/macb.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 0fcdc25..dc4e305 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -322,6 +322,9 @@ static void macb_tx(struct macb *bp)
>   		for (i = 0; i<  TX_RING_SIZE; i++)
>   			bp->tx_ring[i].ctrl = MACB_BIT(TX_USED);
>
> +		/* Add wrap bit */
> +		bp->tx_ring[TX_RING_SIZE - 1].ctrl |= MACB_BIT(TX_WRAP);
> +
>   		/* free transmit buffer in upper layer*/
>   		for (tail = bp->tx_tail; tail != head; tail = NEXT_TX(tail)) {
>   			struct ring_info *rp =&bp->tx_skb[tail];


-- 
Nicolas Ferre

^ permalink raw reply

* Re: [PATCH ] cdc_ncm: fixes for big-endian architecture / MIPS
From: David Miller @ 2011-08-04  8:43 UTC (permalink / raw)
  To: giuseppe
  Cc: alexey.orishko, netdev, oliver, linux-usb, gregkh, alexey.orishko
In-Reply-To: <87fwlhzjey.fsf@gnu.org>

From: Giuseppe Scrivano <giuseppe@southpole.se>
Date: Thu, 04 Aug 2011 10:10:29 +0200

> cdc_ncm: fix endianness problem.
> 
> Fix a misusage of the struct usb_cdc_notification to pass arguments to the
> usb_control_msg function.  The usb_control_msg function expects host endian
> arguments but usb_cdc_notification stores these values as little endian.
> 
> Now usb_control_msg is directly invoked with host endian values.

Applied.

^ permalink raw reply

* Re: [PATCH] macb: restore wrap bit when performing underrun cleanup
From: David Miller @ 2011-08-04  8:43 UTC (permalink / raw)
  To: tord.andersson; +Cc: nicolas.ferre, netdev, linux-kernel
In-Reply-To: <1312445507-31382-1-git-send-email-tord.andersson@endian.se>

From: Tord Andersson <tord.andersson@endian.se>
Date: Thu,  4 Aug 2011 10:11:47 +0200

> When TX underrun occurs, a cleanup is performed that marks all buffers as used. As a side effect it also clears the wrap bit in the last buffer. This patch will restore the wrap bit.
> 
> Signed-off-by: Tord Andersson <tord.andersson@endian.se>

Applied.

^ permalink raw reply

* [PATCH] macb: restore wrap bit when performing underrun cleanup
From: Tord Andersson @ 2011-08-04  8:11 UTC (permalink / raw)
  To: nicolas.ferre; +Cc: netdev, linux-kernel, Tord Andersson

When TX underrun occurs, a cleanup is performed that marks all buffers as used. As a side effect it also clears the wrap bit in the last buffer. This patch will restore the wrap bit.

Signed-off-by: Tord Andersson <tord.andersson@endian.se>
---
 drivers/net/macb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 0fcdc25..dc4e305 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -322,6 +322,9 @@ static void macb_tx(struct macb *bp)
 		for (i = 0; i < TX_RING_SIZE; i++)
 			bp->tx_ring[i].ctrl = MACB_BIT(TX_USED);
 
+		/* Add wrap bit */
+		bp->tx_ring[TX_RING_SIZE - 1].ctrl |= MACB_BIT(TX_WRAP);
+
 		/* free transmit buffer in upper layer*/
 		for (tail = bp->tx_tail; tail != head; tail = NEXT_TX(tail)) {
 			struct ring_info *rp = &bp->tx_skb[tail];
-- 
1.5.4.3


^ permalink raw reply related

* WARNING: at drivers/net/e1000e/netdev.c:5221 __e1000_shutdown+0x43f/0x4c0 [e1000e]()
From: Jesper Juhl @ 2011-08-04  8:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, e1000-devel

Hi

I just woke my laptop from suspend and found this in dmesg :

...
[46011.457402] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
[46011.457407] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[46011.457808] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[46011.465085] hub 1-1.2:1.0: USB hub found
[46011.465482] hub 1-1.2:1.0: 4 ports detected
[46011.731642] usb 1-1.2.3: new low speed USB device number 11 using ehci_hcd
[46011.823432] input: USB Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.0/input/input14
[46011.823546] generic-usb 0003:0566:4006.0005: input,hidraw0: USB HID v1.11 Mouse [USB Mouse] on usb-0000:00:1a.0-1.2.3/input0
[46011.901235] usb 1-1.2.4: new full speed USB device number 12 using ehci_hcd
[46012.017545] input: Sun USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/input/input15
[46012.017786] generic-usb 0003:0430:00A2.0006: input,hidraw1: USB HID v1.10 Keyboard [Sun USB Keyboard] on usb-0000:00:1a.0-1.2.4/input0
[46013.437900] e1000e 0000:00:19.0: PME# enabled
[46013.467170] e1000e 0000:00:19.0: BAR 0: set to [mem 0xf2600000-0xf261ffff] (PCI address [0xf2600000-0xf261ffff])
[46013.467182] e1000e 0000:00:19.0: BAR 1: set to [mem 0xf2625000-0xf2625fff] (PCI address [0xf2625000-0xf2625fff])
[46013.467191] e1000e 0000:00:19.0: BAR 2: set to [io  0x1820-0x183f] (PCI address [0x1820-0x183f])
[46013.467214] e1000e 0000:00:19.0: restoring config space at offset 0xf (was 0x100, writing 0x10b)
[46013.467241] e1000e 0000:00:19.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100107)
[46013.467305] e1000e 0000:00:19.0: PME# disabled
[46013.560412] e1000e 0000:00:19.0: irq 41 for MSI/MSI-X
[46013.613523] e1000e 0000:00:19.0: irq 41 for MSI/MSI-X
[46013.614823] ADDRCONF(NETDEV_UP): eth0: link is not ready
[46013.750226] e1000e 0000:00:19.0: PME# enabled
[46013.786332] e1000e 0000:00:19.0: BAR 0: set to [mem 0xf2600000-0xf261ffff] (PCI address [0xf2600000-0xf261ffff])
[46013.786344] e1000e 0000:00:19.0: BAR 1: set to [mem 0xf2625000-0xf2625fff] (PCI address [0xf2625000-0xf2625fff])
[46013.786354] e1000e 0000:00:19.0: BAR 2: set to [io  0x1820-0x183f] (PCI address [0x1820-0x183f])
[46013.786377] e1000e 0000:00:19.0: restoring config space at offset 0xf (was 0x100, writing 0x10b)
[46013.786405] e1000e 0000:00:19.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100507)
[46013.786467] e1000e 0000:00:19.0: PME# disabled
[46013.879654] e1000e 0000:00:19.0: irq 41 for MSI/MSI-X
[46013.932698] e1000e 0000:00:19.0: irq 41 for MSI/MSI-X
[46013.933919] ADDRCONF(NETDEV_UP): eth0: link is not ready
[46014.933488] ------------[ cut here ]------------
[46014.933522] WARNING: at drivers/net/e1000e/netdev.c:5221 __e1000_shutdown+0x43f/0x4c0 [e1000e]()
[46014.933526] Hardware name: 4384GJG
[46014.933529] Modules linked in: ipv6 usbhid hid uvcvideo videodev media v4l2_compat_ioctl32 snd_hda_codec_hdmi snd_hda_codec_conexant arc4 vboxnetadp vboxnetflt snd_hda_intel vboxdrv ecb i915 drm_kms_helper snd_hda_codec iwlagn snd_hwdep drm serio_raw sg sdhci_pci mac80211 firewire_ohci cfg80211 snd_pcm ehci_hcd tpm_tis usbcore sdhci cpufreq_ondemand firewire_core battery snd_timer mmc_core msr i2c_i801 tpm intel_agp pcspkr psmouse crc_itu_t acpi_cpufreq freq_table e1000e mperf intel_ips wmi i2c_algo_bit tpm_bios evdev intel_gtt i2c_core button thinkpad_acpi processor iTCO_wdt snd_page_alloc ac iTCO_vendor_support video thermal rfkill snd soundcore nvram ext4 mbcache jbd2 crc16 sr_mod cdrom sd_mod ahci libahci libata scsi_mod
[46014.933612] Pid: 29819, comm: kworker/2:1 Not tainted 2.6.39-ARCH #1
[46014.933616] Call Trace:
[46014.933628]  [<ffffffff8105b90f>] warn_slowpath_common+0x7f/0xc0
[46014.933634]  [<ffffffff8105b96a>] warn_slowpath_null+0x1a/0x20
[46014.933643]  [<ffffffffa01c4f7f>] __e1000_shutdown+0x43f/0x4c0 [e1000e]
[46014.933652]  [<ffffffff81012fc9>] ? sched_clock+0x9/0x10
[46014.933656]  [<ffffffffa01c5039>] e1000_runtime_suspend+0x39/0x50 [e1000e]
[46014.933660]  [<ffffffff8100a6cf>] ? __switch_to+0xbf/0x2f0
[46014.933665]  [<ffffffff812392dd>] pci_pm_runtime_suspend+0x4d/0x100
[46014.933667]  [<ffffffff81239290>] ? pci_legacy_suspend_late+0x100/0x100
[46014.933671]  [<ffffffff812e7d52>] rpm_callback+0x42/0x80
[46014.933674]  [<ffffffff813e4faf>] ? schedule+0x33f/0xad0
[46014.933676]  [<ffffffff812e82fa>] rpm_suspend+0x1da/0x3f0
[46014.933679]  [<ffffffff812e9380>] ? pm_schedule_suspend+0xe0/0xe0
[46014.933681]  [<ffffffff812e941a>] pm_runtime_work+0x9a/0xc0
[46014.933685]  [<ffffffff81077f6e>] process_one_work+0x11e/0x4c0
[46014.933687]  [<ffffffff810788ff>] worker_thread+0x15f/0x350
[46014.933689]  [<ffffffff810787a0>] ? manage_workers.isra.29+0x230/0x230
[46014.933694]  [<ffffffff8107d6ec>] kthread+0x8c/0xa0
[46014.933697]  [<ffffffff813e9fe4>] kernel_thread_helper+0x4/0x10
[46014.933699]  [<ffffffff8107d660>] ? kthread_worker_fn+0x190/0x190
[46014.933700]  [<ffffffff813e9fe0>] ? gs_change+0x13/0x13
[46014.933702] ---[ end trace b2e5aa34f74b5252 ]---
[46015.215367] e1000e 0000:00:19.0: PME# enabled
...

This is with a 2.6.39.3 kernel.

The laptop is a Lenovo Thinkpad T510 model 4384-GJG.

lspci -vvx has this to say about the ethernet device:

00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06)
        Subsystem: Lenovo Device 2153
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 41
        Region 0: Memory at f2600000 (32-bit, non-prefetchable) [size=128K]
        Region 1: Memory at f2625000 (32-bit, non-prefetchable) [size=4K]
        Region 2: I/O ports at 1820 [size=32]
        Capabilities: [c8] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME+
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0f00c  Data: 415d
        Capabilities: [e0] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
                AFStatus: TP-
        Kernel driver in use: e1000e
        Kernel modules: e1000e
00: 86 80 ea 10 07 05 10 00 06 00 00 02 00 00 00 00
10: 00 00 60 f2 00 50 62 f2 21 18 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 53 21
30: 00 00 00 00 c8 00 00 00 00 00 00 00 0b 01 00 00

The network seems to be working fine, so it's clearly not fatal.
I regularly suspend/resume this laptop and I've never seen this before 
with this or other kernels, so it's not really reproducible.

Let me know if there is other information you'd like and I'll be happy to 
provide it.

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

^ permalink raw reply

* Re: [PATCH ] cdc_ncm: fixes for big-endian architecture / MIPS
From: Giuseppe Scrivano @ 2011-08-04  8:10 UTC (permalink / raw)
  To: David Miller
  Cc: alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw,
	netdev-u79uwXL29TY76Z2rM5mHXA, oliver-GvhC2dPhHPQdnm+yROfE0A,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, gregkh-l3A5Bk7waGM,
	alexey.orishko-Re5JQEeQqe8AvxtiuMwx3w
In-Reply-To: <20110803.191141.888495095889424492.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

Hello David,

David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> writes:

> The patch looks great, but please repost this fresh with a more
> vebose commit log message explaining all the things we discussed
> to get the change to it's current form.

thanks for your review!  I hope I was enough verbose this time :-)

Regards,
Giuseppe



>From 2ad27dac918eea4d39f3cc10796f4f08ead7210b Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <giuseppe-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
Date: Fri, 15 Jul 2011 15:34:14 +0200
Subject: [PATCH] cdc_ncm: fix endianness problem.

Fix a misusage of the struct usb_cdc_notification to pass arguments to the
usb_control_msg function.  The usb_control_msg function expects host endian
arguments but usb_cdc_notification stores these values as little endian.

Now usb_control_msg is directly invoked with host endian values.

Signed-off-by: Giuseppe Scrivano <giuseppe-A9uVI2HLR7kOP4wsBPIw7w@public.gmane.org>
---
 drivers/net/usb/cdc_ncm.c |  156 ++++++++++++++++-----------------------------
 1 files changed, 56 insertions(+), 100 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index f33ca6a..d3b9e95 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -54,7 +54,7 @@
 #include <linux/usb/usbnet.h>
 #include <linux/usb/cdc.h>
 
-#define	DRIVER_VERSION				"01-June-2011"
+#define	DRIVER_VERSION				"04-Aug-2011"
 
 /* CDC NCM subclass 3.2.1 */
 #define USB_CDC_NCM_NDP16_LENGTH_MIN		0x10
@@ -164,35 +164,8 @@ cdc_ncm_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
 	usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info));
 }
 
-static int
-cdc_ncm_do_request(struct cdc_ncm_ctx *ctx, struct usb_cdc_notification *req,
-		   void *data, u16 flags, u16 *actlen, u16 timeout)
-{
-	int err;
-
-	err = usb_control_msg(ctx->udev, (req->bmRequestType & USB_DIR_IN) ?
-				usb_rcvctrlpipe(ctx->udev, 0) :
-				usb_sndctrlpipe(ctx->udev, 0),
-				req->bNotificationType, req->bmRequestType,
-				req->wValue,
-				req->wIndex, data,
-				req->wLength, timeout);
-
-	if (err < 0) {
-		if (actlen)
-			*actlen = 0;
-		return err;
-	}
-
-	if (actlen)
-		*actlen = err;
-
-	return 0;
-}
-
 static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 {
-	struct usb_cdc_notification req;
 	u32 val;
 	u8 flags;
 	u8 iface_no;
@@ -201,14 +174,14 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 
 	iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber;
 
-	req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE;
-	req.bNotificationType = USB_CDC_GET_NTB_PARAMETERS;
-	req.wValue = 0;
-	req.wIndex = cpu_to_le16(iface_no);
-	req.wLength = cpu_to_le16(sizeof(ctx->ncm_parm));
-
-	err = cdc_ncm_do_request(ctx, &req, &ctx->ncm_parm, 0, NULL, 1000);
-	if (err) {
+	err = usb_control_msg(ctx->udev,
+				usb_rcvctrlpipe(ctx->udev, 0),
+				USB_CDC_GET_NTB_PARAMETERS,
+				USB_TYPE_CLASS | USB_DIR_IN
+				 | USB_RECIP_INTERFACE,
+				0, iface_no, &ctx->ncm_parm,
+				sizeof(ctx->ncm_parm), 10000);
+	if (err < 0) {
 		pr_debug("failed GET_NTB_PARAMETERS\n");
 		return 1;
 	}
@@ -254,31 +227,26 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 
 	/* inform device about NTB input size changes */
 	if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) {
-		req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT |
-							USB_RECIP_INTERFACE;
-		req.bNotificationType = USB_CDC_SET_NTB_INPUT_SIZE;
-		req.wValue = 0;
-		req.wIndex = cpu_to_le16(iface_no);
 
 		if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) {
 			struct usb_cdc_ncm_ndp_input_size ndp_in_sz;
-
-			req.wLength = 8;
-			ndp_in_sz.dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
-			ndp_in_sz.wNtbInMaxDatagrams =
-					cpu_to_le16(CDC_NCM_DPT_DATAGRAMS_MAX);
-			ndp_in_sz.wReserved = 0;
-			err = cdc_ncm_do_request(ctx, &req, &ndp_in_sz, 0, NULL,
-									1000);
+			err = usb_control_msg(ctx->udev,
+					usb_sndctrlpipe(ctx->udev, 0),
+					USB_CDC_SET_NTB_INPUT_SIZE,
+					USB_TYPE_CLASS | USB_DIR_OUT
+					 | USB_RECIP_INTERFACE,
+					0, iface_no, &ndp_in_sz, 8, 1000);
 		} else {
 			__le32 dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
-
-			req.wLength = 4;
-			err = cdc_ncm_do_request(ctx, &req, &dwNtbInMaxSize, 0,
-								NULL, 1000);
+			err = usb_control_msg(ctx->udev,
+					usb_sndctrlpipe(ctx->udev, 0),
+					USB_CDC_SET_NTB_INPUT_SIZE,
+					USB_TYPE_CLASS | USB_DIR_OUT
+					 | USB_RECIP_INTERFACE,
+					0, iface_no, &dwNtbInMaxSize, 4, 1000);
 		}
 
-		if (err)
+		if (err < 0)
 			pr_debug("Setting NTB Input Size failed\n");
 	}
 
@@ -333,29 +301,24 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 
 	/* set CRC Mode */
 	if (flags & USB_CDC_NCM_NCAP_CRC_MODE) {
-		req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT |
-							USB_RECIP_INTERFACE;
-		req.bNotificationType = USB_CDC_SET_CRC_MODE;
-		req.wValue = cpu_to_le16(USB_CDC_NCM_CRC_NOT_APPENDED);
-		req.wIndex = cpu_to_le16(iface_no);
-		req.wLength = 0;
-
-		err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000);
-		if (err)
+		err = usb_control_msg(ctx->udev, usb_sndctrlpipe(ctx->udev, 0),
+				USB_CDC_SET_CRC_MODE,
+				USB_TYPE_CLASS | USB_DIR_OUT
+				 | USB_RECIP_INTERFACE,
+				USB_CDC_NCM_CRC_NOT_APPENDED,
+				iface_no, NULL, 0, 1000);
+		if (err < 0)
 			pr_debug("Setting CRC mode off failed\n");
 	}
 
 	/* set NTB format, if both formats are supported */
 	if (ntb_fmt_supported & USB_CDC_NCM_NTH32_SIGN) {
-		req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT |
-							USB_RECIP_INTERFACE;
-		req.bNotificationType = USB_CDC_SET_NTB_FORMAT;
-		req.wValue = cpu_to_le16(USB_CDC_NCM_NTB16_FORMAT);
-		req.wIndex = cpu_to_le16(iface_no);
-		req.wLength = 0;
-
-		err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000);
-		if (err)
+		err = usb_control_msg(ctx->udev, usb_sndctrlpipe(ctx->udev, 0),
+				USB_CDC_SET_NTB_FORMAT, USB_TYPE_CLASS
+				 | USB_DIR_OUT | USB_RECIP_INTERFACE,
+				USB_CDC_NCM_NTB16_FORMAT,
+				iface_no, NULL, 0, 1000);
+		if (err < 0)
 			pr_debug("Setting NTB format to 16-bit failed\n");
 	}
 
@@ -365,17 +328,13 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 	if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) {
 		__le16 max_datagram_size;
 		u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize);
-
-		req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN |
-							USB_RECIP_INTERFACE;
-		req.bNotificationType = USB_CDC_GET_MAX_DATAGRAM_SIZE;
-		req.wValue = 0;
-		req.wIndex = cpu_to_le16(iface_no);
-		req.wLength = cpu_to_le16(2);
-
-		err = cdc_ncm_do_request(ctx, &req, &max_datagram_size, 0, NULL,
-									1000);
-		if (err) {
+		err = usb_control_msg(ctx->udev, usb_rcvctrlpipe(ctx->udev, 0),
+				USB_CDC_GET_MAX_DATAGRAM_SIZE,
+				USB_TYPE_CLASS | USB_DIR_IN
+				 | USB_RECIP_INTERFACE,
+				0, iface_no, &max_datagram_size,
+				2, 1000);
+		if (err < 0) {
 			pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n",
 						CDC_NCM_MIN_DATAGRAM_SIZE);
 		} else {
@@ -396,17 +355,15 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
 					CDC_NCM_MIN_DATAGRAM_SIZE;
 
 			/* if value changed, update device */
-			req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT |
-							USB_RECIP_INTERFACE;
-			req.bNotificationType = USB_CDC_SET_MAX_DATAGRAM_SIZE;
-			req.wValue = 0;
-			req.wIndex = cpu_to_le16(iface_no);
-			req.wLength = 2;
-			max_datagram_size = cpu_to_le16(ctx->max_datagram_size);
-
-			err = cdc_ncm_do_request(ctx, &req, &max_datagram_size,
-								0, NULL, 1000);
-			if (err)
+			err = usb_control_msg(ctx->udev,
+						usb_sndctrlpipe(ctx->udev, 0),
+						USB_CDC_SET_MAX_DATAGRAM_SIZE,
+						USB_TYPE_CLASS | USB_DIR_OUT
+						 | USB_RECIP_INTERFACE,
+						0,
+						iface_no, &max_datagram_size,
+						2, 1000);
+			if (err < 0)
 				pr_debug("SET_MAX_DATAGRAM_SIZE failed\n");
 		}
 
@@ -672,7 +629,7 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb)
 	u32 rem;
 	u32 offset;
 	u32 last_offset;
-	u16 n = 0;
+	u16 n = 0, index;
 	u8 ready2send = 0;
 
 	/* if there is a remaining skb, it gets priority */
@@ -860,8 +817,8 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb)
 					cpu_to_le16(sizeof(ctx->tx_ncm.nth16));
 	ctx->tx_ncm.nth16.wSequence = cpu_to_le16(ctx->tx_seq);
 	ctx->tx_ncm.nth16.wBlockLength = cpu_to_le16(last_offset);
-	ctx->tx_ncm.nth16.wNdpIndex = ALIGN(sizeof(struct usb_cdc_ncm_nth16),
-							ctx->tx_ndp_modulus);
+	index = ALIGN(sizeof(struct usb_cdc_ncm_nth16), ctx->tx_ndp_modulus);
+	ctx->tx_ncm.nth16.wNdpIndex = cpu_to_le16(index);
 
 	memcpy(skb_out->data, &(ctx->tx_ncm.nth16), sizeof(ctx->tx_ncm.nth16));
 	ctx->tx_seq++;
@@ -874,12 +831,11 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb)
 	ctx->tx_ncm.ndp16.wLength = cpu_to_le16(rem);
 	ctx->tx_ncm.ndp16.wNextNdpIndex = 0; /* reserved */
 
-	memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wNdpIndex,
+	memcpy(((u8 *)skb_out->data) + index,
 						&(ctx->tx_ncm.ndp16),
 						sizeof(ctx->tx_ncm.ndp16));
 
-	memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wNdpIndex +
-					sizeof(ctx->tx_ncm.ndp16),
+	memcpy(((u8 *)skb_out->data) + index + sizeof(ctx->tx_ncm.ndp16),
 					&(ctx->tx_ncm.dpe16),
 					(ctx->tx_curr_frame_num + 1) *
 					sizeof(struct usb_cdc_ncm_dpe16));
-- 
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH] ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
From: Max Matveev @ 2011-08-04  7:42 UTC (permalink / raw)
  To: netdev; +Cc: vladislav.yasevich

When support for binding to 'mapped INADDR_ANY (::ffff.0.0.0.0)' was added
in 0f8d3c7ac3693d7b6c731bf2159273a59bf70e12 the rest of the code
wasn't told so now it's possible to bind IPv6 datagram socket to
::ffff.0.0.0.0, connect it to another IPv4 address and it will all
work except for getsockhame() which does not return the local address
as expected.

To give getsockname() something to work with check for 'mapped INADDR_ANY'
when connecting and update the in-core source addresses appropriately.

Signed-off-by: Max Matveev <makc@redhat.com>
---
 net/ipv6/datagram.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 1656033..d3a65a18 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -33,6 +33,11 @@
 #include <linux/errqueue.h>
 #include <asm/uaccess.h>
 
+static inline int ipv6_mapped_addr_any(const struct in6_addr *a)
+{
+	return (ipv6_addr_v4mapped(a) && (a->s6_addr32[3] == 0));
+}
+
 int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
 	struct sockaddr_in6	*usin = (struct sockaddr_in6 *) uaddr;
@@ -102,10 +107,12 @@ ipv4_connected:
 
 		ipv6_addr_set_v4mapped(inet->inet_daddr, &np->daddr);
 
-		if (ipv6_addr_any(&np->saddr))
+		if (ipv6_addr_any(&np->saddr) ||
+		    ipv6_mapped_addr_any(&np->saddr))
 			ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr);
 
-		if (ipv6_addr_any(&np->rcv_saddr)) {
+		if (ipv6_addr_any(&np->rcv_saddr) || 
+		    ipv6_mapped_addr_any(&np->rcv_saddr)) {
 			ipv6_addr_set_v4mapped(inet->inet_rcv_saddr,
 					       &np->rcv_saddr);
 			if (sk->sk_prot->rehash)
-- 
1.7.4.4


^ permalink raw reply related

* Re: return of ip_rt_bug()
From: David Miller @ 2011-08-04  7:23 UTC (permalink / raw)
  To: davej; +Cc: netdev, selinux
In-Reply-To: <20110802170942.GA17164@redhat.com>

From: Dave Jones <davej@redhat.com>
Date: Tue, 2 Aug 2011 13:09:42 -0400

> all the traces he's hit so far seem to be caused by udp, and they all seem to be
> going from 192.168.2.5 -> 255.255.255.255
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=712632 is his full report with similar traces.

It should have been fixed by the patch below, but apparently not:

--------------------
>From ed6e4ef836d425bc35e33bf20fcec95e68203afa Mon Sep 17 00:00:00 2001
From: Julian Anastasov <ja@ssi.bg>
Date: Sat, 18 Jun 2011 07:53:59 +0000
Subject: [PATCH] netfilter: Fix ip_route_me_harder triggering ip_rt_bug

	Avoid creating input routes with ip_route_me_harder.
It does not work for locally generated packets. Instead,
restrict sockets to provide valid saddr for output route (or
unicast saddr for transparent proxy). For other traffic
allow saddr to be unicast or local but if callers forget
to check saddr type use 0 for the output route.

	The resulting handling should be:

- REJECT TCP:
	- in INPUT we can provide addr_type = RTN_LOCAL but
	better allow rejecting traffic delivered with
	local route (no IP address => use RTN_UNSPEC to
	allow also RTN_UNICAST).
	- FORWARD: RTN_UNSPEC => allow RTN_LOCAL/RTN_UNICAST
	saddr, add fix to ignore RTN_BROADCAST and RTN_MULTICAST
	- OUTPUT: RTN_UNSPEC

- NAT, mangle, ip_queue, nf_ip_reroute: RTN_UNSPEC in LOCAL_OUT

- IPVS:
	- use RTN_LOCAL in LOCAL_OUT and FORWARD after SNAT
	to restrict saddr to be local

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/netfilter.c            |   60 ++++++++++++++------------------------
 net/ipv4/netfilter/ipt_REJECT.c |   14 ++------
 2 files changed, 26 insertions(+), 48 deletions(-)

diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 4614bab..2e97e3e 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -17,51 +17,35 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
 	const struct iphdr *iph = ip_hdr(skb);
 	struct rtable *rt;
 	struct flowi4 fl4 = {};
-	unsigned long orefdst;
+	__be32 saddr = iph->saddr;
+	__u8 flags = 0;
 	unsigned int hh_len;
-	unsigned int type;
 
-	type = inet_addr_type(net, iph->saddr);
-	if (skb->sk && inet_sk(skb->sk)->transparent)
-		type = RTN_LOCAL;
-	if (addr_type == RTN_UNSPEC)
-		addr_type = type;
+	if (!skb->sk && addr_type != RTN_LOCAL) {
+		if (addr_type == RTN_UNSPEC)
+			addr_type = inet_addr_type(net, saddr);
+		if (addr_type == RTN_LOCAL || addr_type == RTN_UNICAST)
+			flags |= FLOWI_FLAG_ANYSRC;
+		else
+			saddr = 0;
+	}
 
 	/* some non-standard hacks like ipt_REJECT.c:send_reset() can cause
 	 * packets with foreign saddr to appear on the NF_INET_LOCAL_OUT hook.
 	 */
-	if (addr_type == RTN_LOCAL) {
-		fl4.daddr = iph->daddr;
-		if (type == RTN_LOCAL)
-			fl4.saddr = iph->saddr;
-		fl4.flowi4_tos = RT_TOS(iph->tos);
-		fl4.flowi4_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
-		fl4.flowi4_mark = skb->mark;
-		fl4.flowi4_flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0;
-		rt = ip_route_output_key(net, &fl4);
-		if (IS_ERR(rt))
-			return -1;
-
-		/* Drop old route. */
-		skb_dst_drop(skb);
-		skb_dst_set(skb, &rt->dst);
-	} else {
-		/* non-local src, find valid iif to satisfy
-		 * rp-filter when calling ip_route_input. */
-		fl4.daddr = iph->saddr;
-		rt = ip_route_output_key(net, &fl4);
-		if (IS_ERR(rt))
-			return -1;
+	fl4.daddr = iph->daddr;
+	fl4.saddr = saddr;
+	fl4.flowi4_tos = RT_TOS(iph->tos);
+	fl4.flowi4_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
+	fl4.flowi4_mark = skb->mark;
+	fl4.flowi4_flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : flags;
+	rt = ip_route_output_key(net, &fl4);
+	if (IS_ERR(rt))
+		return -1;
 
-		orefdst = skb->_skb_refdst;
-		if (ip_route_input(skb, iph->daddr, iph->saddr,
-				   RT_TOS(iph->tos), rt->dst.dev) != 0) {
-			dst_release(&rt->dst);
-			return -1;
-		}
-		dst_release(&rt->dst);
-		refdst_drop(orefdst);
-	}
+	/* Drop old route. */
+	skb_dst_drop(skb);
+	skb_dst_set(skb, &rt->dst);
 
 	if (skb_dst(skb)->error)
 		return -1;
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 1ff79e5..51f13f8 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -40,7 +40,6 @@ static void send_reset(struct sk_buff *oldskb, int hook)
 	struct iphdr *niph;
 	const struct tcphdr *oth;
 	struct tcphdr _otcph, *tcph;
-	unsigned int addr_type;
 
 	/* IP header checks: fragment. */
 	if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET))
@@ -55,6 +54,9 @@ static void send_reset(struct sk_buff *oldskb, int hook)
 	if (oth->rst)
 		return;
 
+	if (skb_rtable(oldskb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
+		return;
+
 	/* Check checksum */
 	if (nf_ip_checksum(oldskb, hook, ip_hdrlen(oldskb), IPPROTO_TCP))
 		return;
@@ -101,19 +103,11 @@ static void send_reset(struct sk_buff *oldskb, int hook)
 	nskb->csum_start = (unsigned char *)tcph - nskb->head;
 	nskb->csum_offset = offsetof(struct tcphdr, check);
 
-	addr_type = RTN_UNSPEC;
-	if (hook != NF_INET_FORWARD
-#ifdef CONFIG_BRIDGE_NETFILTER
-	    || (nskb->nf_bridge && nskb->nf_bridge->mask & BRNF_BRIDGED)
-#endif
-	   )
-		addr_type = RTN_LOCAL;
-
 	/* ip_route_me_harder expects skb->dst to be set */
 	skb_dst_set_noref(nskb, skb_dst(oldskb));
 
 	nskb->protocol = htons(ETH_P_IP);
-	if (ip_route_me_harder(nskb, addr_type))
+	if (ip_route_me_harder(nskb, RTN_UNSPEC))
 		goto free_nskb;
 
 	niph->ttl	= ip4_dst_hoplimit(skb_dst(nskb));
-- 
1.7.6


^ permalink raw reply related

* Re: data vs overhead bytes, netperf aggregate RR and retransmissions
From: Jesse Brandeburg @ 2011-08-04  6:37 UTC (permalink / raw)
  To: Rick Jones; +Cc: netdev
In-Reply-To: <4E386E98.1090606@hp.com>

On Tue, Aug 2, 2011 at 2:39 PM, Rick Jones <rick.jones2@hp.com> wrote:
> driver: igb
> version: 2.1.0-k2
> firmware-version: 1.8-2
> bus-info: 0000:05:00.0
>
> One of the things fixed recently in netperf (top-of-trunk, beyond 2.5.0) is
> I actually have reporting of per-connection TCP retransmissions working.  I
> was looking at that, and noticed a bunch of retransmissions at the 256 burst
> level with 24 concurrent netperfs.  I figured it was simple overload of say
> the switch or the one port active on the SUT (I do have one system talking
> to two, so perhaps some incast).  Burst 64 had retrans as well.  Burst 16
> and below did not.  That pattern repeated at 12 concurrent netperfs, and 8,
> and 4 and 2 and even 1 - yes, a single netperf aggregate TCP_RR test with a
> burst of 64 was reporting TCP retransmissions.  No incasting issues there.
>  The network was otherwise clean.

Rick, can you reboot and try with idle=poll OR set ethtool -C ethX rx-usecs 0
both tests would be interesting, possibly relating your issue to cpu
power management and/or interrupt throttling, or some combo of both.

Also please check the ethtool -S ethX stats from the hardware, and
include them in your reply.

^ permalink raw reply

* Re: [PATCH] bonding: document two undocumented options.
From: Nicolas de Pesloüan @ 2011-08-04  5:41 UTC (permalink / raw)
  To: Jay Vosburgh
  Cc: David Miller, Stephen Hemminger, andy, netdev@vger.kernel.org
In-Reply-To: <3571.1312405193@death>

Le 03/08/2011 22:59, Jay Vosburgh a écrit :
> Nicolas de Pesloüan<nicolas.2p.debian@gmail.com>  wrote:

<snip>

>> The obvious default value should be 1, but I cannot confirm it is.
>
> 	Looking at it now, I see no initialization, and it's a static,
> so I believe it will end up being zero.  From the code, zero seems like
> the proper default, since it will make this test never pass:
>
>                  /* are enough slaves available to consider link up? */
>                  if (active->num_of_ports<  bond->params.min_links) {
>                          if (netif_carrier_ok(bond->dev)) {
>                                  netif_carrier_off(bond->dev);
>                                  return 1;
>                          }
>
> 	This will cause carrier to be asserted (for 802.3ad mode)
> whenever there is an active aggregator, regardless of the number of
> available links in that aggregator.
>
>> Stephen, as the author of this feature, can you please clarify what the default value for min_links is?
>>
>> V2 will follow, giving the real default value for all_slaves_active and
>> what I consider the sensible default value for max_links, even if the
>> technical real default value is currently unclear.
>
> 	I think the actual and sensible default are both zero, although
> the documentation should probably mention that a value of zero is magic
> and won't ever set the bond down due to too few ports (links) active.
>
> 	Or, perhaps describe it how it actually works: if there are
> fewer than "min_links" ports in the active aggregator, the bond is set
> carrier down.  The default min_links value of zero means that the bond
> will never be set down due to having too few ports active.

Well, you are right, but for as far as I understand, using 1 as the default value for min_links 
would cause the exact same behavior.

And 1 would be less "magical" and as such, more understandable from a user point of view. User might 
understand min_links=0 as "assert carrier on if at least 0 link have carrier on", which might be 
understood as "always assert carrier on".

	Nicolas.

^ permalink raw reply

* Re: bonding and ifenslave version.
From: Nicolas de Pesloüan @ 2011-08-04  5:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jay Vosburgh, Andy Gospodarek, netdev
In-Reply-To: <20110803143338.03988aab@nehalam.ftrdhcpuser.net>

Le 03/08/2011 23:33, Stephen Hemminger a écrit :
> On Wed, 03 Aug 2011 22:38:03 +0200
> Nicolas de Pesloüan<nicolas.2p.debian@gmail.com>  wrote:
<snip>
>> At least, we can:
>> - update the bonding documentation to clarify that ifenslave is deprecated (and move most ifenslave
>> related stuffs at the end of the documentation);
>> - possibly issue a warning when the API is used, suggesting to use sysfs instead.
>>
>> I can take care of the documentation update if appropriate.
>>
>> 	Nicolas.
>
> Or I could just put a shell script that does the same thing in iproute.

You mean, to replace ifenslave (from ifenslave.c) by a shell script by the same name that gives 
users the same command-line interface but use sysfs instead of the ioctl API internally?

I had this in mind two years ago, in a private conversation while changing the ifenslave package on 
Debian.

But chance exist that those who expect ifenslave to work would like to disable sysfs support if not 
used. I assume that totally disabling sysfs at compile time would reduce the size of the kernel far 
more that disabling the ioctl API. So, for those doing embedded things, this may makes sens to have 
an ifenslave version that doesn't rely on sysfs.

Or do you mean, to replace ifenslave (.c) by a shell script that use netlink internally? Are all the 
bonding options available through netlink? I remember many conversation about using netlink for 
bonding setup, but don't remember seeing that in the actual code.

	Nicolas.

^ permalink raw reply

* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
From: Roland Dreier @ 2011-08-04  2:53 UTC (permalink / raw)
  To: Yevgeny Petrilin
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4E395A18.8070600-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>

Hi Yevgeny!

Actually on further testing it seems that things are still not perfect
with my old firmware at least.

If I do "ifconfig eth6 mtu 1450" (where eth6 is a mlx4_en interface)
then I am no longer able to get traffic through the interface; if I
have a ping running it stops immediately.  It seems any mtu change
triggers this (increasing the mtu above the default has the same
effect, and restoring the mtu to the default doesn't fix it).

Haven't tried to debug further.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] slip: cleanup statistics generation
From: David Miller @ 2011-08-04  2:12 UTC (permalink / raw)
  To: matvejchikov; +Cc: netdev
In-Reply-To: <CAKh5naZiFHjQ_q00iBk1kz5XCU9E4wC+7Pxd-8w=v96z-f0Vig@mail.gmail.com>

From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Wed, 3 Aug 2011 15:02:18 +0400

> OMG, sorry for the typo. Here is the correct patch.
> 
> Subject: [PATCH] slip: cleanup statistics generation
> 
> Remove unused tx_compressed, tx_compressed and tx_misses fields from
> the slip structure. Also, make some device stats generation cleanups.
> 
> Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>

Looks better, applied, thanks.

^ permalink raw reply

* Re: [PATCH ] cdc_ncm: fixes for big-endian architecture / MIPS
From: David Miller @ 2011-08-04  2:11 UTC (permalink / raw)
  To: giuseppe
  Cc: alexey.orishko, netdev, oliver, linux-usb, gregkh, alexey.orishko
In-Reply-To: <87ipqeebvg.fsf@gnu.org>

From: Giuseppe Scrivano <giuseppe@southpole.se>
Date: Wed, 03 Aug 2011 17:46:43 +0200

>>From 7ba49d858103acb2ce4043127e3512ea29dff307 Mon Sep 17 00:00:00 2001
> From: Giuseppe Scrivano <giuseppe@southpole.se>
> Date: Fri, 15 Jul 2011 15:34:14 +0200
> Subject: [PATCH] cdc_ncm: fix endianess problem.
> 
> Signed-off-by: Giuseppe Scrivano <giuseppe@southpole.se>

The patch looks great, but please repost this fresh with a more
vebose commit log message explaining all the things we discussed
to get the change to it's current form.

Thanks!

^ permalink raw reply

* Re: [resend PATCH] irda: use PCI_VENDOR_ID_*
From: David Miller @ 2011-08-04  2:04 UTC (permalink / raw)
  To: jdmason; +Cc: netdev, samuel
In-Reply-To: <1312389762-9728-1-git-send-email-jdmason@kudzu.us>

From: Jon Mason <jdmason@kudzu.us>
Date: Wed,  3 Aug 2011 11:42:42 -0500

> Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define locally.
> 
> Signed-off-by: Jon Mason <jdmason@kudzu.us>

Applied, thanks.

^ permalink raw reply

* Re: [resend PATCH] ixgb: use PCI_VENDOR_ID_*
From: Jeff Kirsher @ 2011-08-04  0:09 UTC (permalink / raw)
  To: Jon Mason
  Cc: David S. Miller, netdev@vger.kernel.org, Brandeburg, Jesse,
	Allan, Bruce W, Wyborny, Carolyn, Skidmore, Donald C,
	Rose, Gregory V, Waskiewicz Jr, Peter P, Duyck, Alexander H,
	Ronciak, John, e1000-devel@lists.sourceforge.net
In-Reply-To: <1312389773-9761-1-git-send-email-jdmason@kudzu.us>

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

On Wed, 2011-08-03 at 09:42 -0700, Jon Mason wrote:
> Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define
> locally.
> 
> Signed-off-by: Jon Mason <jdmason@kudzu.us>
> ---
>  drivers/net/ixgb/ixgb_hw.c   |    5 +++--
>  drivers/net/ixgb/ixgb_ids.h  |    5 -----
>  drivers/net/ixgb/ixgb_main.c |   10 +++++-----
>  3 files changed, 8 insertions(+), 12 deletions(-) 

Thanks Jon, I will add the patch to my queue.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [resend PATCH] ixgbe: remove unused #define
From: Jeff Kirsher @ 2011-08-04  0:09 UTC (permalink / raw)
  To: Jon Mason
  Cc: David S. Miller, netdev@vger.kernel.org, Brandeburg, Jesse,
	Allan, Bruce W, Wyborny, Carolyn, Skidmore, Donald C,
	Rose, Gregory V, Waskiewicz Jr, Peter P, Duyck, Alexander H,
	Ronciak, John, e1000-devel@lists.sourceforge.net
In-Reply-To: <1312389773-9761-2-git-send-email-jdmason@kudzu.us>

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

On Wed, 2011-08-03 at 09:42 -0700, Jon Mason wrote:
> 
> Remove unused IXGBE_INTEL_VENDOR_ID #define
> 
> Signed-off-by: Jon Mason <jdmason@kudzu.us>
> ---
>  drivers/net/ixgbe/ixgbe_type.h |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-) 

Thanks Jon, I will add the patch to my queue.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: pull request: wireless 2011-08-03
From: David Miller @ 2011-08-03 23:38 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20110803144754.GB30439@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 3 Aug 2011 10:47:55 -0400

> The following changes since commit 28f4881cbf9ce285edfc245a8990af36d21c062f:
> 
>   bnx2x: Clear MDIO access warning during first driver load (2011-08-03 03:22:18 -0700)
> 
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
> 

Looks a lot better, pulled, thanks!

^ permalink raw reply


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