Re: [PATCH net-next 1/2] net: dsa: Add support for a switch reset gpio

2015-11-19 Thread Neil Armstrong
Hi Andrew, On 11/19/2015 12:29 AM, Andrew Lunn wrote: > + gpio = of_get_named_gpio_flags(child, "reset-gpios", 0, > +&flags); > + if (gpio_is_valid(gpio)) { > + ret = devm_gpio_request_one(dev, gpio, flags, > +

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 18.11.2015 um 22:22 schrieb Hannes Frederic Sowa: > On Wed, Nov 18, 2015, at 22:20, Stefan Priebe wrote: >> you mean just: >> la /proc/$pid/fd > > ls -l /proc/pid/fd/ > > the numbers in brackets in return from readlink are the inode numbers. > >> and >> >> cat /proc/net/netlink > > Exactly,

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Florian Weimer
On 11/18/2015 10:23 PM, Stefan Priebe wrote: >> please try to get a backtrace with debugging information. It is likely >> that this is the make_request/__check_pf functionality in glibc, but it >> would be nice to get some certainty. >> >> Which glibc version do you use? Has it got a fix for CVE

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Florian Weimer
On 11/18/2015 10:36 PM, Stefan Priebe wrote: >> please try to get a backtrace with debugging information. It is likely >> that this is the make_request/__check_pf functionality in glibc, but it >> would be nice to get some certainty. > > sorry here it is. What I'm wondering is why is there ipv6

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 19.11.2015 um 10:44 schrieb Florian Weimer: > On 11/18/2015 10:36 PM, Stefan Priebe wrote: > >>> please try to get a backtrace with debugging information. It is likely >>> that this is the make_request/__check_pf functionality in glibc, but it >>> would be nice to get some certainty. >> >> so

[PATCH net] bnx2x: Fix vxlan removal

2015-11-19 Thread Yuval Mintz
Commmit ac7eccd4d48fc "bnx2x: track vxlan port count" contains a bug - Instead of achieving the required goal, vxlan configuration would not be removed since we're decrementing the port instead of the counter. CC: Jiri Benc Signed-off-by: Yuval Mintz --- Hi Dave, Please consider applying this t

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
OK it had a livelock again. It just took more time. So here is the data: # la /proc/2598/fd total 0 dr-x-- 2 root root0 Nov 19 06:53 . dr-xr-xr-x 7 callweaver callweaver 0 Nov 18 22:38 .. lrwx-- 1 root root 64 Nov 19 06:54 0 -> /dev/null lrwx-- 1 root

Re: WARN due to local_bh_disable called with interrupts disabled

2015-11-19 Thread Jesper Dangaard Brouer
On Thu, 19 Nov 2015 02:37:54 - subas...@codeaurora.org wrote: > We are seeing a WARN due to local_bh_disable called with interrupts > disabled with CONFIG_IRQSOFF_TRACER / CONFIG_PREEMPT_TRACER. AFAIK this WARN happens due to a being called from hardware interrupt context. __local_bh_disabl

[PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Arnd Bergmann
The tulip driver causes annoying build-time warnings for allmodconfig builds for all recent architectures: dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! This is the last remaini

Re: [PATCH net] tcp: fix potential huge kmalloc() calls in TCP_REPAIR

2015-11-19 Thread Pavel Emelyanov
On 11/19/2015 08:03 AM, Eric Dumazet wrote: > From: Eric Dumazet > > tcp_send_rcvq() is used for re-injecting data into tcp receive queue. > > Problems : > > - No check against size is performed, allowed user to fool kernel in > attempting very large memory allocations, eventually triggering

[PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Daniel Borkmann
Add a handler for show_fdinfo() to be used by the anon-inodes backend for eBPF maps, and dump the map specification there. Not only useful for admins, but also it provides a minimal way to compare specs from ELF vs pinned object. Signed-off-by: Daniel Borkmann --- kernel/bpf/syscall.c | 22 +

[patch net-next 2/3] mlxsw: spectrum: Unify setting of HW VLAN filters

2015-11-19 Thread Jiri Pirko
From: Ido Schimmel When adding or deleting VLANs from a bridged port, HW VLAN filters must be set accordingly. Instead of having the same code in both add and delete functions, just wrap it in a function and call it with the appropriate parameters. Signed-off-by: Ido Schimmel Signed-off-by: Ela

[patch net-next 3/3] mlxsw: spectrum: Add error paths to __mlxsw_sp_port_vlans_add

2015-11-19 Thread Jiri Pirko
From: Ido Schimmel The operation of adding VLANs on a port via switchdev ops can fail and we need to be prepared for it. If we do not rollback hardware operations following a failure, hardware and software will remain in an inconsistent state. Solve that by adding suitable error paths to __mlxsw

[patch net-next 0/3] mlxsw: small driver update

2015-11-19 Thread Jiri Pirko
From: Jiri Pirko Couple of VLAN-related patches. Ido Schimmel (3): mlxsw: spectrum: Use correct PVID value when removing VLANs mlxsw: spectrum: Unify setting of HW VLAN filters mlxsw: spectrum: Add error paths to __mlxsw_sp_port_vlans_add .../ethernet/mellanox/mlxsw/spectrum_switchdev.c

[patch net-next 1/3] mlxsw: spectrum: Use correct PVID value when removing VLANs

2015-11-19 Thread Jiri Pirko
From: Ido Schimmel When removing a range of VLANs in which PVID is a member we should use the correct PVID value instead of some VLAN in the range. Also, change two print statements to use 'dev' instead of 'mlxsw_sp_port->dev', as it's already used in other print statements in the function. Sig

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 10:56, Stefan Priebe - Profihost AG wrote: > OK it had a livelock again. It just took more time. > > So here is the data: Thanks, I couldn't reproduce it so far with simple threaded resolver loop on your kernel. :/ Your data is useless if you don't also provide the file

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 19.11.2015 um 12:41 schrieb Hannes Frederic Sowa: > On Thu, Nov 19, 2015, at 10:56, Stefan Priebe - Profihost AG wrote: >> OK it had a livelock again. It just took more time. >> >> So here is the data: > > Thanks, I couldn't reproduce it so far with simple threaded resolver > loop on your kern

[PATCH net-next 0/2] ppp: Remove PPPOX_ZOMBIE socket state

2015-11-19 Thread Guillaume Nault
Several issues have been found lately wrt. the PPPOX_ZOMBIE socket state. This state is now only set upon reception of a PADT to stop further transmissions. However this is redundant with the PADT workqueue mechanism introduced by 287f3a943fef ("pppoe: Use workqueue to die properly when a PADT is r

[PATCH net-next 1/2] ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()

2015-11-19 Thread Guillaume Nault
Since 287f3a943fef ("pppoe: Use workqueue to die properly when a PADT is received"), pppoe_disc_rcv() disconnects the socket by scheduling pppoe_unbind_sock_work(). This is enough to stop socket transmission and makes the PPPOX_ZOMBIE state uncessary. Signed-off-by: Guillaume Nault --- drivers/n

[PATCH net-next 2/2] ppp: remove PPPOX_ZOMBIE socket state

2015-11-19 Thread Guillaume Nault
PPPOX_ZOMBIE is never set anymore. Signed-off-by: Guillaume Nault --- drivers/net/ppp/pppoe.c | 4 ++-- drivers/net/ppp/pppox.c | 2 +- include/linux/if_pppox.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index 1dedfbf

RE: [PATCH] bnx2x:Fix error handling and return statement in the function bnx2x_vf_init

2015-11-19 Thread Ariel Elior
> -Original Message- > From: Nicholas Krause [mailto:xerofo...@gmail.com] > Sent: Thursday, November 19, 2015 5:31 AM > To: Ariel Elior > Cc: netdev ; linux-kernel > > Subject: [PATCH] bnx2x:Fix error handling and return statement in the function > bnx2x_vf_init > > This fixes error han

Re: r8169 regression: UDP packets dropped intermittantly

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 17:27 +1030, Jonathan Woithe wrote: > On Thu, Nov 19, 2015 at 01:56:08AM +0100, Francois Romieu wrote: > > Jonathan Woithe : > > [...] > > > I could try. What's the most reliable way to determine this? Use regular > > > ethtool queries about the time of the failures? > > >

Re: [PATCH net] tcp: fix potential huge kmalloc() calls in TCP_REPAIR

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 13:51 +0300, Pavel Emelyanov wrote: > On 11/19/2015 08:03 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > tcp_send_rcvq() is used for re-injecting data into tcp receive queue. > > > > Problems : > > > > - No check against size is performed, allowed user to fool kern

Re: [PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Will Deacon
On Thu, Nov 19, 2015 at 11:42:26AM +0100, Arnd Bergmann wrote: > The tulip driver causes annoying build-time warnings for allmodconfig > builds for all recent architectures: > > dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture > undefined > dec/tulip/tulip_core.c:101:2: war

Re: WARN due to local_bh_disable called with interrupts disabled

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 11:42 +0100, Jesper Dangaard Brouer wrote: > On Thu, 19 Nov 2015 02:37:54 - subas...@codeaurora.org wrote: > > > We are seeing a WARN due to local_bh_disable called with interrupts > > disabled with CONFIG_IRQSOFF_TRACER / CONFIG_PREEMPT_TRACER. > > AFAIK this WARN happe

Re: [PATCH net] tcp: fix potential huge kmalloc() calls in TCP_REPAIR

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 04:25 -0800, Eric Dumazet wrote: > On Thu, 2015-11-19 at 13:51 +0300, Pavel Emelyanov wrote: > > On 11/19/2015 08:03 AM, Eric Dumazet wrote: > > > From: Eric Dumazet > > > > > > tcp_send_rcvq() is used for re-injecting data into tcp receive queue. > > > > > > Problems : > >

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 12:43, Stefan Priebe - Profihost AG wrote: > > Am 19.11.2015 um 12:41 schrieb Hannes Frederic Sowa: > > On Thu, Nov 19, 2015, at 10:56, Stefan Priebe - Profihost AG wrote: > >> OK it had a livelock again. It just took more time. > >> > >> So here is the data: > > > > Than

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 19.11.2015 um 13:41 schrieb Hannes Frederic Sowa: > On Thu, Nov 19, 2015, at 12:43, Stefan Priebe - Profihost AG wrote: >> >> Am 19.11.2015 um 12:41 schrieb Hannes Frederic Sowa: >>> On Thu, Nov 19, 2015, at 10:56, Stefan Priebe - Profihost AG wrote: OK it had a livelock again. It just too

[PATCH] netfilter: avoid harmless unnitialized variable warnings

2015-11-19 Thread Arnd Bergmann
Several ARM default configurations give us warnings on recent compilers about potentially uninitialized variables in the nfnetlink code in two functions: net/netfilter/nfnetlink_queue.c: In function 'nfqnl_build_packet_message': net/netfilter/nfnetlink_queue.c:519:19: warning: 'nfnl_ct' may be use

[PATCH v8] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-19 Thread Mans Rullgard
This adds a driver for the Aurora VLSI NB8800 Ethernet controller. It is an almost complete rewrite of a driver originally found in a Sigma Designs 2.6.22 tree. Signed-off-by: Mans Rullgard --- Changes: - make some variables unsigned --- drivers/net/ethernet/Kconfig |1 + drivers/net

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Florian Weimer
On 11/19/2015 01:46 PM, Stefan Priebe - Profihost AG wrote: > I can try Kernel 4.4-rc1 next week. Or something else? I found this bug report which indicates that 4.1.10 works: But in your original report, you said that 4.1.13 is broken.

Re: [PATCH 13/14] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-11-19 Thread Michal Hocko
On Wed 18-11-15 16:48:22, Johannes Weiner wrote: [...] > So I ran perf record -g -a netperf -t TCP_STREAM multiple times inside > a memory-controlled cgroup, but mostly mem_cgroup_charge_skmem() does > not show up in the profile at all. Once it was there with 0.00%. OK, this sounds very good! This

Re: [PATCH net-next 1/2] net: dsa: Add support for a switch reset gpio

2015-11-19 Thread Andrew Lunn
On Thu, Nov 19, 2015 at 09:39:11AM +0100, Neil Armstrong wrote: > Hi Andrew, > > On 11/19/2015 12:29 AM, Andrew Lunn wrote: > > + gpio = of_get_named_gpio_flags(child, "reset-gpios", 0, > > + &flags); > > + if (gpio_is_valid(gpio)) { > >

[PATCH net-next 1/2] bnx2x: Add new SW stat 'tx_exhaustion_events'

2015-11-19 Thread Yuval Mintz
Driver already has an internal counter for number of times a given queue had to be stopped due to Tx ring exhaustion. This add the counter to the statistics presented by driver, e.g., by using `ethtool -S'. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 5 ++

[PATCH net-next 0/2] bnx2x: Statistics patch series

2015-11-19 Thread Yuval Mintz
Hi Dave, This series contains 2 small statistics-related patches, first adding a new SW statistics and the other exposing port stats for multi-function devices. Please consider applying this series to `net-next'. Thanks, Yuval Mintz -- To unsubscribe from this list: send the line "unsubscribe ne

[PATCH net-next 2/2] bnx2x: Show port statistics in Multi-function

2015-11-19 Thread Yuval Mintz
Today, port statistics are being presented when using `ethool -S' only for single-function devices, but there are some port statistics which are crucial for analyzing bottle-necks. E.g., HW Rx discards due to lack of buffer space [when device isn't handling ingress traffic fast enough]. Judging th

Re: OVS VXLAN decap rule has full match on TTL for the outer headers?

2015-11-19 Thread Or Gerlitz
On Sat, Nov 14, 2015 at 8:45 AM, Joe Stringer wrote: > On 13 November 2015 at 06:46, Or Gerlitz wrote: >> On Fri, Nov 13, 2015 at 10:14 AM, Joe Stringer >> wrote: >>> I agree that this UNSPEC issue on v2.3 could do with a bit of a closer >>> look. I'll see if I can find some time for it. Alter

net-next is now OPEN

2015-11-19 Thread David Miller
As you can see I cut net-next last night and started feeding patches into the tree, so net-next is open now. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 06:12, Tom Herbert wrote: > I think this solution presumes some out of band signaling about a path > failure deep in the network that is not reported via the TCP > connection. This solution is obviously only as good as the signaling, > but clearly the most general solution

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Maciej Żenczykowski Date: Wed, 18 Nov 2015 23:19:03 -0800 > Privileged userspace can already make these decisions today, whether > it is by killing processes with open sockets, or by turning interfaces > up and down or by reconfiguring the firewall and/or the routing > rules/tables, or by i

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 10:48 -0500, David Miller wrote: > At least if they do it this way, and someone claims that Linux TCP > behaves outside the spec or improperly, it's not directly because of > any code I am responsible for. > > That's the difference, and frankly an important one to me. > > If

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Eric Dumazet Date: Thu, 19 Nov 2015 08:19:24 -0800 > Here is the thing : > > - Android powered phones and devices have a similar code since 2008. > There is _no_ way they can avoid having this functionality. Weren't we given similar story about initial wake locks implementation? There is

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 11:33 -0500, David Miller wrote: > You cannot just say "I signoff on this, it's the only reasonable > scheme, apply it." That's not how we do things here. I added my SOB because I effectively worked a lot on this patch. Not because it is a sign of "This is the only way it

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 11:33 -0500, David Miller wrote: > Android folks really do not care about upstream, and it is probably > bottom of their priority. Their actions consistently support this. Well, in this case they contacted me and we worked on a modern solution, candidate for upstream kernel

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Eric Dumazet Date: Thu, 19 Nov 2015 08:43:34 -0800 > You already rejected some of my patches, obviously. Of course, and I applied quickly all the really nice ones, many of them... :-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord..

Re: [PATCH 13/14] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-11-19 Thread Johannes Weiner
On Thu, Nov 19, 2015 at 02:50:24PM +0100, Michal Hocko wrote: > On Wed 18-11-15 16:48:22, Johannes Weiner wrote: > [...] > > So I ran perf record -g -a netperf -t TCP_STREAM multiple times inside > > a memory-controlled cgroup, but mostly mem_cgroup_charge_skmem() does > > not show up in the profil

Re: [PATCH v2 net-next 00/14] net: extend busy polling support

2015-11-19 Thread Eric Dumazet
On Wed, 2015-11-18 at 16:18 -0500, David Miller wrote: > ers (by disabling busy polling on them) > > or revert this last patch. > > I like this series a lot, and hope we can fix any fallout quickly and > painlessly. > > Applied to net-next. Thanks David. Could you push your tree so that we can s

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Eric Dumazet Date: Thu, 19 Nov 2015 08:47:44 -0800 > So if the reaction of this is "Patch is coming from Android, must be > yet another hack", it is quite not fair. I have not said this. But the attitude of that all of a sudden we must care urgently about some Android issue they have wait

Re: [PATCH v2 net-next 00/14] net: extend busy polling support

2015-11-19 Thread David Miller
From: Eric Dumazet Date: Thu, 19 Nov 2015 08:53:52 -0800 > On Wed, 2015-11-18 at 16:18 -0500, David Miller wrote: >> ers (by disabling busy polling on them) >> > or revert this last patch. >> >> I like this series a lot, and hope we can fix any fallout quickly and >> painlessly. >> >> Applied t

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 17:19, Eric Dumazet wrote: > On Thu, 2015-11-19 at 10:48 -0500, David Miller wrote: > > At least if they do it this way, and someone claims that Linux TCP > > behaves outside the spec or improperly, it's not directly because of > > any code I am responsible for. > > > > Th

Re: [PATCH -next] net: tcp: move to timewait when receiving data post active-close

2015-11-19 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Nov 2015 07:46:31 -0800 > Anyway, having a TIMEWAIT setup after sending a RST makes little > sense to me. > > When a RST packet is sent, the remote peer will forget everything about > this previous connection, and another connect() might reuse the tuple > and I d

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Tom Herbert
> I actually don't have an issue with killing from user space that much. I > still recommend (and actually have started to look at it today) to add a > new substate for TCP TIMEWAIT and don't have any issue if we block the > socket for 60 seconds and send RSTs to all incoming data. This way we > ca

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 11:56:22AM +0100, Daniel Borkmann wrote: > Add a handler for show_fdinfo() to be used by the anon-inodes > backend for eBPF maps, and dump the map specification there. Not > only useful for admins, but also it provides a minimal way to > compare specs from ELF vs pinned obje

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 12:02 -0500, David Miller wrote: > From: Eric Dumazet > Date: Thu, 19 Nov 2015 08:47:44 -0800 > > > So if the reaction of this is "Patch is coming from Android, must be > > yet another hack", it is quite not fair. > > I have not said this. > > But the attitude of that all

Re: [PATCH RFT v2] sh_eth: fix kernel oops in skb_put()

2015-11-19 Thread Sergei Shtylyov
Hello. On 10/27/2015 01:52 AM, Yasushi SHOJI wrote: In a low memory situation the following kernel oops occurs: Unable to handle kernel NULL pointer dereference at virtual address 0050 pgd = 8490c000 [0050] *pgd=4651e831, *pte=, *ppte= Internal error: Oops: 17 [#1] PREE

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Tom Herbert Date: Thu, 19 Nov 2015 09:38:37 -0800 > 1) We need transparency. If a third party kills a TCP connection then > the application should be informed of specifically that. This seems > easy enough to just pick an appropriate error number as I suggested. Agreed. > 2) We need const

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > Add a handler for show_fdinfo() to be used by the anon-inodes > backend for eBPF maps, and dump the map specification there. Not > only useful for admins, but also it provides a minimal way to > compare specs from ELF vs pinned object. > > S

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 19:09, David Miller wrote: > From: Tom Herbert > Date: Thu, 19 Nov 2015 09:38:37 -0800 > > > 1) We need transparency. If a third party kills a TCP connection then > > the application should be informed of specifically that. This seems > > easy enough to just pick an appro

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 07:19:24PM +0100, Hannes Frederic Sowa wrote: > On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > > Add a handler for show_fdinfo() to be used by the anon-inodes > > backend for eBPF maps, and dump the map specification there. Not > > only useful for admins, but also

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Daniel Borkmann
On 11/19/2015 07:19 PM, Hannes Frederic Sowa wrote: On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: Add a handler for show_fdinfo() to be used by the anon-inodes backend for eBPF maps, and dump the map specification there. Not only useful for admins, but also it provides a minimal way to

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 07:36:10PM +0100, Daniel Borkmann wrote: > On 11/19/2015 07:19 PM, Hannes Frederic Sowa wrote: > >On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > >>Add a handler for show_fdinfo() to be used by the anon-inodes > >>backend for eBPF maps, and dump the map specificatio

[PATCH 5/7] net: wrap sock->sk_cgrp_prioidx and ->sk_classid inside a struct

2015-11-19 Thread Tejun Heo
Introduce sock->sk_cgrp_data which is a struct sock_cgroup_data. ->sk_cgroup_prioidx and ->sk_classid are moved into it. The struct and its accessors are defined in cgroup-defs.h. This is to prepare for overloading the fields with a cgroup pointer. This patch mostly performs equivalent conversio

[PATCH 4/7] netprio_cgroup: limit the maximum css->id to USHRT_MAX

2015-11-19 Thread Tejun Heo
netprio builds per-netdev contiguous priomap array which is indexed by css->id. The array is allocated using kzalloc() effectively limiting the maximum ID supported to some thousand range. This patch caps the maximum supported css->id to USHRT_MAX which should be way above what is actually useabl

[PATCH 2/7] kernfs: implement kernfs_walk_and_get()

2015-11-19 Thread Tejun Heo
Implement kernfs_walk_and_get() which is similar to kernfs_find_and_get() but can walk a path instead of just a name. v2: Use strlcpy() instead of strlen() + memcpy() as suggested by David. Signed-off-by: Tejun Heo Cc: Greg Kroah-Hartman Cc: David Miller --- fs/kernfs/dir.c| 46 ++

[PATCH 7/7] netfilter: implement xt_cgroup2 match

2015-11-19 Thread Tejun Heo
This patch implements xt_cgroup2 which matches cgroup2 membership of the associated socket. The match is recursive and invertible. For rationales on introducing another cgroup based match, please refer to a preceding commit "sock, cgroup: add sock->sk_cgroup". v2: Included linux/limits.h from xt

[PATCH 6/7] sock, cgroup: add sock->sk_cgroup

2015-11-19 Thread Tejun Heo
In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup membership te

[PATCH 3/7] cgroup: implement cgroup_get_from_path() and expose cgroup_put()

2015-11-19 Thread Tejun Heo
Implement cgroup_get_from_path() using kernfs_walk_and_get() which obtains a default hierarchy cgroup from its path. This will be used to allow cgroup path based matching from outside cgroup proper - e.g. networking and perf. v2: Add EXPORT_SYMBOL_GPL(cgroup_get_from_path). Signed-off-by: Tejun

[PATCHSET v2] netfilter, cgroup: implement xt_cgroup2 match

2015-11-19 Thread Tejun Heo
Hello, This is the second take of the xt_cgroup2 patchset. Changes from the last take are * Instead of adding sock->sk_cgroup separately, sock->sk_cgrp_data now carries either (prioidx, classid) pair or cgroup2 pointer. This avoids inflating struct sock with yet another cgroup related field

[PATCH 1/7] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-19 Thread Tejun Heo
cgroup_is_descendant() currently walks up the hierarchy and compares each ancestor to the cgroup in question. While enough for cgroup core usages, this can't be used in hot paths to test cgroup membership. This patch adds cgroup->ancestor_ids[] which records the IDs of all ancestors including self

[PATCH iptables] libxt_cgroup: improve wording in the man page

2015-11-19 Thread Tejun Heo
Replace "disadviced" with "not advised" as suggested by Jan. Signed-off-by: Tejun Heo Cc: Daniel Borkmann Cc: Jan Engelhardt --- extensions/libxt_cgroup.man |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/extensions/libxt_cgroup.man +++ b/extensions/libxt_cgroup.man @@ -12,7 +1

[PATCH v2 iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-19 Thread Tejun Heo
This patch adds the extension for the xt_cgroup2 which matches packets based on the v2 cgroup path of the associated socket. v2: cgroup2_match->userspacesize and ->save and man page updated as per Jan. Signed-off-by: Tejun Heo Cc: Daniel Borkmann Cc: Jan Engelhardt --- extensions/libxt_cg

[PATCH net 1/1] tipc: correct settings of broadcast link state

2015-11-19 Thread Jon Maloy
Since commit 5266698661401afc5e ("tipc: let broadcast packet reception use new link receive function") the broadcast send link state was meant to always be set to LINK_ESTABLISHED, since we don't need this link to follow the regular link FSM rules. It was also the intention that this state anyway s

[PATCH 1/3 v2] dl2k: Handle memory allocation errors in alloc_list

2015-11-19 Thread Ondrej Zary
If memory allocation fails in alloc_list(), free the already allocated memory and return -ENOMEM. In rio_open(), call alloc_list() first and abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 182 +++

[PATCH 2/3] dl2k: Reorder and cleanup initialization

2015-11-19 Thread Ondrej Zary
Move HW init and stop into separate functions. Request IRQ only after the HW has been reset (so interrupts are disabled and no stale interrupts are pending). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 95 ++--- 1 file changed, 56 insertio

[PATCH 3/3 v3] dl2k: Implement suspend

2015-11-19 Thread Ondrej Zary
Add suspend/resume support to dl2k driver. This requires RX/TX rings to be reset so split out the required functionality from alloc_list() into new rio_reset_ring(). Tested on Asus NX1101 (IP1000A) and D-Link DGE-550T (DL-2000). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c |

[PATCH net-next 3/8] tipc: reduce code dependency between binding table and node layer

2015-11-19 Thread Jon Maloy
The file name_distr.c currently contains three functions, named_cluster_distribute(), tipc_publ_subcscribe() and tipc_publ_unsubscribe() that all directly access fields in struct tipc_node. We want to eliminate such dependencies, so we move those functions to the file node.c and rename them to tipc

[PATCH net-next 2/8] tipc: small cleanup of function tipc_node_check_state()

2015-11-19 Thread Jon Maloy
The function tipc_node_check_state() contains the core logics for handling link synchronization and failover. For this reason, it is important to keep it as comprehensible as possible. In this commit, we make three small cleanups. 1) If the node is in state SELF_DOWN_PEER_LEAVING and the received

[PATCH net-next 5/8] tipc: convert node lock to rwlock

2015-11-19 Thread Jon Maloy
According to the node FSM a node in state SELF_UP_PEER_UP cannot change state inside a lock context, except when a TUNNEL_PROTOCOL (SYNCH or FAILOVER) packet arrives. However, the node's individual links may still change state. Since each link now is protected by its own spinlock, we finally have

[PATCH net-next 0/8] tipc: some cleanups and improvements

2015-11-19 Thread Jon Maloy
This series mostly contains cleanups and cosmetic code changes. The only real functional change is in #4 and #5, where we change the locking structure for nodes and links in order to permit full concurrency between links working in parallel on different interfaces. Since the groundwork for this has

[PATCH net-next 6/8] tipc: narrow down exposure of struct tipc_node

2015-11-19 Thread Jon Maloy
In our effort to have less code and include dependencies between entities such as node, link and bearer, we try to narrow down the exposed interface towards the node as much as possible. In this commit, we move the definition of struct tipc_node, along with many of its associated function declarat

[PATCH net-next 0/8] tipc: some cleanups and improvements

2015-11-19 Thread Jon Maloy
This series mostly contains cleanups and cosmetic code changes. The only real functional change is in #3 and #4, where we change the locking structure for nodes and links in order to permit full concurrency between links working in parallel on different interfaces. Since the groundwork for this has

[PATCH net-next 1/8] tipc: move linearization of buffers to generic code

2015-11-19 Thread Jon Maloy
In commit 5cbb28a4bf65c7e4 ("tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers") we added linearization of NAME_DISTRIBUTOR, LINK_PROTOCOL/RESET and LINK_PROTOCOL/ACTIVATE to the function tipc_udp_recv(). The location of the change was selected in order to make the commit easily appliable

[PATCH net-next 4/8] tipc: introduce per-link spinlock

2015-11-19 Thread Jon Maloy
As a preparation to allow parallel links to work more independently from each other we introduce a per-link spinlock, to be stored in the struct nodes's link entry area. Since the node lock still is a regular spinlock there is no increase in parallellism at this stage. Reviewed-by: Ying Xue Signe

[PATCH net-next 8/8] tipc: eliminate remnants of hungarian notation

2015-11-19 Thread Jon Maloy
The number of variables with Hungarian notation (l_ptr, n_ptr etc.) has been significantly reduced over the last couple of years. We now root out the last traces of this practice. There are no functional changes in this commit. Reviewed-by: Ying Xue Signed-off-by: Jon Maloy --- net/tipc/bearer

[PATCH net-next 7/8] tipc: narrow down interface towards struct tipc_link

2015-11-19 Thread Jon Maloy
We move the definition of struct tipc_link from link.h to link.c in order to minimize its exposure to the rest of the code. When needed, we define new functions to make it possible for external entities to access and set data in the link. Apart from the above, there are no functional changes. Re

[PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Eric Dumazet
From: Eric Dumazet Checking if skb is NULL in napi_gro_frags() is too late. If skb was NULL, we would crash earlier in napi_frags_skb() Drivers normally catch napi_get_frags() NULL return value before calling napi_gro_frags() Signed-off-by: Eric Dumazet --- net/core/dev.c |3 --- 1 file

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe
Am 19.11.2015 um 14:19 schrieb Florian Weimer: On 11/19/2015 01:46 PM, Stefan Priebe - Profihost AG wrote: I can try Kernel 4.4-rc1 next week. Or something else? I found this bug report which indicates that 4.1.10 works: But in yo

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 11:42:50AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Checking if skb is NULL in napi_gro_frags() is too late. > > If skb was NULL, we would crash earlier in napi_frags_skb() > > Drivers normally catch napi_get_frags() NULL return value > before calling napi_gro

[PATCH 01/15] net: Add skb_inner_transport_offset function

2015-11-19 Thread Tom Herbert
Same thing as skb_transport_offset but returns the offset of the inner transport header (when skb->encpasulation is set). Signed-off-by: Tom Herbert --- include/linux/skbuff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c9c394b..

[PATCH 03/15] fcoe: Use CHECKSUM_PARTIAL to indicate CRC offload

2015-11-19 Thread Tom Herbert
When setting up CRC offload set ip_summed to CHECKSUM_PARTIAL instead of CHECKSUM_UNNECESSARY. This is consistent with the definition of CHECKSUM_PARTIAL. The only driver that seems to be advertising NETIF_F_FCOE_CRC is ixgbe. AFICT the driver does not look at ip_summed for FCOE and just assumes t

[PATCH 07/15] net: Add driver helper functions to determine checksum offloadability

2015-11-19 Thread Tom Herbert
Add skb_csum_offload_chk driver helper function to determine if a device with limited checksum offload capabilities is able to offload the checksum for a given packet. This patch includes: - The skb_csum_offload_chk function. Returns true if checksum is offloadable, else false. Optionally, i

[PATCH 12/15] fm10k: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 16 ++-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 5 ++--- 2 files changed, 16 insertions(+)

[PATCH 02/15] sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC

2015-11-19 Thread Tom Herbert
The SCTP checksum is really a CRC and is very different from the standards 1's complement checksum that serves as the checksum for IP protocols. This offload interface is also very different. Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these differences. The term CSUM should be reserv

[PATCH 15/15] qlogic: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 10 +++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 16 ++-- drivers/net/ethernet/qlogi

[PATCH 13/15] ixgbe: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 41 +++ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet

[PATCH 09/15] bnx2x: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 15 +-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 +++--- 2 files changed, 16 insertions(

[PATCH 06/15] tcp: Fix conditions to determine checksum offload

2015-11-19 Thread Tom Herbert
In tcp_send_sendpage and tcp_sendmsg we check the route capabilities to determine if checksum offload can be performed. This check currently does not take the IP protocol into account for devices that advertise only one of NETIF_F_IPV6_CSUM or NETIF_F_IP_CSUM. This patch adds a function to check ca

[PATCH 04/15] net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK

2015-11-19 Thread Tom Herbert
The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the set of features for offloading all checksums. This a mask of the checksum offload related features bits. It is incorrect to set both NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for features of a device

[PATCH 14/15] mlx4: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 16 ++-- 2 files changed, 17 insertions(+),

[PATCH 05/15] net: Eliminate NETIF_F_GEN_CSUM and NETIF_F_V[46]_CSUM

2015-11-19 Thread Tom Herbert
These netif flags are unnecessary convolutions. It is more straightforward to just use NETIF_F_HW_CSUM, NETIF_F_IP_CSUM, and NETIF_F_IPV6_CSUM directly. This patch also: - Cleans up can_checksum_protocol - Simplifies netdev_intersect_features Signed-off-by: Tom Herbert --- drivers/net/e

  1   2   >