[PATCH 2/2] vhost: forbid IOTLB invalidation when not enabled

2016-11-17 Thread Jason Wang
When IOTLB is not enabled, we should forbid IOTLB invalidation to avoid a NULL pointer dereference. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c6f2d89..7d338d5 100644 --- a/driver

RE: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-17 Thread Hayes Wang
Mark Lord [mailto:ml...@pobox.com] > Sent: Thursday, November 17, 2016 9:42 PM [...] > What the above sample shows, is the URB transfer buffer ran out of space in > the > middle > of a packet, and the hardware then tried to just continue that same packet in > the > next URB, > without an rx_desc

pull-request: mac80211 2016-11-18

2016-11-17 Thread Johannes Berg
Hi Dave, Due to travel/vacation, this is a bit late, but there aren't that many fixes either. Most interesting/important are the fixes from Felix and perhaps the scan entry limit. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 269ebce45

[PATCH net-next] bridge: add igmpv3 and mldv2 query support

2016-11-17 Thread Hangbin Liu
Add bridge IGMPv3 and MLDv2 query support. But before we think it is stable enough, only enable it when declare in force_igmp/mld_version. Signed-off-by: Hangbin Liu --- net/bridge/br_multicast.c | 203 -- 1 file changed, 194 insertions(+), 9 deletions

[PATCH net-next 2/4] geneve: Merge ipv4 and ipv6 geneve_build_skb()

2016-11-17 Thread Pravin B Shelar
There are minimal difference in building Geneve header between ipv4 and ipv6 geneve tunnels. Following patch refactors code to unify it. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 100 ++- 1 file changed, 26 insertions(+), 74 deletio

[PATCH net-next 0/4] geneve: Use LWT more effectively.

2016-11-17 Thread Pravin B Shelar
Following patch series make use of geneve LWT code path for geneve netdev type of device. This allows us to simplify geneve module. Pravin B Shelar (4): geneve: Unify LWT and netdev handling. geneve: Merge ipv4 and ipv6 geneve_build_skb() geneve: Remove redundant socket checks. geneve: Opt

[PATCH net-next 1/4] geneve: Unify LWT and netdev handling.

2016-11-17 Thread Pravin B Shelar
Current geneve implementation has two separate cases to handle. 1. netdev xmit 2. LWT xmit. In case of netdev, geneve configuration is stored in various struct geneve_dev members. For example geneve_addr, ttl, tos, label, flags, dst_cache, etc. For LWT ip_tunnel_info is passed to the device in ip_

[PATCH net-next 4/4] geneve: Optimize geneve device lookup.

2016-11-17 Thread Pravin B Shelar
Rather than comparing 64-bit tunnel-id, compare tunnel vni which is 24-bit id. This also save conversion from vni to tunnel id on each tunnel packet receive. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --g

[PATCH net-next 3/4] geneve: Remove redundant socket checks.

2016-11-17 Thread Pravin B Shelar
Geneve already has check for device socket in route lookup function. So no need to check it in xmit function. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 9

Re: [PATCH net-next v3 4/7] vxlan: improve vxlan route lookup checks.

2016-11-17 Thread Pravin Shelar
On Thu, Nov 17, 2016 at 2:17 AM, David Laight wrote: > From: Of Jiri Benc >> Sent: 15 November 2016 14:40 >> On Sun, 13 Nov 2016 20:43:55 -0800, Pravin B Shelar wrote: >> > @@ -1929,8 +1951,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, >> > struct net_device *dev, >> > union vxlan_addr

Proposal

2016-11-17 Thread Teresa Au
Business Partnership Proposal For You,contact me via my personal E-mail for further detail's: ms_teresa_a...@outlook.com

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-17 Thread Harini Katakam
Hi Rafal, On Thu, Nov 17, 2016 at 7:05 PM, Rafal Ozieblo wrote: > -Original Message- > From: Nicolas Ferre [mailto:nicolas.fe...@atmel.com] > Sent: 17 listopada 2016 14:29 > To: Harini Katakam; Rafal Ozieblo > Cc: harini.kata...@xilinx.com; netdev@vger.kernel.org; > linux-ker...@vger.ker

[PATCH] net: fec: Detect and recover receive queue hangs

2016-11-17 Thread Chris Lesiak
This corrects a problem that appears to be similar to ERR006358. But while ERR006358 is a race when the tx queue transitions from empty to not empty, this problem is a race when the rx queue transitions from full to not full. The symptom is a receive queue that is stuck. The ENET_RDAR register w

[iproute2] iproute2: fix the link group name getting error

