Re: [RFC PATCH net-next v2] ipv6: implement consistent hashing for equal-cost multipath routing

2016-11-29 Thread David Lebrun
On 11/30/2016 04:52 AM, Hannes Frederic Sowa wrote: > In the worst case this causes 2GB (order 19) allocations (x == 31) to > happen in GFP_ATOMIC (due to write lock) context and could cause update > failures to the routing table due to fragmentation. Are you sure the > upper limit of 31 is reasona

[PATCH iproute2 V3 2/3] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
Introduce classifying by metadata extracted by the tunnel device. Outer header fields - source/dest ip and tunnel id, are extracted from the metadata when classifying. For example, the following will add a filter on the ingress Qdisc of shared vxlan device named 'vxlan0'. To forward packets with o

[PATCH iproute2 V3 3/3] tc/act_tunnel: Introduce ip tunnel action

2016-11-29 Thread Amir Vadai
This action could be used before redirecting packets to a shared tunnel device, or when redirecting packets arriving from a such a device. The 'unset' action is optional. It is used to explicitly unset the metadata created by the tunnel device during decap. If not used, the metadata will be releas

[PATCH iproute2 V3 0/3] tc: Support for ip tunnel metadata set/unset/classify

2016-11-29 Thread Amir Vadai
Hi, This short series adds support for matching and setting metadata for ip tunnel shared device using the TC system, introduced in kernel 4.9 [1]. Applied and tested on top of commit f3f339e9590a ("cleanup debris from revert") Example usage: $ tc filter add dev vxlan0 protocol ip parent :

[PATCH iproute2 V3 1/3] libnetlink: Introduce rta_getattr_be*()

2016-11-29 Thread Amir Vadai
Add the utility functions rta_getattr_be16() and rta_getattr_be32(), and change existing code to use it. Signed-off-by: Amir Vadai --- bridge/fdb.c | 4 ++-- include/libnetlink.h | 9 + ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c| 2 +- 4 files changed, 13 insertions(+), 4

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
On Wed, Nov 30, 2016 at 9:17 AM, Amir Vadai wrote: > On Tue, Nov 29, 2016 at 07:26:58PM -0800, Stephen Hemminger wrote: (Sending again since I just discovered that Google Inbox is adding an HTML part...) >> The overall design is fine, just a couple nits with the code. >> >> > diff --git a/tc/f_fl

RE: [patch net / RFC] net: fec: increase frame size limitation to actually available buffer

