Re: [PATCH net-next v2 7/9] net: use core MTU range checking in misc drivers

2016-10-20 Thread Rémi Denis-Courmont
Acked-by: Rémi Denis-Courmont -- Rémi Denis-Courmont http://www.remlab.net/CV.pdf

[PATCH net 1/1] bnx2x: Use the correct divisor value for PHC clock readings.

2016-10-20 Thread Sony.Chacko
From: Sudarsana Reddy Kalluru Time Sync (PTP) implementation uses the divisor/shift value for converting the clock ticks to nanoseconds. Driver currently defines shift value as 1, this results in the nanoseconds value to be calculated as half the actual value. Hence the user application fails to

Re: [PATCH] net: cpsw: fix obtaining mac address for am3517

2016-10-20 Thread Tony Lindgren
* Jeroen Hofstee [161020 12:57]: > Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac > id to common file") did not only move the code for an am3517, it also > added the slave parameter, resulting in a invalid (all zero) mac address > being returned. So change it back to alwa

network packet kernel rate limit

2016-10-20 Thread YUAN Linyu
User space application require linux kernel to do rate limit to some type of Ethernet packet(ARP, ICMP, TCP, for example 1000 packet/s) when system run under Ethernet packet flooding test. Do you know if kernel already exist a feature to implement this requirement? Thanks

[PATCH net-next 1/1] driver: tun: Forbid to set IFF_TUN and IFF_TAP at the same time

2016-10-20 Thread fgao
From: Gao Feng Current tun driver permits the ifr_flags is set with IFF_TUN and IFF_TAP at the same time. But actually there is only IFF_TUN flag works. And it does not make sense these two flags are set, so add this check. Signed-off-by: Gao Feng --- drivers/net/tun.c | 4 1 file changed

Re: [PATCH v6 0/6] Add eBPF hooks for cgroups

2016-10-20 Thread David Ahern
On 9/19/16 10:43 AM, Daniel Mack wrote: > This is v6 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

Re: [PATCH] kexec: Export kexec_in_progress to modules

2016-10-20 Thread Eric W. Biederman
David Miller writes: > From: Florian Fainelli > Date: Thu, 20 Oct 2016 18:15:16 -0700 > >> The bcm_sf2 driver uses kexec_in_progress to know whether it can power >> down an integrated PHY during shutdown, and can be built as a module. >> Other modules may be using this in the future, so export i

Re: [PATCH] net: skip genenerating uevents for network namespaces that are exiting

2016-10-20 Thread Andrey Vagin
On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: >> No one can see these events, because a network namespace can not be >> destroyed, if it has sockets. >> > > Are you sure? kobject_uevent_env() seems sending uevents to all > network namespa

