Netdev List
 help / color / mirror / Atom feed
* RE: [PATCH v3] net/hyperv: fix wrong length of mac address
From: Haiyang Zhang @ 2013-01-19 15:07 UTC (permalink / raw)
  To: Amos Kong, davem@davemloft.net, KY Srinivasan
  Cc: netdev@vger.kernel.org, devel@linuxdriverproject.org
In-Reply-To: <1358563929-10942-1-git-send-email-kongjianjun@gmail.com>

> From: Amos Kong

> Sent: Friday, January 18, 2013 9:52 PM
> To: davem@davemloft.net; KY Srinivasan; Haiyang Zhang
> Cc: netdev@vger.kernel.org; devel@linuxdriverproject.org; Amos Kong
> Subject: [PATCH v3] net/hyperv: fix wrong length of mac address
> 
> This patch fixed wrong mac length, it should be ETH_ALEN,
> also replaced the hardcode 6 in hyperv_net.h
> 
> Signed-off-by: Amos Kong <kongjianjun@gmail.com>
> ---
> v2: update commitlog, fix cc list
> v3: fix hardcode length in hyperv_net.h
> ---

 Acked-by: Haiyang Zhang <haiyangz@microsoft.com>

^ permalink raw reply

* Re: IPsec AH use of ahash
From: Eric Dumazet @ 2013-01-19 15:46 UTC (permalink / raw)
  To: Tom St Denis
  Cc: Waskiewicz Jr, Peter P, David Miller, steffen klassert, herbert,
	linux-kernel, netdev, Michal Kubecek
In-Reply-To: <1325444527.92017.1358591457919.JavaMail.root@elliptictech.com>

On Sat, 2013-01-19 at 05:30 -0500, Tom St Denis wrote:

> As someone who maintained (and I mean that in all senses not just
> applied patches) OSS projects while working full time and still trying
> to have a life I get it.  That said I never turned away patches solely
> on "style" issues.  At the same time you should look at the size and
> scope of the patches I'm talking about.  It took me all of less than
> an hour to develop and less than a couple of hours to give it a run to
> see if it works correctly [talking about the CMAC patch].
> 
> This *should* be a no-brainer to apply.
> 

Again, if its a no-brainer, the patch should be perfect, so that our
brains can cope with the hard to review patches, and hard to debug
problems. A maintainer is not a machine doing mechanical work

Every time we have to ask you another round, its a lost of time for
everybody.

Really if you can not understand that, thats too bad.


> For those of us who do Kernel development during business hours it's
> hard to justify the work when the path to mainline is convoluted and
> landmined.  

Thousands of contributors just did it very well. 

You might read a bit Documentation/SubmittingPatches

vi +263 Documentation/SubmittingPatches

This is a bit outdated, as obviously Linus is not the guy most
contributors are dealing with.

^ permalink raw reply

* Re: pull request: batman-adv 2013-01-19
From: David Miller @ 2013-01-19 15:50 UTC (permalink / raw)
  To: ordex; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1358602079-24024-1-git-send-email-ordex@autistici.org>

From: Antonio Quartulli <ordex@autistici.org>
Date: Sat, 19 Jan 2013 21:27:46 +0800

> here is our second patchset intended for net-next/linux-3.9.
> In this batch you have some struct refactoring and a great kernel doc
> improvement by Marek Lindner. In patch 10/13 you have the random32() function
> renaming proposed by Akinobu Mita.
> 
> In 11/13 instead you have a behavioural change brought by Simon Wunderlich which
> is modifying the way a batman-adv virtual interface is unregistered in order to
> prevent a possible deadlock involving rntl_lock and s_active. We have
> already been discussing about this problem and its possible solution on the
> netdev mailing list.
> The rest is just clean up work.
> 
> Please pull or let me know if there is any problem.

Pulled, thanks Antonio.

^ permalink raw reply

