[PATCH] fix:brcmfmac: add missing header dependencies

2016-08-26 Thread Baoyou Xie
We get 1 warning when biuld kernel with W=1: drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c:23:6: warning: no previous prototype for '__brcmf_err' [-Wmissing- prototypes] In fact, this function is declared in brcmfmac/debuge.h, so this patch add missing header dependencies

Re: [PATCH] drivers: net: stmmac: fix spelling mistake "mulitcast" -> "multicast"

2016-08-26 Thread David Miller
From: Colin King Date: Fri, 26 Aug 2016 19:35:25 +0100 > From: Colin Ian King > > Trivial fix to spelling mistake in dev_warn message. > > Signed-off-by: Colin Ian King Applied.

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread David Miller
From: Eric Dumazet Date: Fri, 26 Aug 2016 08:51:39 -0700 > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian

Re: [PATCH net-next 0/3] sfc: minor fixes

2016-08-26 Thread David Miller
From: Edward Cree Date: Fri, 26 Aug 2016 15:11:34 +0100 > Edward Cree (2): > sfc: include size-binned TX stats on sfn8542q > sfc: remove duplicate assignment > > Jon Cooper (1): > sfc: work around TRIGGER_INTERRUPT command not working on SFC9140 Series applied,

Re: [PATCH -next] net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()

2016-08-26 Thread David Miller
From: Wei Yongjun Date: Fri, 26 Aug 2016 14:35:43 + > From: Wei Yongjun > > Fix to return a negative error code from the cpsw_fill_rx_channels() > error handling case instead of 0, as done elsewhere in this function. > > Fixes: ce52c744574b

Re: [PATCH 1/1] vxlan: remove the useless header file protocol.h

2016-08-26 Thread David Miller
From: zyjzyj2...@gmail.com Date: Tue, 23 Aug 2016 21:30:44 +0800 > From: Zhu Yanjun > > This header file is not used in vxlan.c file. > > Signed-off-by: Zhu Yanjun Applied to net-next, thanks.

Re: [PATCH net] sfc: fix potential stack corruption from running past stat bitmask

2016-08-26 Thread David Miller
From: Edward Cree Date: Fri, 26 Aug 2016 11:19:34 +0100 > From: Andrew Rybchenko > > On 32-bit systems, mask is only an array of 3 longs, not 4, so don't try > to write to mask[3]. > Also include build-time checks in case the size of the

Re: [PATCH net-next 0/7] tipc: introduce UDP replicast

2016-08-26 Thread David Miller
From: Richard Alpe Date: Fri, 26 Aug 2016 10:52:49 +0200 > This series introduces UDP replicast. A concept where we emulate multicast by > sending multiple unicast messages to configured peers. This allows TIPC to be > used in environments where IP multicast is

Re: [PATCH v2 net-next] documentation: Document issues with VMs and XPS and drivers enabling it on their own

2016-08-26 Thread David Miller
From: Tom Herbert Date: Thu, 25 Aug 2016 16:43:35 -0700 > This seems like it will only confuse users even more. You've clearly > identified an issue, let's figure out how to fix it. I kinda feel the same way about this situation.

Re: [PATCH net-next] net: dsa: bcm_sf2: Utilize mask clear/set helpers in bcm_sf2_intr_disable

2016-08-26 Thread David Miller
From: Florian Fainelli Date: Thu, 25 Aug 2016 15:23:41 -0700 > And while at it, remove the unecessary writing of zeroes to the CPU_MASK_CLEAR > register since it has no functional use. > > Signed-off-by: Florian Fainelli Applied, thanks.

Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver

2016-08-26 Thread David Miller
From: Timur Tabi Date: Thu, 25 Aug 2016 16:39:03 -0500 > +static const u8 duuid[] = { > + 0x77, 0x79, 0x60, 0xbf, > + 0x2d, 0xab, > + 0x9d, 0x4b, > + 0x94, 0xf0, > + 0xe1, 0x11, 0x98, 0x01, 0xa2, 0xba > +}; This seems to be completely unused, please

Re: pull request: bluetooth 2016-08-25

2016-08-26 Thread David Miller
From: Johan Hedberg Date: Thu, 25 Aug 2016 22:17:46 +0300 > Here are a couple of important Bluetooth fixes for the 4.8 kernel: > > - Memory leak fix for HCI requests > - Fix sk_filter handling with L2CAP > - Fix sock_recvmsg behavior when MSG_TRUNC is not set > >

Re: [PATCH V2 net-next] alx: add tso support

