Re: [PATCH net-next 06/13] route: move lwtunnel state to dst_entry

2015-08-19 Thread roopa
On 8/18/15, 1:33 PM, Jiri Benc wrote: Currently, the lwtunnel state resides in per-protocol data. This is a problem if we encapsulate ipv6 traffic in an ipv4 tunnel (or vice versa). The xmit function of the tunnel does not know whether the packet has been routed to it by ipv4 or ipv6, yet it

Re: [PATCH] r8169: Add values missing in @get_stats64 from HW counters

2015-08-19 Thread Corinna Vinschen
On Aug 19 02:51, Hayes Wang wrote: [...] The TCs are only reset by a power cycle and there's no known way to reset them programatically. It could be cleared by setting bit 0, such as rtl_tally_reset() of r8152. Thanks for this hint. I'll give it a try. Is it safe to assume that this

Re: [PATCH] r8169: Add values missing in @get_stats64 from HW counters

2015-08-19 Thread Corinna Vinschen
On Aug 18 19:05, David Miller wrote: From: Francois Romieu rom...@fr.zoreil.com Date: Tue, 18 Aug 2015 23:40:17 +0200 Corinna Vinschen vinsc...@redhat.com : The r8169 driver collects statistical information returned by @get_stats64 by counting them in the driver itself, even though many

RE: [PATCH] bridge: Enable configuration of ageing interval for bridges and switch devices.

2015-08-19 Thread Premkumar Jonnala
Hello Scott, Thank you for the diff and comments. Please see my comments inline. -Original Message- From: Scott Feldman [mailto:sfel...@gmail.com] Sent: Tuesday, August 18, 2015 12:48 PM To: Premkumar Jonnala Cc: netdev@vger.kernel.org Subject: Re: [PATCH] bridge: Enable

[PATCH v2 net-next 06/13] route: move lwtunnel state to dst_entry

2015-08-19 Thread Jiri Benc
Currently, the lwtunnel state resides in per-protocol data. This is a problem if we encapsulate ipv6 traffic in an ipv4 tunnel (or vice versa). The xmit function of the tunnel does not know whether the packet has been routed to it by ipv4 or ipv6, yet it needs the lwtstate data. Moving the

[PATCH v2 net-next 05/13] ip_tunnels: use tos and ttl fields also for IPv6

2015-08-19 Thread Jiri Benc
Rename the ipv4_tos and ipv4_ttl fields to just 'tos' and 'ttl', as they'll be used with IPv6 tunnels, too. Signed-off-by: Jiri Benc jb...@redhat.com --- drivers/net/vxlan.c| 8 include/net/ip_tunnels.h | 8 net/ipv4/ip_gre.c | 8

[PATCH v2 net-next 07/13] ipv6: drop metadata dst in ip6_route_input

2015-08-19 Thread Jiri Benc
The fix in commit 48fb6b554501 is incomplete, as now ip6_route_input can be called with non-NULL dst if it's a metadata dst and the reference is leaked. Drop the reference. Fixes: 48fb6b554501 (ipv6: fix crash over flow-based vxlan device) Fixes: ee122c79d422 (vxlan: Flow based tunneling) CC:

[PATCH v2 net-next 00/13] lwtunnel: per route ipv6 support for vxlan

2015-08-19 Thread Jiri Benc
v2: Fixed issues in patch 4 pointed out by Alexei. This series enables IPv6 tunnels based on lwtunnel infrastructure. Only vxlan is supported for now. Tested in all combinations of IPv4 over IPv6, IPv6 over IPv4 and IPv6 over IPv6. Jiri Benc (13): ip_tunnels: remove custom alignment and

[PATCH v2 net-next 10/13] vxlan: do not shadow flags variable

2015-08-19 Thread Jiri Benc
The 'flags' variable is already defined in the outer scope. Signed-off-by: Jiri Benc jb...@redhat.com --- drivers/net/vxlan.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 070149f77072..2c1abf95c17d 100644 ---

[PATCH v2 net-next 11/13] vxlan: metadata based tunneling for IPv6