* Re: [net-next 00/10][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2013-01-19 15:53 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1358601299-10404-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 19 Jan 2013 05:14:49 -0800

> This series contains updates to ixgbe, ixgbevf and igb.
> 
> The following are changes since commit 1ad759d8479b4b28f2a6c874d380066cf987b341:
>   ipv6: remove unneeded check to pskb_may_pull in ipip6_rcv
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

^ permalink raw reply

* Re: [PATCH 1/2] introduce flag FLAG_NOARP for usb net devices which cannot do ARP
From: David Miller @ 2013-01-19 15:55 UTC (permalink / raw)
  To: cpuwolf
  Cc: dbbw, peter, oneukum, sshtylyov, gregkh, alexey.orishko, bjorn,
	linux-usb, netdev
In-Reply-To: <1358596079-7126-1-git-send-email-cpuwolf@gmail.com>


Why did you submit this _4_ times?

I'm deleteing everything, I'm not even going to try and guess why
you submitted this so many times and what might be different between
each copy.

^ permalink raw reply

* Re: [PATCH net] net: qmi_wwan: add ONDA MT8205 4G LTE
From: David Miller @ 2013-01-19 15:56 UTC (permalink / raw)
  To: bjorn-yOkvZcmFvRU
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1358519194-10118-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>

From: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
Date: Fri, 18 Jan 2013 15:26:34 +0100

> The driver description files gives these names to the vendor specific
> functions on this modem:
> 
>  Diag   VID_19D2&PID_0265&MI_00
>  NMEA   VID_19D2&PID_0265&MI_01
>  AT cmd VID_19D2&PID_0265&MI_02
>  Modem  VID_19D2&PID_0265&MI_03
>  Net    VID_19D2&PID_0265&MI_04
> 
> Signed-off-by: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>

Applied, thanks.
--
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

* Re: [PATCH net-next 0/2] Add support of multicast static tree
From: David Miller @ 2013-01-19 15:58 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev, dlstevens
In-Reply-To: <1358528378-2110-1-git-send-email-nicolas.dichtel@6wind.com>

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri, 18 Jan 2013 17:59:36 +0100

> The goal of this serie is to add the support of proxy multicast, ie being able
> to build a static multicast tree. In other words, it adds the support of (*,G)
> mf[6]c entries.
> 
>  include/linux/mroute.h       |   2 +-
>  include/linux/mroute6.h      |   2 +-
>  include/uapi/linux/in6.h     |  15 ++----
>  include/uapi/linux/mroute.h  |   3 ++
>  include/uapi/linux/mroute6.h |   3 ++
>  net/ipv4/ipmr.c              | 118 +++++++++++++++++++++++++++++++++++-----
>  net/ipv6/ip6mr.c             | 126 ++++++++++++++++++++++++++++++++++++++-----
>  7 files changed, 230 insertions(+), 39 deletions(-)
> 
> Comments are welcome.

David, could you please review this series from Nicolas?

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: asix: ax88772_unbind() can be static
From: David Miller @ 2013-01-19 16:00 UTC (permalink / raw)
  To: fengguang.wu; +Cc: dev, netdev
In-Reply-To: <20130119013656.GA15200@localhost>

From: Fengguang Wu <fengguang.wu@intel.com>
Date: Sat, 19 Jan 2013 09:36:56 +0800

> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3] net/hyperv: fix wrong length of mac address
From: David Miller @ 2013-01-19 16:02 UTC (permalink / raw)
  To: haiyangz; +Cc: kongjianjun, kys, netdev, devel
In-Reply-To: <5fc6e66ddc034250a4e510784266b063@DFM-DB3MBX15-06.exchange.corp.microsoft.com>

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Sat, 19 Jan 2013 15:07:14 +0000

>> From: Amos Kong
> 
>> Sent: Friday, January 18, 2013 9:52 PM
>> To: davem@davemloft.net; KY Srinivasan; Haiyang Zhang
>> Cc: netdev@vger.kernel.org; devel@linuxdriverproject.org; Amos Kong
>> Subject: [PATCH v3] net/hyperv: fix wrong length of mac address
>> 
>> This patch fixed wrong mac length, it should be ETH_ALEN,
>> also replaced the hardcode 6 in hyperv_net.h
>> 
>> Signed-off-by: Amos Kong <kongjianjun@gmail.com>
>> ---
>> v2: update commitlog, fix cc list
>> v3: fix hardcode length in hyperv_net.h
>> ---
> 
>  Acked-by: Haiyang Zhang <haiyangz@microsoft.com>

Applied, thanks.

^ permalink raw reply

* [PATCH] rtlwifi: Fix build warning introduced by commit a290593
From: Larry Finger @ 2013-01-19 18:36 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev, kbuild test robot

The kbuild test robot reports the following warning with x86_64-randconfig-x955:

warning: (RTL8192CE && RTL8192SE && RTL8192DE && RTL8723AE && RTL8192CU) selects
 RTLWIFI which has unmet direct dependencies (NETDEVICES && WLAN &&
 (RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE))

This warning was introduced in commit a290593, "rtlwifi: Modify files for addition
of rtl8723ae", and is d ue to a missing dependence of RTLWIFI on RTL8723AE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
---
 drivers/net/wireless/rtlwifi/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/Kconfig b/drivers/net/wireless/rtlwifi/Kconfig
index 21b1bbb..b80bc46 100644
--- a/drivers/net/wireless/rtlwifi/Kconfig
+++ b/drivers/net/wireless/rtlwifi/Kconfig
@@ -57,12 +57,12 @@ config RTL8192CU
 
 config RTLWIFI
 	tristate
-	depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE
+	depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE
 	default m
 
 config RTLWIFI_DEBUG
 	bool "Additional debugging output"
-	depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE
+	depends on RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE || RTL8723AE
 	default y
 
 config RTL8192C_COMMON
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH 20/21] ntb_netdev: improve logging
From: Joe Perches @ 2013-01-19 18:51 UTC (permalink / raw)
  To: Jon Mason; +Cc: Greg KH, linux-kernel, netdev, Dave Jiang, Nicholas Bellinger
In-Reply-To: <1358586155-23322-21-git-send-email-jon.mason@intel.com>