2016-08-26 Thread David Miller
From: Tobias Regnery Date: Thu, 25 Aug 2016 20:09:53 +0200 > Add tso/tso6 support to the alx driver. > Based on information from the downstream driver at github.com/qca/alx > > Signed-off-by: Tobias Regnery > --- > Changes in V2: > -

[PATCH] irda: Fix likely typo in output format string

2016-08-26 Thread Oleg Drokin
%ul would print an unsigned with a letter l at the end which does not seem to be desired here, on the other hand the value being printed is u32 so just drop the l instead of converting to %lu Signed-off-by: Oleg Drokin --- drivers/net/irda/vlsi_ir.c | 2 +- 1 file changed,

[PATCH] bridge: Fix format string for %ul

2016-08-26 Thread Oleg Drokin
%ul would print an unsigned value and a letter l, likely it was %lu that was meant to print the long int, but in reality the values printed there are just regular signed ints, so just dropping the l altogether. Signed-off-by: Oleg Drokin --- net/bridge/br_stp_bpdu.c | 2 +-

Re: [PATCH net-next v4 0/2] net: ethernet: mediatek: modify to use the PDMA for Ethernet RX

2016-08-26 Thread David Miller
From: Nelson Chang Date: Fri, 26 Aug 2016 01:09:41 +0800 > This series have some modifications and refines to support Ethernet RX by the > PDMA. > > changes since v4: > - Remove the redundant OR operation in mtk_hw_init() > > changes since v3: > - Add GDM hardware

Re: [PATCH] irda: Fix likely typo in output format string

2016-08-26 Thread Joe Perches
(added Chunyan Zhang to cc) On Fri, 2016-08-26 at 23:14 -0400, Oleg Drokin wrote: > %ul would print an unsigned with a letter l at the end which does > not seem to be desired here, on the other hand the value being printed > is u32 so just drop the l instead of converting to %lu Fixes:

[PATCH net-next 6/6] samples/bpf: add sampleip example

2016-08-26 Thread Alexei Starovoitov
From: Brendan Gregg sample instruction pointer and frequency count in a BPF map Signed-off-by: Brendan Gregg Signed-off-by: Alexei Starovoitov --- samples/bpf/Makefile| 4 + samples/bpf/sampleip_kern.c | 38 +

[PATCH net-next 3/6] bpf: perf_event progs should only use preallocated maps

2016-08-26 Thread Alexei Starovoitov
Make sure that BPF_PROG_TYPE_PERF_EVENT programs only use preallocated hash maps, since doing memory allocation in overflow_handler can crash depending on where nmi got triggered. Signed-off-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 22 +- 1 file

[PATCH net-next 5/6] samples/bpf: add perf_event+bpf example

2016-08-26 Thread Alexei Starovoitov
The bpf program is called 50 times a second and does hashmap[kern_stackid]++ It's primary purpose to check that key bpf helpers like map lookup, update, get_stackid, trace_printk and ctx access are all working. It checks: - PERF_COUNT_HW_CPU_CYCLES on all cpus - PERF_COUNT_HW_CPU_CYCLES for

[PATCH net-next 4/6] perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs

2016-08-26 Thread Alexei Starovoitov
Allow attaching BPF_PROG_TYPE_PERF_EVENT programs to sw and hw perf events via overflow_handler mechanism. When program is attached the overflow_handlers become stacked. The program acts as a filter. Returning zero from the program means that the normal perf_event_output handler will not be called

[PATCH net-next 0/6] perf, bpf: add support for bpf in sw/hw perf_events

2016-08-26 Thread Alexei Starovoitov
Hi Peter, Dave, this patch set is a follow up to the discussion: https://lkml.org/lkml/2016/8/4/304 It turned out to be simpler than what we discussed. Patches 1-3 is a bpf-side prep for the main patch 4 that adds bpf program as an overflow_handler to sw and hw perf_events. Peter, please review.

[PATCH net-next 2/6] bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type