2016-11-29 Thread Andy Duan
From: Nikita Yushchenko Sent: Wednesday, November 30, 2016 2:36 PM >To: Andy Duan ; David S. Miller >; Troy Kisky ; >Andrew Lunn ; Eric Nelson ; Philippe >Reynes ; Johannes Berg ; >netdev@vger.kernel.org >Cc: Chris Healy ; Fabio Estevam >; linux-ker...@vger.kernel.org >Subject: Re: [patch

Re: [PATCH v3 net-next 3/3] openvswitch: Fix skb->protocol for vlan frames.

2016-11-29 Thread Pravin Shelar
On Tue, Nov 29, 2016 at 3:30 PM, Jarno Rajahalme wrote: > Do not always set skb->protocol to be the ethertype of the L3 header. > For a packet with non-accelerated VLAN tags skb->protocol needs to be > the ethertype of the outermost non-accelerated VLAN ethertype. > > Any VLAN offloading is undone

Re: [WIP] net+mlx4: auto doorbell

2016-11-29 Thread Alexei Starovoitov
On Mon, Nov 28, 2016 at 10:58 PM, Eric Dumazet wrote: > { > @@ -496,8 +531,13 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev, > wmb(); > > /* we want to dirty this cache line once */ > - ACCESS_ONCE(ring->last_nr_txbb) = last_nr_txbb; > - ACCESS_ONCE(ring-

Re: [patch net / RFC] net: fec: increase frame size limitation to actually available buffer

2016-11-29 Thread Toshiaki Makita
On 2016/11/30 15:36, Nikita Yushchenko wrote: >> But I think it is not necessary since the driver don't support jumbo frame. > > Hardcoded 1522 raises two separate issues. > > (1) When DSA is in use, frames processed by FEC chip contain DSA tag and > thus can be larger than hardcoded limit of 152

Re: [PATCH v3 net-next 2/3] openvswitch: Use is_skb_forwardable() for length check.

2016-11-29 Thread Pravin Shelar
On Tue, Nov 29, 2016 at 3:30 PM, Jarno Rajahalme wrote: > Use is_skb_forwardable() instead of an explicit length check. This > gets around the apparent MTU check failure in OVS test cases when > skb->protocol is not properly set in case of non-accelerated VLAN > skbs. > > Suggested-by: Pravin She

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Amir Vadai
On Tue, Nov 29, 2016 at 07:26:58PM -0800, Stephen Hemminger wrote: > The overall design is fine, just a couple nits with the code. > > > diff --git a/tc/f_flower.c b/tc/f_flower.c > > index 2d31d1aa832d..1cf0750b5b83 100644 > > --- a/tc/f_flower.c > > +++ b/tc/f_flower.c > > > > > +static int f

Re: [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure

2016-11-29 Thread Alexei Starovoitov
On Wed, Nov 30, 2016 at 07:48:51AM +0100, Thomas Graf wrote: > On 11/29/16 at 04:15pm, Alexei Starovoitov wrote: > > On Tue, Nov 29, 2016 at 02:21:22PM +0100, Thomas Graf wrote: > > ... > > > +#define LWT_BPF_MAX_HEADROOM 128 > > > > why 128? > > btw I'm thinking for XDP to use 256, so metadata ca

Re: [PATCH net-next v3 4/4] bpf: Add tests and samples for LWT-BPF

2016-11-29 Thread Thomas Graf
On 11/29/16 at 04:17pm, Alexei Starovoitov wrote: > On Tue, Nov 29, 2016 at 02:21:23PM +0100, Thomas Graf wrote: > > Adds a series of test to verify the functionality of attaching > > BPF programs at LWT hooks. > > > > Also adds a sample which collects a histogram of packet sizes which > > pass th

Re: [PATCH] netns: avoid disabling irq for netns id

2016-11-29 Thread Cong Wang
On Tue, Nov 29, 2016 at 2:14 PM, Paul Moore wrote: > On Tue, Nov 29, 2016 at 5:11 PM, Paul Moore wrote: >> From: Paul Moore >> >> Bring back commit bc51dddf98c9 ("netns: avoid disabling irq for netns >> id") now that we've fixed some audit multicast issues that caused >> problems with original a

Re: [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure

2016-11-29 Thread Thomas Graf
On 11/29/16 at 04:15pm, Alexei Starovoitov wrote: > On Tue, Nov 29, 2016 at 02:21:22PM +0100, Thomas Graf wrote: > ... > > +#define LWT_BPF_MAX_HEADROOM 128 > > why 128? > btw I'm thinking for XDP to use 256, so metadata can be stored in there. It's an arbitrary limit to catch obvious misconfigur

Re: [patch net / RFC] net: fec: increase frame size limitation to actually available buffer

2016-11-29 Thread Nikita Yushchenko
> But I think it is not necessary since the driver don't support jumbo frame. Hardcoded 1522 raises two separate issues. (1) When DSA is in use, frames processed by FEC chip contain DSA tag and thus can be larger than hardcoded limit of 1522. This issue is not FEC-specific, any driver that hardco

Re: [PATCH net-next v5 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 06:07:18PM -0700, David Ahern wrote: > On 11/29/16 5:59 PM, Alexei Starovoitov wrote: > > On Tue, Nov 29, 2016 at 05:43:08PM -0700, David Ahern wrote: > >> On 11/29/16 1:01 PM, Alexei Starovoitov wrote: > >>> Could you also expose sk_protcol and sk_type as read only fields?

Re: [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 06:52:36PM -0800, John Fastabend wrote: > On 16-11-29 04:15 PM, Alexei Starovoitov wrote: > > On Tue, Nov 29, 2016 at 02:21:22PM +0100, Thomas Graf wrote: > >> Registers new BPF program types which correspond to the LWT hooks: > >> - BPF_PROG_TYPE_LWT_IN => dst_input() >

Re: The ubufs->refcount maybe be subtracted twice when tun_get_user failed

2016-11-29 Thread Jason Wang
On 2016年11月30日 10:53, Jason Wang wrote: On 2016年11月29日 21:27, wangyunjian wrote: Sorry, I didn't describe it clearly. In fact, the second subtraction happens in the function handle_tx, when tun_get_user fails and zcopy_used is ture. Fllowing the steps: I get your meaning. Thanks for the r

Re: [net-next PATCH v3 6/6] virtio_net: xdp, add slowpath case for non contiguous buffers

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 06:50:18PM -0800, John Fastabend wrote: > On 16-11-29 04:37 PM, Alexei Starovoitov wrote: > > On Tue, Nov 29, 2016 at 12:11:33PM -0800, John Fastabend wrote: > >> virtio_net XDP support expects receive buffers to be contiguous. > >> If this is not the case we enable a slowpa

[PATCH net 2/2] macvtap: handle ubuf refcount correctly when meet erros

2016-11-29 Thread Jason Wang
We trigger uarg->callback() immediately after we decide do datacopy even if caller want to do zerocopy. This will cause the callback (vhost_net_zerocopy_callback) decrease the refcount. But when we meet an error afterwards, the error handling in vhost handle_tx() will try to decrease it again. This

[PATCH net 1/2] tun: handle ubuf refcount correctly when meet erros

2016-11-29 Thread Jason Wang
We trigger uarg->callback() immediately after we decide do datacopy even if caller want to do zerocopy. This will cause the callback (vhost_net_zerocopy_callback) decrease the refcount. But when we meet an error afterwards, the error handling in vhost handle_tx() will try to decrease it again. This

Re: netlink: GPF in sock_sndtimeo

2016-11-29 Thread Richard Guy Briggs
On 2016-11-29 15:13, Cong Wang wrote: > On Tue, Nov 29, 2016 at 8:48 AM, Richard Guy Briggs wrote: > > On 2016-11-26 17:11, Cong Wang wrote: > >> It is racy on audit_sock, especially on the netns exit path. > > > > I think that is the only place it is racy. The other places audit_sock > > is set

Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset

2016-11-29 Thread Harini Katakam
Hi David, On Wed, Nov 30, 2016 at 5:35 AM, David Miller wrote: > From: Harini Katakam > Date: Mon, 28 Nov 2016 14:53:49 +0530 > >> In macb_reset_hw, use read-modify-write to disable RX and TX. >> This way exiting settings and reserved bits wont be disturbed. >> Use the same method for clearing s

Re: [PATCH net 00/16] net: fix fixed-link phydev leaks

2016-11-29 Thread David Miller
From: Johan Hovold Date: Mon, 28 Nov 2016 19:24:53 +0100 > This series fixes failures to deregister and free fixed-link phydevs > that have been registered using the of_phy_register_fixed_link() > interface. > > All but two drivers currently fail to do this and this series fixes most > of them w

Re: [RFC PATCH net-next v2] ipv6: implement consistent hashing for equal-cost multipath routing

2016-11-29 Thread Tom Herbert
On Tue, Nov 29, 2016 at 9:15 AM, David Lebrun wrote: > When multiple nexthops are available for a given route, the routing engine > chooses a nexthop by computing the flow hash through get_hash_from_flowi6 > and by taking that value modulo the number of nexthops. The resulting value > indexes the

Re: [RFC PATCH net-next v2] ipv6: implement consistent hashing for equal-cost multipath routing

2016-11-29 Thread Hannes Frederic Sowa
Hi, On Tue, Nov 29, 2016, at 18:15, David Lebrun wrote: > When multiple nexthops are available for a given route, the routing > engine > chooses a nexthop by computing the flow hash through get_hash_from_flowi6 > and by taking that value modulo the number of nexthops. The resulting > value > index

Re: [PATCH net-next 5/5] udp: add recvmmsg implementation

2016-11-29 Thread Hannes Frederic Sowa
Hello, On Wed, Nov 30, 2016, at 01:22, David Miller wrote: > From: Hannes Frederic Sowa > Date: Fri, 25 Nov 2016 18:09:00 +0100 > > > During review we discussed on how to handle major errors in the kernel: > > > > The old code and the new code still can report back success even though > > the k

Re: [PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-29 Thread Stephen Hemminger
The overall design is fine, just a couple nits with the code. > diff --git a/tc/f_flower.c b/tc/f_flower.c > index 2d31d1aa832d..1cf0750b5b83 100644 > --- a/tc/f_flower.c > +++ b/tc/f_flower.c > > +static int flower_parse_key_id(char *str, int type, struct nlmsghdr *n) str is not modified, the

[net-next v2] neigh: remove duplicate check for same neigh

2016-11-29 Thread Zhang Shengju
Currently loop index 'idx' is used as the index in the neigh list of interest. It's increased only when the neigh is dumped. It's not the absolute index in the list. Because there is no info to record which neigh has already be scanned by previous loop. This will cause the filtered out neighs to be

Re: [PATCH iproute2 1/2] devlink: Add usage help for eswitch subcommand

2016-11-29 Thread Stephen Hemminger
On Sun, 27 Nov 2016 13:21:02 +0200 Roi Dayan wrote: > Add missing usage help for devlink dev eswitch subcommand. > > Signed-off-by: Roi Dayan > Reviewed-by: Or Gerlitz Ok. Applied both, will show in next merge

[PATCH v4 3/5] net: asix: Fix AX88772x resume failures

2016-11-29 Thread ASIX_Allan [Office]
The change fixes AX88772x resume failure by - Restore incorrect AX88772A PHY registers when resetting - Need to stop MAC operation when suspending - Need to restart MII when restoring PHY Signed-off-by: Allan Chou Signed-off-by: Robert Foss Tested-by: Robert Foss Tested-by: Jon Hunter Tested-b

Re: The ubufs->refcount maybe be subtracted twice when tun_get_user failed

2016-11-29 Thread Jason Wang
On 2016年11月29日 21:27, wangyunjian wrote: Sorry, I didn't describe it clearly. In fact, the second subtraction happens in the function handle_tx, when tun_get_user fails and zcopy_used is ture. Fllowing the steps: I get your meaning. Thanks for the reporting. Will post patches (since macvtap

Re: [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure

2016-11-29 Thread John Fastabend
On 16-11-29 04:15 PM, Alexei Starovoitov wrote: > On Tue, Nov 29, 2016 at 02:21:22PM +0100, Thomas Graf wrote: >> Registers new BPF program types which correspond to the LWT hooks: >> - BPF_PROG_TYPE_LWT_IN => dst_input() >> - BPF_PROG_TYPE_LWT_OUT => dst_output() >> - BPF_PROG_TYPE_LWT_XM

Re: [net-next PATCH v3 6/6] virtio_net: xdp, add slowpath case for non contiguous buffers

2016-11-29 Thread John Fastabend
On 16-11-29 04:37 PM, Alexei Starovoitov wrote: > On Tue, Nov 29, 2016 at 12:11:33PM -0800, John Fastabend wrote: >> virtio_net XDP support expects receive buffers to be contiguous. >> If this is not the case we enable a slowpath to allow connectivity >> to continue but at a significan performance

Re: [net-next] neigh: remove duplicate check for same neigh

2016-11-29 Thread David Ahern
On 11/29/16 6:27 PM, 张胜举 wrote: > This has less changes, but I preferred to add a new function to do the > filter logic, this is the same as your code @rtnl_dump_ifinfo(). I'd prefer it to stay in line as it is now. You can save the cycles of filtering on already viewed entries without an overha

Re: [PATCH net-next] hv_netvsc: remove excessive logging on MTU change

2016-11-29 Thread David Miller
From: Vitaly Kuznetsov Date: Mon, 28 Nov 2016 18:25:44 +0100 > When we change MTU or the number of channels on a netvsc device we get the > following logged: > > hv_netvsc bf5edba8...: net device safe to remove > hv_netvsc: hv_netvsc channel opened successfully > hv_netvsc bf5edba8...: Send s

Re: [patch net-next 0/4] mlxsw: couple of enhancements and fixes

2016-11-29 Thread David Miller
From: Jiri Pirko Date: Mon, 28 Nov 2016 18:01:22 +0100 > Couple of enhancements and fixes from Ido. Series applied, thanks Jiri.

Re: [PATCH 1/1] GSO: Reload iph after pskb_may_pull

2016-11-29 Thread David Miller
From: Arnaldo Carvalho de Melo Date: Mon, 28 Nov 2016 12:36:58 -0300 > As it may get stale and lead to use after free. > > Acked-by: Eric Dumazet > Cc: Alexander Duyck > Cc: Andrey Konovalov > Fixes: cbc53e08a793 ("GSO: Add GSO type for fixed IPv4 ID") > Signed-off-by: Arnaldo Carvalho de Mel

Re: [patch net] sched: cls_flower: remove from hashtable only in case skip sw flag is not set

2016-11-29 Thread David Miller
From: Jiri Pirko Date: Mon, 28 Nov 2016 15:40:13 +0100 > From: Jiri Pirko > > Be symmetric to hashtable insert and remove filter from hashtable only > in case skip sw flag is not set. > > Fixes: e69985c67c33 ("net/sched: cls_flower: Introduce support in SKIP SW > flag") > Signed-off-by: Jiri

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-29 Thread David Miller
From: Eric Dumazet Date: Mon, 28 Nov 2016 06:26:49 -0800 > From: Eric Dumazet > > pskb_may_pull() can reallocate skb->head, we need to reload dh pointer > in dccp_invalid_packet() or risk use after free. > > Bug found by Andrey Konovalov using syzkaller. > > Signed-off-by: Eric Dumazet > Rep

Re: [PATCH net-next v2] mlxsw: switchib: add MLXSW_PCI dependency

2016-11-29 Thread David Miller
From: Arnd Bergmann Date: Mon, 28 Nov 2016 15:26:04 +0100 > The newly added switchib driver fails to link if MLXSW_PCI=m: > > drivers/net/ethernet/mellanox/mlxsw/mlxsw_switchib.o: In > function^Cmlxsw_sib_module_exit': > switchib.c:(.exit.text+0x8): undefined reference to > `mlxsw_pci_driver_u

Re: [PATCH v2] net: phy: Fix use after free in phy_detach()

2016-11-29 Thread David Miller
From: Geert Uytterhoeven Date: Mon, 28 Nov 2016 15:18:31 +0100 > If device_release_driver(&phydev->mdio.dev) is called, it releases all > resources belonging to the PHY device. Hence the subsequent call to > phy_led_triggers_unregister() will access already freed memory when > unregistering the L

Re: [PATCH v2 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-29 Thread David Miller
From: Zumeng Chen Date: Mon, 28 Nov 2016 21:55:00 +0800 > When a hardware issue happened as described by inline comments, the register > write pattern looks like the following: > > > + wmb(); > > > There might be a memory barrier between these two write operations, so add wmb > to ensure an f

RE: [net-next] neigh: remove duplicate check for same neigh

2016-11-29 Thread 张胜举
> -Original Message- > From: David Ahern [mailto:d...@cumulusnetworks.com] > Sent: Wednesday, November 30, 2016 12:23 AM > To: Zhang Shengju ; > netdev@vger.kernel.org > Subject: Re: [net-next] neigh: remove duplicate check for same neigh > > On 11/29/16 1:22 AM, Zhang Shengju wrote: > > @

Re: [PATCH net-next v3 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-29 Thread Florian Fainelli
On 11/29/2016 05:13 PM, David Miller wrote: > From: Florian Fainelli > Date: Tue, 29 Nov 2016 16:43:20 -0800 > >> On 11/29/2016 04:38 PM, David Miller wrote: >>> From: Jerome Brunet >>> Date: Mon, 28 Nov 2016 10:46:45 +0100 >>> This patchset fixes an issue with the OdroidC2 board (DWMAC + R

Re: [PATCH net-next v3 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-29 Thread David Miller
From: Florian Fainelli Date: Tue, 29 Nov 2016 16:43:20 -0800 > On 11/29/2016 04:38 PM, David Miller wrote: >> From: Jerome Brunet >> Date: Mon, 28 Nov 2016 10:46:45 +0100 >> >>> This patchset fixes an issue with the OdroidC2 board (DWMAC + RTL8211F). >>> The platform seems to enter LPI on the R

Re: [PATCH net-next v5 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-29 Thread David Ahern
On 11/29/16 5:59 PM, Alexei Starovoitov wrote: > On Tue, Nov 29, 2016 at 05:43:08PM -0700, David Ahern wrote: >> On 11/29/16 1:01 PM, Alexei Starovoitov wrote: >>> Could you also expose sk_protcol and sk_type as read only fields? >> >> Those are bitfields in struct sock, so can't use offsetof or si

Re: [PATCH net v2 1/1] net: macb: fix the RX queue reset in macb_rx()

2016-11-29 Thread David Miller
From: Cyrille Pitchen Date: Mon, 28 Nov 2016 14:40:55 +0100 > On macb only (not gem), when a RX queue corruption was detected from > macb_rx(), the RX queue was reset: during this process the RX ring > buffer descriptor was initialized by macb_init_rx_ring() but we forgot > to also set bp->rx_tai

Re: [PATCH net-next v5 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 05:43:08PM -0700, David Ahern wrote: > On 11/29/16 1:01 PM, Alexei Starovoitov wrote: > > Could you also expose sk_protcol and sk_type as read only fields? > > Those are bitfields in struct sock, so can't use offsetof or sizeof. Any > existing use cases that try to load a

Re: [PATCH] stmmac: fix comments, make debug output consistent

2016-11-29 Thread David Miller
From: Pavel Machek Date: Mon, 28 Nov 2016 12:55:59 +0100 > Fix comments, add some new, and make debugfs output consistent. > > Signed-off-by: Pavel Machek Applied to net-next, thanks.

Re: [PATCH net-next v2] bpf: cgroup: fix documentation of __cgroup_bpf_update()

2016-11-29 Thread David Miller
From: Daniel Mack Date: Mon, 28 Nov 2016 14:11:04 +0100 > There's a 'not' missing in one paragraph. Add it. > > Signed-off-by: Daniel Mack > Reported-by: Rami Rosen > Fixes: 3007098494be ("cgroup: add support for eBPF programs") Applied, thanks.

[PATCH net-next 1/1] driver: ipvlan: Remove useless member mtu_adj of struct ipvl_dev

2016-11-29 Thread fgao
From: Gao Feng The mtu_adj is initialized to zero when alloc mem, there is no any assignment to mtu_adj. It is only used in ipvlan_adjust_mtu as one right value. So it is useless member of struct ipvl_dev, then remove it. Signed-off-by: Gao Feng --- drivers/net/ipvlan/ipvlan.h | 1 - driv

Re: Crash due to mutex genl_lock called from RCU context

2016-11-29 Thread David Miller
From: Herbert Xu Date: Mon, 28 Nov 2016 19:22:12 +0800 > netlink: Call cb->done from a worker thread > > The cb->done interface expects to be called in process context. > This was broken by the netlink RCU conversion. This patch fixes > it by adding a worker struct to make the cb->done call whe

Re: [PATCH net V2] net/sched: pedit: make sure that offset is valid

2016-11-29 Thread David Miller
From: Amir Vadai Date: Mon, 28 Nov 2016 12:56:40 +0200 > Add a validation function to make sure offset is valid: > 1. Not below skb head (could happen when offset is negative). > 2. Validate both 'offset' and 'at'. > > Signed-off-by: Amir Vadai Applied and queued up for -stable, thanks.

Re: [PATCH net-next v3 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-29 Thread Florian Fainelli
On 11/29/2016 04:38 PM, David Miller wrote: > From: Jerome Brunet > Date: Mon, 28 Nov 2016 10:46:45 +0100 > >> This patchset fixes an issue with the OdroidC2 board (DWMAC + RTL8211F). >> The platform seems to enter LPI on the Rx path too often while performing >> relatively high TX transfer. This

Re: [PATCH net-next v5 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-29 Thread David Ahern
On 11/29/16 1:01 PM, Alexei Starovoitov wrote: > Could you also expose sk_protcol and sk_type as read only fields? Those are bitfields in struct sock, so can't use offsetof or sizeof. Any existing use cases that try to load a bitfield in a bpf that I can look at?

Re: [PATCH] cpsw: ethtool: add support for nway reset

2016-11-29 Thread David Miller
From: yegorsli...@googlemail.com Date: Mon, 28 Nov 2016 10:47:52 +0100 > From: Yegor Yefremov > > This patch adds support for ethtool's '-r' command. Restarting > N-WAY negotiation can be useful to activate newly changed EEE > settings etc. > > Signed-off-by: Yegor Yefremov This doesn't apply

Re: [PATCH net-next v3 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-29 Thread David Miller
From: Jerome Brunet Date: Mon, 28 Nov 2016 10:46:45 +0100 > This patchset fixes an issue with the OdroidC2 board (DWMAC + RTL8211F). > The platform seems to enter LPI on the Rx path too often while performing > relatively high TX transfer. This eventually break the link (both Tx and > Rx), and re

Re: [net-next PATCH v3 6/6] virtio_net: xdp, add slowpath case for non contiguous buffers

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 12:11:33PM -0800, John Fastabend wrote: > virtio_net XDP support expects receive buffers to be contiguous. > If this is not the case we enable a slowpath to allow connectivity > to continue but at a significan performance overhead associated with > linearizing data. To make

Re: bpf debug info

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 09:23:10PM +0100, Daniel Borkmann wrote: > On 11/29/2016 07:51 PM, Alexei Starovoitov wrote: > >On Tue, Nov 29, 2016 at 03:38:18PM +, Jakub Kicinski wrote: > [...] > So next step is to improve verifier messages to be more human friendly. > The step after is to in

Re: [PATCH net-next 2/2] tcp: allow to turn tcp timestamp randomization off

2016-11-29 Thread Florian Westphal
Eric Dumazet wrote: > On Tue, 2016-11-29 at 16:45 +0100, Florian Westphal wrote: > > Eric says: "By looking at tcpdump, and TS val of xmit packets of multiple > > flows, we can deduct the relative qdisc delays (think of fq pacing). > > This should work even if we have one flow per remote peer." >

Re: [PATCH net-next 5/5] udp: add recvmmsg implementation

2016-11-29 Thread David Miller
From: Hannes Frederic Sowa Date: Fri, 25 Nov 2016 18:09:00 +0100 > During review we discussed on how to handle major errors in the kernel: > > The old code and the new code still can report back success even though > the kernel got back an EFAULT while copying from kernel space to user > space (

Re: [PATCH] net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during resume

2016-11-29 Thread Ivan Khoronzhuk
On Tue, Nov 29, 2016 at 04:27:03PM -0600, Grygorii Strashko wrote: > netif_set_real_num_tx/rx_queues() are required to be called with rtnl_lock > taken, otherwise ASSERT_RTNL() warning will be triggered - which happens > now during System resume from suspend: > cpsw_resume() > |- cpsw_ndo_open() >

Re: [PATCH net-next v3 4/4] bpf: Add tests and samples for LWT-BPF

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 02:21:23PM +0100, Thomas Graf wrote: > Adds a series of test to verify the functionality of attaching > BPF programs at LWT hooks. > > Also adds a sample which collects a histogram of packet sizes which > pass through an LWT hook. > > $ ./lwt_len_hist.sh > Starting netserv

Re: [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure

2016-11-29 Thread Alexei Starovoitov
On Tue, Nov 29, 2016 at 02:21:22PM +0100, Thomas Graf wrote: > Registers new BPF program types which correspond to the LWT hooks: > - BPF_PROG_TYPE_LWT_IN => dst_input() > - BPF_PROG_TYPE_LWT_OUT => dst_output() > - BPF_PROG_TYPE_LWT_XMIT => lwtunnel_xmit() > > The separate program types

Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset

2016-11-29 Thread David Miller
From: Harini Katakam Date: Mon, 28 Nov 2016 14:53:49 +0530 > In macb_reset_hw, use read-modify-write to disable RX and TX. > This way exiting settings and reserved bits wont be disturbed. > Use the same method for clearing statistics as well. > > Signed-off-by: Harini Katakam This doesn't make

Re: [PATCH] net: stmmac: enable tx queue 0 for gmac4 IPs synthesized with multiple TX queues

2016-11-29 Thread David Miller
From: Niklas Cassel Date: Thu, 24 Nov 2016 15:36:33 +0100 > From: Niklas Cassel > > The dwmac4 IP can synthesized with 1-8 number of tx queues. > On an IP synthesized with DWC_EQOS_NUM_TXQ > 1, all txqueues are disabled > by default. For these IPs, the bitfield TXQEN is R/W. > > Always enable

RE: [PATCH net-netx] net: lan78xx: add LAN7801 MAC-only support

2016-11-29 Thread Woojung.Huh
> > It seems phy_unregister_fixup() will be needed for module network driver. > > phy_fixup_list keeps the list even after unloading module. > > Do you know any update is waiting for submission? If not, I'll make patch. > > Oh, yes, that's a good point, we need such a thing, so far fixups have > b

Re: [PATCH] net: arc_emac: add dependencies on associated arches and compile test

2016-11-29 Thread David Miller
From: Peter Robinson Date: Mon, 28 Nov 2016 07:12:37 + > Add dependencies on the architectures that support these devices and > add compile test to ensure ongoing code build coverage. > > Signed-off-by: Peter Robinson Applied.

Re: [PATCH net-netx] net: lan78xx: add LAN7801 MAC-only support

2016-11-29 Thread Florian Fainelli
On 11/29/2016 03:55 PM, woojung@microchip.com wrote: >> There are two ways to get these settings propagated to the PHY driver: >> >> - using a board fixup which is going to be invoked during >> drv->config_init() time >> >> - specifying a phydev->dev_flags and reading it from the PHY driver to

RE: [PATCH net-netx] net: lan78xx: add LAN7801 MAC-only support

2016-11-29 Thread Woojung.Huh
> There are two ways to get these settings propagated to the PHY driver: > > - using a board fixup which is going to be invoked during > drv->config_init() time > > - specifying a phydev->dev_flags and reading it from the PHY driver to > act upon and configure the PHY based on that value, there a

Re: [PATCH v2 net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-29 Thread Jarno Rajahalme
> On Nov 28, 2016, at 11:21 PM, Pravin Shelar wrote: > > On Mon, Nov 28, 2016 at 6:41 PM, Jarno Rajahalme wrote: >> Do not set skb->protocol to be the ethertype of the L3 header, unless >> the packet only has the L3 header. For a non-hardware offloaded VLAN >> frame skb->protocol needs to be o

Re: [PATCH net-next 1/7] net/mlx5e: Implement Fragmented Work Queue (WQ)

2016-11-29 Thread Eric Dumazet
On Wed, 2016-11-30 at 00:19 +0200, Saeed Mahameed wrote: > From: Tariq Toukan > > Add new type of struct mlx5_frag_buf which is used to allocate fragmented > buffers rather than contiguous, and make the Completion Queues (CQs) use > it as they are big (default of 2MB per CQ in Striding RQ). > >

[PATCH v3 net-next 2/3] openvswitch: Use is_skb_forwardable() for length check.

2016-11-29 Thread Jarno Rajahalme
Use is_skb_forwardable() instead of an explicit length check. This gets around the apparent MTU check failure in OVS test cases when skb->protocol is not properly set in case of non-accelerated VLAN skbs. Suggested-by: Pravin Shelar Fixes: 5108bbaddc ("openvswitch: add processing of L3 packets")

[PATCH v3 net-next 1/3] openvswitch: Add a missing break statement.

2016-11-29 Thread Jarno Rajahalme
Add a break statement to prevent fall-through from OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL. Without the break actions setting ethernet addresses fail to validate with log messages complaining about invalid tunnel attributes. Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets") Sign

[PATCH v3 net-next 3/3] openvswitch: Fix skb->protocol for vlan frames.

2016-11-29 Thread Jarno Rajahalme
Do not always set skb->protocol to be the ethertype of the L3 header. For a packet with non-accelerated VLAN tags skb->protocol needs to be the ethertype of the outermost non-accelerated VLAN ethertype. Any VLAN offloading is undone on the OVS netlink interface, and any VLAN tags added by userspac

Re: bnx2 breaks Dell R815 BMC IPMI since 4.8

2016-11-29 Thread Gavin Shan
On Tue, Nov 29, 2016 at 07:57:51AM +0100, Brice Goglin wrote: >Hello > >My Dell PowerEdge R815 doesn't have IPMI anymore when I boot a 4.8 >kernel, the BMC doesn't even ping anymore. Its Ethernet devices are 4 of >those: > >01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Giga

RE: [PATCH net-netx] net: lan78xx: add LAN7801 MAC-only support

2016-11-29 Thread Woojung.Huh
> There are two ways to get these settings propagated to the PHY driver: > > - using a board fixup which is going to be invoked during > drv->config_init() time > > - specifying a phydev->dev_flags and reading it from the PHY driver to > act upon and configure the PHY based on that value, there a

Re: [PATCH net] fib_trie: Avoid expensive update of suffix length when not required

2016-11-29 Thread Alexander Duyck
On Tue, Nov 29, 2016 at 9:46 AM, Robert Shearman wrote: > With certain distributions of routes it can take a long time to add > and delete further routes at scale. For example, with a route for > 10.37.96.0/20 present it takes 47s to add ~200k contiguous /24 routes > from 8.0.0.0/24 through to 11.

Re: netlink: GPF in sock_sndtimeo

2016-11-29 Thread Cong Wang
On Tue, Nov 29, 2016 at 8:48 AM, Richard Guy Briggs wrote: > On 2016-11-26 17:11, Cong Wang wrote: >> It is racy on audit_sock, especially on the netns exit path. > > I think that is the only place it is racy. The other places audit_sock > is set is when the socket failure has just triggered a re

[PATCH for-next 1/6] IB/hns: Fix the bug when destroy qp

2016-11-29 Thread Salil Mehta
From: "Wei Hu (Xavier)" If send queue is still working when qp is in reset state by modify qp in destroy qp function, hardware will hold on and don't work in hip06 SoC. In current codes, RoCE driver check hardware pointer of sending and hardware pointer of processing to ensure that hardware has p

[PATCH for-next 6/6] IB/hns: Fix the IB device name

2016-11-29 Thread Salil Mehta
From: Lijun Ou This patch mainly fix the name for IB device in order to match with libhns. Signed-off-by: Lijun Ou Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_roce

Re: qed, qedi patchset submission

2016-11-29 Thread Arun Easi
Hi David, As we are preparing to post V3 of the qed (drivers/net/) and qedi (drivers/scsi/), I would like to get your opinion on the "qedi" part. As qedi (the iSCSI driver) is dependent on the accompanying "qed" changes, qedi changes have to follow or be together with qed changes. Martin is ok

[PATCH for-next 5/6] IB/hns: Fix the bug when free cq

2016-11-29 Thread Salil Mehta
From: Shaobo Xu If the resources of cq are freed while executing the user case, hardware can not been notified in hip06 SoC. Then hardware will hold on when it writes the cq buffer which has been released. In order to slove this problem, RoCE driver checks the CQE counter, and ensure that the ou

[PATCH for-next 3/6] IB/hns: Fix the bug of setting port mtu

2016-11-29 Thread Salil Mehta
From: "Wei Hu (Xavier)" In hns_roce driver, we need not call iboe_get_mtu to reduce IB headers from effective IBoE MTU because hr_dev->caps.max_mtu has already been reduced. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c | 16 ++--

[PATCH for-next 2/6] IB/hns: Fix the bug when free mr

2016-11-29 Thread Salil Mehta
From: Shaobo Xu If the resources of mr are freed while executing the user case, hardware can not been notified in hip06 SoC. Then hardware will hold on when it reads the payload by the PA which has been released. In order to slove this problem, RoCE driver creates 8 reserved loopback QPs to ensu

[PATCH for-next 4/6] IB/hns: Delete the redundant memset operation

2016-11-29 Thread Salil Mehta
From: "Wei Hu (Xavier)" It deleted the redundant memset operation because the memory allocated by ib_alloc_device has been set zero. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c |3 --- 1 file changed, 3 deletions(-) diff --git a

[PATCH for-next 0/6] IB/hns: Bug Fixes for HNS RoCE Driver

2016-11-29 Thread Salil Mehta
This patch-set contains bug fixes for the HNS RoCE driver. Lijun Ou (1): IB/hns: Fix the IB device name Shaobo Xu (2): IB/hns: Fix the bug when free mr IB/hns: Fix the bug when free cq Wei Hu (Xavier) (3): IB/hns: Fix the bug when destroy qp IB/hns: Fix the bug of setting port mtu IB

[PATCH] ethtool: mark mask values as ULL values

2016-11-29 Thread Jacob Keller
If compiling with signed checks enabled, there will be warnings generated by the ETHTOOL_RX_FLOW_SPEC_RING(_VF) masks. These are currently marked as signed constants, which will generate warnings when masking with unsigned values. Avoid this by marking them explicitly as unsigned values. Signed-of

Re: 4.9-rc7: (forcedeth?) BUG: sleeping function called from invalid context at kernel/irq/manage.c:110

2016-11-29 Thread Eric Dumazet
On Tue, 2016-11-29 at 12:06 -0800, Linus Torvalds wrote: > On Nov 29, 2016 11:58 AM, "Eric Dumazet" > wrote: > > > > nv_do_nic_poll() is simply buggy and needs a fix. > > > > synchronize_irq() can sleep. > > Yes, but why did it start showing up now? None of this has changed as > far as I can see?

[PATCH] net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during resume

2016-11-29 Thread Grygorii Strashko
netif_set_real_num_tx/rx_queues() are required to be called with rtnl_lock taken, otherwise ASSERT_RTNL() warning will be triggered - which happens now during System resume from suspend: cpsw_resume() |- cpsw_ndo_open() |- netif_set_real_num_tx/rx_queues() |- ASSERT_RTNL(); Hence, fix it by

[PATCH net-next 4/7] net/mlx5e: Remove redundant hashtable lookup in configure flower

2016-11-29 Thread Saeed Mahameed
From: Roi Dayan We will never find a flow with the same cookie as cls_flower always allocates a new flow and the cookie is the allocated memory address. Fixes: e3a2b7ed018e ("net/mlx5e: Support offload cls_flower with drop action") Signed-off-by: Roi Dayan Reviewed-by: Hadar Hen Zion Signed-of

[PATCH net-next 2/7] net/mlx5e: Move function mlx5e_create_umr_mkey

2016-11-29 Thread Saeed Mahameed
From: Tariq Toukan In next patch we are going to create a UMR MKey per RQ, we need mlx5e_create_umr_mkey declared before mlx5e_create_rq. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 74 +++ 1 file change

[PATCH net-next 3/7] net/mlx5e: Create UMR MKey per RQ

2016-11-29 Thread Saeed Mahameed
From: Tariq Toukan In Striding RQ implementation, we used a single UMR (User-Mode Memory Registration) memory key for all RQs. When the product of RQs number*size gets high, we hit a limitation of u16 field size in FW. Here we move to using a UMR memory key per RQ, so we can scale to any number

[PATCH net-next 7/7] net/mlx5e: Remove flow encap entry in the correct place

2016-11-29 Thread Saeed Mahameed
From: Roi Dayan Handling flow encap entry should be inside tc del flow and is only relevant for offloaded eswitch TC rules. Fixes: 11a457e9b6c1 ("net/mlx5e: Add basic TC tunnel set action for SRIOV offloads") Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed ---

[PATCH net-next 6/7] net/mlx5e: Refactor tc del flow to accept mlx5e_tc_flow instance

2016-11-29 Thread Saeed Mahameed
From: Roi Dayan Change the function that deletes offloaded TC rule to get struct mlx5e_tc_flow instance which contains both the flow handle and flow attributes. This is a cleanup needed for downstream patches, it doesn't change any functionality. Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz

[PATCH net-next 0/7] Mellanox 100G mlx5 updates 2016-11-29

2016-11-29 Thread Saeed Mahameed
Hi Dave, The following series from Tariq and Roi, provides some critical fixes and updates for the mlx5e driver. >From Tariq: - Fix driver coherent memory huge allocation issues by fragmenting completion queues, in a way that is transparent to the netdev driver by providing a new buffer t

[PATCH net-next 1/7] net/mlx5e: Implement Fragmented Work Queue (WQ)

2016-11-29 Thread Saeed Mahameed
From: Tariq Toukan Add new type of struct mlx5_frag_buf which is used to allocate fragmented buffers rather than contiguous, and make the Completion Queues (CQs) use it as they are big (default of 2MB per CQ in Striding RQ). This fixes the failures of type: "mlx5e_open_locked: mlx5e_open_channel

  1   2   3   4   >