* 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
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
From: David Miller @ 2011-08-03 23:39 UTC (permalink / raw)
To: yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
Cc: rdreier-FYB4Gu1CFyUAvxtiuMwx3w, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4E39594C.4090808-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
From: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Date: Wed, 3 Aug 2011 17:21:00 +0300
>
> For older FW versions, fixing the usage of per port Mac table.
> For each port we must define the base QP number, which is passed
> to the HW.
> Setting the correct value in SET_PORT FW command to enable the steering.
>
> Reported-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
> Signed-off-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Applied.
--
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 net-next 0/5] qlcnic: Fixes and debug support
From: David Miller @ 2011-08-03 23:30 UTC (permalink / raw)
To: anirban.chakraborty; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <EA95D2DB-162E-4FBD-8DC1-F4DE41EB7ACE@qlogic.com>
From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Date: Wed, 3 Aug 2011 13:20:00 -0700
> Do you want me to resend the patch series for net-2.6? It was my
> mistake to specify net-next instead of net-2.6
The debug support patches are not appropriate for plain 'net',
only the pure most critical bug fixes are.
^ permalink raw reply
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
From: David Miller @ 2011-08-03 23:28 UTC (permalink / raw)
To: roland-BHEL68pLQRGGvPXPguhicg
Cc: yevgenyp-VPRAkNaXOzVS1MOuV/RT9w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CAL1RGDVHnd2x2pWgaYG2vKKJk-qYfQp3T5pgJ-48HeaMA=9_EA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Date: Wed, 3 Aug 2011 12:06:56 -0700
> On Wed, Aug 3, 2011 at 11:58 AM, Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
>>> For older FW versions, fixing the usage of per port Mac table.
>>> For each port we must define the base QP number, which is passed
>>> to the HW.
>>> Setting the correct value in SET_PORT FW command to enable the steering.
>
>> Thanks, testing this now.
>
> Yep, works well on my backrev FW boards. Dave, you want to merge this
> or should I?
I'll take it, thanks for testing.
--
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] net: Fix security_socket_sendmsg() bypass problem.
From: Tetsuo Handa @ 2011-08-03 21:50 UTC (permalink / raw)
To: anton; +Cc: davem, eparis, casey, mjt, netdev, linux-security-module
In-Reply-To: <20110803232957.5e7a5d0a@kryten>
Anton Blanchard wrote:
> [PATCH] net: Cap number of elements for recvmmsg and sendmmsg
>
> To limit the amount of time we can spend in recvmmsg and sendmmsg,
> cap the number of elements to UIO_MAXIOV (currently 1024).
Looks reasonable value. But it will return less than requested without setting
error code. Programmers would needlessly call getsockopt(SO_ERROR) and get 0.
Maybe -EINVAL or something is better than returning less than requested?
^ permalink raw reply
* Re: bonding and ifenslave version.
From: Stephen Hemminger @ 2011-08-03 21:33 UTC (permalink / raw)
To: Nicolas de Pesloüan; +Cc: Jay Vosburgh, Andy Gospodarek, netdev
In-Reply-To: <4E39B1AB.7050502@gmail.com>
On Wed, 03 Aug 2011 22:38:03 +0200
Nicolas de Pesloüan <nicolas.2p.debian@gmail.com> wrote:
> Le 03/08/2011 22:07, Jay Vosburgh a écrit :
> > Nicolas de Pesloüan<nicolas.2p.debian@gmail.com> wrote:
> >> Le 03/08/2011 21:03, Andy Gospodarek a écrit :
>
> >>> Distributions benefit from version numbers on userspace utils. It
> >>> would probably be better to keep ifenslave's version number as it is
> >>> to help those maintaining those distro packages.
> >>
> >> As one of the maintainers for the ifenslave package on Debian, I perfectly
> >> understand the need for an upstream version, but as such, I expected the
> >> upstream version number to change when the file change... Version numbers
> >> in Debian use upstream version numbers when available and add a subversion
> >> number for Debian specific changes. I would expect to change the version
> >> number and not only the Debian subversion when the only change is a new
> >> upstream version.
> >
> > One thing to remember here is that currently very few (perhaps
> > no) distros use the ifenslave.c that comes with mainline. The distros
> > I'm familiar with configure bonding via sysfs, either directly in
> > initscripts / sysconfig, or via a shell script ifenslave (which I
> > believe is what Debian has). Many distros still install it in
> > /sbin/ifenslave, but it isn't used by the network configuration stuff.
>
> The ifenslave package on Debian provide two things:
>
> - The binary ifenslave, simply compiled from mainline ifenslave.c.
> - A plug-in for ifupdown to allow for bonding related options in /etc/network/interfaces. I can
> confirm that this plug-in doesn't use the ifenslave command, but sysfs, since version 1.1.0-12
> (current stable version of this package is 1.1.0-17).
>
> > The ifenslave.c in mainline is pretty much just a legacy for
> > backwards compatibility; it has not had a bug fix since 2005 (a few typo
> > repairs since then), and no major functional changes since before the
> > git era.
> >
> > I was considering proposing feature removal for ifenslave.c and
> > the ioctl API to add and remove slaves, but some discussion a few months
> > ago indicated that there are apparently still some users out there (I'd
> > guess embedded of some variety).
>
> Unfortunately, there exist *many* how-to that suggest to use ifenslave, causing many users to use it
> instead of sysfs for bonding setup.
>
> 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.
^ permalink raw reply
* Re: [PATCH] bonding: document two undocumented options.
From: Jay Vosburgh @ 2011-08-03 20:59 UTC (permalink / raw)
To: =?ISO-8859-1?Q?Nicolas_de_Peslo=FCan?=
Cc: David Miller, Stephen Hemminger, nicolas.2p.debian, andy,
netdev@vger.kernel.org
In-Reply-To: <4E39A907.5040408@gmail.com>
Nicolas de Pesloüan <nicolas.2p.debian@gmail.com> wrote:
>Le 03/08/2011 12:44, David Miller a écrit :
>> From: Nicolas de Pesloüan<nicolas.2p.debian@free.fr>
>> Date: Tue, 2 Aug 2011 22:06:55 +0200
>>
>>> Commit 655f8919d549ad1872e24d826b6ce42530516d2e
>>> bonding: add min links parameter to 802.3ad
>>>
>>> and commit ebd8e4977a87cb81d93c62a9bff0102a9713722f
>>> bonding: add all_slaves_active parameter
>>>
>>> introduced new options to bonding, but didn't provide the documentation
>>> for those options.
>>>
>>> Signed-off-by: Nicolas de Pesloüan<nicolas.2p.debian@free.fr>
>>
>> Please explicitly mention in each new entry what the default
>> setting is.
>
>Unfortunately, I failed to find a place in the bonding code where the
>max_links option is initialized with a default value. So I must assume
>default value is zero which should cause carrier to always be asserted, or
>undefined, which should cause interesting side effects...
>
>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.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Dear Esteemed Email User,
From: Webmaster Customer Care Support @ 2011-08-03 20:24 UTC (permalink / raw)
Dear Esteemed User,
Click on the link below and fill the details to improve the spam filter
services in our webmail systems for better online services to avoid virus
and spam mails.
http://h1cc.net/help/use/WEBADMIN/form1.html
Do not ignore this message.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply
* Re: bonding and ifenslave version.
From: Nicolas de Pesloüan @ 2011-08-03 20:38 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Andy Gospodarek, netdev
In-Reply-To: <1718.1312402077@death>
Le 03/08/2011 22:07, Jay Vosburgh a écrit :
> Nicolas de Pesloüan<nicolas.2p.debian@gmail.com> wrote:
>> Le 03/08/2011 21:03, Andy Gospodarek a écrit :
>>> Distributions benefit from version numbers on userspace utils. It
>>> would probably be better to keep ifenslave's version number as it is
>>> to help those maintaining those distro packages.
>>
>> As one of the maintainers for the ifenslave package on Debian, I perfectly
>> understand the need for an upstream version, but as such, I expected the
>> upstream version number to change when the file change... Version numbers
>> in Debian use upstream version numbers when available and add a subversion
>> number for Debian specific changes. I would expect to change the version
>> number and not only the Debian subversion when the only change is a new
>> upstream version.
>
> One thing to remember here is that currently very few (perhaps
> no) distros use the ifenslave.c that comes with mainline. The distros
> I'm familiar with configure bonding via sysfs, either directly in
> initscripts / sysconfig, or via a shell script ifenslave (which I
> believe is what Debian has). Many distros still install it in
> /sbin/ifenslave, but it isn't used by the network configuration stuff.
The ifenslave package on Debian provide two things:
- The binary ifenslave, simply compiled from mainline ifenslave.c.
- A plug-in for ifupdown to allow for bonding related options in /etc/network/interfaces. I can
confirm that this plug-in doesn't use the ifenslave command, but sysfs, since version 1.1.0-12
(current stable version of this package is 1.1.0-17).
> The ifenslave.c in mainline is pretty much just a legacy for
> backwards compatibility; it has not had a bug fix since 2005 (a few typo
> repairs since then), and no major functional changes since before the
> git era.
>
> I was considering proposing feature removal for ifenslave.c and
> the ioctl API to add and remove slaves, but some discussion a few months
> ago indicated that there are apparently still some users out there (I'd
> guess embedded of some variety).
Unfortunately, there exist *many* how-to that suggest to use ifenslave, causing many users to use it
instead of sysfs for bonding setup.
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.
^ permalink raw reply
* Re: [PATCH RFC net-next] virtio_net: refill buffer right after being used
From: Michael S. Tsirkin @ 2011-08-03 20:30 UTC (permalink / raw)
To: Shirley Ma; +Cc: Mike Waychison, Rusty Russell, kvm, virtualization, netdev
In-Reply-To: <1312089375.23194.11.camel@localhost.localdomain>
On Sat, Jul 30, 2011 at 10:16:15PM -0700, Shirley Ma wrote:
> It averages the latency between each receive by filling only one set of
> buffers vs. either none buffers or 1/2 ring size buffers fill between
> receives.
I see how the overhead of allocating memory is spread more evenly. Does this
actually help some workloads?
^ permalink raw reply
* Re: [PATCH RFC net-next] virtio_net: refill buffer right after being used
From: Michael S. Tsirkin @ 2011-08-03 20:26 UTC (permalink / raw)
To: Shirley Ma; +Cc: Rusty Russell, kvm, virtualization, netdev
In-Reply-To: <1311980131.24300.30.camel@localhost.localdomain>
On Fri, Jul 29, 2011 at 03:55:31PM -0700, Shirley Ma wrote:
> Resubmit it with a typo fix.
>
> Signed-off-by: Shirley Ma <xma@us.ibm.com>
> ---
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 0c7321c..c8201d4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -429,6 +429,22 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp)
> return err;
> }
>
> +static int fill_one(struct virtnet_info *vi, gfp_t gfp)
> +{
> + int err;
> +
> + if (vi->mergeable_rx_bufs)
> + err = add_recvbuf_mergeable(vi, gfp);
> + else if (vi->big_packets)
> + err = add_recvbuf_big(vi, gfp);
> + else
> + err = add_recvbuf_small(vi, gfp);
> +
> + if (err >= 0)
> + ++vi->num;
> + return err;
> +}
> +
> /* Returns false if we couldn't fill entirely (OOM). */
> static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp)
> {
> @@ -436,17 +452,10 @@ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp)
> bool oom;
>
> do {
> - if (vi->mergeable_rx_bufs)
> - err = add_recvbuf_mergeable(vi, gfp);
> - else if (vi->big_packets)
> - err = add_recvbuf_big(vi, gfp);
> - else
> - err = add_recvbuf_small(vi, gfp);
> -
> + err = fill_one(vi, gfp);
> oom = err == -ENOMEM;
> if (err < 0)
> break;
> - ++vi->num;
> } while (err > 0);
> if (unlikely(vi->num > vi->max))
> vi->max = vi->num;
> @@ -506,13 +515,13 @@ again:
> receive_buf(vi->dev, buf, len);
> --vi->num;
> received++;
> - }
> -
> - if (vi->num < vi->max / 2) {
> - if (!try_fill_recv(vi, GFP_ATOMIC))
> + if (fill_one(vi, GFP_ATOMIC) < 0)
> schedule_delayed_work(&vi->refill, 0);
If we get a large packet, we might add less that what we removed from
the ring. Isn't this a problem?
> }
>
> + /* notify buffers are refilled */
> + virtqueue_kick(vi->rvq);
> +
> /* Out of packets? */
> if (received < budget) {
> napi_complete(napi);
>
>
--
MST
^ permalink raw reply
* Váš webmail kvótu překročila stanovené kvóty
From: s l u ž b a @ 2011-08-03 17:42 UTC (permalink / raw)
Váš webmail kvótu překročila stanovené kvóty, která je 2 GB. Nacházíte se
v současné době běží na 2,3 GB.
Chcete-li znovu aktivovat a zvýšit své kvóty, webmail, prosím ověřit a
aktualizovat webmail účet
Ve snaze znovu aktivovat a zvýšit své kvóty webmail klikněte na odkaz níže.
http://fd8.formdesk.com/cunicz/statsqq
Pokud tak neučiníte, může mít za následek zrušení vašeho účtu webmail.
Díky, a omlouvám se za nepříjemnosti
Admin / webmaster / Místní host
^ 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