2016-08-26 Thread Alexei Starovoitov
Introduce BPF_PROG_TYPE_PERF_EVENT programs that can be attached to HW and SW perf events (PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE correspondingly in uapi/linux/perf_event.h) The program visible context meta structure is struct bpf_perf_event_data { struct pt_regs regs; __u64

[PATCH net-next 1/6] bpf: support 8-byte metafield access

2016-08-26 Thread Alexei Starovoitov
The verifier supported only 4-byte metafields in struct __sk_buff and struct xdp_md. The metafields in upcoming struct bpf_perf_event are 8-byte to match register width in struct pt_regs. Teach verifier to recognize 8-byte metafield access. The patch doesn't affect safety of sockets and xdp

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Linus Torvalds
On Fri, Aug 26, 2016 at 10:40 AM, CAI Qian wrote: > After applied to this patch and ran the reproducer (compiling gcc), had > no bucket_table_alloc in kmemleak report anymore. Hence, > > Tested-by: CAI Qian > > Funny enough, it now gave me this, > > [

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-26 Thread Eli Cooper
Hi, On 2016/8/27 3:49, Shmulik Ladkani wrote: > However new users of 'ip6_tnl_xmit' (e.g. __gre6_xmit callers) may still > have their 'fl6->flowi6_proto' not armed. > > Maybe the right fix is assigning 'fl6->flowi6_proto = proto', either at > start of 'ip6_tnl_xmit' or just prior the

Re: [PATCH v3 3/6] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-26 Thread Alexei Starovoitov
On Fri, Aug 26, 2016 at 09:58:49PM +0200, Daniel Mack wrote: > Extend the bpf(2) syscall by two new commands, BPF_PROG_ATTACH and > BPF_PROG_DETACH which allow attaching and detaching eBPF programs > to a target. > > On the API level, the target could be anything that has an fd in > userspace,

Re: [PATCH v3 2/6] cgroup: add support for eBPF programs

2016-08-26 Thread Alexei Starovoitov
On Fri, Aug 26, 2016 at 09:58:48PM +0200, Daniel Mack wrote: > This patch adds two sets of eBPF program pointers to struct cgroup. > One for such that are directly pinned to a cgroup, and one for such > that are effective for it. > > To illustrate the logic behind that, assume the following

Re: [RFCv2 07/16] bpf: enable non-core use of the verfier

2016-08-26 Thread Alexei Starovoitov
On Fri, Aug 26, 2016 at 07:06:06PM +0100, Jakub Kicinski wrote: > Advanced JIT compilers and translators may want to use > eBPF verifier as a base for parsers or to perform custom > checks and validations. > > Add ability for external users to invoke the verifier > and provide callbacks to be

Re: [RFC v2 09/10] landlock: Handle cgroups

2016-08-26 Thread Alexei Starovoitov
On Fri, Aug 26, 2016 at 05:10:40PM +0200, Mickaël Salaün wrote: > trimming cc list again. When it's too big vger will consider it as spam. > On 26/08/2016 04:14, Alexei Starovoitov wrote: > > On Thu, Aug 25, 2016 at 12:32:44PM +0200, Mickaël Salaün wrote: > >> Add an eBPF function

Re: [PATCH] ravb: avoid unused function warnings

2016-08-26 Thread Sergei Shtylyov
Hello. On 08/26/2016 06:30 PM, Arnd Bergmann wrote: When CONFIG_PM_SLEEP is disabled, we get a couple of harmless warnings: drivers/net/ethernet/renesas/ravb_main.c:2117:12: error: 'ravb_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/renesas/ravb_main.c:2104:12:

Re: [PATCH 1/2] smc91x: always use 8-bit access if necessary

2016-08-26 Thread kbuild test robot
Hi Arnd, [auto build test WARNING on net-next/master] [also build test WARNING on v4.8-rc3 next-20160825] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to

Re: [PATCH net-next v1] gso: Support partial splitting at the frag_list pointer

2016-08-26 Thread Alexander Duyck
On Thu, Aug 25, 2016 at 4:00 AM, Steffen Klassert wrote: > diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c > index 989a362..ac46233 100644 > --- a/net/ipv4/af_inet.c > +++ b/net/ipv4/af_inet.c > @@ -1190,7 +1190,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); >

Re: [PATCH] net/mlx4_en: protect ring->xdp_prog with rcu_read_lock

2016-08-26 Thread Brenden Blanco
On Fri, Aug 26, 2016 at 01:38:08PM -0700, Brenden Blanco wrote: > Depending on the preempt mode, the bpf_prog stored in xdp_prog may be > freed despite the use of call_rcu inside bpf_prog_put. The situation is > possible when running in PREEMPT_RCU=y mode, for instance, since the rcu > callback

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-08-26 Thread Maxime Ripard
Hi, On Wed, Aug 24, 2016 at 02:02:21PM +0200, LABBE Corentin wrote: > > > +/* Set Management Data Clock, must be call after device reset */ > > > +static void sun8i_emac_set_mdc(struct net_device *ndev) > > > +{ > > > + struct sun8i_emac_priv *priv = netdev_priv(ndev); > > > + unsigned long rate;

Re: [PATCH net-next v1] gso: Support partial splitting at the frag_list pointer

2016-08-26 Thread Alexander Duyck
On Fri, Aug 26, 2016 at 1:36 PM, Shmulik Ladkani wrote: > Hi, > > On Thu, 25 Aug 2016 13:00:19 +0200 Steffen Klassert > wrote: >> On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote: >> > That being the >> > case we should be

[PATCH] net/mlx4_en: protect ring->xdp_prog with rcu_read_lock

2016-08-26 Thread Brenden Blanco
Depending on the preempt mode, the bpf_prog stored in xdp_prog may be freed despite the use of call_rcu inside bpf_prog_put. The situation is possible when running in PREEMPT_RCU=y mode, for instance, since the rcu callback for destroying the bpf prog can run even during the bh handling in the

Re: [PATCH net-next v1] gso: Support partial splitting at the frag_list pointer

2016-08-26 Thread Shmulik Ladkani
Hi, On Thu, 25 Aug 2016 13:00:19 +0200 Steffen Klassert wrote: > On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote: > > That being the > > case we should be able to determine the size that you would need to > > segment at by taking skb->len, and

Re: kernel BUG at net/unix/garbage.c:149!"

2016-08-26 Thread Hannes Frederic Sowa
On 25.08.2016 01:30, Nikolay Borisov wrote: > On Thu, Aug 25, 2016 at 12:40 AM, Hannes Frederic Sowa > wrote: >> On 24.08.2016 16:24, Nikolay Borisov wrote: > [SNIP] >> >> One commit which could have to do with that is >> >> commit

Re: [PATCH net-next-v3 0/6] net: dsa: Make bcm_sf2 utilize b53_common

2016-08-26 Thread David Miller
From: Florian Fainelli Date: Fri, 26 Aug 2016 12:18:28 -0700 > Changes in v3: > > - rebase against 145dd5f9c88f6ee645662df0be003e8f04bdae93 ("net: flush the > softnet backlog in process context") This is a lot better, series applied, thanks!

Re: [PATCH net-next] net: batch calls to flush_all_backlogs()

2016-08-26 Thread Hannes Frederic Sowa
On Fri, Aug 26, 2016, at 21:50, Eric Dumazet wrote: > From: Eric Dumazet > > After commit 145dd5f9c88f ("net: flush the softnet backlog in process > context"), we can easily batch calls to flush_all_backlogs() for all > devices processed in rollback_registered_many() > >

Re: [patch net-next 0/5] mlxsw: Introduce support for offload forward mark

2016-08-26 Thread David Miller
From: Jiri Pirko Date: Thu, 25 Aug 2016 18:42:35 +0200 > Ido says: > This patchset enables the forwarding of certain control packets by the > device instead of relying on the CPU to do the forwarding. > > The first two patches simplify the current switchdev offload forward >

Re: [patch net v2] team: loadbalance: push lacpdus to exact delivery

2016-08-26 Thread David Miller
From: Jiri Pirko Date: Thu, 25 Aug 2016 18:30:52 +0200 > From: Jiri Pirko > > When team is in bridge and LACP is utilized, LACPDU packets are pushed > to userspace using raw socket and there they are processed. However, > since 8626c56c8279b, LACPDU skbs

[PATCH net-next] net: batch calls to flush_all_backlogs()

2016-08-26 Thread Eric Dumazet
From: Eric Dumazet After commit 145dd5f9c88f ("net: flush the softnet backlog in process context"), we can easily batch calls to flush_all_backlogs() for all devices processed in rollback_registered_many() Tested: Before patch, on an idle host. modprobe dummy

[PATCH] net: ethernet: renesas: sh_eth: do not access POST registers if not exist

2016-08-26 Thread Chris Brandt
The RZ/A1 has a TSU, but since it only has one Ethernet port, it does not have POST registers. Therefore, if you try to write to register index TSU_POST1 (which will be because it does not exist), it will either panic or corrupt memory elsewhere. Reported-by: Daniel Palmer

[PATCH v3 6/6] samples: bpf: add userspace example for attaching eBPF programs to cgroups

2016-08-26 Thread Daniel Mack
Add a simple userpace program to demonstrate the new API to attach eBPF programs to cgroups. This is what it does: * Create arraymap in kernel with 4 byte keys and 8 byte values * Load eBPF program The eBPF program accesses the map passed in to store two pieces of information. The

[PATCH v3 5/6] net: core: run cgroup eBPF egress programs

2016-08-26 Thread Daniel Mack
If the cgroup associated with the receiving socket has an eBPF programs installed, run them from __dev_queue_xmit(). eBPF programs used in this context are expected to either return 1 to let the packet pass, or != 1 to drop them. The programs have access to the full skb, including the MAC

[PATCH v3 2/6] cgroup: add support for eBPF programs

2016-08-26 Thread Daniel Mack
This patch adds two sets of eBPF program pointers to struct cgroup. One for such that are directly pinned to a cgroup, and one for such that are effective for it. To illustrate the logic behind that, assume the following example cgroup hierarchy. A - B - C \ D - E If only B has a

[PATCH v3 4/6] net: filter: run cgroup eBPF ingress programs

2016-08-26 Thread Daniel Mack
If the cgroup associated with the receiving socket has an eBPF programs installed, run them from sk_filter_trim_cap(). eBPF programs used in this context are expected to either return 1 to let the packet pass, or != 1 to drop them. The programs have access to the full skb, including the MAC

[PATCH v3 3/6] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-26 Thread Daniel Mack
Extend the bpf(2) syscall by two new commands, BPF_PROG_ATTACH and BPF_PROG_DETACH which allow attaching and detaching eBPF programs to a target. On the API level, the target could be anything that has an fd in userspace, hence the name of the field in union bpf_attr is called 'target_fd'. When

[PATCH v3 0/6] Add eBPF hooks for cgroups

2016-08-26 Thread Daniel Mack
This is v3 of the patch set to allow eBPF programs for network filtering and accounting to be attached to cgroups, so that they apply to all sockets of all tasks placed in that cgroup. The logic also allows to be extendeded for other cgroup based eBPF logic. I am posting this now with only very

[PATCH v3 1/6] bpf: add new prog type for cgroup socket filtering

2016-08-26 Thread Daniel Mack
For now, this program type is equivalent to BPF_PROG_TYPE_SOCKET_FILTER in terms of checks during the verification process. It may access the skb as well. Programs of this type will be attached to cgroups for network filtering and accounting. Signed-off-by: Daniel Mack ---

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-26 Thread Shmulik Ladkani
Hi, On Fri, 26 Aug 2016 23:52:29 +0800 Eli Cooper wrote: > Commit 8eb30be0352d0916 ("ipv6: Create ip6_tnl_xmit") unsets > flowi6_proto in ip4ip6_tnl_xmit() and ip6ip6_tnl_xmit(). > Since xfrm_selector_match() relies on this info, IPv6 packets > sent by an ip6tunnel cannot be

Re: [PATCH net-next] devlink: remove unused priv_size

2016-08-26 Thread David Miller
From: Ivan Vecera Date: Thu, 25 Aug 2016 16:46:44 +0200 > Remove unused and useless priv_size member from struct devlink_ops. > > Cc: Jiri Pirko > Signed-off-by: Ivan Vecera Applied.

[PATCH net-next v3 5/6] net: dsa: bcm_sf2: Utilize core B53 driver when possible

2016-08-26 Thread Florian Fainelli
The Broadcom Starfighter2 is almost entirely register compatible with B53, yet for historical reasons came up first in the tree and is now being updated to utilize b53_common.c to the fullest extent possible. A few things need to be adjusted to allow that: - the switch "core" registers currently

[PATCH net-next v3 6/6] net: dsa: bcm_sf2: Remove duplicate code

2016-08-26 Thread Florian Fainelli
Now that we are using b53_common for most VLAN, FDB and bridge operations, delete all the redundant code that we had in bcm_sf2.c to keep only the integration specific logic that we have to deal with: power management, link management and the external interfaces (RGMII, MDIO). Signed-off-by:

[PATCH net-next v3 4/6] net: dsa: b53: Add JOIN_ALL_VLAN support

2016-08-26 Thread Florian Fainelli
In order to migrate the bcm_sf2 driver over to the b53 driver for most VLAN/FDB/bridge operations, we need to add support for the "join all VLANs" register and behavior which allows us to make a given port join all VLANs and avoid setting specific VLAN entries when it is leaving the bridge.

[PATCH net-next v3 1/6] net: dsa: b53: Initialize ds->ops in b53_switch_alloc

2016-08-26 Thread Florian Fainelli
In order to allow drivers to override specific dsa_switch_driver callbacks, initialize ds->ops to b53_switch_ops earlier, which avoids having to expose this structure to glue drivers. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 3 +-- 1 file

[PATCH net-next v3 2/6] net: dsa: b53: Prepare to support 7445 switch

2016-08-26 Thread Florian Fainelli
Allocate a device entry for the Broadcom BCM7445 integrated switch currently backed by bcm_sf2.c. Since this is the latest generation, it has 4 ARL entries, 4K VLANs and uses Port 8 for the CPU/IMP port. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c

[PATCH net-next v3 3/6] net: dsa: b53: Define SF2 MIB layout

2016-08-26 Thread Florian Fainelli
The 58xx and 7445 chips use the Starfighter2 code, define its MIB layout and introduce a helper function: is58xx() which checks for both of these IDs for now. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 63

[PATCH net-next-v3 0/6] net: dsa: Make bcm_sf2 utilize b53_common

2016-08-26 Thread Florian Fainelli
Hi all, This patch series makes the bcm_sf2 driver utilize a large number of the core functions offered by the b53_common driver since the SWITCH_CORE registers are mostly register compatible with the switches driven by b53_common. In order to accomplish that, we just override the dsa_driver_ops

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-26 Thread Eric Dumazet
On Fri, 2016-08-26 at 11:26 -0700, Cong Wang wrote: > On Thu, Aug 25, 2016 at 10:48 AM, Eric Dumazet wrote: > > > > Please find a better way than using a spinlock in this hot path. > > > > Maybe looking at > > 2ee22a90c7afac265bb6f7abea610b938195e2b8 net_sched: act_mirred:

Re: [PATCH net-next-v2 0/6] net: dsa: Make bcm_sf2 utilize b53_common

2016-08-26 Thread David Miller
From: Florian Fainelli Date: Thu, 25 Aug 2016 09:24:35 -0700 > Hi all, > > This patch series makes the bcm_sf2 driver utilize a large number of the core > functions offered by the b53_common driver since the SWITCH_CORE registers are > mostly register compatible with the

NULL pointer dereference when closing socket on a 4.1 kernel

2016-08-26 Thread Ulf Samuelsson
Getting a NULL pointer crash when a socket is closed. [ 593.173973] Unable to handle kernel NULL pointer dereference at virtual address 0010 [ 593.182079] pgd = e416ed00 [ 593.184789] [0010] *pgd=1b3a2003, *pmd=1ac47003, *pte= [ 593.191029] Internal error: Oops: 207 [#1]

Re: [PATCH net-next] net: flush the softnet backlog in process context

2016-08-26 Thread David Miller
From: Paolo Abeni Date: Thu, 25 Aug 2016 15:58:44 +0200 > Currently in process_backlog(), the process_queue dequeuing is > performed with local IRQ disabled, to protect against > flush_backlog(), which runs in hard IRQ context. > > This patch moves the flush operation to a

Re: [PATCH] drivers: net: stmmac: fix spelling mistake "mulitcast" -> "multicast"

2016-08-26 Thread Joe Perches
On Fri, 2016-08-26 at 19:35 +0100, Colin King wrote: > Trivial fix to spelling mistake in dev_warn message. Thanks Colin Are you also fixing up comments and such? $ git grep -i -E "\bmulit" Documentation/networking/kcm.txt:Kernel Connection Mulitplexor arch/arm/mach-s3c64xx/include/mach/irqs.h:

Re: [PATCH net-next] net: bridge: export also pvid flag in the xstats flags

2016-08-26 Thread David Miller
From: Nikolay Aleksandrov Date: Thu, 25 Aug 2016 14:27:51 +0200 > When I added support to export the vlan entry flags via xstats I forgot to > add support for the pvid since it is manually matched, so check if the > entry matches the vlan_group's pvid and set the

Re: [PATCH] net: hns: dereference ppe_cb->ppe_common_cb if it is non-null

2016-08-26 Thread David Miller
From: Colin King Date: Thu, 25 Aug 2016 07:51:10 +0100 > From: Colin Ian King > > ppe_cb->ppe_common_cb is being dereferenced before a null check is > being made on it. If ppe_cb->ppe_common_cb is null then we end up > with a null pointer

Re: [PATCH net] veth: sctp: add NETIF_F_SCTP_CRC to device features

2016-08-26 Thread David Miller
From: Xin Long Date: Thu, 25 Aug 2016 13:21:49 +0800 > Commit b17c706987fa ("loopback: sctp: add NETIF_F_SCTP_CSUM to device > features") added NETIF_F_SCTP_CRC to device features for lo device to > improve the performance of sctp over lo. > > This patch is to add

Re: [PATCH net-next v4 0/3] net: mpls: fragmentation and gso fixes for locally originated traffic

2016-08-26 Thread David Miller
From: David Ahern Date: Wed, 24 Aug 2016 20:10:42 -0700 > This series fixes mtu and fragmentation for tunnels using lwtunnel > output redirect, and fixes GSO for MPLS for locally originated traffic > reported by Lennert Buytenhek. > > A follow on series will address

[PATCH] drivers: net: stmmac: fix spelling mistake "mulitcast" -> "multicast"

2016-08-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King --- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-26 Thread Cong Wang
On Thu, Aug 25, 2016 at 10:48 AM, Eric Dumazet wrote: > > Please find a better way than using a spinlock in this hot path. > > Maybe looking at > 2ee22a90c7afac265bb6f7abea610b938195e2b8 net_sched: act_mirred: remove > spinlock in fast path >

[RFCv2 01/16] add basic register-field manipulation macros

2016-08-26 Thread Jakub Kicinski
Common approach to accessing register fields is to define structures or sets of macros containing mask and shift pair. Operations on the register are then performed as follows: field = (reg >> shift) & mask; reg &= ~(mask << shift); reg |= (field & mask) << shift; Defining shift and mask

[RFCv2 05/16] bpf: recognize 64bit immediate loads as consts

2016-08-26 Thread Jakub Kicinski
When verifier sees a generic BPF_LD | BPF_IMM | BPF_DW it should mark the dst register as CONST_IMM with the loaded value stored in imm. Signed-off-by: Jakub Kicinski --- kernel/bpf/verifier.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[RFCv2 02/16] net: cls_bpf: add hardware offload

2016-08-26 Thread Jakub Kicinski
This patch adds hardware offload capability to cls_bpf classifier, similar to what have been done with U32 and flower. Signed-off-by: Jakub Kicinski --- v2: - drop unnecessary WARN_ON; - reformat error handling a bit. --- include/linux/netdevice.h | 2 ++

[RFCv2 08/16] bpf: export bpf_prog_clone functions

2016-08-26 Thread Jakub Kicinski
Export bpf_prog_clone_create() and bpf_prog_clone_free(). Signed-off-by: Jakub Kicinski --- include/linux/bpf.h | 4 kernel/bpf/core.c | 8 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h

[RFCv2 07/16] bpf: enable non-core use of the verfier

2016-08-26 Thread Jakub Kicinski
Advanced JIT compilers and translators may want to use eBPF verifier as a base for parsers or to perform custom checks and validations. Add ability for external users to invoke the verifier and provide callbacks to be invoked for every intruction checked. For now only add most basic callback for

[RFCv2 06/16] bpf: verifier: recognize rN ^ rN as load of 0

2016-08-26 Thread Jakub Kicinski
Teach the verifier to recognize that xoring a register with itself makes it a constant (0). Signed-off-by: Jakub Kicinski --- kernel/bpf/verifier.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index

[RFCv2 03/16] net: cls_bpf: limit hardware offload by software-only flag

2016-08-26 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_HW flag. Unlike U32 and flower cls_bpf already has some netlink flags defined. I chose to create a new attribute to be able to use the same flag values as the above. Unknown flags are ignored and not reported upon dump. Signed-off-by: Jakub

[RFCv2 04/16] net: cls_bpf: add support for marking filters as hardware-only

2016-08-26 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_SW flag. Signed-off-by: Jakub Kicinski --- net/sched/cls_bpf.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index

[RFCv2 00/16] BPF hardware offload (cls_bpf for now)

2016-08-26 Thread Jakub Kicinski
Hi! This is an updated version of BPF offload set. Biggest change from the previous version is reusing the verifier to check the exit codes and pointer types. The change to the verifier is not very invasive and my gut feeling is that adding simple hooks to the core verifier is cleaner than

[PATCH] ath10k: fix spelling mistake "montior" -> "monitor"

2016-08-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ath10k_warn message. Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RFCv2 13/16] nfp: bpf: add packet marking support

2016-08-26 Thread Jakub Kicinski
Add missing ABI defines and eBPF instructions to allow mark to be passed on and extend prepend parsing on the RX path to pick it up from packet metadata. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 2 ++

[RFCv2 11/16] net: cls_bpf: allow offloaded filters to update stats

2016-08-26 Thread Jakub Kicinski
Call into offloaded filters to update stats. Signed-off-by: Jakub Kicinski --- include/net/pkt_cls.h | 1 + net/sched/cls_bpf.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index

[RFCv2 09/16] nfp: add BPF to NFP code translator

2016-08-26 Thread Jakub Kicinski
Add translator for JITing eBPF to operations which can be executed on NFP's programmable engines. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/Makefile|6 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 233 +++

[RFCv2 10/16] nfp: bpf: add hardware bpf offload

2016-08-26 Thread Jakub Kicinski
Add hardware bpf offload on our smart NICs. Detect if capable firmware is loaded and use it to load the code JITed with just added translator onto programmable engines. This commit only supports offloading cls_bpf in legacy mode (non-direct action). Signed-off-by: Jakub Kicinski

[RFCv2 14/16] net: act_mirred: allow statistic updates from offloaded actions

2016-08-26 Thread Jakub Kicinski
Implement .stats_update() callback. The implementation is generic and can be reused by other simple actions if needed. Signed-off-by: Jakub Kicinski --- net/sched/act_mirred.c | 8 1 file changed, 8 insertions(+) diff --git a/net/sched/act_mirred.c

[RFCv2 15/16] nfp: bpf: add support for legacy redirect action

2016-08-26 Thread Jakub Kicinski
Data path has redirect support so expressing redirect to the port frame came from is a trivial matter of setting the right result code. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 1 +

[RFCv2 16/16] nfp: bpf: add offload of TC direct action mode

2016-08-26 Thread Jakub Kicinski
Add offload of TC in direct action mode. We just need to provide appropriate checks in the verifier and a new outro block to translate the exit codes to what data path expects Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h |

[RFCv2 12/16] net: bpf: allow offloaded filters to update stats

2016-08-26 Thread Jakub Kicinski
Periodically poll stats and call into offloaded actions to update them. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 19 +++ .../net/ethernet/netronome/nfp/nfp_net_common.c| 3 ++

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread CAI Qian
After applied to this patch and ran the reproducer (compiling gcc), had no bucket_table_alloc in kmemleak report anymore. Hence, Tested-by: CAI Qian Funny enough, it now gave me this, [ 3406.807461] kmemleak: 1353 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

Re: [PATCH RESEND nf] netfilter: avoid a race between nf_register_hook() and cleanup_net()

2016-08-26 Thread Pablo Neira Ayuso
Hi Eric, On Sat, Jul 30, 2016 at 08:24:37AM -0500, Eric W. Biederman wrote: > Michal Kubecek writes: > > > There is a race condition between nf_{,un}register_hook() and > > cleanup_net() which can either trigger WARN check or cause a memory > > leak. The scenario is like this

Re: possible memory leak in ipc

2016-08-26 Thread Linus Torvalds
On Fri, Aug 26, 2016 at 10:04 AM, Cong Wang wrote: > > It was correct until... > > commit 4cf0b354d92ee2c642532ee39e330f8f580fd985 > Author: Florian Westphal > Date: Fri Aug 12 12:03:52 2016 +0200 > > rhashtable: avoid large lock-array allocations

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Cong Wang
On Fri, Aug 26, 2016 at 8:51 AM, Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian

Re: possible memory leak in ipc

2016-08-26 Thread Cong Wang
On Fri, Aug 26, 2016 at 10:00 AM, Cong Wang wrote: > On Fri, Aug 26, 2016 at 8:41 AM, Eric Dumazet wrote: >> >> There is a trivial bug in alloc_bucket_locks() >> I will send a patch. > > > Yeah, the 'else' branch looks so suspicious. ;) It was

Re: possible memory leak in ipc

2016-08-26 Thread Cong Wang
On Fri, Aug 26, 2016 at 8:41 AM, Eric Dumazet wrote: > > There is a trivial bug in alloc_bucket_locks() > I will send a patch. Yeah, the 'else' branch looks so suspicious. ;)

Re: [PATCH, net-next] qede: hide 32-bit compile warning

2016-08-26 Thread Joe Perches
On Fri, 2016-08-26 at 17:37 +0200, Arnd Bergmann wrote: > The addition of the per-queue statistics introduced a harmless warning > on all 32-bit architectures: > > drivers/net/ethernet/qlogic/qede/qede_ethtool.c: In function > 'qede_get_ethtool_stats': >

Catholic Rev.Sister

2016-08-26 Thread Catholic Rev Sister
-- Hello, Am reverend sister Fatu i have an Important Massage to deliver to you. Rev Sister

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Herbert Xu
On Fri, Aug 26, 2016 at 08:51:39AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian >

Re: [PATCH net] rhashtable: fix a memory leak in alloc_bucket_locks()

2016-08-26 Thread Florian Westphal
Eric Dumazet wrote: > From: Eric Dumazet > > If vmalloc() was successful, do not attempt a kmalloc_array() > > Fixes: 4cf0b354d92e ("rhashtable: avoid large lock-array allocations") > Reported-by: CAI Qian > Signed-off-by: Eric

  1   2   >