Re: [Patch net] net: saving irq context for peernet2id()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 4:35 PM, Cong Wang wrote: > Since you want to test SELinux anyway, please test the attached one. > Finally my kernel config is friendly to SELinux, and now there are several tests fails: Test Summary Report --- sysctl/test (Wstat: 0 Tests: 4 Fai

Re: [PATCH net-next v12 8/9] openvswitch: allow L3 netdev ports

2016-10-20 Thread Pravin Shelar
On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: > Allow ARPHRD_NONE interfaces to be added to ovs bridge. > > Based on previous versions by Lorand Jakab and Simon Horman. > > Signed-off-by: Lorand Jakab > Signed-off-by: Simon Horman > Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar

Re: [PATCH net-next v12 7/9] openvswitch: add Ethernet push and pop actions

2016-10-20 Thread Pravin Shelar
On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: > It's not allowed to push Ethernet header in front of another Ethernet > header. > > It's not allowed to pop Ethernet header if there's a vlan tag. This > preserves the invariant that L3 packet never has a vlan tag. > > Based on previous versions

Re: [PATCH net-next v12 6/9] openvswitch: netlink: support L3 packets

2016-10-20 Thread Pravin Shelar
On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: > Extend the ovs flow netlink protocol to support L3 packets. Packets without > OVS_KEY_ATTR_ETHERNET attribute specify L3 packets; for those, the > OVS_KEY_ATTR_ETHERTYPE attribute is mandatory. > > Push/pop vlan actions are only supported for Eth

Re: [PATCH net-next v12 5/9] openvswitch: add processing of L3 packets

2016-10-20 Thread Pravin Shelar
On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: > Support receiving, extracting flow key and sending of L3 packets (packets > without an Ethernet header). > > Note that even after this patch, non-Ethernet interfaces are still not > allowed to be added to bridges. Similarly, netlink interface for

Re: [PATCH net] net: remove MTU limits on a few ether_setup callers

2016-10-20 Thread Florian Fainelli
Le 20/10/2016 à 20:25, Jarod Wilson a écrit : > These few drivers call ether_setup(), but have no ndo_change_mtu, and thus > were overlooked for changes to MTU range checking behavior. They > previously had no range checks, so for feature-parity, set their min_mtu > to 0 and max_mtu to ETH_MAX_MTU

Re: [PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers

2016-10-20 Thread Michael S. Tsirkin
On Thu, Oct 20, 2016 at 10:37:20PM -0400, Jarod Wilson wrote: > On Thu, Oct 20, 2016 at 11:23:54PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 20, 2016 at 01:55:21PM -0400, Jarod Wilson wrote: > ... > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > > index fad84f3..720

[PATCH net] net: remove MTU limits on a few ether_setup callers

2016-10-20 Thread Jarod Wilson
These few drivers call ether_setup(), but have no ndo_change_mtu, and thus were overlooked for changes to MTU range checking behavior. They previously had no range checks, so for feature-parity, set their min_mtu to 0 and max_mtu to ETH_MAX_MTU (65535), instead of the 68 and 1500 inherited from the

Re: [PATCH 1/4] kconfig: introduce the "imply" keyword

2016-10-20 Thread Nicolas Pitre
On Thu, 20 Oct 2016, Nicolas Pitre wrote: > On Thu, 20 Oct 2016, Edward Cree wrote: > > > I'm interpreting "imply" as being more a way of saying "if you want FOO you > > probably want BAZ as well". But maybe that should be yet another new > > keyword if it's so different from what you want "impl

Re: [PATCH] net: l2tp_eth: fix max_mtu

2016-10-20 Thread Jarod Wilson
On Thu, Oct 20, 2016 at 09:19:29PM +, Asbjoern Sloth Toennesen wrote: > On Thu, 20 Oct 2016 20:08:26 + (UTC), a...@asbjorn.biz wrote: > > diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c > > index 965f7e3..ba82dcc 100644 > > --- a/net/l2tp/l2tp_eth.c > > +++ b/net/l2tp/l2tp_eth.c > >

Re: [PATCH] net: skip genenerating uevents for network namespaces that are exiting

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: > No one can see these events, because a network namespace can not be > destroyed, if it has sockets. > Are you sure? kobject_uevent_env() seems sending uevents to all network namespaces.

[PATCH net-next] net: allow to kill a task which waits net_mutex in copy_new_ns

2016-10-20 Thread Andrei Vagin
From: Andrey Vagin net_mutex can be locked for a long time. It may be because many namespaces are being destroyed or many processes decide to create a network namespace. Both these operations are heavy, so it is better to have an ability to kill a process which is waiting net_mutex. Cc: "David

[PATCH] net: skip genenerating uevents for network namespaces that are exiting

2016-10-20 Thread Andrei Vagin
No one can see these events, because a network namespace can not be destroyed, if it has sockets. My experiments shows that net namespaces are destroyed more 30% faster with this optimization. Here is a perf output for destroying network namespaces without this patch. - 94.76% 0.02% kwork

Re: [PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers

2016-10-20 Thread Jarod Wilson
On Thu, Oct 20, 2016 at 11:23:54PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 20, 2016 at 01:55:21PM -0400, Jarod Wilson wrote: ... > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..720809f 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/vir

Re: [PATCH net] udp: must lock the socket in udp_disconnect()

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 18:12 -0700, Cong Wang wrote: > If this is the cause of the hashlist corruption (I am still unsure about > this), > then why only UDP? Don't all of those using ip4_datagram_connect() > as ->connect() and using udp_disconnect() as ->disconnect() need this fix? > > For exampl

Re: [PATCH] kexec: Export kexec_in_progress to modules

2016-10-20 Thread David Miller
From: Florian Fainelli Date: Thu, 20 Oct 2016 18:15:16 -0700 > The bcm_sf2 driver uses kexec_in_progress to know whether it can power > down an integrated PHY during shutdown, and can be built as a module. > Other modules may be using this in the future, so export it. > > Fixes: 2399d6143f85 ("n

linux-next: manual merge of the staging tree with the net-next tree

2016-10-20 Thread Stephen Rothwell
Hi Greg, Today's linux-next merge of the staging tree got a conflict in: drivers/staging/wlan-ng/p80211netdev.c between commit: 9c22b4a34edd ("net: use core MTU range checking in wireless drivers") from the net-next tree and commit: 84ad1efa7d2b ("staging: wlan-ng: fix block comment war

[PATCH] kexec: Export kexec_in_progress to modules

2016-10-20 Thread Florian Fainelli
The bcm_sf2 driver uses kexec_in_progress to know whether it can power down an integrated PHY during shutdown, and can be built as a module. Other modules may be using this in the future, so export it. Fixes: 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels") Signed-off

Re: [PATCH net] udp: must lock the socket in udp_disconnect()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 9:39 AM, Eric Dumazet wrote: > From: Eric Dumazet > > Baozeng Ding reported KASAN traces showing uses after free in > udp_lib_get_port() and other related UDP functions. > > A CONFIG_DEBUG_PAGEALLOC=y kernel would eventually crash. > > I could write a reproducer with two t

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

2016-10-20 Thread Florian Fainelli
gt; >>>> 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd >>>> kernels") >>>> >>>> I used the version of the net tree from next-20161020 for today. >>> >>> OK, seems like we need an ifdef CONFIG

RE: [PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers

2016-10-20 Thread Kershner, David A
> -Original Message- > From: Haiyang Zhang [mailto:haiya...@microsoft.com] > Sent: Thursday, October 20, 2016 2:05 PM > To: Jarod Wilson ; linux-ker...@vger.kernel.org > Cc: netdev@vger.kernel.org; virtualizat...@lists.linux-foundation.org; KY > Srinivasan ; Michael S. Tsirkin ; > Shrikri

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

2016-10-20 Thread Stephen Rothwell
gt;> multi_v7_defconfig) failed like this: > >> > >> ERROR: "kexec_in_progress" [drivers/net/dsa/bcm_sf2.ko] undefined! > >> > >> Caused by commit > >> > >> 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd

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

2016-10-20 Thread Florian Fainelli
_progress" [drivers/net/dsa/bcm_sf2.ko] undefined! >> >> Caused by commit >> >> 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd >> kernels") >> >> I used the version of the net tree from next-20161020 for today. > >

Re: [Patch net v2] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 3:10 PM, Eric Dumazet wrote: > > I used 'I wonder if' to say that we might have some better way to code > this test nowadays, but this can be done in a separate patch of course. OK, let's keep one bugfix in one patch. ;)

linux-next: manual merge of the net-next tree with the net tree

2016-10-20 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/ibm/ibmvnic.c between commit: 87737f8810db ("ibmvnic: Update MTU after device initialization") from the net tree and commit: d894be57ca92 ("ethernet: use net core MTU range checking in more dri

Re: [Patch net] net: saving irq context for peernet2id()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 12:07 PM, Paul Moore wrote: > On Thu, Oct 20, 2016 at 2:29 PM, Cong Wang wrote: >> On Thu, Oct 20, 2016 at 7:58 AM, Stephen Smalley wrote: >>> On 10/20/2016 02:52 AM, Cong Wang wrote: A kernel warning inside __local_bh_enable_ip() was reported by people running

RE: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF support

2016-10-20 Thread Vatsavayi, Raghu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, October 20, 2016 1:57 PM > To: Vatsavayi, Raghu > Cc: netdev@vger.kernel.org; Chickles, Derek; Burla, Satananda; Manlunas, > Felix > Subject: Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for

Re: [PATCH 05/10] gpio: Introduce SAM gpio driver

2016-10-20 Thread Linus Walleij
n Fri, Oct 7, 2016 at 5:18 PM, Pantelis Antoniou wrote: > From: Guenter Roeck > > The SAM GPIO IP block is present in the Juniper PTX series > of routers as part of the SAM FPGA. > > Signed-off-by: Georgi Vlaev > Signed-off-by: Guenter Roeck > Signed-off-by: Rajat Jain > [Ported from Juniper

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

2016-10-20 Thread Florian Fainelli
> > 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd > kernels") > > I used the version of the net tree from next-20161020 for today. OK, seems like we need an ifdef CONFIG_KEXEC_CORE, let me fix that. Thanks Stephen! -- Florian

[PATCH net-next 1/2] bpf: add helper for retrieving current numa node id

2016-10-20 Thread Daniel Borkmann
Use case is mainly for soreuseport to select sockets for the local numa node, but since generic, lets also add this for other networking and tracing program types. Suggested-by: Eric Dumazet Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- include/linux/bpf.h | 1 + includ

[PATCH net-next 0/2] Add BPF numa id helper

2016-10-20 Thread Daniel Borkmann
This patch set adds a helper for retrieving current numa node id and a test case for SO_REUSEPORT. Thanks! Daniel Borkmann (2): bpf: add helper for retrieving current numa node id reuseport, bpf: add test case for bpf_get_numa_node_id include/linux/bpf.h | 1 +

[PATCH net-next 2/2] reuseport, bpf: add test case for bpf_get_numa_node_id

2016-10-20 Thread Daniel Borkmann
The test case is very similar to reuseport_bpf_cpu, only that here we select socket members based on current numa node id. # numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 12 13 14 15 16 17 node 0 size: 128867 MB node 0 free: 120080 MB node 1 cpus: 6 7 8 9 10 11 18 19 20

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

2016-10-20 Thread Stephen Rothwell
t;) I used the version of the net tree from next-20161020 for today. -- Cheers, Stephen Rothwell

Unexpected behaviour of suppress_prefixlength 0

2016-10-20 Thread Matthias Peter Walther
Hello, I'm Matthias and I'm new to this list. I just signed up, to ask the following question. I have a configuration like this: root@des1 ~ # ip rule 0:from all lookup local 32765:from all iif lo lookup ffnet suppress_prefixlength 0 32766:from all lookup main 32767:from all l

Re: [Patch net v2] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 14:35 -0700, Cong Wang wrote: > On Thu, Oct 20, 2016 at 6:47 AM, Eric Dumazet wrote: > > On Wed, 2016-10-19 at 23:35 -0700, Cong Wang wrote: > >> Baozeng reported this deadlock case: > > > > ... > > > >> + > >> +void ipv6_sock_mc_close(struct sock *sk) > >> +{ > >> + stru

Re: [Patch net v2] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 6:47 AM, Eric Dumazet wrote: > On Wed, 2016-10-19 at 23:35 -0700, Cong Wang wrote: >> Baozeng reported this deadlock case: > > ... > >> + >> +void ipv6_sock_mc_close(struct sock *sk) >> +{ >> + struct ipv6_pinfo *np = inet6_sk(sk); >> + >> + if (!rcu_access_pointer(

Re: [PATCH] net: l2tp_eth: fix max_mtu

2016-10-20 Thread Asbjoern Sloth Toennesen
On Thu, 20 Oct 2016 20:08:26 + (UTC), a...@asbjorn.biz wrote: > diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c > index 965f7e3..ba82dcc 100644 > --- a/net/l2tp/l2tp_eth.c > +++ b/net/l2tp/l2tp_eth.c > @@ -259,6 +259,7 @@ static int l2tp_eth_create(struct net *net, u32 > tunnel_id, u32

RE: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF support

2016-10-20 Thread Vatsavayi, Raghu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, October 20, 2016 1:57 PM > To: Vatsavayi, Raghu > Cc: netdev@vger.kernel.org; Chickles, Derek; Burla, Satananda; Manlunas, > Felix > Subject: Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for

[Patch net] ipv4: use the right lock for ping_group_range

2016-10-20 Thread Cong Wang
This reverts commit a681574c99be23e4d20b769bf0e543239c364af5 ("ipv4: disable BH in set_ping_group_range()") because we never read ping_group_range in BH context (unlike local_port_range). Then, since we already have a lock for ping_group_range, those using ip_local_ports.lock for ping_group_range

[PATCH net-next] net/sched: em_meta: Fix 'meta vlan' to correctly recognize zero VID frames

2016-10-20 Thread Shmulik Ladkani
META_COLLECTOR int_vlan_tag() assumes that if the accel tag (vlan_tci) is zero, then no vlan accel tag is present. This is incorrect for zero VID vlan accel packets, making the following match fail: tc filter add ... basic match 'meta(vlan mask 0xfff eq 0)' ... Apparently 'int_vlan_tag' was imp

Re: [PATCH net-next v5 2/3] udp: implement memory accounting helpers

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 22:31 +0200, Paolo Abeni wrote: > + > +int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb) > +{ > + struct sk_buff_head *list = &sk->sk_receive_queue; > + int rmem, delta, amt, err = -ENOMEM; > + int size = skb->truesize; > + > + /* try to avo

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 14:00 -0700, Cong Wang wrote: > Error prone vs. space saving, it's up to you... > > But clearly current code is still broken even after your patch. I will send > a revert + previous typo fix. Yes please do.

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 1:43 PM, Eric Dumazet wrote: > On Thu, 2016-10-20 at 12:44 -0700, Cong Wang wrote: >> On Thu, Oct 20, 2016 at 12:40 PM, Cong Wang wrote: >> > On Thu, Oct 20, 2016 at 12:32 PM, Cong Wang >> > wrote: >> >> On Thu, Oct 20, 2016 at 10:26 AM, Eric Dumazet >> >> wrote: >> >>

Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF support

2016-10-20 Thread David Miller
From: "Vatsavayi, Raghu" Date: Thu, 20 Oct 2016 20:01:37 + > > >> -Original Message- >> From: David Miller [mailto:da...@davemloft.net] >> Sent: Thursday, October 20, 2016 11:13 AM >> To: Vatsavayi, Raghu >> Cc: netdev@vger.kernel.org; Vatsavayi, Raghu; Chickles, Derek; Burla, >> Sa

Re: [PATCH net] udp: must lock the socket in udp_disconnect()

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 14:46 -0400, David Miller wrote: > > Applied, sounds like I should queue this up for -stable too right? Yes, I believe all stable versions have this bug. Thanks.

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Eric Dumazet
On Thu, 2016-10-20 at 12:44 -0700, Cong Wang wrote: > On Thu, Oct 20, 2016 at 12:40 PM, Cong Wang wrote: > > On Thu, Oct 20, 2016 at 12:32 PM, Cong Wang > > wrote: > >> On Thu, Oct 20, 2016 at 10:26 AM, Eric Dumazet > >> wrote: > >>> From: Eric Dumazet > >>> > >>> In commit 4ee3bd4a8c746 ("ip

[PATCH net-next v5 3/3] udp: use it's own memory accounting schema

2016-10-20 Thread Paolo Abeni
Completely avoid default sock memory accounting and replace it with udp-specific accounting. Since the new memory accounting model encapsulates completely the required locking, remove the socket lock on both enqueue and dequeue, and avoid using the backlog on enqueue. Be sure to clean-up rx queue

[PATCH net-next v5 2/3] udp: implement memory accounting helpers

2016-10-20 Thread Paolo Abeni
Avoid using the generic helpers. Use the receive queue spin lock to protect the memory accounting operation, both on enqueue and on dequeue. On dequeue perform partial memory reclaiming, trying to leave a quantum of forward allocated memory. On enqueue use a custom helper, to allow some optimizat

[PATCH net-next v5 1/3] net/socket: factor out helpers for memory and queue manipulation

2016-10-20 Thread Paolo Abeni
Basic sock operations that udp code can use with its own memory accounting schema. No functional change is introduced in the existing APIs. v4 -> v5: - avoid whitespace changes v2 -> v4: - avoid exporting __sock_enqueue_skb v1 -> v2: - avoid export sock_rmem_free Acked-by: Hannes Frederic

[PATCH net-next v5 0/3] udp: refactor memory accounting

2016-10-20 Thread Paolo Abeni
This patch series refactor the udp memory accounting, replacing the generic implementation with a custom one, in order to remove the needs for locking the socket on the enqueue and dequeue operations. The socket backlog usage is dropped, as well. The first patch factor out pieces of some queue and

Re: [PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers

2016-10-20 Thread Michael S. Tsirkin
On Thu, Oct 20, 2016 at 01:55:21PM -0400, Jarod Wilson wrote: > hyperv_net: > - set min/max_mtu, per Haiyang, after rndis_filter_device_add > > virtio_net: > - set min/max_mtu > - remove virtnet_change_mtu > vmxnet3: > - set min/max_mtu > > xen-netback: > - min_mtu = 0, max_mtu = 65517 > > xen-n

RE: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF support

2016-10-20 Thread Vatsavayi, Raghu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, October 20, 2016 11:13 AM > To: Vatsavayi, Raghu > Cc: netdev@vger.kernel.org; Vatsavayi, Raghu; Chickles, Derek; Burla, > Satananda; Manlunas, Felix > Subject: Re: [PATCH net-next V2 1/9] liquidio CN

[PATCH] net: l2tp_eth: fix max_mtu

2016-10-20 Thread Asbjoern Sloth Toennesen
Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") CC: netdev@vger.kernel.org CC: Jarod Wilson Signed-off-by: Asbjoern Sloth Toennesen --- net/l2tp/l2tp_eth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index 965f7e3..ba82dcc

Re: [PATCH 1/4] kconfig: introduce the "imply" keyword

2016-10-20 Thread Nicolas Pitre
On Thu, 20 Oct 2016, Edward Cree wrote: > On 20/10/16 19:29, Nicolas Pitre wrote: > > On Thu, 20 Oct 2016, Edward Cree wrote: > >> But the desire is a property of the user, not of the driver. If you're > >> willing to add CONFIG_FOO_BAZ to every combination of (driver, subsystem) > >> then "imply

Re: [PATCH] davinci_emac: fix setting the mac from DT

2016-10-20 Thread Jeroen Hofstee
Hi, On 20-10-16 14:41, Tony Lindgren wrote: * Jeroen Hofstee [161019 12:39]: commit 9120bd6e9f77 ("net: davinci_emac: Get device dm816x MAC address using the cpsw code") sets the mac address to the one stored in the chip unconditionally, overwritten the one already set from the device tree. T

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 12:40 PM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 12:32 PM, Cong Wang wrote: >> On Thu, Oct 20, 2016 at 10:26 AM, Eric Dumazet >> wrote: >>> From: Eric Dumazet >>> >>> In commit 4ee3bd4a8c746 ("ipv4: disable BH when changing ip local port >>> range") Cong added BH pr

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 12:32 PM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 10:26 AM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> In commit 4ee3bd4a8c746 ("ipv4: disable BH when changing ip local port >> range") Cong added BH protection in set_local_port_range() but missed >> that same fix

Re: [RFC PATCH net-next] bpf: fix potential percpu map overcopy to user.

2016-10-20 Thread Daniel Borkmann
On 10/20/2016 08:41 PM, William Tu wrote: On Thu, Oct 20, 2016 at 9:58 AM, Alexei Starovoitov wrote: On Thu, Oct 20, 2016 at 06:04:38PM +0200, Daniel Borkmann wrote: diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index ee384f0..d4832e8 100644 -

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 10:26 AM, Eric Dumazet wrote: > From: Eric Dumazet > > In commit 4ee3bd4a8c746 ("ipv4: disable BH when changing ip local port > range") Cong added BH protection in set_local_port_range() but missed > that same fix was needed in set_ping_group_range() Don't know why ping_g

Re: [RFC PATCH net-next] bpf: fix potential percpu map overcopy to user.

2016-10-20 Thread William Tu
> Documentation/cputopology.txt +106 says /sys/devices/system/cpu/possible > outputs cpu_possible_mask. That is the same as in num_possible_cpus(), so > first step would be to fix the buggy example code, imho. > > What perhaps could be done in a second step to reduce overhead is an option > for bpf

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-20 Thread Michal Hocko
On Wed 19-10-16 10:23:55, Dave Hansen wrote: > On 10/19/2016 10:01 AM, Michal Hocko wrote: > > The question I had earlier was whether this has to be an explicit FOLL > > flag used by g-u-p users or we can just use it internally when mm != > > current->mm > > The reason I chose not to do that was t

Re: [Patch net] net: saving irq context for peernet2id()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 11:29 AM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 7:58 AM, Stephen Smalley wrote: >> On 10/20/2016 02:52 AM, Cong Wang wrote: >>> A kernel warning inside __local_bh_enable_ip() was reported by people >>> running SELinux, this is caused due to some SELinux functions >>>

Re: [PATCH 1/4] kconfig: introduce the "imply" keyword

2016-10-20 Thread Edward Cree
On 20/10/16 19:29, Nicolas Pitre wrote: > On Thu, 20 Oct 2016, Edward Cree wrote: >> But the desire is a property of the user, not of the driver. If you're >> willing to add CONFIG_FOO_BAZ to every combination of (driver, subsystem) >> then "imply" becomes unnecessary, doesn't it? > Absolutely. A

Re: [Patch net] net: saving irq context for peernet2id()

2016-10-20 Thread Paul Moore
On Thu, Oct 20, 2016 at 2:29 PM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 7:58 AM, Stephen Smalley wrote: >> On 10/20/2016 02:52 AM, Cong Wang wrote: >>> A kernel warning inside __local_bh_enable_ip() was reported by people >>> running SELinux, this is caused due to some SELinux functions >>> (

Re: [PATCH net-next v2 0/9] net: use core MTU range checking everywhere

2016-10-20 Thread David Miller
From: Jarod Wilson Date: Thu, 20 Oct 2016 13:55:15 -0400 > This stack of patches should get absolutely everything in the kernel > converted from doing their own MTU range checking to the core MTU range > checking. This second spin includes alterations to hopefully fix all > concerns raised with t

Re: [PATCH 0/4] make POSIX timers optional with some Kconfig help

2016-10-20 Thread Josh Triplett
On Wed, Oct 19, 2016 at 07:42:49PM -0400, Nicolas Pitre wrote: > Many embedded systems don't need the full POSIX timer support. > Configuring them out provides a nice kernel image size reduction. > > When POSIX timers are configured out, the PTP clock subsystem should be > left out as well. Howeve

Re: [PATCH net] ipv4: disable BH in set_ping_group_range()

2016-10-20 Thread David Miller
From: Eric Dumazet Date: Thu, 20 Oct 2016 10:26:48 -0700 > From: Eric Dumazet > > In commit 4ee3bd4a8c746 ("ipv4: disable BH when changing ip local port > range") Cong added BH protection in set_local_port_range() but missed > that same fix was needed in set_ping_group_range() > > Fixes: b8f1a

Re: [PATCH -next] net: ethernet: mediatek: use dev_kfree_skb_any instead of dev_kfree_skb

2016-10-20 Thread David Miller
From: Wei Yongjun Date: Thu, 20 Oct 2016 17:00:32 + > From: Wei Yongjun > > Replace dev_kfree_skb with dev_kfree_skb_any in mtk_start_xmit() > which can be called from hard irq context (netpoll) and from > other contexts. mtk_start_xmit() only frees skbs that it has > dropped. > > This is

Re: [PATCH -next] myri10ge: fix typo in parameter description

2016-10-20 Thread David Miller
From: Wei Yongjun Date: Thu, 20 Oct 2016 17:01:56 + > From: Wei Yongjun > > Fix typo in parameter description. > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH -next] dwc_eth_qos: use dev_kfree_skb_any instead of dev_kfree_skb

2016-10-20 Thread David Miller
From: Wei Yongjun Date: Thu, 20 Oct 2016 16:59:49 + > From: Wei Yongjun > > Replace dev_kfree_skb with dev_kfree_skb_any in dwceqos_start_xmit() > which can be called from hard irq context (netpoll) and from > other contexts. dwceqos_start_xmit() only frees skbs that it has > dropped. > >

Re: [PATCH net-next v12 5/9] openvswitch: add processing of L3 packets

2016-10-20 Thread Pravin Shelar
On Wed, Oct 19, 2016 at 9:52 AM, Jiri Benc wrote: > On Tue, 18 Oct 2016 22:13:45 -0700, Pravin Shelar wrote: >> On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: >> > - skb_reset_network_header(skb); >> > + skb->protocol = parse_ethertype(skb); >> >> I am not sure about changi

Re: [PATCH net] net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels

2016-10-20 Thread Florian Fainelli
On 10/20/2016 11:44 AM, David Miller wrote: > From: Florian Fainelli > Date: Thu, 20 Oct 2016 09:32:19 -0700 > >> For a kernel that is being kexec'd we re-enable the integrated GPHY in >> order for the subsequent MDIO bus scan to succeed and properly bind to >> the bcm7xxx PHY driver. If we did n

Re: [PATCH net] udp: must lock the socket in udp_disconnect()

2016-10-20 Thread David Miller
From: Eric Dumazet Date: Thu, 20 Oct 2016 09:39:40 -0700 > From: Eric Dumazet > > Baozeng Ding reported KASAN traces showing uses after free in > udp_lib_get_port() and other related UDP functions. > > A CONFIG_DEBUG_PAGEALLOC=y kernel would eventually crash. > > I could write a reproducer wi

Re: [PATCH net] net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels

2016-10-20 Thread David Miller
From: Florian Fainelli Date: Thu, 20 Oct 2016 09:32:19 -0700 > For a kernel that is being kexec'd we re-enable the integrated GPHY in > order for the subsequent MDIO bus scan to succeed and properly bind to > the bcm7xxx PHY driver. If we did not do that, the GPHY would be shut > down by the time

Re: [RFC PATCH net-next] bpf: fix potential percpu map overcopy to user.

2016-10-20 Thread William Tu
On Thu, Oct 20, 2016 at 9:58 AM, Alexei Starovoitov wrote: > On Thu, Oct 20, 2016 at 06:04:38PM +0200, Daniel Borkmann wrote: >> >> diff --git a/tools/testing/selftests/bpf/test_maps.c >> b/tools/testing/selftests/bpf/test_maps.c >> index ee384f0..d4832e8 100644 >> --- a/tools/testing/selftests/b

Re: [PATCH 0/4] STM32F429: Add Ethernet fixes

2016-10-20 Thread David Miller
From: Alexandre TORGUE Date: Thu, 20 Oct 2016 17:21:22 +0200 > This series adds several fixes for Ethernet for stm32f429 MCU. > First 2 patches have already been reviewed some months ago when > stm32 Ethernet glue has been pushed (I added in this series to keep > history). Fixes are: > -Change

Re: [PATCH net-next v2 3/9] net: use core MTU range checking in wireless drivers

2016-10-20 Thread David Miller
From: Johannes Berg Date: Thu, 20 Oct 2016 20:22:35 +0200 > On Thu, 2016-10-20 at 13:55 -0400, Jarod Wilson wrote: >> - set max_mtu in wil6210 driver >> - set max_mtu in atmel driver >> - set min/max_mtu in cisco airo driver, remove airo_change_mtu >> - set min/max_mtu in ipw2100/ipw2200 drivers,

Re: [PATCH net] bpf, test: fix ld_abs + vlan push/pop stress test

2016-10-20 Thread David Miller
From: Daniel Borkmann Date: Thu, 20 Oct 2016 17:13:53 +0200 > After commit 636c2628086e ("net: skbuff: Remove errornous length > validation in skb_vlan_pop()") mentioned test case stopped working, > throwing a -12 (ENOMEM) return code. The issue however is not due to > 636c2628086e, but rather du

Re: [PATCH] netfilter: don't permit unprivileged writes to global state via sysctls

2016-10-20 Thread David Miller
From: Pablo Neira Ayuso Date: Thu, 20 Oct 2016 20:22:24 +0200 > On Sat, Sep 24, 2016 at 12:21:04AM +0200, Jann Horn wrote: >> This prevents the modification of nf_conntrack_max in unprivileged network >> namespaces. For unprivileged network namespaces, ip_conntrack_max is kept >> as a readonly sy

Re: [PATCH 0/4] make POSIX timers optional with some Kconfig help

2016-10-20 Thread Nicolas Pitre
On Thu, 20 Oct 2016, Thomas Gleixner wrote: > On Wed, 19 Oct 2016, Nicolas Pitre wrote: > > Therefore this series also includes kconfig changes to implement a new > > keyword to express some reverse dependencies like "select" does, named > > "imply", and still allowing for the target config symbol

Re: [PATCH net v3] net: add recursion limit to GRO

2016-10-20 Thread David Miller
From: Sabrina Dubroca Date: Thu, 20 Oct 2016 15:58:02 +0200 > Currently, GRO can do unlimited recursion through the gro_receive > handlers. This was fixed for tunneling protocols by limiting tunnel GRO > to one level with encap_mark, but both VLAN and TEB still have this > problem. Thus, the ke

Re: [PATCH] ipv6: properly prevent temp_prefered_lft sysctl race

2016-10-20 Thread David Miller
From: Jiri Bohac Date: Thu, 20 Oct 2016 12:29:26 +0200 > The check for an underflow of tmp_prefered_lft is always false > because tmp_prefered_lft is unsigned. The intention of the check > was to guard against racing with an update of the > temp_prefered_lft sysctl, potentially resulting in an un

Re: [Patch net] net: saving irq context for peernet2id()

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 7:58 AM, Stephen Smalley wrote: > On 10/20/2016 02:52 AM, Cong Wang wrote: >> A kernel warning inside __local_bh_enable_ip() was reported by people >> running SELinux, this is caused due to some SELinux functions >> (indirectly) call peernet2id() with IRQ disabled in proces

Re: [PATCH 1/4] kconfig: introduce the "imply" keyword

2016-10-20 Thread Nicolas Pitre
On Thu, 20 Oct 2016, Edward Cree wrote: > On 20/10/16 18:04, Nicolas Pitre wrote: > > On Thu, 20 Oct 2016, Edward Cree wrote: > >> Also, I don't think having any FOO=y should preclude BAZ=m. Suppose both > >> FOO and FOO2 imply BAZ, FOO=y and FOO2=m. > > Some people didn't like the fact that you

Re: [PATCH] bnx2x: Replace semaphore stats_lock with mutex

2016-10-20 Thread David Miller
From: Binoy Jayan Date: Thu, 20 Oct 2016 14:22:12 +0530 > stats_lock is used as a simple mutex No, it is not. > @@ -1976,8 +1973,8 @@ int bnx2x_stats_safe_exec(struct bnx2x *bp, > /* Wait for statistics to end [while blocking further requests], >* then run supplied function 'safel

Re: [PATCH net-next] net: phy: aquantia: add PHY ID of AQR106 and AQR107

2016-10-20 Thread David Miller
From: Date: Thu, 20 Oct 2016 16:30:31 +0800 > From: Shaohui Xie > > The AQR106 and AQR107 can use the existing driver. > > Signed-off-by: Shaohui Xie Applied.

Re: [PATCH net-next v2 3/9] net: use core MTU range checking in wireless drivers

2016-10-20 Thread Johannes Berg
On Thu, 2016-10-20 at 13:55 -0400, Jarod Wilson wrote: > - set max_mtu in wil6210 driver > - set max_mtu in atmel driver > - set min/max_mtu in cisco airo driver, remove airo_change_mtu > - set min/max_mtu in ipw2100/ipw2200 drivers, remove > libipw_change_mtu > - set min/max_mtu in p80211netdev, r

Re: [PATCH] netfilter: don't permit unprivileged writes to global state via sysctls

2016-10-20 Thread Pablo Neira Ayuso
On Sat, Sep 24, 2016 at 12:21:04AM +0200, Jann Horn wrote: > This prevents the modification of nf_conntrack_max in unprivileged network > namespaces. For unprivileged network namespaces, ip_conntrack_max is kept > as a readonly sysctl in order to minimize potential compatibility issues. > > This p

Re: [PATCH] net: fec: drop check for clk==NULL before calling clk_*

2016-10-20 Thread David Miller
From: Uwe Kleine-König Date: Thu, 20 Oct 2016 10:28:27 +0200 > clk_prepare, clk_enable and their counterparts (at least the common clk > ones, but also most others) do check for the clk being NULL anyhow (and > return 0 then), so there is no gain when the caller checks, too. > > Signed-off-by: U

Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF support

2016-10-20 Thread David Miller
From: Raghu Vatsavayi Date: Wed, 19 Oct 2016 22:40:38 -0700 > +/* Default behaviour of Liquidio is to provide one queue per VF. But Liquidio > + * can also provide multiple queues to each VF. If user wants to change the > + * default behaviour HW should be provided configuration info at init time

RE: [PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers

2016-10-20 Thread Haiyang Zhang
> -Original Message- > From: Jarod Wilson [mailto:ja...@redhat.com] > Sent: Thursday, October 20, 2016 1:55 PM > To: linux-ker...@vger.kernel.org > Cc: Jarod Wilson ; netdev@vger.kernel.org; > virtualizat...@lists.linux-foundation.org; KY Srinivasan > ; Haiyang Zhang ; Michael S. > Tsirki

Re: [PATCH net-next] hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()

2016-10-20 Thread David Miller
From: Vitaly Kuznetsov Date: Thu, 20 Oct 2016 10:51:04 +0200 > Stephen Hemminger writes: > >> Do we need ACCESS_ONCE() here to avoid check/use issues? >> > > I think we don't: this is the only place in the function where we read > the variable so we'll get normal read. We're not trying to sync

  1   2   >