On Sat, 2013-01-19 at 02:02 -0700, Jon Mason wrote:
> Improve driver logging to be more helpful
[]
> diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
[]
> @@ -408,6 +408,5 @@ static void __exit ntb_netdev_exit_module(void)
>  {
>  	ntb_unregister_client(&ntb_netdev_client);
>  	ntb_unregister_client_dev(KBUILD_MODNAME);
> -	pr_info("%s: Driver removed\n", KBUILD_MODNAME);

It's almost always true that using
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include

and changing all pr_<level>( uses from

	pr_<level>("s: etc...", KBUiLD_MODNAME, ...)
to
	pr_<level>("etc...", ...)

produces overall smaller object code.
That's even more likely for 64 bit compiled code.

^ permalink raw reply

* iwlwifi (Unsupported (too old) EEPROM VER=0x416 < 0x423 CALIB=0x5 < 0x4)
From: Paul Freeman @ 2013-01-19 23:25 UTC (permalink / raw)
  To: netdev


Hi,
  I seem to be having and odd issue with iwlwifi (Unsupported (too old) 
EEPROM VER=0x416 < 0x423 CALIB=0x5 < 0x4) on a recently purchased Intel 
Wifi 6200 N mini pci-e card, is anyone aware of a fix for this ?


uname -a
---------------------------------------------
Linux cache-Inspiron-910 3.5.0-22-generic #34-Ubuntu SMP Tue Jan 8 
21:41:11 UTC 2013 i686 i686 i686 GNU/Linux

lspci
---------------------------------------------
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200
	Subsystem: Intel Corporation Centrino Advanced-N 6200 2x2 AGN
	Flags: fast devsel, IRQ 17
	Memory at f0200000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: [c8] Power Management version 3
	Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [e0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Device Serial Number 00-15-00-ff-ff-5f-aa-59
	Kernel modules: iwlwifi


firmware version 9.221.4.1 build 25532
---------------------------------------------
[    3.636659] cfg80211: Calling CRDA to update world regulatory domain
[    3.899749] iwlwifi: Intel(R) Wireless WiFi Link AGN driver for 
Linux, in-tree:
[    3.899758] iwlwifi: Copyright(c) 2003-2012 Intel Corporation
[    3.900111] iwlwifi 0000:03:00.0: pci_resource_len = 0x00002000
[    3.900120] iwlwifi 0000:03:00.0: pci_resource_base = f843c000
[    3.900128] iwlwifi 0000:03:00.0: HW Revision ID = 0x0
[    3.900459] iwlwifi 0000:03:00.0: irq 44 for MSI/MSI-X

[    6.365912] cfg80211: World regulatory domain updated:
[    6.365922] cfg80211:   (start_freq - end_freq @ bandwidth), 
(max_antenna_gain, max_eirp)
[    6.365931] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), 
(300 mBi, 2000 mBm)
[    6.365938] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), 
(300 mBi, 2000 mBm)
[    6.365945] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), 
(300 mBi, 2000 mBm)
[    6.365952] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), 
(300 mBi, 2000 mBm)
[    6.365959] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), 
(300 mBi, 2000 mBm)

[    6.683215] iwlwifi 0000:03:00.0: loaded firmware version 9.221.4.1 
build 25532
[    6.684588] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
[    6.684599] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[    6.684607] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING 
enabled
[    6.684614] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE 
enabled
[    6.684622] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_P2P disabled
[    6.684631] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) 
Advanced-N 6200 AGN, REV=0x74
[    6.684856] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[    6.716302] iwlwifi 0000:03:00.0: Unsupported (too old) EEPROM 
VER=0x416 < 0x423 CALIB=0x5 < 0x4


as they were there I also tried the other firmwares from:
  
http://wireless.kernel.org/en/users/Drivers/iwlwifi?n=downloads#Firmware

firmware version 9.193.4.1 build 19710
---------------------------------------------
[ 2030.767040] iwlwifi: Intel(R) Wireless WiFi Link AGN driver for 
Linux, in-tree:
[ 2030.767050] iwlwifi: Copyright(c) 2003-2012 Intel Corporation
[ 2030.767332] iwlwifi 0000:03:00.0: pci_resource_len = 0x00002000
[ 2030.767340] iwlwifi 0000:03:00.0: pci_resource_base = f843c000
[ 2030.767346] iwlwifi 0000:03:00.0: HW Revision ID = 0x0
[ 2030.767547] iwlwifi 0000:03:00.0: irq 44 for MSI/MSI-X
[ 2030.797131] iwlwifi 0000:03:00.0: loaded firmware version 9.193.4.1 
build 19710
[ 2030.798313] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 2030.798327] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[ 2030.798335] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING 
enabled
[ 2030.798344] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE 
enabled
[ 2030.798352] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_P2P disabled
[ 2030.798363] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) 
Advanced-N 6200 AGN, REV=0x74
[ 2030.798555] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[ 2030.827866] iwlwifi 0000:03:00.0: Unsupported (too old) EEPROM 
VER=0x416 < 0x423 CALIB=0x5 < 0x4

