[PATCH net 1/2] ipvlan: NULL pointer dereference panic in ipvlan_port_destroy

2017-10-31 Thread Girish Moodalbail
When call to register_netdevice() (called from ipvlan_link_new()) fails, we call ipvlan_uninit() (through ndo_uninit()) to destroy the ipvlan port. Upon returning unsuccessfully from register_netdevice() we go ahead and call ipvlan_port_destroy() again which causes NULL pointer dereference panic.

[PATCH net 0/2] NULL pointer dereference in {ipvlan|macvlan}_port_destroy

2017-10-31 Thread Girish Moodalbail
>From code inspection it appeared that there is a possibility where in ipvlan_port_destroy() might be dealing with a port (struct ipvl_port) that has already been destroyed and is therefore already NULL. However, we don't check for NULL and continue to access the fields which results in a kernel

[PATCH net 2/2] macvlan: NULL pointer dereference panic in macvlan_port_destroy

2017-10-31 Thread Girish Moodalbail
When call to register_netdevice() (called from macvlan_common_newlink()) fails, we call macvlan_uninit() (through ndo_uninit()) to destroy the macvlan port. Upon returning unsuccessfully from register_netdevice() we go ahead and call macvlan_port_destroy() again which causes NULL pointer

Re: [iproute PATCH 3/3] ss: Fix width calculations when Netid or State columns are missing

2017-10-31 Thread Stefano Brivio
On Tue, 31 Oct 2017 17:55:06 +0100 Stephen Hemminger wrote: > On Sun, 29 Oct 2017 21:22:34 +0100 > Stefano Brivio wrote: > > > + addrp_width -= netid_width + 1 * !!netid_width; > > + addrp_width -= state_width + 1 * !!state_width; > >

Re: [PATCH iproute2] tc: m_ife: fix match tcindex parsing

2017-10-31 Thread Stephen Hemminger
On Mon, 30 Oct 2017 12:37:49 -0400 Alexander Aring wrote: > This patch changes ife_prio to ife_tcindex which is right variable to > assign in the argument in this case. > > Signed-off-by: Alexander Aring > --- > Found by inspection the code. Good catch.

Re: [iproute PATCH 3/3] ss: Fix width calculations when Netid or State columns are missing

2017-10-31 Thread Stephen Hemminger
On Sun, 29 Oct 2017 21:22:34 +0100 Stefano Brivio wrote: > + addrp_width -= netid_width + 1 * !!netid_width; > + addrp_width -= state_width + 1 * !!state_width; Doing !! here is being too bit tricky for code that is not performance sensitive. Just use an if

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 07:09:58 -0700 Eric Dumazet wrote: > On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: > > RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering > > guarantees (see the comment in rcupdate.h). This is also not a hotpath. > >