2016-11-17 Thread Zhang Shengju
In the situation where more than one entry live in the same hash bucket, loop to get the correct one. Before: $ cat /etc/iproute2/group 0 default 256 test $ sudo ip link set group test dummy1 $ ip link show type dummy 11: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group 0 ql

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Rick Jones
On 11/17/2016 04:37 PM, Julian Anastasov wrote: On Thu, 17 Nov 2016, Rick Jones wrote: raj@tardy:~/netperf2_trunk$ strace -v -o /tmp/netperf.strace src/netperf -F src/nettest_omni.c -t UDP_STREAM -l 1 -- -m 1472 ... socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4 getsockopt(4, SOL_SOCKET, SO_SND

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Julian Anastasov
Hello, On Thu, 17 Nov 2016, Rick Jones wrote: > raj@tardy:~/netperf2_trunk$ strace -v -o /tmp/netperf.strace src/netperf -F > src/nettest_omni.c -t UDP_STREAM -l 1 -- -m 1472 > > ... > > socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4 > getsockopt(4, SOL_SOCKET, SO_SNDBUF, [212992], [4])

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-17 Thread Jarno Rajahalme
> On Nov 14, 2016, at 3:09 PM, Eric Dumazet wrote: > > On Mon, 2016-11-14 at 14:46 -0800, Eric Dumazet wrote: >> On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote: >> >>> synchronize_rcu_expidited is not enough if you have multiple network >>> devices in play. >>> >>> Looking at the c

[Patch net v2] af_unix: conditionally use freezable blocking calls in read

2016-11-17 Thread Cong Wang
Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") converts schedule_timeout() to its freezable version, it was probably correct at that time, but later, commit 2b514574f7e8 ("net: af_unix: implement splice for stream af_unix sockets") breaks the strong requirement for a freezable

Re: Virtio_net support vxlan encapsulation package TSO offload discuss

2016-11-17 Thread Jarno Rajahalme
I worked on the same issue a few months back. I rebased my proof-of-concept code to the current net-next and posted an RFC patch a moment ago. I have zero experience on QEMU feature negotiation or extending the virtio_net spec. Since the virtio_net handling code is now all done using shared code

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Rick Jones
On 11/17/2016 01:44 PM, Eric Dumazet wrote: because netperf sends the same message over and over... Well, sort of, by default. That can be altered to a degree. The global -F option should cause netperf to fill the buffers in its send ring with data from the specified file. The number of buf

[RFC PATCH net-next] virtio_net: Support UDP Tunnel offloads.

2016-11-17 Thread Jarno Rajahalme
This patch is a proof-of-concept I did a few months ago for UDP tunnel offload support in virtio_net interface, and rebased on to the current net-next. Real implementation needs to extend the virtio_net header rather than piggy-backing on existing fields. Inner MAC length (or inner network offset

Re: [Patch net] af_unix: revert "af_unix: use freezable blocking calls in read"

2016-11-17 Thread Cong Wang
On Thu, Nov 17, 2016 at 2:30 PM, Colin Cross wrote: > On Thu, Nov 17, 2016 at 2:09 PM, Cong Wang wrote: >> Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") >> converts schedule_timeout() to its freezable version, it was probably >> correct at that time, but later, commit 2b5145

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Alexander Duyck
On Thu, Nov 17, 2016 at 9:34 AM, David Laight wrote: > From: Jesper Dangaard Brouer >> Sent: 17 November 2016 14:58 >> On Thu, 17 Nov 2016 06:17:38 -0800 >> Eric Dumazet wrote: >> >> > On Thu, 2016-11-17 at 14:42 +0100, Jesper Dangaard Brouer wrote: >> > >> > > I can see that qdisc layer does not

Re: [Patch net] af_unix: revert "af_unix: use freezable blocking calls in read"

2016-11-17 Thread Colin Cross
On Thu, Nov 17, 2016 at 2:09 PM, Cong Wang wrote: > Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") > converts schedule_timeout() to its freezable version, it was probably > correct at that time, but later, commit 2b514574f7e8 > ("net: af_unix: implement splice for stream af_un

Re: net: BUG still has locks held in unix_stream_splice_read

2016-11-17 Thread Hannes Frederic Sowa
On 17.11.2016 22:44, Cong Wang wrote: > On Sun, Oct 9, 2016 at 8:14 PM, Al Viro wrote: >> E.g what will happen if some code does a read on AF_UNIX socket with >> some local mutex held? AFAICS, there are exactly two callers of >> freezable_schedule_timeout() - this one and one in XFS; the latter i

Re: Debugging Ethernet issues

2016-11-17 Thread Måns Rullgård
Florian Fainelli writes: > On 11/14/2016 11:00 AM, Måns Rullgård wrote: >> Florian Fainelli writes: >> >>> On 11/14/2016 10:20 AM, Florian Fainelli wrote: On 11/14/2016 09:59 AM, Sebastian Frias wrote: > On 11/14/2016 06:32 PM, Florian Fainelli wrote: >> On 11/14/2016 07:33 AM, Mas

Re: [PATCH v2 net-next] lan78xx: relocate mdix setting to phy driver

2016-11-17 Thread Florian Fainelli
On 11/17/2016 02:10 PM, woojung@microchip.com wrote: > From: Woojung Huh > > Relocate mdix code to phy driver to be called at config_init(). > > Signed-off-by: Woojung Huh Reviewed-by: Florian Fainelli -- Florian

[PATCH v2 net-next] lan78xx: relocate mdix setting to phy driver

2016-11-17 Thread Woojung.Huh
From: Woojung Huh Relocate mdix code to phy driver to be called at config_init(). Signed-off-by: Woojung Huh --- drivers/net/phy/microchip.c | 36 +- drivers/net/usb/lan78xx.c | 73 ++--- 2 files changed, 38 insertions(+), 71 deleti

[Patch net] af_unix: revert "af_unix: use freezable blocking calls in read"

2016-11-17 Thread Cong Wang
Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") converts schedule_timeout() to its freezable version, it was probably correct at that time, but later, commit 2b514574f7e8 ("net: af_unix: implement splice for stream af_unix sockets") breaks the strong requirement for a freezable

Re: [net-next PATCH v2] net: dummy: Introduce dummy virtual functions

2016-11-17 Thread Or Gerlitz
On Mon, Nov 14, 2016 at 3:02 PM, Phil Sutter wrote: > Due to the assumption that all PFs are PCI devices, this implementation > is not completely straightforward: In order to allow for > rtnl_fill_ifinfo() to see the dummy VFs, a fake PCI parent device is > attached to the dummy netdev. This has

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-17 Thread Jerome Brunet
On Thu, 2016-11-17 at 23:30 +0530, Anand Moon wrote: > Hi Jerone, > > > > How about adding callback functionality for .soft_reset to handle > > > BMCR > > > where we update the Auto-Negotiation for the phy, > > > as per the datasheet of the rtl8211f. I think BMCR is already pretty well handled by

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-11-17 Thread Jerome Brunet
On Thu, 2016-11-17 at 19:44 +0100, André Roth wrote: > Hi all, > > > > > I checked again the kernel > > at https://github.com/hardkernel/linux/tree/ odroidc2-3.14.y. The > > version you mention (3.14.65-73) seems to be: > > sha1: c75d5f4d1516cdd86d90a9d1c565bb0ed9251036 tag: jenkins-deb > > s905

Re: net: BUG still has locks held in unix_stream_splice_read

2016-11-17 Thread Cong Wang
On Sun, Oct 9, 2016 at 8:14 PM, Al Viro wrote: > E.g what will happen if some code does a read on AF_UNIX socket with > some local mutex held? AFAICS, there are exactly two callers of > freezable_schedule_timeout() - this one and one in XFS; the latter is > in a kernel thread where we do have goo

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Eric Dumazet
On Thu, 2016-11-17 at 22:19 +0100, Jesper Dangaard Brouer wrote: > > Maybe you can share your udp flood "udpsnd" program source? Very ugly. This is based on what I wrote when tracking the UDP v6 checksum bug (4f2e4ad56a65f3b7d64c258e373cb71e8d2499f4 net: mangle zero checksum in skb_checksum_help

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Jesper Dangaard Brouer
On Thu, 17 Nov 2016 10:51:23 -0800 Eric Dumazet wrote: > On Thu, 2016-11-17 at 19:30 +0100, Jesper Dangaard Brouer wrote: > > > The point is I can see a socket Send-Q forming, thus we do know the > > application have something to send. Thus, and possibility for > > non-opportunistic bulking. All

Re: [PATCH net 1/1] net sched filters: pass netlink message flags in event notification

2016-11-17 Thread Cong Wang
On Wed, Nov 16, 2016 at 2:16 PM, Roman Mashak wrote: > Userland client should be able to read an event, and reflect it back to > the kernel, therefore it needs to extract complete set of netlink flags. > > For example, this will allow "tc monitor" to distinguish Add and Replace > operations. > > S

Re: [PATCH net-next v2 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-17 Thread Daniel Borkmann
On 11/17/2016 10:48 AM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 5:26 PM, Daniel Borkmann wrote: On 11/16/2016 03:30 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 3:54 PM, Daniel Borkmann wrote: On 11/16/2016 01:25 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 2:04 AM, Daniel B

[PATCH net-next v4 2/5] net: fsl: Allow most drivers to be built with COMPILE_TEST

2016-11-17 Thread Florian Fainelli
There are only a handful of Freescale Ethernet drivers that don't actually build with COMPILE_TEST: * FEC, for which we would need to define a default register layout if no supported architecture is defined * UCC_GETH which depends on PowerPC cpm.h header (which could be moved to a generic lo

[PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info

2016-11-17 Thread Florian Fainelli
In preparation for allowing CONFIG_MVNETA_BM to build with COMPILE_TEST, provide an inline stub for mvebu_mbus_get_dram_win_info(). Signed-off-by: Florian Fainelli --- include/linux/mbus.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/mbus.h b/include/linux/mbus.h ind

[PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers

2016-11-17 Thread Florian Fainelli
Hi all, This patch series allows building the Freescale and Marvell Ethernet network drivers with COMPILE_TEST. Changes in v4: - add proper HAS_DMA to fix build errors on m32r - provide an inline stub for mvebu_mbus_get_dram_win_info - added an additional patch to fix build errors with mv88e6xxx

[PATCH net-next v4 4/5] net: marvell: Allow drivers to be built with COMPILE_TEST

2016-11-17 Thread Florian Fainelli
All Marvell Ethernet drivers actually build fine with COMPILE_TEST with a few warnings. We need to add a few HAS_DMA dependencies to fix linking failures on problematic architectures like m32r. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/marvell/Kconfig | 11 +++ 1 file chan

[PATCH net-next v4 5/5] net: dsa: mv88e6xxx: Select IRQ_DOMAIN

2016-11-17 Thread Florian Fainelli
Some architectures may not define IRQ_DOMAIN (like m32r), fixes undefined references to IRQ_DOMAIN functions. Fixes: dc30c35be720 ("net: dsa: mv88e6xxx: Implement interrupt support.") Signed-off-by: Florian Fainelli --- drivers/net/dsa/mv88e6xxx/Kconfig | 1 + 1 file changed, 1 insertion(+) dif

[PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST

2016-11-17 Thread Florian Fainelli
FS is a global symbol used by the x86 32-bit architecture, fixes builds re-definitions: >> drivers/net/ethernet/freescale/gianfar_ptp.c:75:0: warning: "FS" >> redefined #define FS(1<<28) /* FIPER start indication */ In file included from arch/x86/include/uapi/asm/ptrace

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-17 Thread Hannes Frederic Sowa
On 17.11.2016 19:32, Ido Schimmel wrote: > On Thu, Nov 17, 2016 at 06:20:39PM +0100, Hannes Frederic Sowa wrote: >> On 17.11.2016 17:45, David Miller wrote: >>> From: Hannes Frederic Sowa >>> Date: Thu, 17 Nov 2016 15:36:48 +0100 >>> The other way is the journal idea I had, which uses an rb-t

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-17 Thread Hannes Frederic Sowa
On 17.11.2016 19:16, David Miller wrote: > From: Hannes Frederic Sowa > Date: Thu, 17 Nov 2016 18:20:39 +0100 > >> Hi, >> >> On 17.11.2016 17:45, David Miller wrote: >>> From: Hannes Frederic Sowa >>> Date: Thu, 17 Nov 2016 15:36:48 +0100 >>> The other way is the journal idea I had, which u

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-17 Thread Harini Katakam
Hi Rafal, On Thu, Nov 17, 2016 at 5:20 PM, Rafal Ozieblo wrote: > Hello, > I think, there could a bug in your patch. > >> + >> +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT >> + dmacfg |= GEM_BIT(ADDR64); >> +#endif > > You enable 64 bit addressing (64b dma bus width) always when appropriate

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Eric Dumazet
On Thu, 2016-11-17 at 19:30 +0100, Jesper Dangaard Brouer wrote: > The point is I can see a socket Send-Q forming, thus we do know the > application have something to send. Thus, and possibility for > non-opportunistic bulking. Allowing/implementing bulk enqueue from > socket layer into qdisc laye

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-11-17 Thread André Roth
Hi all, > I checked again the kernel > at https://github.com/hardkernel/linux/tree/ odroidc2-3.14.y. The > version you mention (3.14.65-73) seems to be: > sha1: c75d5f4d1516cdd86d90a9d1c565bb0ed9251036 tag: jenkins-deb s905 > kernel-73 I downloaded the prebuilt image from hardkernel, I did not b

Re: [PATCH net 1/1] net sched filters: pass netlink message flags in event notification

2016-11-17 Thread David Miller
From: Roman Mashak Date: Wed, 16 Nov 2016 17:16:10 -0500 > Userland client should be able to read an event, and reflect it back to > the kernel, therefore it needs to extract complete set of netlink flags. > > For example, this will allow "tc monitor" to distinguish Add and Replace > operations.

[PATCH 12/20] net/iucv: Convert to hotplug state machine

2016-11-17 Thread Sebastian Andrzej Siewior
Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. The smp function calls in the online/downprep callbacks are not required as the callback is guaranteed to be invoked on the upcoming/outgoing cpu. Cc: Ursula Braun Cc: "David S. Miller"

Re: [PATCH net-next 0/3] RDS: TCP: HA/Failover fixes

2016-11-17 Thread David Miller
From: Sowmini Varadhan Date: Wed, 16 Nov 2016 13:29:47 -0800 > This series contains a set of fixes for bugs exposed when > we ran the following in a loop between a test machine pair: > > while (1); do ># modprobe rds-tcp on test nodes ># run rds-stress in bi-dir mode between test machin

Re: [PATCH 2/3] net: stmmac: replace hardcoded function name by __func__

2016-11-17 Thread David Miller
From: Corentin Labbe Date: Wed, 16 Nov 2016 20:09:40 +0100 > From: LABBE Corentin > > Some printing have the function name hardcoded. > It is better to use __func__ instead. > > Signed-off-by: Corentin Labbe Applied to net-next.

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-17 Thread Ido Schimmel
On Thu, Nov 17, 2016 at 06:20:39PM +0100, Hannes Frederic Sowa wrote: > On 17.11.2016 17:45, David Miller wrote: > > From: Hannes Frederic Sowa > > Date: Thu, 17 Nov 2016 15:36:48 +0100 > > > >> The other way is the journal idea I had, which uses an rb-tree with > >> timestamps as keys (can be la

Re: [PATCH 1/3] net: stmmac: replace all pr_xxx by their netdev_xxx counterpart

2016-11-17 Thread David Miller
From: Corentin Labbe Date: Wed, 16 Nov 2016 20:09:39 +0100 > From: LABBE Corentin > > The stmmac driver use lots of pr_xxx functions to print information. > This is bad since we cannot know which device logs the information. > (moreover if two stmmac device are present) > > Furthermore, it see

Re: [PATCH 3/3] net: stmmac: replace if (netif_msg_type) by their netif_xxx counterpart

2016-11-17 Thread David Miller
From: Corentin Labbe Date: Wed, 16 Nov 2016 20:09:41 +0100 > From: LABBE Corentin > > As sugested by Joe Perches, we could replace all > if (netif_msg_type(priv)) dev_xxx(priv->devices, ...) > by the simpler macro netif_xxx(priv, hw, priv->dev, ...) > > Signed-off-by: Corentin Labbe Applied

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Jesper Dangaard Brouer
On Thu, 17 Nov 2016 08:21:19 -0800 Eric Dumazet wrote: > On Thu, 2016-11-17 at 15:57 +0100, Jesper Dangaard Brouer wrote: > > On Thu, 17 Nov 2016 06:17:38 -0800 > > Eric Dumazet wrote: > > > > > On Thu, 2016-11-17 at 14:42 +0100, Jesper Dangaard Brouer wrote: > > > > > > > I can see that q

Re: [PATCH net-next] net_sched: sch_fq: use hash_ptr()

2016-11-17 Thread David Miller
From: Eric Dumazet Date: Thu, 17 Nov 2016 09:48:30 -0800 > From: Eric Dumazet > > When I wrote sch_fq.c, hash_ptr() on 64bit arches was awful, > and I chose hash_32(). > > Linus Torvalds and George Spelvin fixed this issue, so we can > use hash_ptr() to get more entropy on 64bit arches with Te

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

2016-11-17 Thread Daniel Mack
This is v8 of the patch set to allow eBPF programs for network filtering and accounting to be attached to cgroups, so that they apply to all sockets of all tasks placed in that cgroup. The logic also allows to be extendeded for other cgroup based eBPF logic. Again, only minor details are updated i

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

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

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

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

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

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

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

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

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

2016-11-17 Thread Daniel Mack
This program type is similar to BPF_PROG_TYPE_SOCKET_FILTER, except that it does not allow BPF_LD_[ABS|IND] instructions and hooks up the bpf_skb_load_bytes() helper. Programs of this type will be attached to cgroups for network filtering and accounting. Signed-off-by: Daniel Mack Acked-by: Alex

[PATCH v8 5/6] net: ipv4, ipv6: run cgroup eBPF egress programs

2016-11-17 Thread Daniel Mack
If the cgroup associated with the receiving socket has an eBPF programs installed, run them from ip_output(), ip6_output() and ip_mc_output(). From mentioned functions we have two socket contexts as per 7026b1ddb6b8 ("netfilter: Pass socket pointer down through okfn()."). We explicitly need to use

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-17 Thread David Miller
From: Hannes Frederic Sowa Date: Thu, 17 Nov 2016 18:20:39 +0100 > Hi, > > On 17.11.2016 17:45, David Miller wrote: >> From: Hannes Frederic Sowa >> Date: Thu, 17 Nov 2016 15:36:48 +0100 >> >>> The other way is the journal idea I had, which uses an rb-tree with >>> timestamps as keys (can be l

[PATCH ipsec] xfrm: unbreak xfrm_sk_policy_lookup

2016-11-17 Thread Florian Westphal
if we succeed grabbing the refcount, then if (err && !xfrm_pol_hold_rcu) will evaluate to false so this hits last else branch which then sets policy to ERR_PTR(0). Fixes: ae33786f73a7ce ("xfrm: policy: only use rcu in xfrm_sk_policy_lookup") Reported-by: Nicolas Dichtel Tested-by: Nicolas Dich

[PATCH -next] tcp: make undo_cwnd mandatory for congestion modules

2016-11-17 Thread Florian Westphal
The undo_cwnd fallback in the stack doubles cwnd based on ssthresh, which un-does reno halving behaviour. It seems more appropriate to let congctl algorithms pair .ssthresh and .undo_cwnd properly. Add a 'tcp_reno_undo_cwnd' function and wire it up for all congestion algorithms that used to rely o

[PATCH net-next v3 1/5] ethtool: (uapi) Add ETHTOOL_PHY_GTUNABLE and ETHTOOL_PHY_STUNABLE

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju Defines a generic API to get/set phy tunables. The API is using the existing ethtool_tunable/tunable_type_id types which is already being used for mac level tunables. Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Allan W. Nielsen --- include/uapi/

RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-17 Thread Rafal Ozieblo
-Original Message- From: Nicolas Ferre [mailto:nicolas.fe...@atmel.com] Sent: 17 listopada 2016 14:29 To: Harini Katakam; Rafal Ozieblo Cc: harini.kata...@xilinx.com; netdev@vger.kernel.org; linux-ker...@vger.kernel.org Subject: Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support

Re: [PATCH net-next v3 4/7] vxlan: improve vxlan route lookup checks.

2016-11-17 Thread David Miller
From: Jiri Benc Date: Thu, 17 Nov 2016 16:59:49 +0100 > On Thu, 17 Nov 2016 10:17:01 +, David Laight wrote: >> Worse than arbitrary, it adds 4 bytes of pad on 64bit systems. > > It does not, this is not a struct. He is talking about on the function stack.

Re: net: BUG still has locks held in unix_stream_splice_read

2016-11-17 Thread Dmitry Vyukov
On Mon, Oct 10, 2016 at 10:01 AM, Dmitry Vyukov wrote: > On Mon, Oct 10, 2016 at 5:14 AM, Al Viro wrote: >> On Mon, Oct 10, 2016 at 03:46:07AM +0100, Al Viro wrote: >>> On Sun, Oct 09, 2016 at 12:06:14PM +0200, Dmitry Vyukov wrote: >>> > I suspect this is: >>> > >>> > commit 25869262ef7af24ccde98

[PATCH net-next] net_sched: sch_fq: use hash_ptr()

2016-11-17 Thread Eric Dumazet
From: Eric Dumazet When I wrote sch_fq.c, hash_ptr() on 64bit arches was awful, and I chose hash_32(). Linus Torvalds and George Spelvin fixed this issue, so we can use hash_ptr() to get more entropy on 64bit arches with Terabytes of memory, and avoid the cast games. Signed-off-by: Eric Dumazet

Fwd:[Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

2016-11-17 Thread Neftin, Sasha
From: Baicar, Tyler [mailto:tbai...@codeaurora.org] Sent: Tuesday, November 15, 2016 11:50 PM To: Neftin, Sasha ; Kirsher, Jeffrey T ; intel-wired-...@lists.osuosl.org; netdev@vger.kernel.org; linux-ker...@vger.kernel.org; ok...@codeaurora.org; ti...@codeaurora.org Subject: Re: [Intel-wired-lan] [P

Re: [PATCH 1/3] net: stmmac: replace all pr_xxx by their netdev_xxx counterpart

2016-11-17 Thread Giuseppe CAVALLARO
On 11/16/2016 8:09 PM, Corentin Labbe wrote: From: LABBE Corentin The stmmac driver use lots of pr_xxx functions to print information. This is bad since we cannot know which device logs the information. (moreover if two stmmac device are present) Furthermore, it seems that it assumes wrongly t

[PATCH net v2 3/7] net: ethernet: ti: cpsw: fix deferred probe

2016-11-17 Thread Johan Hovold
Make sure to deregister all child devices also on probe errors to avoid leaks and to fix probe deferral: cpsw 4a10.ethernet: omap_device: omap_device_enable() called from invalid state 1 cpsw 4a10.ethernet: use pm_runtime_put_sync_suspend() in driver? cpsw: probe of 4a10.ethernet fail

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-17 Thread Anand Moon
Hi Jerone, On 17 November 2016 at 15:50, Jerome Brunet wrote: > On Wed, 2016-11-16 at 22:36 +0530, Anand Moon wrote: >> Hi Jerome. >> >> On 15 November 2016 at 19:59, Jerome Brunet >> wrote: >> > >> > On some platforms, energy efficient ethernet with rtl8211 devices >> > is >> > causing issue,

[PATCH net v2 6/7] net: ethernet: ti: cpsw: add missing sanity check

2016-11-17 Thread Johan Hovold
Make sure to check for allocation failures before dereferencing a NULL-pointer during probe. Fixes: 649a1688c960 ("net: ethernet: ti: cpsw: create common struct to hold shared driver data") Signed-off-by: Johan Hovold --- drivers/net/ethernet/ti/cpsw.c | 3 +++ 1 file changed, 3 insertions(+) d

[PATCH ethtool v3 2/2] Ethtool: Implements ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE and PHY downshift

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju Add ethtool get and set tunable to access PHY drivers. Ethtool Help: ethtool -h for PHY tunables ethtool --set-phy-tunable DEVNAME Set PHY tunable [ downshift on|off [count N] ] ethtool --get-phy-tunable DEVNAME Get PHY tunable

[PATCH net-next v3 4/5] ethtool: Core impl for ETHTOOL_PHY_DOWNSHIFT tunable

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju Adding validation support for the ETHTOOL_PHY_DOWNSHIFT. Functional implementation needs to be done in the individual PHY drivers. Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Allan W. Nielsen --- net/core/ethtool.c | 6 ++ 1 file changed, 6

[PATCH net-next v3 2/5] ethtool: Implements ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju Adding get_tunable/set_tunable function pointer to the phy_driver structure, and uses these function pointers to implement the ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE ioctls. Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Allan W. Nielsen --- inc

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Rick Jones
On 11/17/2016 12:16 AM, Jesper Dangaard Brouer wrote: time to try IP_MTU_DISCOVER ;) To Rick, maybe you can find a good solution or option with Eric's hint, to send appropriate sized UDP packets with Don't Fragment (DF). Well, I suppose adding another setsockopt() to the data socket creation

[PATCH net-next v3 5/5] net: phy: Add downshift get/set support in Microsemi PHYs driver

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju Implements the phy tunable function pointers and implement downshift functionality for MSCC PHYs. Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Allan W. Nielsen --- drivers/net/phy/mscc.c | 100 + 1

[PATCH] net: sky2: Fix shutdown crash

2016-11-17 Thread Jeremy Linton
The sky2 frequently crashes during machine shutdown with: sky2_get_stats+0x60/0x3d8 [sky2] dev_get_stats+0x68/0xd8 rtnl_fill_stats+0x54/0x140 rtnl_fill_ifinfo+0x46c/0xc68 rtmsg_ifinfo_build_skb+0x7c/0xf0 rtmsg_ifinfo.part.22+0x3c/0x70 rtmsg_ifinfo+0x50/0x5c netdev_state_change+0x4c/0x58 linkwatch_

[PATCH net v2 1/7] net: ethernet: ti: cpsw: fix bad register access in probe error path

2016-11-17 Thread Johan Hovold
Make sure to keep the platform device runtime-resumed throughout probe to avoid accessing the CPSW registers in the error path (e.g. for deferred probe) with clocks disabled: Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0872d08 ... [] (cpsw_ale_control_set) from [] (cpsw_ale_de

RE: Netperf UDP issue with connected sockets

2016-11-17 Thread David Laight
From: Jesper Dangaard Brouer > Sent: 17 November 2016 14:58 > On Thu, 17 Nov 2016 06:17:38 -0800 > Eric Dumazet wrote: > > > On Thu, 2016-11-17 at 14:42 +0100, Jesper Dangaard Brouer wrote: > > > > > I can see that qdisc layer does not activate xmit_more in this case. > > > > > > > Sure. Not enou

[PATCH net v2 4/7] net: ethernet: ti: cpsw: fix of_node and phydev leaks

2016-11-17 Thread Johan Hovold
Make sure to drop references taken and deregister devices registered during probe on probe errors (including deferred probe) and driver unbind. Specifically, PHY of-node references were never released and fixed-link PHY devices were never deregistered. Fixes: 9e42f715264f ("drivers: net: cpsw: ad

[PATCH net-next v3 3/5] ethtool: (uapi) Add ETHTOOL_PHY_DOWNSHIFT to PHY tunables

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju For operation in cabling environments that are incompatible with 1000BASE-T, PHY device may provide an automatic link speed downshift operation. When enabled, the device automatically changes its 1000BASE-T auto-negotiation to the next slower speed after a configured number o

[PATCH ethtool v3 1/2] ethtool-copy.h:sync with net

2016-11-17 Thread Allan W. Nielsen
From: Raju Lakkaraju This covers kernel changes upto: commit f5a4732f85613b3fb43f8bc33a017e3db3b3605a Author: Raju Lakkaraju Date: Wed Nov 9 16:33:09 2016 +0530 ethtool: (uapi) Add ETHTOOL_PHY_DOWNSHIFT to PHY tunables For operation in cabling environments that are incompatible with

[PATCH net-next v3 0/5] Adding PHY-Tunables and downshift support

2016-11-17 Thread Allan W. Nielsen
Hi All, (This is a re-post of the v3 patch set with a new cover letter - I was not aware that the cover letters was used a commit comments in merge commits). This series add support for PHY tunables, and uses this facility to configure downshifting. The downshifting mechanism is implemented for M

[PATCH net v2 0/7] net: cpsw: fix leaks and probe deferral

2016-11-17 Thread Johan Hovold
This series fixes as number of leaks and issues in the cpsw probe-error and driver-unbind paths, some which specifically prevented deferred probing. Johan v2 - Keep platform device runtime-resumed throughout probe instead of resuming in the probe error path as suggested by Grygorii (patch

[PATCH ethtool v3 0/2] Adding downshift support to ethtool

2016-11-17 Thread Allan W. Nielsen
Hi All, (This is a re-post of the v3 patch set with a new cover letter - I was not aware that the cover letters was used as commit comments in merge commits). This patch implements for set/get downshifting. Downshifting can either be turned on/off, or it can be configured to a specifc count. "c

[PATCH net v2 2/7] net: ethernet: ti: cpsw: fix mdio device reference leak

2016-11-17 Thread Johan Hovold
Make sure to drop the reference taken by of_find_device_by_node() when looking up an mdio device from a phy_id property during probe. Fixes: 549985ee9c72 ("cpsw: simplify the setup of the register pointers") Signed-off-by: Johan Hovold --- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1

Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

2016-11-17 Thread Neftin, Sasha
On 11/13/2016 10:34 AM, Neftin, Sasha wrote: > On 11/11/2016 12:35 AM, Baicar, Tyler wrote: >> Hello Sasha, >> >> On 11/9/2016 11:19 PM, Neftin, Sasha wrote: >>> On 11/9/2016 11:41 PM, Tyler Baicar wrote: Move IRQ free code so that it will happen regardless of the __E1000_DOWN bit. Curren

Re: Netperf UDP issue with connected sockets

2016-11-17 Thread Jesper Dangaard Brouer
On Thu, 17 Nov 2016 06:17:38 -0800 Eric Dumazet wrote: > On Thu, 2016-11-17 at 14:42 +0100, Jesper Dangaard Brouer wrote: > > > I can see that qdisc layer does not activate xmit_more in this case. > > > > Sure. Not enough pressure from the sender(s). > > The bottleneck is not the NIC or qdi

Re: [PATCH] net: sky2: Fix shutdown crash

2016-11-17 Thread Sudeep Holla
On 17/11/16 15:14, Jeremy Linton wrote: The sky2 frequently crashes during machine shutdown with: sky2_get_stats+0x60/0x3d8 [sky2] dev_get_stats+0x68/0xd8 rtnl_fill_stats+0x54/0x140 rtnl_fill_ifinfo+0x46c/0xc68 rtmsg_ifinfo_build_skb+0x7c/0xf0 rtmsg_ifinfo.part.22+0x3c/0x70 rtmsg_ifinfo+0x50/0

RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-17 Thread Rafal Ozieblo
-Original Message- From: Harini Katakam [mailto:harinikatakamli...@gmail.com] Sent: 17 listopada 2016 13:22 To: Rafal Ozieblo Cc: harini.kata...@xilinx.com; nicolas.fe...@atmel.com; netdev@vger.kernel.org; linux-ker...@vger.kernel.org Subject: Re: [RFC PATCH 2/2] net: macb: Add 64 bit add

[PATCH net v2 5/7] net: ethernet: ti: cpsw: fix secondary-emac probe error path

2016-11-17 Thread Johan Hovold
Make sure to deregister the primary device in case the secondary emac fails to probe. kernel BUG at /home/johan/work/omicron/src/linux/net/core/dev.c:7743! ... [] (free_netdev) from [] (cpsw_probe+0x9cc/0xe50) [] (cpsw_probe) from [] (platform_drv_probe+0x5c/0xc0) Fixes: d9ba8f9e6298 ("driver: ne

Re: [Patch net] net: check dead netns for peernet2id_alloc()

2016-11-17 Thread David Miller
From: Cong Wang Date: Wed, 16 Nov 2016 10:27:02 -0800 > Andrei reports we still allocate netns ID from idr after we destroy > it in cleanup_net(). > > cleanup_net(): > ... > idr_destroy(&net->netns_ids); > ... > list_for_each_entry_reverse(ops, &pernet_list, list) > ops_exit_list(ops

Re: [PATCH net-next] net/mlx4_en: remove napi_hash_del() call

2016-11-17 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Nov 2016 05:49:22 -0800 > From: Eric Dumazet > > There is no need calling napi_hash_del()+synchronize_rcu() before > calling netif_napi_del() > > netif_napi_del() does this already. > > Using napi_hash_del() in a driver is useful only when dealing with > a bat

Re: [PATCH net 0/3] net: phy: fix of_node and device leaks

2016-11-17 Thread David Miller
From: Johan Hovold Date: Wed, 16 Nov 2016 15:20:35 +0100 > These patches fix a couple of of_node leaks in the fixed-link code and a > device reference leak in a phy helper. Series applied, thanks.

  1   2   >