firmware version 9.176.4.1 build 15835
---------------------------------------------
[ 2263.767690] iwlwifi: Intel(R) Wireless WiFi Link AGN driver for 
Linux, in-tree:
[ 2263.767701] iwlwifi: Copyright(c) 2003-2012 Intel Corporation
[ 2263.767988] iwlwifi 0000:03:00.0: pci_resource_len = 0x00002000
[ 2263.767998] iwlwifi 0000:03:00.0: pci_resource_base = f843c000
[ 2263.768005] iwlwifi 0000:03:00.0: HW Revision ID = 0x0
[ 2263.772210] iwlwifi 0000:03:00.0: irq 44 for MSI/MSI-X
[ 2263.799205] iwlwifi 0000:03:00.0: loaded firmware version 9.176.4.1 
build 15835
[ 2263.800449] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 2263.800462] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[ 2263.800470] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING 
enabled
[ 2263.800479] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE 
enabled
[ 2263.800487] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_P2P disabled
[ 2263.800498] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) 
Advanced-N 6200 AGN, REV=0x74
[ 2263.800714] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
[ 2263.829269] iwlwifi 0000:03:00.0: Unsupported (too old) EEPROM 
VER=0x416 < 0x423 CALIB=0x5 < 0x4

^ permalink raw reply

* Re: [PATCH net] net: cdc_ncm: workaround for missing CDC Union
From: Alexey Orishko @ 2013-01-20  0:21 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: Oliver Neukum, netdev, linux-usb, Greg Suarez, Alexey Orishko
In-Reply-To: <871udiur74.fsf@nemi.mork.no>

On Fri, Jan 18, 2013 at 10:17 PM, Bjørn Mork <bjorn@mork.no> wrote:

>>> Some Sierra Wireless firmwares support CDC MBIM but have no CDC
>>> Union funtional descriptor. This violates the MBIM specification,

I don't believe Sierra Wireless violates MBIM specification.
See in the specification: "there are two ways to group interfaces: the
WHCM Union functional descriptor and IAD."

Regards,
Alexey

^ permalink raw reply

* Re: [PATCH 1/2] introduce flag FLAG_NOARP for usb net devices which cannot do ARP
From: Wei Shuai @ 2013-01-20  1:05 UTC (permalink / raw)
  To: David Miller
  Cc: dbbw-H+wXaHxf7aLQT0dZR+AlfA, peter-Y+HMSxxDrH8,
	oneukum-l3A5Bk7waGM, sshtylyov-Igf4POYTYCDQT0dZR+AlfA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw, bjorn-yOkvZcmFvRU,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20130119.105546.121223240976490384.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

sorry for wrongly use git, I cannot recall them back. There is no
different between them. Anything else I can fix this? Resubmit?

2013/1/19, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>:
>
> Why did you submit this _4_ times?
>
> I'm deleteing everything, I'm not even going to try and guess why
> you submitted this so many times and what might be different between
> each copy.
>
--
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

* [PATCH 1/2] usbnet: introduce flag FLAG_NOARP for usb net devices
From: Wei Shuai @ 2013-01-20  1:16 UTC (permalink / raw)
  To: dcbw, davem, peter, oneukum, sshtylyov, gregkh, alexey.orishko,
	bjorn
  Cc: linux-usb, netdev, Wei Shuai

we do have some USB net devices, which cannot do ARP. so we can introduce a new flag 
FLAG_NOARP, then client drivers can easily handle these kind of devices


Signed-off-by: Wei Shuai <cpuwolf@gmail.com>
---
 drivers/net/usb/usbnet.c   |    4 ++++
 include/linux/usb/usbnet.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 3d4bf01..f34b2eb 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1448,6 +1448,10 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 		if ((dev->driver_info->flags & FLAG_WWAN) != 0)
 			strcpy(net->name, "wwan%d");
 