Re: [PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:02 +0100 Vitaly Kuznetsov wrote: > @@ -2002,7 +2002,9 @@ static int netvsc_probe(struct hv_device *dev, > device_info.recv_sections = NETVSC_DEFAULT_RX; > device_info.recv_section_size = NETVSC_RECV_SECTION_SIZE; > > + rtnl_lock();

Re: [PATCH net-next V2 3/3] tun: add eBPF based queue selection method

2017-10-31 Thread Michael S. Tsirkin
On Tue, Oct 31, 2017 at 06:32:18PM +0800, Jason Wang wrote: > This patch introduces an eBPF based queue selection method based on > the flow steering policy ops. Userspace could load an eBPF program > through TUNSETSTEERINGEBPF. This gives much more flexibility compare > to simple but hard coded

Re: [RFC PATCH 1/5] security: Add support for SCTP security hooks

2017-10-31 Thread Marcelo Ricardo Leitner
On Tue, Oct 17, 2017 at 03:02:47PM +0100, Richard Haines wrote: > The SCTP security hooks are explained in: > Documentation/security/LSM-sctp.txt > > Signed-off-by: Richard Haines > --- > Documentation/security/LSM-sctp.txt | 212 >

[PATCH net-next 3/4] l2tp: remove l2tp_tunnel_count and l2tp_session_count

2017-10-31 Thread Guillaume Nault
These variables have never been used. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_core.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 216f49aec16f..7c8d1eb757a5 100644 --- a/net/l2tp/l2tp_core.c +++

Re: [PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:01 +0100 Vitaly Kuznetsov wrote: > It was found that in some cases host refuses to teardown GPADL for send/ > receive buffers (probably when some work with these buffere is scheduled or > ongoing). Change the teardown logic to be: > 1) Send

[PATCH net-next 1/4] l2tp: remove ->ref() and ->deref()

2017-10-31 Thread Guillaume Nault
The ->ref() and ->deref() callbacks are unused since PPP stopped using them in ee40fb2e1eb5 ("l2tp: protect sock pointer of struct pppol2tp_session with RCU"). We can thus remove them from struct l2tp_session and drop the do_ref parameter of l2tp_session_get*(). Signed-off-by: Guillaume Nault

[PATCH net-next 4/4] l2tp: remove field 'dev' from struct l2tp_eth

2017-10-31 Thread Guillaume Nault
This field has never been used. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_eth.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index d29bfee291cb..3e2dec1fb0f5 100644 --- a/net/l2tp/l2tp_eth.c +++

[PATCH net-next 2/4] l2tp: remove l2tp specific refcount debugging

2017-10-31 Thread Guillaume Nault
With conversion to refcount_t, such manual debugging code doesn't make sense anymore. The tunnel part was already dropped by 54652eb12c1b ("l2tp: hold tunnel while looking up sessions in l2tp_netlink"). Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_core.h | 24

[PATCH net-next 0/4] l2tp: remove unused code

2017-10-31 Thread Guillaume Nault
Patch #1 removes the ref/deref mechanism that was originally used to prevent ppp pseudowires from dropping their sockets. This mechanism was error prone and isn't used anymore. Patch #2 removes some module specific refcount debugging. Patches #3 and #4 take care of some dead code. Guillaume

Re: [PATCH net-next] vhost_net: conditionally enable tx polling

2017-10-31 Thread Michael S. Tsirkin
On Tue, Oct 31, 2017 at 06:27:20PM +0800, Jason Wang wrote: > We always poll tx for socket, this is sub optimal since: > > - we only want to be notified when sndbuf is available > - this will slightly increase the waitqueue traversing time and more > important, vhost could not benefit from

Re: [PATCH iproute2/net-next]tc: B.W limits can now be specified in %

2017-10-31 Thread Stephen Hemminger
On Sat, 28 Oct 2017 22:57:00 +0530 Nishanth Devarajan wrote: > > +int read_prop(char *dev, char *prop, long *value) > +{ > + char fname[41], buf[80], *endp; > + ssize_t len; > + int fd; > + long result; > + > + sprintf(fname, "/sys/class/net/%s/%s", dev,

Re: [RFC net-next 4/4] net: phy: Correctly process PHY_HALTED in phy_stop_machine()

2017-10-31 Thread Florian Fainelli
On 10/31/2017 08:26 AM, Geert Uytterhoeven wrote: > Hi Florian, > > On Mon, Oct 30, 2017 at 5:09 PM, Florian Fainelli > wrote: >> On 10/30/2017 06:56 AM, Geert Uytterhoeven wrote: >>> On Thu, Oct 26, 2017 at 1:21 AM, Florian Fainelli >>> wrote:

Re: [PATCH net] ipv6: addrconf: increment ifp refcount before ipv6_del_addr()

2017-10-31 Thread Eric Dumazet
On Tue, 2017-10-31 at 10:09 -0600, David Ahern wrote: > Interestingly, I put the failure sequence into a loop and hit the above > path closing in on 1 million times and I am not seeing a memory leak > with our without this patch. > > The above does fix the refcnt and based on other call sites

Re: [PATCH iproute2 1/1] ip netns: use strtol() instead of atoi()

2017-10-31 Thread Stephen Hemminger
On Fri, 27 Oct 2017 12:55:27 -0400 Roman Mashak wrote: > Use strtol-based API to parse and validate integer input; atoi() does not > detect > errors and may yield undefined behaviour if result can't be represented. > > Signed-off-by: Roman Mashak Since

Re: [iproute2, RFC PATCH] flower: Represent HW traffic classes as classid values

2017-10-31 Thread Stephen Hemminger
On Fri, 27 Oct 2017 02:37:44 -0700 Amritha Nambiar wrote: > Use the classid values reserved in the range :ffe0 - :ffef > to identify hardware traffic classes. > > Example: > Match Dst IPv4,Dst Port and route to TC1: > # tc filter add dev eth0 protocol ip parent :\

Re: [PATCH iproute2 1/1] ip: added missing newline in man page

2017-10-31 Thread Stephen Hemminger
On Fri, 27 Oct 2017 15:05:34 -0400 Roman Mashak wrote: > Signed-off-by: Roman Mashak Applied

[PATCH] net: recvmsg: Unconditionally zero struct sockaddr_storage

2017-10-31 Thread Kees Cook
Some protocols do not correctly wipe the contents of the on-stack struct sockaddr_storage sent down into recvmsg() (e.g. SCTP), and leak kernel stack contents to userspace. This wipes it unconditionally before per-protocol handlers run. Note that leaks like this are mitigated by building with

Re: [PATCH net] ipv6: addrconf: increment ifp refcount before ipv6_del_addr()

2017-10-31 Thread David Ahern
On 10/30/17 11:47 PM, Eric Dumazet wrote: > From: Eric Dumazet > > In the (unlikely) event fixup_permanent_addr() returns a failure, > addrconf_permanent_addr() calls ipv6_del_addr() without the > mandatory call to in6_ifa_hold(), leading to a refcount error, > spotted by

Re: [PATCH net-next] ppp: Destroy the mutex when cleanup

2017-10-31 Thread Guillaume Nault
On Tue, Oct 31, 2017 at 06:25:37PM +0800, gfree.w...@vip.163.com wrote: > From: Gao Feng > > The mutex_destroy only makes sense when enable DEBUG_MUTEX. For the > good readbility, it's better to invoke it in exit func when the init > func invokes mutex_init. > >

[PATCH 0/2][v2] Add the ability to do BPF directed error injection

2017-10-31 Thread Josef Bacik
v1->v2: - moved things around to make sure that bpf_override_return could really only be used for an ftrace kprobe. - killed the special return values from trace_call_bpf. - renamed pc_modified to bpf_kprobe_state so bpf_override_return could tell if it was being called from an ftrace kprobe

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-10-31 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-10-31 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Signed-off-by: Josef Bacik ---

Re: [RFC net-next 4/4] net: phy: Correctly process PHY_HALTED in phy_stop_machine()

2017-10-31 Thread Geert Uytterhoeven
Hi Florian, On Mon, Oct 30, 2017 at 5:09 PM, Florian Fainelli wrote: > On 10/30/2017 06:56 AM, Geert Uytterhoeven wrote: >> On Thu, Oct 26, 2017 at 1:21 AM, Florian Fainelli >> wrote: >>> Marc reported that he was not getting the PHY library

pull-request: wireless-drivers 2017-10-31

2017-10-31 Thread Kalle Valo
Hi Dave, here's a pull request to net tree for 4.14. Due to the ath10k security issue I would like to get this to 4.14 still. Please let me know if there are any problems. Kalle The following changes since commit a6127b4440d1f74f26b64006b2f50c9dc6d66efc: Merge tag

[patch net-next v3 2/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath

2017-10-31 Thread Jiri Pirko
From: Jiri Pirko In sch_handle_egress and sch_handle_ingress tp->q is used only in order to update stats. So stats and filter list are the only things that are needed in clsact qdisc fastpath processing. Introduce new mini_Qdisc struct to hold those items. Also, introduce a

[patch net-next v3 1/2] net: sched: introduce chain_head_change callback

2017-10-31 Thread Jiri Pirko
From: Jiri Pirko Add a callback that is to be called whenever head of the chain changes. Also provide a callback for the default case when the caller gets a block using non-extended getter. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 14

[patch net-next v3 0/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath

2017-10-31 Thread Jiri Pirko
From: Jiri Pirko This patchset's main patch is patch number 2. It carries the description and changelog. Patch 1 is just a dependency. Jiri Pirko (2): net: sched: introduce chain_head_change callback net: core: introduce mini_Qdisc and eliminate usage of tp->q for

Re: [PATCH net-next v3 2/2] net sched act_vlan: VLAN action rewrite to use RCU lock/unlock and update

2017-10-31 Thread Pieter Jansen van Vuuren
On Tue, 31 Oct 2017 10:16:05 -0400 Manish Kurup wrote: > Hi Pieter, > > On Tue, Oct 31, 2017 at 9:06 AM, Pieter Jansen van Vuuren < > pieter.jansenvanvuu...@netronome.com> wrote: > > > On Sun, 29 Oct 2017 04:47:54 -0400 > > Manish Kurup wrote:

Re: [patch net-next RFC 1/9] net_sch: red: Add offload ability to RED qdisc

2017-10-31 Thread Jiri Pirko
Tue, Oct 31, 2017 at 03:59:08PM CET, dsah...@gmail.com wrote: >On 10/31/17 1:41 AM, Jiri Pirko wrote: >>> >>> If it is read-only, then attempts to set it from userspace should cause >>> the command to fail. >> >> That breaks uapi. Consider existing userspace app sending garbage in >> that bit and

Re: [patch net-next RFC 1/9] net_sch: red: Add offload ability to RED qdisc

2017-10-31 Thread David Ahern
On 10/31/17 1:41 AM, Jiri Pirko wrote: >> >> If it is read-only, then attempts to set it from userspace should cause >> the command to fail. > > That breaks uapi. Consider existing userspace app sending garbage in > that bit and new kernel which randomly fails upon the garbage. > It is called

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Tue, 31 Oct 2017 15:40:06 +0100 > >> Eric Dumazet writes: >> >>> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: RCU_INIT_POINTER() is not suitable here as

[PATCH net-next 2/3] net: dsa: lan9303: Add STP ALR entry on port 0

2017-10-31 Thread Egil Hjelmeland
STP BPDUs arriving on user ports must sent to CPU port only, for processing by the SW bridge. Add an ALR entry with STP state override to fix that. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 2 ++ include/linux/dsa/lan9303.h| 2 ++

[PATCH net-next 1/3] net: dsa: lan9303: Transmit using ALR when unicast

2017-10-31 Thread Egil Hjelmeland
lan9303_xmit_use_arl() introduced in previous patch set is wrong. The chip flood broadcast and unknown multicast frames. The effect is that broadcasts and multicasts are duplicated on egress. It is not possible to configure the chip to direct unknown multicasts to CPU port only. This means that

[PATCH net-next 0/3] net: dsa: lan9303: Fix STP and flooding issues

2017-10-31 Thread Egil Hjelmeland
This patch set finishes the STP support, and fixes flooding issues. Patch 1 fixes a flooding issue in the previous patch set. Patch 2 finishes STP support by adding a ALR entry. Patch 3 prevent duplicate flooding in HW and SW bridge. Egil Hjelmeland (3): net: dsa: lan9303: Transmit using ALR

[PATCH net-next 3/3] net: dsa: lan9303: lan9303_rcv set skb->offload_fwd_mark

2017-10-31 Thread Egil Hjelmeland
The chip flood broadcast and unknown multicast frames. On receive set skb->offload_fwd_mark to prevent the SW from flooding to the same ports. One exception: Because the ALR is set up to forward STP BPDUs only to CPU, the SW bridge should flood STP BPDUs if local STP is not enabled. This is

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread David Miller
From: Vitaly Kuznetsov Date: Tue, 31 Oct 2017 15:40:06 +0100 > Eric Dumazet writes: > >> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: >>> RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering >>> guarantees (see the

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
Eric Dumazet writes: > On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: >> RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering >> guarantees (see the comment in rcupdate.h). This is also not a hotpath. >> >> Signed-off-by: Vitaly Kuznetsov

[PATCH] net: thunderx: remove a couple of redundant assignments

2017-10-31 Thread Colin King
From: Colin Ian King The assignment to pointer msg is redundant as it is never read, so remove msg. Also remove the first assignment to qset as this is not read before the next re-assignment of a new value to qset in the for-loop. Cleans up two clang warnings:

[PATCH v1] MAINTAINERS: Add lib/net_utils.c to NETWORKING (general)

2017-10-31 Thread Andy Shevchenko
It looks like the best place in MAINTAINERS data base to cover this orphaned module. Signed-off-by: Andy Shevchenko --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0630482e701b..474321873fc1 100644 ---

Re: VPLS in Linux

2017-10-31 Thread Roopa Prabhu
On Tue, Oct 31, 2017 at 6:42 AM, Алексей Болдырев wrote: > When will support for VPLS appear in Linux? 08/21/2017 David Lamparter has > already sent these patches, but they are not in the kernel for some reason, > not populi. Such question, when all the same

[PATCH net-next] sfc: support rx-fcs and rx-all

2017-10-31 Thread Edward Cree
Ethernet FCS inclusion (rx-fcs) is supported on EF10 NICs, conditional on a firmware capability bit (MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS). To receive frames with bad FCS (rx-all) we just don't return the discard flag EFX_RX_PKT_DISCARD from efx_ef10_handle_rx_event_errors() or

Re: Problems with mvneta

2017-10-31 Thread Thomas Petazzoni
Hello, Let's add Simon Guinot in the loop. On Tue, 31 Oct 2017 15:23:22 +0100, Sven Müller wrote: > After quite a long time of trying to reproduce the issue without any success > I got 3 network crashes today. And all errors occurred with a kernel > including the patch: > >

Re: Problems with mvneta

2017-10-31 Thread Sven Müller
After quite a long time of trying to reproduce the issue without any success I got 3 network crashes today. And all errors occurred with a kernel including the patch: 2a90f7e1d5d04e4f1060268e0b55a2c702bbd67a At least according to Andreas' and my problems we can exclude the 6ad2 patch as the

[PATCH] net: macb: remove redundant assignment to variable work_done

2017-10-31 Thread Colin King
From: Colin Ian King Variable work_done is set to zero and this value is never read, instead it is set to another value a few statements later. Remove the redundant assignment. Cleans up clang warning: drivers/net/ethernet/cadence/macb_main.c:1221:2: warning: Value

[RFC v2 PATCH 02/11] decnet: Move dn_next into decnet route structure.

2017-10-31 Thread David S. Miller
Signed-off-by: David S. Miller --- include/net/dn_route.h | 1 + include/net/dst.h | 1 - net/decnet/dn_route.c | 34 ++ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/include/net/dn_route.h b/include/net/dn_route.h

[RFC v2 PATCH 08/11] xfrm: Move dst->path into struct xfrm_dst

2017-10-31 Thread David S. Miller
The first member of an IPSEC route bundle chain sets it's dst->path to the underlying ipv4/ipv6 route that carries the bundle. Stated another way, if one were to follow the xfrm_dst->child chain of the bundle, the final non-NULL pointer would be the path and point to either an ipv4 or an ipv6

[RFC v2 PATCH 07/11] ipv6: Move dst->from into struct rt6_info.

2017-10-31 Thread David S. Miller
The dst->from value is only used by ipv6 routes to track where a route "came from". Any time we clone or copy a core ipv6 route in the ipv6 routing tables, we have the copy/clone's ->from point to the base route. This is used to handle route expiration properly. Only ipv6 uses this mechanism,

[RFC v2 PATCH 10/11] xfrm: Stop using dst->next in bundle construction.

2017-10-31 Thread David S. Miller
While building ipsec bundles, blocks of xfrm dsts are linked together using dst->next from bottom to the top. The only thing this is used for is initializing the pmtu values of the xfrm stack, and for updating the mtu values at xfrm_bundle_ok() time. The bundle pmtu entries must be processed in

[RFC v2 PATCH 09/11] net: Rearrange dst_entry layout to avoid useless padding.

2017-10-31 Thread David S. Miller
We have padding to try and align the refcount on a separate cache line. But after several simplifications the padding has increased substantially. So now it's easy to change the layout to get rid of the padding entirely. We group the write-heavy __refcnt and __use with less often used items

[RFC v2 PATCH 06/11] xfrm: Move child route linkage into xfrm_dst.

2017-10-31 Thread David S. Miller
XFRM bundle child chains look like this: xdst1 --> xdst2 --> xdst3 --> path_dst All of xdstN are xfrm_dst objects and xdst->u.dst.xfrm is non-NULL. The final child pointer in the chain, here called 'path_dst', is some other kind of route such as an ipv4 or ipv6 one. The xfrm output path

[RFC v2 PATCH 00/11] net: Significantly shrink the size of routes.

2017-10-31 Thread David S. Miller
Through a combination of several things, our route structures are larger than they need to be. Mostly this stems from having members in dst_entry which are only used by one class of routes. So the majority of the work in this series is about "un-commoning" these members and pushing them into the

[RFC v2 PATCH 01/11] net: dst->rt_next is unused.

2017-10-31 Thread David S. Miller
Delete it. Signed-off-by: David S. Miller --- include/net/dst.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/net/dst.h b/include/net/dst.h index 2f53ecc2c296..1551fdeadc7a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -100,7 +100,6 @@ struct

[RFC v2 PATCH 04/11] net: Create and use new helper xfrm_dst_child().

2017-10-31 Thread David S. Miller
Only IPSEC routes have a non-NULL dst->child pointer. And IPSEC routes are identified by a non-NULL dst->xfrm pointer. Signed-off-by: David S. Miller --- include/net/xfrm.h | 9 + net/core/dst.c | 8 +--- net/ipv4/xfrm4_mode_tunnel.c |

[RFC v2 PATCH 03/11] ipv6: Move rt6_next from dst_entry into ipv6 route structure.

2017-10-31 Thread David S. Miller
Signed-off-by: David S. Miller --- include/net/dst.h | 1 - include/net/ip6_fib.h | 5 +++-- net/ipv6/ip6_fib.c| 26 +- net/ipv6/route.c | 10 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/net/dst.h

[RFC v2 PATCH 05/11] ipsec: Create and use new helpers for dst child access.

2017-10-31 Thread David S. Miller
This will make a future change moving the dst->child pointer less invasive. Signed-off-by: David S. Miller --- include/net/xfrm.h | 5 + net/xfrm/xfrm_policy.c | 47 +++ 2 files changed, 28 insertions(+), 24 deletions(-)

[RFC v2 PATCH 11/11] net: Remove dst->next

2017-10-31 Thread David S. Miller
There are no more users. Signed-off-by: David S. Miller --- include/net/dst.h | 4 net/core/dst.c| 1 - 2 files changed, 5 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index ffd0d81f861f..b0e71091d159 100644 --- a/include/net/dst.h +++

Re: [RFC PATCH] xfrm: fix regression introduced by xdst pcpu cache

2017-10-31 Thread Florian Westphal
Stephen Smalley wrote: > It is a regression; the correct SA was being used prior to the xdst > pcpu cache commit. I don't doubt that at all. I would like to understand why the flow cache did not have this problem. > easily run on a Fedora VM, > git clone

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Eric Dumazet
On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: > RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering > guarantees (see the comment in rcupdate.h). This is also not a hotpath. > > Signed-off-by: Vitaly Kuznetsov > --- >

Re: [RFC PATCH] xfrm: fix regression introduced by xdst pcpu cache

2017-10-31 Thread Stephen Smalley
On Tue, 2017-10-31 at 09:43 -0400, Stephen Smalley wrote: > On Tue, 2017-10-31 at 12:11 +0100, Florian Westphal wrote: > > Stephen Smalley wrote: > > > Since 4.14-rc1, the selinux-testsuite has been encountering > > > sporadic > > > failures during testing of labeled IPSEC.

Re: [PATCH net] tcp: fix tcp_mtu_probe() vs highest_sack

2017-10-31 Thread Neal Cardwell
On Tue, Oct 31, 2017 at 2:08 AM, Eric Dumazet wrote: > From: Eric Dumazet > > Based on SNMP values provided by Roman, Yuchung made the observation > that some crashes in tcp_sacktag_walk() might be caused by MTU probing. > > Looking at

VPLS in Linux

2017-10-31 Thread Алексей Болдырев
When will support for VPLS appear in Linux? 08/21/2017 David Lamparter has already sent these patches, but they are not in the kernel for some reason, not populi. Such question, when all the same these patches will get to a kernel? Here is a link to this email:

[PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split

2017-10-31 Thread Vitaly Kuznetsov
It was found that in some cases host refuses to teardown GPADL for send/ receive buffers (probably when some work with these buffere is scheduled or ongoing). Change the teardown logic to be: 1) Send NVSP_MSG1_TYPE_REVOKE_* messages 2) Close the channel 3) Teardown GPADLs. This seems to work

[PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering guarantees (see the comment in rcupdate.h). This is also not a hotpath. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Vitaly Kuznetsov
rndis_filter_receive() is called from interrupt context and may race with rndis_filter_device_remove() resetting extension pointer. RNDIS_MSG_HALT does not help, host may still send us messages after it. Protect extension pointer with RCU. Signed-off-by: Vitaly Kuznetsov ---

[PATCH net-next 4/4] hv_netvsc: hide warnings about uninitialized/missing rndis device

2017-10-31 Thread Vitaly Kuznetsov
Hyper-V hosts are known to send RNDIS messages even after we halt the device in rndis_filter_halt_device(). Remove user visible messages as they are not really useful. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/rndis_filter.c | 4 ++-- 1 file changed, 2

Re: [RFC PATCH] xfrm: fix regression introduced by xdst pcpu cache

2017-10-31 Thread Stephen Smalley
On Tue, 2017-10-31 at 12:11 +0100, Florian Westphal wrote: > Stephen Smalley wrote: > > Since 4.14-rc1, the selinux-testsuite has been encountering > > sporadic > > failures during testing of labeled IPSEC. git bisect pointed to > > commit ec30d78c14a813db39a647b6a348b4286

[PATCH net-next 0/4] hv_netvsc: fix some crashes and hangs on channel/mtu changes

2017-10-31 Thread Vitaly Kuznetsov
It was found that netvsc driver doesn't survive e.g. # while true; do ethtool -L eth0 combined 4; ethtool -L eth0 combined 8; done" test. I was able to identify several issues: hang in guest/host communication and a couple of crashes. Fix these. While I'm not convinced I'm fixing everything VMs

Re: [PATCH v10 0/8] net: stmmac: dwmac-sun8i: Handle integrated PHY

2017-10-31 Thread Maxime Ripard
On Tue, Oct 31, 2017 at 09:19:07AM +0100, Corentin Labbe wrote: > Hello > > The current way to find if the PHY is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than the integrated one. >

Re: [PATCH net-next] sctp: fix error return code in sctp_send_add_streams()

2017-10-31 Thread Marcelo Ricardo Leitner
On Tue, Oct 31, 2017 at 01:28:16PM +, Wei Yongjun wrote: > Fix to returnerror code -ENOMEM from the sctp_make_strreset_addstrm() > error handling case instead of 0. 'retval' can be overwritten to 0 after > call sctp_stream_alloc_out(). > > Fixes: e090abd0d81c ("sctp: factor out stream->out

[PATCH net-next v2] ipv4: fix validate_source for VRF setup

2017-10-31 Thread Paolo Abeni
David reported breakages of VRF scenarios due to the commit 6e617de84e87 ("net: avoid a full fib lookup when rp_filter is disabled."): the local addresses based test is too strict when VRFs are in place. With this change we fall-back to a full lookup when custom fib rules are in place; so that we

[PATCH net-next] sctp: fix error return code in sctp_send_add_streams()

2017-10-31 Thread Wei Yongjun
Fix to returnerror code -ENOMEM from the sctp_make_strreset_addstrm() error handling case instead of 0. 'retval' can be overwritten to 0 after call sctp_stream_alloc_out(). Fixes: e090abd0d81c ("sctp: factor out stream->out allocation") Signed-off-by: Wei Yongjun ---

Re: [PATCH] net: hso: remove redundant unused variable dev

2017-10-31 Thread Johan Hovold
On Tue, Oct 31, 2017 at 12:01:47PM +, Colin King wrote: > From: Colin Ian King > > The pointer dev is being assigned but is never used, hence it is > redundant and can be removed. Cleans up clang warning: > > drivers/net/usb/hso.c:2280:2: warning: Value stored to

Re: WARNING in kobject_add_internal

2017-10-31 Thread Dmitry Vyukov
On Tue, Oct 31, 2017 at 3:54 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 833e0e2f24fd0525090878f71e129a8a4cb8bf78 > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler:

Re: [PATCH net-next v3 2/2] net sched act_vlan: VLAN action rewrite to use RCU lock/unlock and update

2017-10-31 Thread Pieter Jansen van Vuuren
On Sun, 29 Oct 2017 04:47:54 -0400 Manish Kurup wrote: > Using a spinlock in the VLAN action causes performance issues when the VLAN > action is used on multiple cores. Rewrote the VLAN action to use RCU read > locking for reads and updates instead. > Fixed nxp flower

[RFC PATCH 03/14] packet: enable AF_PACKET V4 rings

2017-10-31 Thread Björn Töpel
From: Björn Töpel Allow creation of AF_PACKET V4 rings. Tx and Rx are still disabled. Signed-off-by: Björn Töpel --- include/linux/tpacket4.h | 391 +++ net/packet/af_packet.c | 262

[RFC PATCH 13/14] i40e: added XDP support for TP4 enabled queue pairs

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson In this commit the packet array learned to execute XDP programs on it's flushable range. This means that before the kernel flush completed/filled Rx frame to userspace, an XDP program will be executed and acted upon. Currently, a packet array

[RFC PATCH 12/14] samples/tpacket4: added veth support

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson This commit adds support for running the benchmark using a veth pair. Signed-off-by: Magnus Karlsson --- samples/tpacket4/tpbench.c | 189 ++--- 1 file changed, 163

[RFC PATCH 14/14] xdp: introducing XDP_PASS_TO_KERNEL for PACKET_ZEROCOPY use

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson This patch introduces XDP_PASS_TO_KERNEL especially for use with PACKET_ZEROCOPY (ZC) and AF_PACKET V4. When ZC is enabled, XDP_PASS will send a packet to the V4 socket so that the application can receive it. If the XDP program would like to send

[RFC PATCH 11/14] veth: added support for PACKET_ZEROCOPY

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson Add AF_PACKET V4 zerocopy support for the veth driver. Signed-off-by: Magnus Karlsson --- drivers/net/veth.c | 172 +++ include/linux/tpacket4.h | 131

[RFC PATCH 09/14] i40e: AF_PACKET V4 ndo_tp4_zerocopy Tx support

2017-10-31 Thread Björn Töpel
From: Björn Töpel Here, egress support for TP4 is added, and hence implementing ndo_tp4_xmit. The ndo_tp4_xmit simply kicks the NAPI context. In the NAPI poll, pulling egress frames from userland, posting the frames to the hardware descriptor queue and clearing completed

[RFC PATCH 10/14] samples/tpacket4: added tpbench

2017-10-31 Thread Björn Töpel
From: Björn Töpel The tpbench program is benchmarking TPACKET_V2 up to TPACKET_V4. There's a bench_all.sh script that makes testing all versions easier. Note that zero-copy means binding the TPACKET_V4 socket to a certain NIC hardware queue, so you'll need to steer your

[RFC PATCH 08/14] i40e: AF_PACKET V4 ndo_tp4_zerocopy Rx support

2017-10-31 Thread Björn Töpel
From: Björn Töpel This commit adds an implementation for ndo_tp4_zerocopy. When an AF_PACKET V4 socket enables zerocopy, it will trigger the ndo_tp4_zerocopy implementation. The selected queue pair is disabled, TP4 mode is enabled and the queue pair is re-enabled.

[RFC PATCH 07/14] packet: wire up zerocopy for AF_PACKET V4

2017-10-31 Thread Björn Töpel
From: Björn Töpel This commits adds support for zerocopy mode. Note that zerocopy mode requires that the network interface has been bound to the socket using the bind syscall, and that the corresponding netdev implements the AF_PACKET V4 ndos. Signed-off-by: Björn Töpel

[RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-10-31 Thread Björn Töpel
From: Björn Töpel This patch adds the necessary AF_PACKET V4 structures for usage from userspace. AF_PACKET V4 is a new interface optimized for high performance packet processing. Signed-off-by: Björn Töpel --- include/uapi/linux/if_packet.h | 65

[RFC PATCH 06/14] netdevice: add AF_PACKET V4 zerocopy ops

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson Two new ndo ops are added. One for enabling/disabling AF_PACKET V4 zerocopy, and one for kicking the egress ring. Signed-off-by: Magnus Karlsson --- include/linux/netdevice.h | 16 1 file changed, 16

[RFC PATCH 05/14] packet: enable Tx support for AF_PACKET V4

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson In this commit AF_PACKET V4 egress support is added. Signed-off-by: Magnus Karlsson --- include/linux/tpacket4.h | 192 +++ net/packet/af_packet.c | 169

[RFC PATCH 04/14] packet: enable Rx for AF_PACKET V4

2017-10-31 Thread Björn Töpel
From: Magnus Karlsson In this commit, ingress support is implemented. Signed-off-by: Magnus Karlsson --- include/linux/tpacket4.h | 361 +++ net/packet/af_packet.c | 83 +++ 2 files

[RFC PATCH 02/14] packet: implement PACKET_MEMREG setsockopt

2017-10-31 Thread Björn Töpel
From: Björn Töpel Here, the PACKET_MEMREG setsockopt is implemented for the AF_PACKET protocol family. PACKET_MEMREG allows the user to register memory regions that can be used by AF_PACKET V4 as packet data buffers. Signed-off-by: Björn Töpel ---

[RFC PATCH 00/14] Introducing AF_PACKET V4 support

2017-10-31 Thread Björn Töpel
From: Björn Töpel This RFC introduces AF_PACKET_V4 and PACKET_ZEROCOPY that are optimized for high performance packet processing and zero-copy semantics. Throughput improvements can be up to 40x compared to V2 and V3 for the micro benchmarks included. Would be great to get

Re: net-next: del_timer_sync(): possible circular locking dependency detected

2017-10-31 Thread Eric Dumazet
On Tue, 2017-10-31 at 11:04 +0100, Jiri Pirko wrote: > Fri, Oct 20, 2017 at 08:07:53AM CEST, eric.duma...@gmail.com wrote: > >On Thu, 2017-10-19 at 22:06 -0700, Andrei Vagin wrote: > >> Hi, > >> > >> We run criu tests on net-next/master regularly, and today tests > >> triggered this warning: > >>

Re: [PATCH net-next] bpf: reduce verifier memory consumption

2017-10-31 Thread Edward Cree
On 30/10/17 21:51, Alexei Starovoitov wrote: > the verifier got progressively smarter over time and size of its internal > state grew as well. Time to reduce the memory consumption. > > Before: > sizeof(struct bpf_verifier_state) = 6520 > After: > sizeof(struct bpf_verifier_state) = 896 Nice! >

[PATCH] net: hso: remove redundant unused variable dev

2017-10-31 Thread Colin King
From: Colin Ian King The pointer dev is being assigned but is never used, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King

[PATCH v2] net: phy: leds: Add support for "link" trigger

2017-10-31 Thread Maciej S. Szmigiero
Currently, we create a LED trigger for any link speed known to a PHY. These triggers only fire when their exact link speed had been negotiated (they aren't cumulative, that is, they don't fire for "their or any higher" link speed). What we are missing, however, is a trigger which will fire on any

<    1   2   3   4   >