2015-08-19 Thread Jiri Benc
Support metadata based (formerly flow based) tunneling also for IPv6. This complements commit ee122c79d422 (vxlan: Flow based tunneling). Signed-off-by: Jiri Benc jb...@redhat.com --- drivers/net/vxlan.c | 69 +++-- 1 file changed, 40

[PATCH v2 net-next 02/13] ip_tunnels: use u8/u16/u32

2015-08-19 Thread Jiri Benc
The ip_tunnels.h include file uses mixture of __u16 and u16 (etc.) types. Unify it to the non-underscore variants. Signed-off-by: Jiri Benc jb...@redhat.com --- include/net/ip_tunnels.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/net/ip_tunnels.h

[PATCH v2 net-next 01/13] ip_tunnels: remove custom alignment and packing

2015-08-19 Thread Jiri Benc
The custom alignment of struct ip_tunnel_key is unnecessary. In struct sw_flow_key, it starts at offset 256, in struct ip_tunnel_info it's the first field. The structure is also packed even without the __packed keyword. Signed-off-by: Jiri Benc jb...@redhat.com --- include/net/ip_tunnels.h | 2

[PATCH v2 net-next 12/13] ipv6: route: extend flow representation with tunnel key

2015-08-19 Thread Jiri Benc
Use flowi_tunnel in flowi6 similarly to what is done with IPv4. This complements commit 1b7179d3adff (route: Extend flow representation with tunnel key). Signed-off-by: Jiri Benc jb...@redhat.com --- include/net/flow.h | 1 + net/ipv6/route.c | 6 ++ 2 files changed, 7 insertions(+) diff

[PATCH v2 net-next 08/13] ipv6: ndisc: inherit metadata dst when creating ndisc requests

2015-08-19 Thread Jiri Benc
If output device wants to see the dst, inherit the dst of the original skb in the ndisc request. This is an IPv6 counterpart of commit 0accfc268f4d (arp: Inherit metadata dst when creating ARP requests). Signed-off-by: Jiri Benc jb...@redhat.com --- include/net/ndisc.h | 3 ++-

[PATCH v2 net-next 09/13] vxlan: provide access function for vxlan socket address family

2015-08-19 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- drivers/net/vxlan.c | 8 include/net/vxlan.h | 5 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 93613ffd8d7e..070149f77072 100644 --- a/drivers/net/vxlan.c +++

[PATCH v2 net-next 13/13] ipv6: route: per route IP tunnel metadata via lightweight tunnel

2015-08-19 Thread Jiri Benc
Allow specification of per route IP tunnel instructions also for IPv6. This complements commit 3093fbe7ff4b (route: Per route IP tunnel metadata via lightweight tunnel). Signed-off-by: Jiri Benc jb...@redhat.com --- include/uapi/linux/lwtunnel.h | 16 +++ net/ipv4/ip_tunnel_core.c | 102

[PATCH v2 net-next 04/13] ip_tunnels: add IPv6 addresses to ip_tunnel_key

2015-08-19 Thread Jiri Benc
Add the IPv6 addresses as an union with IPv4 ones. When using IPv4, the newly introduced padding after the IPv4 addresses needs to be zeroed out. Signed-off-by: Jiri Benc jb...@redhat.com --- v1-v2: Fix incorrect IP_TUNNEL_KEY_IPV4_PAD_LEN calculation, thanks to Alexei. --- drivers/net/vxlan.c

[PATCH v2 net-next 03/13] ip_tunnels: use offsetofend

2015-08-19 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- include/net/ip_tunnels.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index ca173f22f07f..cc3b39e9010b 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h

Re: [PATCH] lwtunnel: Fix the sparse warnings in fib_encap_match

2015-08-19 Thread Ying Xue
On 08/19/2015 03:40 PM, Jiri Benc wrote: On Wed, 19 Aug 2015 15:33:29 +0800, Ying Xue wrote: When CONFIG_LWTUNNEL config is not enabled, the lwtstate_free() is not declared in lwtunnel.h at all. However, even in this case, the function is still referenced in fib_semantics.c so that there

[PATCH 1/4] virtio_net: use DECLARE_EWMA

2015-08-19 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in no change in code size for me, but reduces the struct receive_queue size by the two unsigned long values that store the parameters.

Re: [PATCH 1/4] virtio_net: use DECLARE_EWMA