+		/* devices that cannot do ARP */
+		if ((dev->driver_info->flags & FLAG_NOARP) != 0)
+			net->flags |= IFF_NOARP;
+
 		/* maybe the remote can't receive an Ethernet MTU */
 		if (net->mtu > (dev->hard_mtu - net->hard_header_len))
 			net->mtu = dev->hard_mtu - net->hard_header_len;
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index bd45eb7..5de7a22 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -100,6 +100,7 @@ struct driver_info {
 #define FLAG_LINK_INTR	0x0800		/* updates link (carrier) status */
 
 #define FLAG_POINTTOPOINT 0x1000	/* possibly use "usb%d" names */
+#define FLAG_NOARP	0x2000		/* device can't do ARP */
 
 /*
  * Indicates to usbnet, that USB driver accumulates multiple IP packets.
-- 
1.7.6.5

^ permalink raw reply related

* [PATCH] tcp: fix incorrect LOCKDROPPEDICMPS counter
From: Eric Dumazet @ 2013-01-20  2:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Maciej Żenczykowski, Neal Cardwell

From: Eric Dumazet <edumazet@google.com>

commit 563d34d057 (tcp: dont drop MTU reduction indications)
added an error leading to incorrect accounting of
LINUX_MIB_LOCKDROPPEDICMPS

If socket is owned by the user, we want to increment
this SNMP counter, unless the message is a
(ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED) one.

Reported-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
 net/ipv4/tcp_ipv4.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 54139fa..70b09ef 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -369,11 +369,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
 	 * We do take care of PMTU discovery (RFC1191) special case :
 	 * we can receive locally generated ICMP messages while socket is held.
 	 */
-	if (sock_owned_by_user(sk) &&
-	    type != ICMP_DEST_UNREACH &&
-	    code != ICMP_FRAG_NEEDED)
-		NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
-
+	if (sock_owned_by_user(sk)) {
+		if (!(type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED))
+			NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
+	}
 	if (sk->sk_state == TCP_CLOSE)
 		goto out;
 

^ permalink raw reply related

* Re: [PATCH v3 2/2] virtio-net: introduce a new control to set macaddr
From: Amos Kong @ 2013-01-20  2:20 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: kvm, mst, netdev, qemu-devel, virtualization, davem
In-Reply-To: <20130118110042.GB22481@stefanha-thinkpad.redhat.com>

On Fri, Jan 18, 2013 at 12:00:42PM +0100, Stefan Hajnoczi wrote:
> On Thu, Jan 17, 2013 at 06:40:12PM +0800, akong@redhat.com wrote:
> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> > index 395ab4f..837c978 100644
> > --- a/drivers/net/virtio_net.c
> > +++ b/drivers/net/virtio_net.c
> > @@ -802,14 +802,32 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
> >  	struct virtnet_info *vi = netdev_priv(dev);
> >  	struct virtio_device *vdev = vi->vdev;
> >  	int ret;
> > +	struct scatterlist sg;
> > +	char save_addr[ETH_ALEN];
> > +	unsigned char save_aatype;
> > +
> > +	memcpy(save_addr, dev->dev_addr, ETH_ALEN);
> > +	save_aatype = dev->addr_assign_type;
> >  
> >  	ret = eth_mac_addr(dev, p);
> >  	if (ret)
> >  		return ret;
> >  
> > -	if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
> > +	if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) {
> > +		sg_init_one(&sg, dev->dev_addr, dev->addr_len);
> > +		if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_MAC,
> > +					  VIRTIO_NET_CTRL_MAC_ADDR_SET,
> > +					  &sg, 1, 0)) {
> > +			dev_warn(&vdev->dev,
> > +				 "Failed to set mac address by vq command.\n");
> > +			memcpy(dev->dev_addr, save_addr, ETH_ALEN);
> > +			dev->addr_assign_type = save_aatype;
> > +			return -EINVAL;
> > +		}
> 
> eth_mac_addr() doesn't allow callers to implement error handling nicely.
> Although you didn't duplicate it's code directly, this patch still leaks
> internals of eth_mac_addr().
> 
> How about splitting eth_mac_addr() in a separate patch:

Agree, then we can have nice error handling.
I will send a V4 and include this patch.
Thanks.
 
> int eth_prepare_mac_addr_change(struct net_device *dev, void *p)
> {
>         struct sockaddr *addr = p;
>         if (!(dev->priv_flags & IFF_LIVE_ADDR_CHANGE) && netif_running(dev))
>                 return -EBUSY;
>         if (!is_valid_ether_addr(addr->sa_data))
>                 return -EADDRNOTAVAIL;
> 	return 0;
> }

...

> Now virtio_net.c does:
> 
> ret = eth_prepare_mac_addr_change(dev, p);
> if (ret < 0)
> 	return ret;
> 
> if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) {
> 	sg_init_one(&sg, dev->dev_addr, dev->addr_len);

         trivial issue, %s/dev->dev_addr/addr->sa_data

> 	if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_MAC,
> 				  VIRTIO_NET_CTRL_MAC_ADDR_SET,
> 				  &sg, 1, 0)) {
> 		dev_warn(&vdev->dev,
> 			 "Failed to set mac address by vq command.\n");
> 		return -EINVAL;
> 	}
> } ...
> 
> eth_commit_mac_addr_change(dev, p);
> return 0;
> 
> Stefan

^ permalink raw reply

* [PATCH v4 0/3] make mac programming for virtio net more robust
From: akong @ 2013-01-20  2:43 UTC (permalink / raw)
  To: mst; +Cc: kvm, netdev, qemu-devel, virtualization, davem

From: Amos Kong <akong@redhat.com>

Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong. 

Third patch introduced a new vq control command to set mac
address, it's atomic.

V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle

Amos Kong (2):
  move virtnet_send_command() above virtnet_set_mac_address()
  virtio-net: introduce a new control to set macaddr

Stefan Hajnoczi (1):
  net: split eth_mac_addr for better error handling

 drivers/net/virtio_net.c        | 110 ++++++++++++++++++++++------------------
 include/linux/etherdevice.h     |   2 +
 include/uapi/linux/virtio_net.h |   8 ++-
 net/ethernet/eth.c              |  43 +++++++++++++---
 4 files changed, 107 insertions(+), 56 deletions(-)

-- 
1.7.11.7

^ permalink raw reply

* [PATCH v4 1/3] move virtnet_send_command() above virtnet_set_mac_address()
From: akong @ 2013-01-20  2:43 UTC (permalink / raw)
  To: mst; +Cc: kvm, netdev, qemu-devel, virtualization, davem
In-Reply-To: <1358649789-2338-1-git-send-email-akong@redhat.com>

From: Amos Kong <akong@redhat.com>

We want to send vq command to set mac address in
virtnet_set_mac_address(), so do this function moving.
Fixed a little issue of coding style.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 drivers/net/virtio_net.c | 89 ++++++++++++++++++++++++------------------------
 1 file changed, 44 insertions(+), 45 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a6fcf15..395ab4f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -753,6 +753,50 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 }
 
