Re: [PATCH 3/4] netfilter: ipv4: use preferred kernel types

2016-02-01 Thread David Miller
From: David Laight Date: Mon, 1 Feb 2016 16:37:41 + > From: Lucas Tanure >> Sent: 30 January 2016 13:18 >> As suggested by checkpatch.pl: >> CHECK: Prefer kernel type 'uX' over 'uintX_t' > > One might ask why? We have consistently done this, and consistency is

Re: [PATCH] net: smc91x: propagate irq return code

2016-02-01 Thread Robert Jarzmik
Sergei Shtylyov writes: > On 02/01/2016 11:41 PM, Robert Jarzmik wrote: > The smc91x driver doesn't honor the probe deferral mechanism when the interrupt source is not yet available, such as one provided by a gpio controller not probed. > >>>

Re: [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread John Fastabend
On 16-02-01 02:43 AM, Amir Vadai wrote: > On Mon, Feb 01, 2016 at 01:31:17AM -0800, John Fastabend wrote: >> On 16-02-01 12:34 AM, Amir Vadai wrote: >>> During initialization, tcf_exts_offload_init() is called to initialize >>> the list of actions description. later on, the classifier description

Re: bonding (IEEE 802.3ad) not working with qemu/virtio

2016-02-01 Thread Rick Jones
On 01/29/2016 10:59 PM, David Miller wrote: There should be a default speed/duplex setting for such devices as well. We can pick one that will be use universally for these kinds of devices. There is at least one monitoring tool - collectl - which gets a trifle upset when the actual speed

Re: [PATCH net] ipv6: addrconf: Fix recursive spin lock call

2016-02-01 Thread Eric Dumazet
On Mon, 2016-02-01 at 19:13 +, subas...@codeaurora.org wrote: > A rcu stall with the following backtrace was seen on a system with > forwarding, optimistic_dad and use_optimistic set. To reproduce, > set these flags and then start ipv6 autoconf. > > This occurs because the device write_lock

Re: [PATCH net v4] r8169: Disable force bus mastering

2016-02-01 Thread David Miller
From: Corcodel Marian Date: Mon, 1 Feb 2016 15:38:16 +0200 > Do not need to force on bus mastering , if alls is ok this is > enabled on BIOS. > > Signed-off-by: Corcodel Marian The chip can be used on systems without a BIOS and that should still

Re: [RFC net-next 0/9] TC filter HW offloads

2016-02-01 Thread Tom Herbert
On Mon, Feb 1, 2016 at 6:37 AM, Amir Vadai wrote: > On Mon, Feb 01, 2016 at 01:21:36AM -0800, John Fastabend wrote: >> On 16-02-01 12:34 AM, Amir Vadai wrote: >> > Hi, >> > >> > So... just before sending that, I noted Jonh's series that >> > deals with tc and u32. One notable

Re: [PATCH net v4] r8169: Added delay after power on and reset.

2016-02-01 Thread David Miller
From: Corcodel Marian Date: Mon, 1 Feb 2016 18:05:20 +0200 > On reset and power on need 2msecs delay to autoload complete data > from eeprom to VPD. > > Signed-off-by: Corcodel Marian Where is this needed delay documented? Unless you are a

Re: [RFC net-next 9/9] net/mlx5e: Flow steering support through switchdev

2016-02-01 Thread Saeed Mahameed
On Mon, Feb 1, 2016 at 10:34 AM, Amir Vadai wrote: > Parse switchdev flow object into device specific commands and program > the hardware to classify and mark/drop the flow accordingly. > > A new Kconfig is introduced: MLX5_EN_SWITCHDEV. This config enables to > compile the driver

[PATCH net] ipv6: addrconf: Fix recursive spin lock call

2016-02-01 Thread subashab
A rcu stall with the following backtrace was seen on a system with forwarding, optimistic_dad and use_optimistic set. To reproduce, set these flags and then start ipv6 autoconf. This occurs because the device write_lock is acquired while already holding the read_lock. Back trace below - INFO:

Re: [PATCH] net: smc91x: propagate irq return code

2016-02-01 Thread Robert Jarzmik
Sergei Shtylyov writes: > Hello. > > On 2/1/2016 1:46 AM, Robert Jarzmik wrote: > >> The smc91x driver doesn't honor the probe deferral mechanism when the >> interrupt source is not yet available, such as one provided by a gpio >> controller not probed. >

Re: [PATCH net] ipv6: addrconf: Fix recursive spin lock call

2016-02-01 Thread Eric Dumazet
On Mon, 2016-02-01 at 11:37 -0800, Eric Dumazet wrote: > I would rather try : > > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 38eeddedfc21..d6b7ab07f914 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -3538,6 +3538,7 @@ static void addrconf_dad_begin(struct

Re: [PATCH 3/4] netfilter: ipv4: use preferred kernel types

2016-02-01 Thread Tom Herbert
On Mon, Feb 1, 2016 at 11:41 AM, David Miller wrote: > From: David Laight > Date: Mon, 1 Feb 2016 16:37:41 + > >> From: Lucas Tanure >>> Sent: 30 January 2016 13:18 >>> As suggested by checkpatch.pl: >>> CHECK: Prefer kernel type 'uX' over

Re: [RFC net-next 0/9] TC filter HW offloads

2016-02-01 Thread John Fastabend
On 16-02-01 06:37 AM, Amir Vadai wrote: > On Mon, Feb 01, 2016 at 01:21:36AM -0800, John Fastabend wrote: >> On 16-02-01 12:34 AM, Amir Vadai wrote: >>> Hi, >>> >>> So... just before sending that, I noted Jonh's series that >>> deals with tc and u32. One notable difference between the >>> two

Re: [PATCH] openvswitch: allow management from inside user namespaces

2016-02-01 Thread pravin shelar
On Fri, Jan 29, 2016 at 8:37 AM, Tycho Andersen wrote: > Hi Eric, > > Thanks for the review. > > On Fri, Jan 29, 2016 at 08:29:55AM -0600, Eric W. Biederman wrote: >> Tycho Andersen writes: >> >> > Operations with the GENL_ADMIN_PERM

Re: [RFC net-next 9/9] net/mlx5e: Flow steering support through switchdev

2016-02-01 Thread Or Gerlitz
On Mon, Feb 1, 2016 at 8:52 PM, Saeed Mahameed wrote: [...] > in case it is, please consider using the vport_manager capability or > any other device capability meant for this, > to initialize and activate mlx5e_switchdev. > > After all such offload might not be

[PATCH net-next 0/4] batch calls to fib_flush and arp_ifdown

2016-02-01 Thread Salam Noureddine
fib_flush walks the whole fib in a net_namespace and is called for each net_device being closed or unregistered. This can be very expensive when dealing with 100k or more routes in the fib and removal of a lot of interfaces. These four patches deal with this issue by calling fib_flush just once

[PATCH net v3 4/4] bond: track sum of rx_nohandler for all slaves

2016-02-01 Thread Jarod Wilson
Sample output with this set applied for an active-backup bond: $ cat /sys/devices/virtual/net/bond0/lower_p7p1/statistics/rx_nohandler 16568 $ cat /sys/devices/virtual/net/bond0/lower_p5p2/statistics/rx_nohandler 16583 $ cat /sys/devices/virtual/net/bond0/statistics/rx_nohandler 33151 CC: Jay

[PATCH net v3 1/4] net/core: relax BUILD_BUG_ON in netdev_stats_to_stats64

2016-02-01 Thread Jarod Wilson
The netdev_stats_to_stats64 function copies the deprecated net_device_stats format stats into rtnl_link_stats64 for legacy support purposes, but with the BUILD_BUG_ON as it was, it wasn't possible to extend rtnl_link_stats64 without also extending net_device_stats. Relax the BUILD_BUG_ON to only

[GIT] Networking

2016-02-01 Thread David Miller
It looks like a lot but it's a mixture of regression fixes as well as fixes for longer standing issues. 1) Fix on-channel cancellation in mac80211, from Johannes Berg. 2) Handle CHECKSUM_COMPLETE properly in xt_TCPMSS netfilter xtables module, from Eric Dumazet. 3) Avoid infinite loop in

[PATCH net v3 0/4] net: add and use rx_nohandler stat counter

2016-02-01 Thread Jarod Wilson
The network core tries to keep track of dropped packets, but some packets you wouldn't really call dropped, so much as intentionally ignored, under certain circumstances. One such case is that of bonding and team device slaves that are currently inactive. Their respective rx_handler functions

[PATCH net v3 2/4] net: add rx_nohandler stat counter

2016-02-01 Thread Jarod Wilson
This adds an rx_nohandler stat counter, along with a sysfs statistics node, and copies the counter out via netlink as well. CC: "David S. Miller" CC: Eric Dumazet CC: Jiri Pirko CC: Daniel Borkmann CC: Tom

[PATCH net-next 2/4] net: dev: add batching to net_device notifiers

2016-02-01 Thread Salam Noureddine
This can be used to optimize bringing down and unregsitering net_devices by running certain cleanup operations only on the net namespace instead of on each net_device. Signed-off-by: Salam Noureddine --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 39

[PATCH net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister

2016-02-01 Thread Salam Noureddine
Call fib_flush at the end when closing or unregistering multiple devices. This can save walking the fib many times and greatly reduce rtnl_lock hold time when unregistering many devices with a fib having hundreds of thousands of routes. Signed-off-by: Salam Noureddine ---

[PATCH net-next 3/4] net: core: introduce neigh_ifdown_all for all down interfaces

2016-02-01 Thread Salam Noureddine
This cleans up neighbour entries for all interfaces in the down state, avoiding walking the whole neighbour table for each interface being brought down. Signed-off-by: Salam Noureddine --- include/net/arp.h | 1 + include/net/neighbour.h | 1 +

[PATCH net-next 1/4] net: add event_list to struct net and provide utility functions

2016-02-01 Thread Salam Noureddine
Signed-off-by: Salam Noureddine --- include/net/net_namespace.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 4089abc..4cf47de 100644 --- a/include/net/net_namespace.h +++

[PATCH net v3 3/4] team: track sum of rx_nohandler for all slaves

2016-02-01 Thread Jarod Wilson
CC: Jiri Pirko CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson --- drivers/net/team/team.c | 10 +++--- include/linux/if_team.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c

Re: [PATCH net] net: Allow flow dissector to handle non 4-byte aligned headers

2016-02-01 Thread Sowmini Varadhan
On (01/31/16 13:37), Tom Herbert wrote: > > Call get_unaligned_be32 when we access 32-bit fields in > __skb_flow_dissect. At the beginning check for unlikely case of > 1-byte aligned packet. > > Note that flow_dissector may be asked to parse packet unaligned > fields in two instances: I tested

[PATCH v2] openvswitch: allow management from inside user namespaces

2016-02-01 Thread Tycho Andersen
Operations with the GENL_ADMIN_PERM flag fail permissions checks because this flag means we call netlink_capable, which uses the init user ns. Instead, let's introduce a new flag, GENL_UNS_ADMIN_PERM for operations which should be allowed inside a user namespace. The motivation for this is to be

Re: [PATCH net] net: Allow flow dissector to handle non 4-byte aligned headers

2016-02-01 Thread Tom Herbert
On Mon, Feb 1, 2016 at 4:31 PM, Sowmini Varadhan wrote: > On (01/31/16 13:37), Tom Herbert wrote: >> >> Call get_unaligned_be32 when we access 32-bit fields in >> __skb_flow_dissect. At the beginning check for unlikely case of >> 1-byte aligned packet. >> >> Note that

[PATCH v2] ipv6: addrconf: Fix recursive spin lock call

2016-02-01 Thread subashab
A rcu stall with the following backtrace was seen on a system with forwarding, optimistic_dad and use_optimistic set. To reproduce, set these flags and allow ipv6 autoconf. This occurs because the device write_lock is acquired while already holding the read_lock. Back trace below - INFO:

Re: [PATCH net] ipv6: addrconf: Fix recursive spin lock call

2016-02-01 Thread subashab
> On Mon, 2016-02-01 at 11:37 -0800, Eric Dumazet wrote: > >> I would rather try : >> >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >> index 38eeddedfc21..d6b7ab07f914 100644 >> --- a/net/ipv6/addrconf.c >> +++ b/net/ipv6/addrconf.c >> @@ -3538,6 +3538,7 @@ static void

[PATCH iproute2 -master 1/4] tc, bpf, examples: further bpf_api improvements

2016-02-01 Thread Daniel Borkmann
Add a couple of improvements to tc's BPF api, that facilitate program development. Signed-off-by: Daniel Borkmann --- examples/bpf/bpf_cyclic.c | 4 +--- examples/bpf/bpf_graft.c| 13 +++ examples/bpf/bpf_prog.c | 26 ++---

[PATCH iproute2 -master 3/4] tc, bpf: give some more hints wrt false relos

2016-02-01 Thread Daniel Borkmann
Provide some more hints to the user/developer when relos have been found that don't point to ld64 imm instruction. Ran couple of times into relos generated by clang [1], where the compiler tried to uninline inlined functions with eBPF and emitted BPF_JMP | BPF_CALL opcodes. If this seems the case,

[PATCH iproute2 -master 4/4] tc, bpf: use bind/type macros from gelf

2016-02-01 Thread Daniel Borkmann
Don't reimplement them and rather use the macros from the gelf header, that is, GELF_ST_BIND()/GELF_ST_TYPE(). Signed-off-by: Daniel Borkmann --- tc/tc_bpf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tc/tc_bpf.c b/tc/tc_bpf.c index

[PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed

2016-02-01 Thread Eric Biggers
This eliminates an "unused function" compiler warning when CONFIG_NF_CONNTRACK_LABELS is not defined. Signed-off-by: Eric Biggers --- net/netfilter/nft_ct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index

[PATCH iproute2 -master 0/4] Minor BPF updates on frontend

2016-02-01 Thread Daniel Borkmann
Couple of minor updates on tc frontend. Stephen, the patches are against iproute2 -master branch and *on top of* the two that are already lingering in patchwork: - http://patchwork.ozlabs.org/patch/569923/ - http://patchwork.ozlabs.org/patch/571385/ Thanks! Daniel Borkmann (4): tc, bpf,

[PATCH iproute2 -master 2/4] tc, bpf: improve verifier logging

2016-02-01 Thread Daniel Borkmann
With a bit larger, branchy eBPF programs f.e. already ~BPF_MAXINSNS/7 in size, it happens rather quickly that bpf(2) rejects also valid programs when only the verifier log buffer size we have in tc is too small. Change that, so by default we don't do any logging, and only in error case we retry

Re: [PATCH net v2 2/2] ipv6/udp: use sticky pktinfo egress ifindex on connect()

2016-02-01 Thread David Ahern
On 1/31/16 7:23 PM, YOSHIFUJI Hideaki wrote: Hannes Frederic Sowa wrote: On 29.01.2016 12:30, Paolo Abeni wrote: Currently, the egress interface index specified via IPV6_PKTINFO is ignored by __ip6_datagram_connect(), so that RFC 3542 section 6.7 can be subverted when the user space

Re: [PATCH net v2 2/2] ipv6/udp: use sticky pktinfo egress ifindex on connect()

2016-02-01 Thread David Miller
From: David Ahern Date: Mon, 1 Feb 2016 19:06:15 -0700 > Can you queue these up for 4.4 stable? Fixes 'ping6 -I ' > for VRFs and 4.4 is the first release with VRF for IPv6. Sure, done.

Re: [PATCH iproute2 -master 2/4] tc, bpf: improve verifier logging

2016-02-01 Thread John Fastabend
On 16-02-01 04:12 PM, Daniel Borkmann wrote: > With a bit larger, branchy eBPF programs f.e. already ~BPF_MAXINSNS/7 in > size, it happens rather quickly that bpf(2) rejects also valid programs > when only the verifier log buffer size we have in tc is too small. > > Change that, so by default we

Re: [RFC PATCH 7/7] net: ixgbe: add support for tc_u32 offload

2016-02-01 Thread David Miller
From: John Fastabend Date: Sun, 31 Jan 2016 17:53:10 -0800 > + ixgbe_jump_tables[uhtid] = nexthdr->jump; I can't figure out what protects concurrent accesses to this shared ixgbe_jump_table[]. Is RTNL held here? If so it's likely that GFP_ATOMIC

[PATCH V4] netfilter: h323: avoid potential attack

2016-02-01 Thread Zhouyi Zhou
I think hackers chould build a malicious h323 packet to overflow the pointer p which will panic during the memcpy(addr, p, len) For example, he may fabricate a very large taddr->ipAddress.ip. As suggested by Eric, this module is protected by a lock (nf_h323_lock) so adding a variable

Re: [RFC net-next 2/9] net/switchdev: Introduce hardware offload support

2016-02-01 Thread amirva
On Mon, Feb 01, 2016 at 10:06:27AM +0100, Jiri Pirko wrote: > Mon, Feb 01, 2016 at 09:34:38AM CET, a...@vadai.me wrote: > >Extend the switchdev API with new operations: switchdev_port_flow_add() > >and switchdev_port_flow_del(). > >It allows the user to add/del a hardware offloaded flow

[RFC net-next 9/9] net/mlx5e: Flow steering support through switchdev

2016-02-01 Thread Amir Vadai
Parse switchdev flow object into device specific commands and program the hardware to classify and mark/drop the flow accordingly. A new Kconfig is introduced: MLX5_EN_SWITCHDEV. This config enables to compile the driver when switchdev is not compiled. Signed-off-by: Amir Vadai

[RFC net-next 3/9] net/act: Offload support by tc actions

2016-02-01 Thread Amir Vadai
In order to support hardware offloading, an action should implment the new offload_init() callback. During filter initialization, offload_init() will be called to add the action description to the actions object that will be used by the filter to configure the hardware. Signed-off-by: Amir Vadai

[RFC net-next 5/9] net/act_gact: Introduce hardware offload support for drop

2016-02-01 Thread Amir Vadai
Enable hardware offloaded packet dropping when filter is marked with 'offload' attribute. Signed-off-by: Amir Vadai --- net/sched/act_gact.c | 17 + 1 file changed, 17 insertions(+) diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index 5c1b051..b639b18

[RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread Amir Vadai
During initialization, tcf_exts_offload_init() is called to initialize the list of actions description. later on, the classifier description is prepared and sent to the switchdev using switchdev_port_flow_add(). When offloaded, fl_classify() is a NOP - already done in hardware. Signed-off-by:

[RFC net-next 4/9] net/act_skbedit: Introduce hardware offload support

2016-02-01 Thread Amir Vadai
Currently only 'mark' operation is supported when hardware offload is requested. Signed-off-by: Amir Vadai --- net/sched/act_skbedit.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index 6751b5f..3113dfc

[RFC net-next 0/9] TC filter HW offloads

2016-02-01 Thread Amir Vadai
Hi, So... just before sending that, I noted Jonh's series that deals with tc and u32. One notable difference between the two approaches is that here we "normalize" the upper layer way of describing matching and actions into a generic structure (flow dissector, etc), which should allow to use

[RFC net-next 2/9] net/switchdev: Introduce hardware offload support

2016-02-01 Thread Amir Vadai
Extend the switchdev API with new operations: switchdev_port_flow_add() and switchdev_port_flow_del(). It allows the user to add/del a hardware offloaded flow classification and actions. For every new flow object a cookie is supplied. This cookie will be used later on to identify the flow when

[RFC net-next 7/9] net/mlx5_core: Go to next flow table support

2016-02-01 Thread Amir Vadai
When destination is NULL, continue processing packet in the following table. Will be used by the offloads table, to process the traffic before any other table (without it knowing who is the next table) Signed-off-by: Amir Vadai ---

Re: [RFC net-next 2/9] net/switchdev: Introduce hardware offload support

2016-02-01 Thread Jiri Pirko
Mon, Feb 01, 2016 at 09:34:38AM CET, a...@vadai.me wrote: >Extend the switchdev API with new operations: switchdev_port_flow_add() >and switchdev_port_flow_del(). >It allows the user to add/del a hardware offloaded flow classification >and actions. >For every new flow object a cookie is supplied.

[RFC net-next 1/9] net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public

2016-02-01 Thread Amir Vadai
Will be used in a following patch. Signed-off-by: Amir Vadai --- include/net/flow_dissector.h | 13 + net/core/flow_dissector.c| 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/net/flow_dissector.h

[RFC net-next 8/9] net/mlx5e: Introduce MLX5_FLOW_NAMESPACE_OFFLOADS

2016-02-01 Thread Amir Vadai
A new namespace to be populated with flow steering rules that deal with offloading rules (matching and/or actions) set for higher level entities such as the TC subsystem. This namespace is located after the bypass namespace and before the kernel. Therefore, it precedes the HW processing done for

[PATCH net] route: add rcu_read_lock when lookup route and update fnhe in __ip_do_redirect

2016-02-01 Thread Xin Long
The only free exceptions is free_nh_exceptions(): free_fib_info_rcu()->free_nh_exceptions() It is in call_rcu(): free_fib_info(): call_rcu(>rcu, free_fib_info_rcu); There is no issue, because it's protected by fib_info rcu. In ip_route_input(output)_slow: rcu_read_lock() fib_lookup()

Re: [PATCH] mac80211: fix memory leak

2016-02-01 Thread Julian Calaby
Hi Sudip, On Mon, Feb 1, 2016 at 8:33 PM, Sudip Mukherjee wrote: > On Mon, Feb 01, 2016 at 11:28:37AM +0200, Kalle Valo wrote: >> Sudip Mukherjee writes: >> >> > On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: >> >> Hi

Re: [RFC net-next 0/9] TC filter HW offloads

2016-02-01 Thread John Fastabend
On 16-02-01 12:34 AM, Amir Vadai wrote: > Hi, > > So... just before sending that, I noted Jonh's series that > deals with tc and u32. One notable difference between the > two approaches is that here we "normalize" the upper layer > way of describing matching and actions into a generic structure

Re: [PATCH net] nftables: use list_for_each_entry_safe_reverse to traversal commit_list in nf_tables_abort

2016-02-01 Thread Xin Long
> > No need to resend. > > Yes, we need this reverse iteration there to handle the 'delete table' > command in the batch. This problem happens since we have > nft_flush_table(). > > Other callsites are artificially restriction deletion of inactive > objects but that should be removed as we already

[PATCH net-next v1 08/10] tipc: protect tipc_subscrb_get() with subscriber spin lock

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, during subscription creation the mod_time() & tipc_subscrb_get() are called after releasing the subscriber spin lock. In a SMP system when performing a subscription creation, if the subscription timeout occurs simultaneously (the timer is scheduled to run on another CPU) then the timer

[PATCH net-next v1 09/10] tipc: donot create timers if subscription timeout = TIPC_WAIT_FOREVER

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, we create timers even for the subscription requests with timeout = TIPC_WAIT_FOREVER. This can be improved by avoiding timer creation when the timeout is set to TIPC_WAIT_FOREVER. In this commit, we introduce a check to creates timers only when timeout != TIPC_WAIT_FOREVER. Acked-by:

[PATCH net-next v1 07/10] tipc: hold subscriber->lock for tipc_nametbl_subscribe()

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, while creating a subscription the subscriber lock protects only the subscribers subscription list and not the nametable. The call to tipc_nametbl_subscribe() is outside the lock. However, at subscription timeout and cancel both the subscribers subscription list and the nametable are

[PATCH net-next v1 02/10] tipc: remove filter and timeout elements from struct tipc_subscription

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, struct tipc_subscription has duplicate timeout and filter attributes present: 1. directly as members of struct tipc_subscription 2. in struct tipc_subscr, which is contained in struct tipc_event In this commit, we remove the references to these elements as members of struct

[PATCH net-next v1 03/10] tipc: remove struct tipc_name_seq from struct tipc_subscription

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, struct tipc_subscriber has duplicate fields for type, upper and lower (as member of struct tipc_name_seq) at: 1. as member seq in struct tipc_subscription 2. as member seq in struct tipc_subscr, which is contained in struct tipc_event The former structure contains the type, upper and

[PATCH net-next v1 00/10] tipc: cleanups, fixes & improvements for topology server

2016-02-01 Thread Parthasarathy Bhuvaragan
This series contains topology server cleanups, fixes and improvements. Cleanups in #1-#4: We remove duplicate data structures and aligin the rest of the code accordingly. Fixes in #5-#8: The bugs occur either during configuration or while running on SMP targets, which are race conditions that

Re: [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread Amir Vadai
On Mon, Feb 01, 2016 at 01:31:17AM -0800, John Fastabend wrote: > On 16-02-01 12:34 AM, Amir Vadai wrote: > > During initialization, tcf_exts_offload_init() is called to initialize > > the list of actions description. later on, the classifier description > > is prepared and sent to the switchdev

Re: [RFC net-next 2/9] net/switchdev: Introduce hardware offload support

2016-02-01 Thread John Fastabend
On 16-02-01 12:34 AM, Amir Vadai wrote: > Extend the switchdev API with new operations: switchdev_port_flow_add() > and switchdev_port_flow_del(). > It allows the user to add/del a hardware offloaded flow classification > and actions. > For every new flow object a cookie is supplied. This cookie

Re: [PATCH] mac80211: fix memory leak

2016-02-01 Thread Sudip Mukherjee
On Mon, Feb 01, 2016 at 11:28:37AM +0200, Kalle Valo wrote: > Sudip Mukherjee writes: > > > On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: > >> Hi Sudip, > >> > >> On Fri, Jan 29, 2016 at 8:49 PM, Sudip Mukherjee > >>

[PATCH net-next v1 04/10] tipc: introduce tipc_subscrb_subscribe() routine

2016-02-01 Thread Parthasarathy Bhuvaragan
In this commit, we split tipc_subscrp_create() into two: 1. tipc_subscrp_create() creates a subscription 2. A new function tipc_subscrp_subscribe() adds the subscription to the subscriber subscription list, activates the subscription timer and subscribes to the nametable updates. In

[PATCH net-next v1 05/10] tipc: fix connection abort during subscription cancellation

2016-02-01 Thread Parthasarathy Bhuvaragan
In 'commit 7fe8097cef5f ("tipc: fix nullpointer bug when subscribing to events")', we terminate the connection if the subscription creation fails. In the same commit, the subscription creation result was based on the value of subscription pointer (set in the function) instead of the return code.

[PATCH net-next v1 06/10] tipc: fix connection abort when receiving invalid cancel request

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, the subscribers endianness for a subscription create/cancel request is determined as: swap = !(s->filter & (TIPC_SUB_PORTS | TIPC_SUB_SERVICE)) The checks are performed only for port/service subscriptions. The swap calculation is incorrectly if the filter in the subscription

[PATCH net-next v1 01/10] tipc: remove incorrect check for subscription timeout value

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, during subscription creation we set sub->timeout by converting the timeout request value in milliseconds to jiffies. This is followed by setting the timeout value in the timer if sub->timeout != TIPC_WAIT_FOREVER. For a subscription create request with a timeout value of

[PATCH net-next v1 10/10] tipc: use alloc_ordered_workqueue() instead of WQ_UNBOUND w/ max_active = 1

2016-02-01 Thread Parthasarathy Bhuvaragan
Until now, tipc_rcv and tipc_send workqueues in server are allocated with parameters WQ_UNBOUND & max_active = 1. This parameters passed to this function makes it equivalent to alloc_ordered_workqueue(). The later form is more explicit and can inherit future ordered_workqueue changes. In this

Re: [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread John Fastabend
On 16-02-01 01:31 AM, John Fastabend wrote: > On 16-02-01 12:34 AM, Amir Vadai wrote: >> During initialization, tcf_exts_offload_init() is called to initialize >> the list of actions description. later on, the classifier description >> is prepared and sent to the switchdev using

Re: [PATCH 1/1] bond: relocate rcu_read_lock and rcu_read_unlock

2016-02-01 Thread Nikolay Aleksandrov
On 02/01/2016 04:31 AM, zyjzyj2...@gmail.com wrote: > From: Zhu Yanjun > > rcu_read_lock and rcu_read_unlock are to protect the function > bond_miimon_inspect. As such, moving rcu_read_lock and rcu_read_unlock > to the function bond_miimon_inspect to make the source code

Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic

2016-02-01 Thread Gregory CLEMENT
Hi David, On sam., janv. 30 2016, David Miller wrote: > From: Gregory CLEMENT > Date: Fri, 29 Jan 2016 17:26:06 +0100 > >> @@ -370,6 +370,8 @@ struct mvneta_port { >> struct net_device *dev; >> struct notifier_block

Re: [PATCH V3] netfilter: h323: avoid potential attack

2016-02-01 Thread Pablo Neira Ayuso
On Fri, Jan 29, 2016 at 11:25:35AM +0800, Zhouyi Zhou wrote: > I think hackers chould build a malicious h323 packet to overflow > the pointer p which will panic during the memcpy(addr, p, len) > For example, he may fabricate a very large taddr->ipAddress.ip; > As suggested by Eric, this module is

Re: [PATCH] mac80211: fix memory leak

2016-02-01 Thread Kalle Valo
Sudip Mukherjee writes: > On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: >> Hi Sudip, >> >> On Fri, Jan 29, 2016 at 8:49 PM, Sudip Mukherjee >> wrote: >> > On error we jumped to the error label and returned the error code

Re: [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread John Fastabend
On 16-02-01 12:34 AM, Amir Vadai wrote: > During initialization, tcf_exts_offload_init() is called to initialize > the list of actions description. later on, the classifier description > is prepared and sent to the switchdev using switchdev_port_flow_add(). > > When offloaded, fl_classify() is a

[PATCH v2 net 4/6] net: mvneta: Modify the queue related fields from each cpu

2016-02-01 Thread Gregory CLEMENT
In the MVNETA_INTR_* registers, the queues related fields are per cpu, according to the datasheet (comment in [] are added by me): "In a multi-CPU system, bits of RX[or TX] queues for which the access by the reading[or writing] CPU is disabled are read as 0, and cannot be cleared[or written]."

[PATCH v2 net 0/6] mvneta fixes for SMP

2016-02-01 Thread Gregory CLEMENT
Hi, Following this bug report: http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173 and the suggestions from Russell King, I reviewed all the code involving multi-CPU. It ended with this series of patches which should improve the stability of the driver. The first patch fix a real bug,

[PATCH v2 net 1/6] net: mvneta: Fix for_each_present_cpu usage

2016-02-01 Thread Gregory CLEMENT
This patch convert the for_each_present in on_each_cpu, instead of applying on the present cpus it will be applied only on the online cpus. This fix a bug reported on http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173. Using the macro on_each_cpu (instead of a for_each_* loop) also

[PATCH v2 net 2/6] net: mvneta: Use on_each_cpu when possible

2016-02-01 Thread Gregory CLEMENT
Instead of using a for_each_* loop in which we just call the smp_call_function_single macro, it is more simple to directly use the on_each_cpu macro. Moreover, this macro ensures that the calls will be done all at once. Suggested-by: Russell King Signed-off-by:

[PATCH v2 net 3/6] net: mvneta: Remove unused code

2016-02-01 Thread Gregory CLEMENT
Since the commit 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") all the percpu irq are used and unmask at initialization, so there is no point to unmask them first. Signed-off-by: Gregory CLEMENT --- drivers/net/ethernet/marvell/mvneta.c | 8

[PATCH v2 net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic

2016-02-01 Thread Gregory CLEMENT
Electing a CPU must be done in an atomic way: it should be done after or before the removal/insertion of a CPU and this function is not reentrant. During the loop of mvneta_percpu_elect we associates the queues to the CPUs, if there is a topology change during this loop, then the mapping between

Re: [PATCH v2] net:Add sysctl_tcp_sg_max_skb_frags

2016-02-01 Thread Hans Westgaard Ry
On 01/27/2016 07:12 PM, Hannes Frederic Sowa wrote: On 27.01.2016 16:15, Eric Dumazet wrote: If it is a common one, it should be /proc/sys/net/core/... instead of /proc/sys/net/ipv4/tcp_ > Other providers include : 1) GRO stack 2) callers of sock_alloc_send_pskb(),

Re: [PATCH v2 net 3/6] net: mvneta: Remove unused code

2016-02-01 Thread Sergei Shtylyov
Hello. On 2/1/2016 4:07 PM, Gregory CLEMENT wrote: Since the commit 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") all the percpu irq are used and unmask at initialization, so Unmasked, you mean? there is no point to unmask them first. Mask, maybe (looking at the

Re: [PATCH v2 net 3/6] net: mvneta: Remove unused code

2016-02-01 Thread Gregory CLEMENT
Hi Sergei, On lun., févr. 01 2016, Sergei Shtylyov wrote: > Hello. > > On 2/1/2016 4:07 PM, Gregory CLEMENT wrote: > >> Since the commit 2dcf75e2793c ("net: mvneta: Associate RX queues with >> each CPU") all the percpu irq are used and unmask at

Re: [PATCH net-next 40/40] ARM: dts: imx6qdl-nitrogen6_max: add phy interrupt to eliminate polling

2016-02-01 Thread Shawn Guo
On Thu, Jan 28, 2016 at 02:26:04PM -0700, Troy Kisky wrote: > Signed-off-by: Troy Kisky > --- > arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi >

Re: [PATCH 1/3] lib: fix callers of strtobool to use char array

2016-02-01 Thread Andy Shevchenko
On Thu, Jan 28, 2016 at 4:17 PM, Kees Cook wrote: > Some callers of strtobool were passing a pointer to unterminated strings. > This fixes the issue and consolidates some logic in cifs. My comments below. First of all I don't think currently there is an issue in cifs,

Re: [PATCH net-next v1 06/10] tipc: fix connection abort when receiving invalid cancel request

2016-02-01 Thread Sergei Shtylyov
Hello. On 2/1/2016 12:44 PM, Parthasarathy Bhuvaragan wrote: Until now, the subscribers endianness for a subscription create/cancel request is determined as: swap = !(s->filter & (TIPC_SUB_PORTS | TIPC_SUB_SERVICE)) The checks are performed only for port/service subscriptions. The swap

Re: [PATCH v2 net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic

2016-02-01 Thread Sergei Shtylyov
On 2/1/2016 4:07 PM, Gregory CLEMENT wrote: Electing a CPU must be done in an atomic way: it should be done after or before the removal/insertion of a CPU and this function is not reentrant. During the loop of mvneta_percpu_elect we associates the queues to the CPUs, if there is a topology

Re: [PATCH] mac80211: fix memory leak

2016-02-01 Thread Sergei Shtylyov
Hello. On 2/1/2016 12:28 PM, Kalle Valo wrote: On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: Hi Sudip, On Fri, Jan 29, 2016 at 8:49 PM, Sudip Mukherjee wrote: On error we jumped to the error label and returned the error code but we missed

[PATCH v2 net 6/6] net: mvneta: Fix race condition during stopping

2016-02-01 Thread Gregory CLEMENT
When stopping the port, the CPU notifier are still there whereas the mvneta_stop_dev function calls mvneta_percpu_disable() on each CPUs. It was possible to have a new CPU coming at this point which could be racy. This patch adds a flag preventing executing the code notifier for a new CPU when

[PATCH net v4] r8169: Disable force bus mastering

2016-02-01 Thread Corcodel Marian
Do not need to force on bus mastering , if alls is ok this is enabled on BIOS. Signed-off-by: Corcodel Marian --- drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

Re: [PATCH net] route: add rcu_read_lock when lookup route and update fnhe in __ip_do_redirect

2016-02-01 Thread Eric Dumazet
On Mon, 2016-02-01 at 18:22 +0800, Xin Long wrote: > But there may be an issue in __ip_do_redirect(): > } else { > if (fib_lookup(net, fl4, , 0) == 0) { > struct fib_nh *nh = _RES_NH(res); > > update_or_create_fnhe(nh, fl4->daddr, new_gw, >

Re: [PATCH net-next 39/40] ARM: dts: imx6qdl-nitrogen6x: add phy interrupt to eliminate polling

2016-02-01 Thread Shawn Guo
On Thu, Jan 28, 2016 at 02:26:03PM -0700, Troy Kisky wrote: > Signed-off-by: Troy Kisky > --- > arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi >

Re: [RFC PATCH net-next 3/3] sctp: Add GSO support

2016-02-01 Thread Marcelo Ricardo Leitner
Em 01-02-2016 15:03, Alexander Duyck escreveu: > On Mon, Feb 1, 2016 at 8:22 AM, Marcelo Ricardo Leitner > wrote: >> Em 30-01-2016 02:07, Alexander Duyck escreveu: >>> >>> On Fri, Jan 29, 2016 at 11:42 AM, Marcelo Ricardo Leitner >>> wrote:

RE: [PATCH 3/4] netfilter: ipv4: use preferred kernel types

2016-02-01 Thread David Laight
From: Lucas Tanure > Sent: 30 January 2016 13:18 > As suggested by checkpatch.pl: > CHECK: Prefer kernel type 'uX' over 'uintX_t' One might ask why? The kernel types are older, but the uintX_t ones are now part of the C standard. Writing header files (eg for ioctl buffers) that have to be parsed

RE: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket

2016-02-01 Thread David Laight
From: Florian Westphal > Sent: 30 January 2016 21:30 > Weidong Wang wrote: > > In the 'for(...) {}', the *bucket alwasy < net->ct.htable_size, > > so remove the check > > @@ -1383,14 +1383,12 @@ get_next_corpse(struct net *net, int (*iter)(struct > > nf_conn *i, void

  1   2   >