2015-08-19 Thread Johannes Berg
Sorry, forgot to Cc Michael and the virt list - patch reproduced below in full. johannes From 22500fbcf722748fe3471b2e4c6156db47aade15 Mon Sep 17 00:00:00 2001 From: Johannes Berg johannes.b...@intel.com Date: Wed, 19 Aug 2015 09:25:18 +0200 Subject: [PATCH] virtio_net: use DECLARE_EWMA Instead

[PATCH 4/4] average: remove out-of-line implementation

2015-08-19 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com Since all users are now converted to the inline implementation, remove the out-of-line implementation entirely. Signed-off-by: Johannes Berg johannes.b...@intel.com --- include/linux/average.h | 24 --- lib/Kconfig | 10

[PATCH 3/4] rt2x00: use DECLARE_EWMA

2015-08-19 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in code that's one byte larger (for me), but reduces struct link_ant and struct link size by the two unsigned long values that store

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-19 Thread Eugene Shatokhin
19.08.2015 04:54, David Miller пишет: From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Fri, 14 Aug 2015 19:58:36 +0300 2. The second race is on dev-flags. dev-flags is set to 0 here: *0 usbnet_stop (usbnet.c:816) /* deferred work (task, timer, softirq) must also stop. *

Re: [PATCH net-next 04/13] ip_tunnels: add IPv6 addresses to ip_tunnel_key

2015-08-19 Thread Jiri Benc
On Tue, 18 Aug 2015 17:36:32 -0700, Alexei Starovoitov wrote: please add commit message. +47 -32 cannot be empty. The patch seemed rather trivial to me (it's basically -key.ipv4_ to -keu.u.ipv4. conversion plus one new memset) but sure, I'll add a few words. It probably does not qualify as

[PATCH net-next 3/3] qeth: no write permission for readonly sysattr

2015-08-19 Thread Ursula Braun
From: Lakhvich Dmitriy ldmit...@ru.ibm.com User is not allowed to write into bridge_state sysfs file. Fixed attribute not mislead the user Signed-off-by: Lakhvich Dmitriy ldmit...@ru.ibm.com Signed-off-by: Ursula Braun ursula.br...@de.ibm.com Reported-by: Peter Oberparleiter

[PATCH net-next 0/3] s390: qeth patches for net-next

2015-08-19 Thread Ursula Braun
From: Ursula Braun ursula.br...@de.ibm.com Hi Dave, here are some s390 related qeth patches for net-next shortlog: Eugene Crosser (1): qeth: remove extraneous length from %pM format Vaishali Thakkar (1): qeth: Convert use of __constant_htons to htons Lakhvich Dmitriy (1): qeth: no

RE: [PATCH] r8169: Add values missing in @get_stats64 from HW counters

2015-08-19 Thread Hayes Wang
Corinna Vinschen [mailto:vinsc...@redhat.com] Sent: Wednesday, August 19, 2015 5:13 PM [...] It could be cleared by setting bit 0, such as rtl_tally_reset() of r8152. Is it safe to assume that this is implemented in all NICs covered by r8169? It is supported from RTL8111C. That is,

Re: [PATCH] lwtunnel: Fix the sparse warnings in fib_encap_match

2015-08-19 Thread Jiri Benc
On Wed, 19 Aug 2015 15:33:29 +0800, Ying Xue wrote: When CONFIG_LWTUNNEL config is not enabled, the lwtstate_free() is not declared in lwtunnel.h at all. However, even in this case, the function is still referenced in fib_semantics.c so that there appears the following sparse warnings:

[PATCH RESEND net-next] lwtunnel: Fix the sparse warnings in fib_encap_match

2015-08-19 Thread Ying Xue
When CONFIG_LWTUNNEL config is not enabled, the lwtstate_free() is not declared in lwtunnel.h at all. However, even in this case, the function is still referenced in fib_semantics.c so that there appears the following sparse warnings: net/ipv4/fib_semantics.c:553:17: error: undefined identifier

[PATCH 0/4] average: convert users to inline implementation

2015-08-19 Thread Johannes Berg
Since there's very little benefit of the out-of-line implementation (a single byte of .text in one driver as far as I've seen), convert all drivers to the inline implementation, saving memory, and remove the out-of-line implementation. Perhaps the easiest would be for Dave to take all of these

[PATCH 2/4] ath5k: use DECLARE_EWMA

2015-08-19 Thread Johannes Berg
From: Johannes Berg johannes.b...@intel.com This reduces code size slightly (at least on x86/64) while also removing memory consumption by two unsigned long values for each ath5k device. Signed-off-by: Johannes Berg johannes.b...@intel.com --- drivers/net/wireless/ath/ath5k/Kconfig | 1 -

[PATCH net-next] ipv4: Make fib_encap_match static

2015-08-19 Thread Ying Xue
Make fib_encap_match() static as it isn't used outside the file. Signed-off-by: Ying Xue ying@windriver.com --- net/ipv4/fib_semantics.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index d525307..8fdf6c2

[PATCH net-next 1/3] qeth: remove extraneous length from %pM format

2015-08-19 Thread Ursula Braun
From: Eugene Crosser eugene.cros...@ru.ibm.com Length specifier in the %pM format is not supported (at least, not documented). Remove it, and also an extraneous '' for the array. Signed-off-by: Eugene Crosser eugene.cros...@ru.ibm.com Signed-off-by: Ursula Braun ursula.br...@de.ibmn.com

[PATCH net-next 2/3] qeth: Convert use of __constant_htons to htons

2015-08-19 Thread Ursula Braun
From: Vaishali Thakkar vthakkar1...@gmail.com In little endian cases, the macro htons unfolds to __swab16 which provides special case for constants. In big endian cases, __constant_htons and htons expand directly to the same expression. So, replace __constant_htons with htons with the goal of

[PATCH] lwtunnel: Fix the sparse warnings in fib_encap_match

2015-08-19 Thread Ying Xue
When CONFIG_LWTUNNEL config is not enabled, the lwtstate_free() is not declared in lwtunnel.h at all. However, even in this case, the function is still referenced in fib_semantics.c so that there appears the following sparse warnings: net/ipv4/fib_semantics.c:553:17: error: undefined identifier

[PATCH] net: bcmgenet: fix uncleaned dma flags

2015-08-19 Thread Jaedon Shin
Clean the dma flags of multiq ring buffer int the interface stop process. This patch fixes that the genet is not running while the interface is re-enabled. $ ifup eth0 - running after booting $ ifdown eth0 $ ifup eth0 - not running and occur tx_timeout The bcmgenet_dma_disable() in

[PATCH net] netlink: mmap: fix tx type check

2015-08-19 Thread Ken-ichirou MATSUZAWA
I can't send netlink message via mmaped netlink socket since commit: a8866ff6a5bce7d0ec465a63bc482a85c09b0d39 netlink: make the check for send from tx_ring deterministic msg-msg_iter.type is set to WRITE (1) at SYSCALL_DEFINE6(sendto, ... import_single_range(WRITE, ...

Re^2:: [PATCH] usbnet: dereference after null check in usbnet_start_xmit() and __usbnet_read_cmd()

2015-08-19 Thread Vivek Kumar Bhagat
Dear Bjorn, This is wrong. There are usbnet minidrivers depending on info-tx_fixup being called with a NULL skb. I am using ax88179_178a driver and not familiar with usbnet minidrivers. When ax88179_tx_fixup() is called with NULL skb from usbnet_start_xmit(), I get a kernel crash.

linux-next: build failure after merge of the net-next tree

2015-08-19 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (arm multi_v7_defconfig) failed like this: net/ipv4/fib_semantics.c: In function 'fib_encap_match': net/ipv4/fib_semantics.c:553:3: error: implicit declaration of function 'lwtstate_free' [-Werror=implicit-function-declaration]

Re: Re: [PATCH] usbnet: dereference after null check in usbnet_start_xmit() and __usbnet_read_cmd()

2015-08-19 Thread Vivek Kumar Bhagat
Dear Bjorn, This is wrong. There are usbnet minidrivers depending on info-tx_fixup being called with a NULL skb. Also, if dev_hard_start_xmit() ensures that skb can not be NULL in usbnet_start_xmit() then we should remove below check. if (skb) --- This check is confusing which says

<    1   2   3