+/*
+ * Send command via the control virtqueue and check status.  Commands
+ * supported by the hypervisor, as indicated by feature bits, should
+ * never fail unless improperly formated.
+ */
+static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
+				 struct scatterlist *data, int out, int in)
+{
+	struct scatterlist *s, sg[VIRTNET_SEND_COMMAND_SG_MAX + 2];
+	struct virtio_net_ctrl_hdr ctrl;
+	virtio_net_ctrl_ack status = ~0;
+	unsigned int tmp;
+	int i;
+
+	/* Caller should know better */
+	BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ||
+		(out + in > VIRTNET_SEND_COMMAND_SG_MAX));
+
+	out++; /* Add header */
+	in++; /* Add return status */
+
+	ctrl.class = class;
+	ctrl.cmd = cmd;
+
+	sg_init_table(sg, out + in);
+
+	sg_set_buf(&sg[0], &ctrl, sizeof(ctrl));
+	for_each_sg(data, s, out + in - 2, i)
+		sg_set_buf(&sg[i + 1], sg_virt(s), s->length);
+	sg_set_buf(&sg[out + in - 1], &status, sizeof(status));
+
+	BUG_ON(virtqueue_add_buf(vi->cvq, sg, out, in, vi, GFP_ATOMIC) < 0);
+
+	virtqueue_kick(vi->cvq);
+
+	/* Spin for a response, the kick causes an ioport write, trapping
+	 * into the hypervisor, so the request should be handled immediately.
+	 */
+	while (!virtqueue_get_buf(vi->cvq, &tmp))
+		cpu_relax();
+
+	return status == VIRTIO_NET_OK;
+}
+
 static int virtnet_set_mac_address(struct net_device *dev, void *p)
 {
 	struct virtnet_info *vi = netdev_priv(dev);
@@ -819,51 +863,6 @@ static void virtnet_netpoll(struct net_device *dev)
 }
 #endif
 
-/*
- * Send command via the control virtqueue and check status.  Commands
- * supported by the hypervisor, as indicated by feature bits, should
- * never fail unless improperly formated.
- */
-static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
-				 struct scatterlist *data, int out, int in)
-{
-	struct scatterlist *s, sg[VIRTNET_SEND_COMMAND_SG_MAX + 2];
-	struct virtio_net_ctrl_hdr ctrl;
-	virtio_net_ctrl_ack status = ~0;
-	unsigned int tmp;
-	int i;
-
-	/* Caller should know better */
-	BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ||
-		(out + in > VIRTNET_SEND_COMMAND_SG_MAX));
-
-	out++; /* Add header */
-	in++; /* Add return status */
-
-	ctrl.class = class;
-	ctrl.cmd = cmd;
-
-	sg_init_table(sg, out + in);
-
-	sg_set_buf(&sg[0], &ctrl, sizeof(ctrl));
-	for_each_sg(data, s, out + in - 2, i)
-		sg_set_buf(&sg[i + 1], sg_virt(s), s->length);
-	sg_set_buf(&sg[out + in - 1], &status, sizeof(status));
-
-	BUG_ON(virtqueue_add_buf(vi->cvq, sg, out, in, vi, GFP_ATOMIC) < 0);
-
-	virtqueue_kick(vi->cvq);
-
-	/*
-	 * Spin for a response, the kick causes an ioport write, trapping
-	 * into the hypervisor, so the request should be handled immediately.
-	 */
-	while (!virtqueue_get_buf(vi->cvq, &tmp))
-		cpu_relax();
-
-	return status == VIRTIO_NET_OK;
-}
-
 static void virtnet_ack_link_announce(struct virtnet_info *vi)
 {
 	rtnl_lock();
-- 
1.7.11.7

^ permalink raw reply related

* [PATCH v4 2/3] net: split eth_mac_addr for better error handling
From: akong @ 2013-01-20  2:43 UTC (permalink / raw)
  To: mst; +Cc: kvm, netdev, qemu-devel, virtualization, davem
In-Reply-To: <1358649789-2338-1-git-send-email-akong@redhat.com>

From: Stefan Hajnoczi <stefanha@gmail.com>

When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.

This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Amos Kong <akong@redhat.com>
---
 include/linux/etherdevice.h |  2 ++
 net/ethernet/eth.c          | 43 ++++++++++++++++++++++++++++++++++++-------
 2 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 243eea1..5cc6e0e 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -40,6 +40,8 @@ extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh,
 extern void eth_header_cache_update(struct hh_cache *hh,
 				    const struct net_device *dev,
 				    const unsigned char *haddr);
+extern int eth_prepare_mac_addr_change(struct net_device *dev, void *p);
+extern void eth_commit_mac_addr_change(struct net_device *dev, void *p);
 extern int eth_mac_addr(struct net_device *dev, void *p);
 extern int eth_change_mtu(struct net_device *dev, int new_mtu);
 extern int eth_validate_addr(struct net_device *dev);
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 4efad53..cce73eb 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -272,16 +272,11 @@ void eth_header_cache_update(struct hh_cache *hh,
 EXPORT_SYMBOL(eth_header_cache_update);
 
 /**
- * eth_mac_addr - set new Ethernet hardware address
+ * eth_prepare_mac_addr_change - prepare for mac change
  * @dev: network device
  * @p: socket address
- *
- * Change hardware address of device.
- *
- * This doesn't change hardware matching, so needs to be overridden
- * for most real devices.
  */
-int eth_mac_addr(struct net_device *dev, void *p)
+int eth_prepare_mac_addr_change(struct net_device *dev, void *p)
 {
 	struct sockaddr *addr = p;
 
@@ -289,9 +284,43 @@ int eth_mac_addr(struct net_device *dev, void *p)
 		return -EBUSY;
 	if (!is_valid_ether_addr(addr->sa_data))
 		return -EADDRNOTAVAIL;
+	return 0;
+}
+EXPORT_SYMBOL(eth_prepare_mac_addr_change);
+
+/**
+ * eth_commit_mac_addr_change - commit mac change
+ * @dev: network device
+ * @p: socket address
+ */
+void eth_commit_mac_addr_change(struct net_device *dev, void *p)
+{
+	struct sockaddr *addr = p;
+
 	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
 	/* if device marked as NET_ADDR_RANDOM, reset it */
 	dev->addr_assign_type &= ~NET_ADDR_RANDOM;
+}
+EXPORT_SYMBOL(eth_commit_mac_addr_change);
+
+/**
+ * eth_mac_addr - set new Ethernet hardware address
+ * @dev: network device
+ * @p: socket address
+ *
+ * Change hardware address of device.
+ *
+ * This doesn't change hardware matching, so needs to be overridden
+ * for most real devices.
+ */
+int eth_mac_addr(struct net_device *dev, void *p)
+{
+	int ret;
+
+	ret = eth_prepare_mac_addr_change(dev, p);
+	if (ret < 0)
+		return ret;
+	eth_commit_mac_addr_change(dev, p);
 	return 0;
 }
 EXPORT_SYMBOL(eth_mac_addr);
-- 
1.7.11.7

^ permalink raw reply related

* [PATCH v4 3/3] virtio-net: introduce a new control to set macaddr
From: akong @ 2013-01-20  2:43 UTC (permalink / raw)
  To: mst; +Cc: rusty, qemu-devel, kvm, virtualization, netdev, davem
In-Reply-To: <1358649789-2338-1-git-send-email-akong@redhat.com>

From: Amos Kong <akong@redhat.com>

Currently we write MAC address to pci config space byte by byte,
this means that we have an intermediate step where mac is wrong.
This patch introduced a new control command to set MAC address,
it's atomic.

VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 drivers/net/virtio_net.c        | 21 ++++++++++++++++++---
 include/uapi/linux/virtio_net.h |  8 +++++++-
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 395ab4f..701408a 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -802,14 +802,28 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
 	struct virtnet_info *vi = netdev_priv(dev);
 	struct virtio_device *vdev = vi->vdev;
 	int ret;
+	struct sockaddr *addr = p;
+	struct scatterlist sg;
 
-	ret = eth_mac_addr(dev, p);
+	ret = eth_prepare_mac_addr_change(dev, p);
 	if (ret)
 		return ret;
 
-	if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
+	if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) {
+		sg_init_one(&sg, addr->sa_data, dev->addr_len);
+		if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_MAC,
+					  VIRTIO_NET_CTRL_MAC_ADDR_SET,
+					  &sg, 1, 0)) {
+			dev_warn(&vdev->dev,
+				 "Failed to set mac address by vq command.\n");
+			return -EINVAL;
+		}
+	} else if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) {
 		vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
-		                  dev->dev_addr, dev->addr_len);
+				  addr->sa_data, dev->addr_len);
+	}
+
+	eth_commit_mac_addr_change(dev, p);
 
 	return 0;
 }
@@ -1627,6 +1641,7 @@ static unsigned int features[] = {
 	VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ,
 	VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN,
 	VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ,
+	VIRTIO_NET_F_CTRL_MAC_ADDR,
 };
 
 static struct virtio_driver virtio_net_driver = {
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index 848e358..a5a8c88 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -53,6 +53,7 @@
 					 * network */
 #define VIRTIO_NET_F_MQ	22	/* Device supports Receive Flow
 					 * Steering */
+#define VIRTIO_NET_F_CTRL_MAC_ADDR 23	/* Set MAC address */
 
 #define VIRTIO_NET_S_LINK_UP	1	/* Link is up */
 #define VIRTIO_NET_S_ANNOUNCE	2	/* Announcement is needed */
@@ -127,7 +128,7 @@ typedef __u8 virtio_net_ctrl_ack;
  #define VIRTIO_NET_CTRL_RX_NOBCAST      5
 
 /*
- * Control the MAC filter table.
+ * Control the MAC
  *
  * The MAC filter table is managed by the hypervisor, the guest should
  * assume the size is infinite.  Filtering should be considered
@@ -140,6 +141,10 @@ typedef __u8 virtio_net_ctrl_ack;
  * first sg list contains unicast addresses, the second is for multicast.
  * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature
  * is available.
+ *
+ * The ADDR_SET command requests one out scatterlist, it contains a
+ * 6 bytes MAC address. This functionality is present if the
+ * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available.
  */
 struct virtio_net_ctrl_mac {
 	__u32 entries;
@@ -148,6 +153,7 @@ struct virtio_net_ctrl_mac {
 
 #define VIRTIO_NET_CTRL_MAC    1
  #define VIRTIO_NET_CTRL_MAC_TABLE_SET        0
+ #define VIRTIO_NET_CTRL_MAC_ADDR_SET         1
 
 /*
  * Control VLAN filtering
-- 
1.7.11.7

^ permalink raw reply related

* Re: [PATCH] tcp: fix incorrect LOCKDROPPEDICMPS counter
From: Maciej Żenczykowski @ 2013-01-20  2:47 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, Neal Cardwell
In-Reply-To: <1358647837.3464.1050.camel@edumazet-glaptop>

Signed-off-by: Maciej Żenczykowski <maze@google.com>

On Sat, Jan 19, 2013 at 6:10 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> commit 563d34d057 (tcp: dont drop MTU reduction indications)
> added an error leading to incorrect accounting of
> LINUX_MIB_LOCKDROPPEDICMPS
>
> If socket is owned by the user, we want to increment
> this SNMP counter, unless the message is a
> (ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED) one.
>
> Reported-by: Maciej Żenczykowski <maze@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---
>  net/ipv4/tcp_ipv4.c |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 54139fa..70b09ef 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -369,11 +369,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
>          * We do take care of PMTU discovery (RFC1191) special case :
>          * we can receive locally generated ICMP messages while socket is held.
>          */
> -       if (sock_owned_by_user(sk) &&
> -           type != ICMP_DEST_UNREACH &&
> -           code != ICMP_FRAG_NEEDED)
> -               NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
> -
> +       if (sock_owned_by_user(sk)) {
> +               if (!(type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED))
> +                       NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
> +       }
>         if (sk->sk_state == TCP_CLOSE)
>                 goto out;
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] ipv6: add anti-spoofing checks for 6to4 and 6rd
From: Hannes Frederic Sowa @ 2013-01-20  3:37 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki; +Cc: netdev, davem
In-Reply-To: <50F9F875.30302@linux-ipv6.org>

On Sat, Jan 19, 2013 at 10:35:49AM +0900, YOSHIFUJI Hideaki wrote:
> (2013年01月19日 05:04), Hannes Frederic Sowa wrote:
> > This patch adds anti-spoofing checks in sit.c as specified in RFC3964
> > section 5.2 for 6to4 and RFC5969 section 12 for 6rd. I left out the
> > checks which could easily be implemented with netfilter.
> > 
> > Specifically this patch adds following logic (based loosely on the
> > pseudocode in RFC3964 section 5.2):
> > 
> > if prefix (inner_src_v6) == rd6_prefix (2002::/16 is the default)
> >         and outer_src_v4 != embedded_ipv4 (inner_src_v6)
> >                 drop
> > if prefix (inner_dst_v6) == rd6_prefix (or 2002::/16 is the default)
> >         and outer_dst_v4 != embedded_ipv4 (inner_dst_v6)
> >                 drop
> > accept
> > 
> > To accomplish the specified security checks proposed by above RFCs,
> > it is still necessary to employ uRPF filters with netfilter. These new
> > checks only kick in if the employed addresses are within the 2002::/16 or
> > another range specified by the 6rd-prefix (which defaults to 2002::/16).
> 
> It seems this breaks 6rd receiving rules:
> 
> BR:
> 	if (outer src ip4 != embedded src ip4)
> 		drop();
> CE:
> 	if (outer src ip4 != embedded src ip4 ||
> 	    inner dest ip6 != configured ip6 prefix)
> 		drop();
> 
> No?

Could you give me a concrete example? I have tested this patch on BR
and CE with different 6rd prefixes (and lengths) and have not seen
any breakage. Perhaps I am missing something.

Thanks,

  Hannes

^ permalink raw reply

* Re: [PATCH] tcp: fix incorrect LOCKDROPPEDICMPS counter
From: Neal Cardwell @ 2013-01-20  4:19 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, Maciej Żenczykowski
In-Reply-To: <1358647837.3464.1050.camel@edumazet-glaptop>

On Sat, Jan 19, 2013 at 9:10 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> commit 563d34d057 (tcp: dont drop MTU reduction indications)
> added an error leading to incorrect accounting of
> LINUX_MIB_LOCKDROPPEDICMPS
>
> If socket is owned by the user, we want to increment
> this SNMP counter, unless the message is a
> (ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED) one.
>
> Reported-by: Maciej Żenczykowski <maze@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>

Acked-by: Neal Cardwell <ncardwell@google.com>

^ permalink raw reply

* Re: IPsec AH use of ahash
From: Mike Galbraith @ 2013-01-20  5:06 UTC (permalink / raw)
  To: Tom St Denis
  Cc: Eric Dumazet, Waskiewicz Jr, Peter P, David Miller,
	steffen klassert, herbert, linux-kernel, netdev, Michal Kubecek
In-Reply-To: <1325444527.92017.1358591457919.JavaMail.root@elliptictech.com>

On Sat, 2013-01-19 at 05:30 -0500, Tom St Denis wrote:

> For those of us who do Kernel development during business hours it's
> hard to justify the work when the path to mainline is convoluted and
> landmined.

Sounds as though any patches you submit land on your dinner plate just
like potatoes.  Hand the cook a pot of half peeled potatoes, he/she may
say try again.  The result of a little extra effort is tastier taters
for everybody feasting at the common table.. including you.

-Mike

^ 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