Re: [PATCH 3/5] net: dsa: ksz: Factor out common tag code

2018-12-10 Thread Andrew Lunn
> So this ksz_tag_ops is still not acceptable? As I understand the kernel is > using this mechanism all over the places. Hi Tristram It is used all other the place, but generally, not in the hot path, just the control plain. > What is left is a direct copying of the transmit and receive functio

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Phil Sutter
Hi, On Tue, Dec 11, 2018 at 01:45:52PM +0800, Herbert Xu wrote: > On Mon, Dec 10, 2018 at 10:17:20PM +0100, Arnd Bergmann wrote: > > This is one of only two files that initialize a semaphore to a negative > > value. We don't really need the two semaphores here at all, but can do > > the same thing

[PATCH] VSOCK: bind to random port for VMADDR_PORT_ANY

2018-12-10 Thread Lepton Wu
The old code always starts from fixed port for VMADDR_PORT_ANY. Sometimes when VMM crashed, there is still orphaned vsock which is waiting for close timer, then it could cause connection time out for new started VM if they are trying to connect to same port with same guest cid since the new packets

Re: [net-next 12/12] net/sched: Remove egdev mechanism

2018-12-10 Thread Or Gerlitz
On Tue, Dec 11, 2018 at 3:09 AM Jakub Kicinski wrote: > > On Mon, 10 Dec 2018 16:27:01 -0800, Saeed Mahameed wrote: > > From: Oz Shlomo > > > > The egdev mechanism was replaced by the TC indirect block notifications > > platform. > > > > Signed-off-by: Oz Shlomo > > Reviewed-by: Eli Britstein >

Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-10 Thread David Miller
From: YueHaibing Date: Tue, 11 Dec 2018 11:13:39 +0800 > gcc warning this: > > drivers/net/ieee802154/ca8210.c:730:10: warning: > comparison is always false due to limited range of data type [-Wtype-limits] > > 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. > This patch

Re: [PATCH net-next] neighbor: Add protocol attribute

2018-12-10 Thread David Miller
From: David Ahern Date: Mon, 10 Dec 2018 19:47:33 -0700 > On 12/7/18 4:45 PM, David Miller wrote: >> >> Right, neigh->ha[] should probably be kept 8-byte aligned. >> > > From what I can see ha is only used with memcpy, and neighbour struct is > annotated with __randomize_layout. Are you saying

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Herbert Xu
On Mon, Dec 10, 2018 at 10:17:20PM +0100, Arnd Bergmann wrote: > This is one of only two files that initialize a semaphore to a negative > value. We don't really need the two semaphores here at all, but can do > the same thing in more conventional and more effient way, by using a > single waitqueue

Re: [PATCH net-next] rhashtable: further improve stability of rhashtable_walk

2018-12-10 Thread Herbert Xu
Hi Neil: On Mon, Dec 10, 2018 at 09:50:43AM +1100, NeilBrown wrote: > I think it was agreed that I would not pursue features that were only > of use to out-of-tree code, but I don't think that applies here. This > is not a feature, this is a quality-of-implementation improvement. > There are

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-10 Thread NeilBrown
On Fri, Nov 30 2018, Bjørn Mork wrote: > g...@kernel.org writes: > >> I have been working towards supporting the MT7530 switch as used in the >> MediaTek MT7621 SoC. Unlike the MediaTek MT7623 the MT7621 is built around >> a dual core MIPS CPU architecture. But underneath it is what appears to >>

[PATCH] net/ibmvnic: Remove tests of member address

2018-12-10 Thread Wen Yang
The driver was checking for non-NULL address. - adapter->napi[i] This is pointless as these will be always non-NULL, since the 'dapter->napi' is allocated in init_napi(). It is safe to get rid of useless checks for addresses to fix the coccinelle warning: >>drivers/net/ethernet/ibm/ibmvnic.c: test

[PATCH] drivers: net: xgene: Remove unnecessary forward declarations

2018-12-10 Thread Nathan Chancellor
Clang warns: drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning: tentative array definition assumed to have one element static const struct acpi_device_id xgene_enet_acpi_match[]; ^ 1 warning generated. Both xgene_enet_acpi_match and xgene_enet_of_m

Re: [PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling

2018-12-10 Thread Michael S. Tsirkin
On Tue, Dec 11, 2018 at 11:06:43AM +0800, Jason Wang wrote: > > On 2018/12/11 上午9:34, Michael S. Tsirkin wrote: > > On Mon, Dec 10, 2018 at 05:44:52PM +0800, Jason Wang wrote: > > > When we try to do rx busy polling in tx path in commit 441abde4cd84 > > > ("net: vhost: add rx busy polling in tx pa

Re: [PATCH net-next v2] tun: replace get_cpu_ptr with this_cpu_ptr when bh disabled

2018-12-10 Thread Michael S. Tsirkin
On Tue, Dec 11, 2018 at 11:43:07AM +0900, Prashant Bhole wrote: > tun_xdp_one() runs with local bh disabled. So there is no need to > disable preemption by calling get_cpu_ptr while updating stats. This > patch replaces the use of get_cpu_ptr() with this_cpu_ptr() as a > micro-optimization. Also re

[PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-10 Thread YueHaibing
gcc warning this: drivers/net/ieee802154/ca8210.c:730:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. This patch change the type of 'len' to unsigned int to avoid this,also fix the gcc

Re: [PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling

2018-12-10 Thread Jason Wang
On 2018/12/11 上午9:34, Michael S. Tsirkin wrote: On Mon, Dec 10, 2018 at 05:44:52PM +0800, Jason Wang wrote: When we try to do rx busy polling in tx path in commit 441abde4cd84 ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex after tx vq mutex is held. This may lead deadlock

Re: [PATCH net 0/4] Fix various issue of vhost

2018-12-10 Thread Jason Wang
On 2018/12/11 上午3:47, David Miller wrote: From: Jason Wang Date: Mon, 10 Dec 2018 17:44:50 +0800 This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through

Re: [PATCH net-next] neighbor: Add protocol attribute

2018-12-10 Thread David Ahern
On 12/7/18 4:45 PM, David Miller wrote: > > Right, neigh->ha[] should probably be kept 8-byte aligned. > >From what I can see ha is only used with memcpy, and neighbour struct is annotated with __randomize_layout. Are you saying that ha should be marked with __aligned(8)? @@ -150,7 +150,7 @@ s

[PATCH net-next v2] tun: replace get_cpu_ptr with this_cpu_ptr when bh disabled

2018-12-10 Thread Prashant Bhole
tun_xdp_one() runs with local bh disabled. So there is no need to disable preemption by calling get_cpu_ptr while updating stats. This patch replaces the use of get_cpu_ptr() with this_cpu_ptr() as a micro-optimization. Also removes related put_cpu_ptr call. Acked-by: Jason Wang Signed-off-by: Pr

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-10 Thread David Gibson
On Thu, Dec 06, 2018 at 08:45:09AM +0200, Leon Romanovsky wrote: > On Thu, Dec 06, 2018 at 03:19:51PM +1100, David Gibson wrote: > > Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when > > unbound from their regular driver and attached to vfio-pci in order to pass > > them throug

Re: pull-request: bpf-next 2018-12-11

2018-12-10 Thread David Miller
From: Daniel Borkmann Date: Tue, 11 Dec 2018 01:33:56 +0100 > It has three minor merge conflicts, resolutions: > > 1) tools/testing/selftests/bpf/test_verifier.c > > Take first chunk with alignment_prevented_execution. > > 2) net/core/filter.c > > [...] > case bpf_ctx_range_ptr(struct _

Re: [PATCH net-next] ieee802154: ca8210: remove a dead branch

2018-12-10 Thread YueHaibing
On 2018/12/11 4:04, David Miller wrote: > From: YueHaibing > Date: Mon, 10 Dec 2018 19:34:43 +0800 > >> Fix follwing gcc warning: >> >> drivers/net/ieee802154/ca8210.c:730:10: warning: >> comparison is always false due to limited range of data type [-Wtype-limits] >> >> the variable 'len' is of

Re: [PATCH net] nfp: flower: ensure TCP flags can be placed in IPv6 frame

2018-12-10 Thread David Miller
From: Jakub Kicinski Date: Mon, 10 Dec 2018 15:03:43 -0800 > From: Pieter Jansen van Vuuren > > Previously we did not ensure tcp flags have a place to be stored > when using IPv6. We correct this by including IPv6 key layer when > we match tcp flags and the IPv6 key layer has not been included

Re: [PATCH net-next] neighbor: gc_list changes should be protected by table lock

2018-12-10 Thread David Miller
From: David Ahern Date: Mon, 10 Dec 2018 13:54:07 -0800 > From: David Ahern > > Adding and removing neighbor entries to / from the gc_list need to be > done while holding the table lock; a couple of places were missed in the > original patch. > > Move the list_add_tail in neigh_alloc to ___nei

Re: [PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling

2018-12-10 Thread Michael S. Tsirkin
On Mon, Dec 10, 2018 at 05:44:52PM +0800, Jason Wang wrote: > When we try to do rx busy polling in tx path in commit 441abde4cd84 > ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex > after tx vq mutex is held. This may lead deadlock so we try to lock vq > one by one in commit 781

Re: [PATCH net 0/2] net/ibmvnic: Fix reset work item locking bugs

2018-12-10 Thread David Miller
From: Thomas Falcon Date: Mon, 10 Dec 2018 15:22:21 -0600 > This patch set fixes issues with scheduling reset work items in > a tasklet context. Since ibmvnic_reset can called in an interrupt, > it should not use a mutex or allocate memory non-atomically. Series applied, thanks.

Re: [PATCH net 4/4] vhost: log dirty page correctly

2018-12-10 Thread Michael S. Tsirkin
On Mon, Dec 10, 2018 at 11:14:41PM +0800, kbuild test robot wrote: > Hi Jason, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on net/master] > > url: > https://github.com/0day-ci/linux/commits/Jason-Wang/Fix-various-issue-of-vhost/

Re: [PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread David Miller
From: Arnd Bergmann Date: Mon, 10 Dec 2018 22:17:20 +0100 > This is one of only two files that initialize a semaphore to a negative > value. We don't really need the two semaphores here at all, but can do > the same thing in more conventional and more effient way, by using a > single waitqueue an

Re: [pull request][net-next 00/12] Mellanox, mlx5 updates (Gre offloads support) 2018-12-10

2018-12-10 Thread David Miller
From: Saeed Mahameed Date: Mon, 10 Dec 2018 16:26:49 -0800 > This series adds the support for mlx5 gre offloads, From Oz Shlomo. > > Please note: > 1) The mlx5-next merge commit at the base of this pull request. > (required for dependencies) > 2) Two non mlx5 patches to remove the now deprecated

Re: [PATCH V2 mlx5-next 4/9] net/mlx5: Add monitor commands layout and event data

2018-12-10 Thread Saeed Mahameed
On Mon, Dec 10, 2018 at 4:49 PM Cong Wang wrote: > > On Mon, Dec 10, 2018 at 1:55 PM Saeed Mahameed wrote: > > +enum mlx5_monitor_counter_ppcnt { > > + MLX5_QUERY_MONITOR_PPCNT_IN_RANGE_LENGTH_ERRORS = 0X0, > > + MLX5_QUERY_MONITOR_PPCNT_OUT_OF_RANGE_LENGTH_FIELD = 0X1, > > +

Re: [net-next 12/12] net/sched: Remove egdev mechanism

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 16:27:01 -0800, Saeed Mahameed wrote: > From: Oz Shlomo > > The egdev mechanism was replaced by the TC indirect block notifications > platform. > > Signed-off-by: Oz Shlomo > Reviewed-by: Eli Britstein > Reviewed-by: Jiri Pirko > Cc: John Hurley > Cc: Jakub Kicinski > Si

Re: [PATCH V2 mlx5-next 4/9] net/mlx5: Add monitor commands layout and event data

2018-12-10 Thread Cong Wang
On Mon, Dec 10, 2018 at 1:55 PM Saeed Mahameed wrote: > +enum mlx5_monitor_counter_ppcnt { > + MLX5_QUERY_MONITOR_PPCNT_IN_RANGE_LENGTH_ERRORS = 0X0, > + MLX5_QUERY_MONITOR_PPCNT_OUT_OF_RANGE_LENGTH_FIELD = 0X1, > + MLX5_QUERY_MONITOR_PPCNT_FRAME_TOO_LONG_ERRORS = 0X

KMSAN: uninit-value in __inet6_bind

2018-12-10 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:3f06bda61398 kmsan: remove excessive KMSAN wrappers from a.. git tree: https://github.com/google/kmsan.git/master console output: https://syzkaller.appspot.com/x/log.txt?x=13ca6b0540 kernel config: https://syzkaller.appspot.c

Re: [PATCH bpf] selftests/bpf: use proper type when passing prog_type

2018-12-10 Thread Daniel Borkmann
On 12/11/2018 12:25 AM, Stanislav Fomichev wrote: > Use bpf_prog_type instead of bpf_map_type when passing prog_type. > > -Wenum-conversion might be unhappy about it: > error: implicit conversion from enumeration type > 'enum bpf_map_type' to different enumeration type > 'enum bp

pull-request: bpf-next 2018-12-11

2018-12-10 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. It has three minor merge conflicts, resolutions: 1) tools/testing/selftests/bpf/test_verifier.c Take first chunk with alignment_prevented_execution. 2) net/core/filter.c [...] case bpf_ctx_range_ptr(stru

[net-next 03/12] net/mlx5e: Provide the TC filter netdev as parameter to flower callbacks

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Currently the driver controls flower filters that are installed on its devices. However, with the introduction of the indirect block notifications platform the driver may receive control events for filters that are installed on higher level net devices (e.g. tunnel devices). There

[net-next 06/12] net/mlx5e: Refactor VXLAN tunnel encap offloading code

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Separates the vxlan header encap logic from the general ipv4/6 encapsulation methods, thus allowing the common IP encap/decap code to branch in downstream patch to multiple IP tunnels. Code refactoring with no functional change. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britste

[net-next 10/12] net: Add netif_is_gretap()/netif_is_ip6gretap()

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Changed the is_gretap_dev and is_ip6gretap_dev logic from structure comparison to string comparison of the rtnl_link_ops kind field. This approach aligns with the current identification methods and function names of vxlan and geneve network devices. Convert mlxsw to use these he

[net-next 02/12] net/mlx5e: Support TC indirect block notifications for eswitch uplink reprs

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Towards using this mechanism as the means to offload tunnel decap rules set on SW tunnel devices instead of egdev, add the supporting structures and functions. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- .../n

[net-next 11/12] net/mlx5e: Add GRE protocol offloading

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Add HW offloading support for TC flower filters configured on gretap/ip6gretap net devices. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en/tc_tun.c | 87 +++ .../ethernet/mellanox/mlx5

[net-next 04/12] net/mlx5e: Propagate the filter's net device to mlx5e structures

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Propagate the filter's net_device parameter to the tc flower parsed attributes structure so that it can later be used in tunnel decap offloading sequences. Pre-step for replacing egdev logic with the indirect block notification mechanism. Signed-off-by: Oz Shlomo Reviewed-by: E

[net-next 12/12] net/sched: Remove egdev mechanism

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo The egdev mechanism was replaced by the TC indirect block notifications platform. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Jiri Pirko Cc: John Hurley Cc: Jakub Kicinski Signed-off-by: Saeed Mahameed --- include/net/act_api.h | 30 -- net/sched/

[net-next 07/12] net/mlx5e: Refactor VXLAN tunnel decap offloading code

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Separates the vxlan header match handling from the matching on the general fields of ipv4/6 tunnels, thus allowing the common IP tunnel match code to branch in down stream patch, to multiple IP tunnels. This patch doesn't add any functionality. Signed-off-by: Oz Shlomo Reviewed

[net-next 08/12] net/mlx5e: Branch according to classified tunnel type

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Currently the tunnel offloading encap/decap methods assumes that VXLAN is the sole tunneling protocol. Lay the infrastructure for supporting multiple tunneling protocols by branching according to the tunnel net device kind. Encap filters tunnel type is determined according to the

[net-next 09/12] net/mlx5e: Move TC tunnel offloading code to separate source file

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Move tunnel offloading related code to a separate source file for better code maintainability. Code refactoring with no functional change. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Makefile |

[net-next 05/12] net/mlx5e: Replace egdev with indirect block notifications

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Use TC indirect block notifications to offload filters that are configured on higher level device interfaces (e.g. tunnel devices). This mechanism replaces the current egdev implementation. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed ---

[net-next 01/12] net/mlx5e: Store eswitch uplink representor state on a dedicated struct

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo Currently only a single field in the representor private structure is relevant for uplink representors. As a pre-step to allow adding additional uplink representor fields, introduce uplink representor private structure. This is prepration step towards replacing egdev logic with

[pull request][net-next 00/12] Mellanox, mlx5 updates (Gre offloads support) 2018-12-10

2018-12-10 Thread Saeed Mahameed
Hi Dave, This series adds the support for mlx5 gre offloads, From Oz Shlomo. Please note: 1) The mlx5-next merge commit at the base of this pull request. (required for dependencies) 2) Two non mlx5 patches to remove the now deprecated egdev mechanism. For more information please see tag log belo

Re: [PATCH iproute2] lib/bpf: fix build warning if no elf

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 13:51:11 -0800, Stephen Hemminger wrote: > Function was not used unlesss HAVE_ELF causing: > > bpf.c:105:13: warning: ‘bpf_map_offload_neutral’ defined but not used > [-Wunused-function] > > Signed-off-by: Stephen Hemminger Ah, FWIW: Acked-by: Jakub Kicinski

Re: [PATCH bpf-next 0/2] libbpf: adding af_xdp support

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 16:34:43 +0100, Magnus Karlsson wrote: > * Is it ok to have static inline functions in this library? They are > currently static inline for performance reasons, but maybe -flto > could fix this but not everyone uses this. I'd think so, we have few static inlines in kernel u

Re: [PATCH bpf-next 2/2] samples/bpf: convert xdpsock to use libbpf for AF_XDP access

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 16:34:45 +0100, Magnus Karlsson wrote: > diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c > index 57ecadc..ca94cfb 100644 > --- a/samples/bpf/xdpsock_user.c > +++ b/samples/bpf/xdpsock_user.c > @@ -44,15 +44,8 @@ > #define PF_XDP AF_XDP > #endif > > -#def

[PATCH v2 bpf-next 2/3] bpf: add bpffs pretty print for cgroup local storage maps

2018-12-10 Thread Roman Gushchin
Implement bpffs pretty printing for cgroup local storage maps (both shared and per-cpu). Output example (captured for tools/testing/selftests/bpf/netcnt_prog.c): Shared: $ cat /sys/fs/bpf/map_2 # WARNING!! The output is for debug purpose only # WARNING!! The output format will change {4294

[PATCH v2 bpf-next 3/3] selftests/bpf: add btf annotations for cgroup_local_storage maps

2018-12-10 Thread Roman Gushchin
Add btf annotations to cgroup local storage maps (per-cpu and shared) in the network packet counting example. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann --- tools/testing/selftests/bpf/netcnt_prog.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/t

[PATCH v2 bpf-next 0/3] bpffs pretty print for cgroup local storage

2018-12-10 Thread Roman Gushchin
This patchset implements bpffs pretty printing for cgroup local storage maps. v2->v1: - fixed size checks in cgroup_storage_check_btf(), based on input from Yonghong and Martin - implemented and used btf_type_is_reg_int(), suggested by Martin Roman Gushchin (3): bpf: pass struct btf point

[PATCH v2 bpf-next 1/3] bpf: pass struct btf pointer to the map_check_btf() callback

2018-12-10 Thread Roman Gushchin
If key_type or value_type are of non-trivial data types (e.g. structure or typedef), it's not possible to check them without the additional information, which can't be obtained without a pointer to the btf structure. So, let's pass btf pointer to the map_check_btf() callbacks. Signed-off-by: Roma

[PATCH bpf] selftests/bpf: use proper type when passing prog_type

2018-12-10 Thread Stanislav Fomichev
Use bpf_prog_type instead of bpf_map_type when passing prog_type. -Wenum-conversion might be unhappy about it: error: implicit conversion from enumeration type 'enum bpf_map_type' to different enumeration type 'enum bpf_prog_type' Signed-off-by: Stanislav Fomichev --- to

[Patch net] tipc: compare remote and local protocols in tipc_udp_enable()

2018-12-10 Thread Cong Wang
When TIPC_NLA_UDP_REMOTE is an IPv6 mcast address but TIPC_NLA_UDP_LOCAL is an IPv4 address, a NULL-ptr deref is triggered as the UDP tunnel sock is initialized to IPv4 or IPv6 sock merely based on the protocol in local address. We should just error out when the remote address and local address ha

Re: [PATCH] net: fix braces and comments codestyle

2018-12-10 Thread Joe Perches
On Tue, 2018-12-11 at 02:11 +0300, Darya Litvintseva wrote: > Signed-off-by: Darya Litvintseva Hello. Most maintainers want some patch description and not a blank commit message. Whitespace only changes are sometimes not taken. First kernel patches are best done in drivers/staging. And some a

Re: [PATCH net] nfp: flower: ensure TCP flags can be placed in IPv6 frame

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 15:03:43 -0800, Jakub Kicinski wrote: > From: Pieter Jansen van Vuuren > > Previously we did not ensure tcp flags have a place to be stored > when using IPv6. We correct this by including IPv6 key layer when > we match tcp flags and the IPv6 key layer has not been included > a

[PATCH] net: fix braces and comments codestyle

2018-12-10 Thread Darya Litvintseva
Signed-off-by: Darya Litvintseva --- net/ethernet/eth.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index fd8faa0dfa61..3b430e245d58 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -90,9 +90,7 @@

[PATCH net] nfp: flower: ensure TCP flags can be placed in IPv6 frame

2018-12-10 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Previously we did not ensure tcp flags have a place to be stored when using IPv6. We correct this by including IPv6 key layer when we match tcp flags and the IPv6 key layer has not been included already. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub K

Re: [PATCH] bpf: fix overflow of bpf_jit_limit when PAGE_SIZE >= 64K

2018-12-10 Thread Daniel Borkmann
On 12/10/2018 06:27 PM, Michael Roth wrote: > Quoting Daniel Borkmann (2018-12-10 08:26:31) >> On 12/07/2018 04:36 PM, Michael Roth wrote: >>> Quoting Michael Ellerman (2018-12-07 06:31:13) Michael Roth writes: > Commit ede95a63b5 introduced a bpf_jit_limit tuneable to limit BPF

Re: [PATCH bpf-next 0/3] rename *_info_cnt to nr_*_info in bpf_prog_info

2018-12-10 Thread Alexei Starovoitov
On 12/10/18 2:14 PM, Yonghong Song wrote: > Before func_info and line_info are added to the kernel, there are several > fields in structure bpf_prog_info specifying the "count" of a user buffer, > e.g., > __u32 nr_jited_ksyms; > __u32 nr_jited_func_lens; > The naming convention h

[PATCH bpf] bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K

2018-12-10 Thread Daniel Borkmann
Michael and Sandipan report: Commit ede95a63b5 introduced a bpf_jit_limit tuneable to limit BPF JIT allocations. At compile time it defaults to PAGE_SIZE * 4, and is adjusted again at init time if MODULES_VADDR is defined. For ppc64 kernels, MODULES_VADDR isn't defined, so we're stuck

Re: [PATCH bpf-next] bpf: clean up bpf_prog_get_info_by_fd()

2018-12-10 Thread Alexei Starovoitov
On Mon, Dec 10, 2018 at 11:17:50AM -0800, Song Liu wrote: > info.nr_jited_ksyms and info.nr_jited_func_lens cannot be 0 in these two > statements, so we don't need to check them. > > Signed-off-by: Song Liu Applied, Thanks

Re: [PATCH bpf-next 2/3] bpf: add bpffs pretty print for cgroup local storage maps

2018-12-10 Thread Roman Gushchin
On Fri, Dec 07, 2018 at 07:37:35PM -0800, Yonghong Song wrote: > > > On 12/7/18 4:53 PM, Roman Gushchin wrote: > > Implement bpffs pretty printing for cgroup local storage maps > > (both shared and per-cpu). > > Output example (captured for tools/testing/selftests/bpf/netcnt_prog.c): > > > > Sha

[PATCH iproute2] fix print_0xhex on 32 bit

2018-12-10 Thread Stephen Hemminger
The argument to print_0xhex is converted to unsigned long long so the format string give for normal printout has to be some variant of %llx. Otherwise, bogus values will be printed on 32 bit platforms. Reported-by: Hans Dedecker Signed-off-by: Stephen Hemminger --- bridge/link.c| 2

Re: IP (rtl8169) forwarding bug (performance)

2018-12-10 Thread Risto Pajula
Hello. I have not yet tested with linux-next but I will, thanks for pointing that out. ...But I have studied the problem a bit more, indeed it seems that the rtl8169 transmission queue gets stuck. Below is some trace log. Starting from 802026 a burst of frames is forwarded from eth0 to eth

[PATCH bpf-next 2/3] tools/bpf: sync kernel uapi bpf.h to tools directory

2018-12-10 Thread Yonghong Song
Sync kernel uapi bpf.h "*_info_cnt => nr_*_info" changes to tools directory. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/l

[PATCH bpf-next 1/3] bpf: rename *_info_cnt to nr_*_info in bpf_prog_info

2018-12-10 Thread Yonghong Song
In uapi bpf.h, currently we have the following fields in the struct bpf_prog_info: __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; The above field names "func_info_cnt" and "line_info_cnt" also appear in union bpf_attr for program loading. The original

Re: [PATCH bpf] bpf: verifier: make sure callees don't prune with caller differences

2018-12-10 Thread Jakub Kicinski
On Mon, 10 Dec 2018 11:35:12 -0800, Jakub Kicinski wrote: > Currently for liveness and state pruning the register parentage > chains don't include states of the callee. This makes some sense > as the callee can't access those registers. However, this means > that READs done after the callee retur

[PATCH bpf-next 0/3] rename *_info_cnt to nr_*_info in bpf_prog_info

2018-12-10 Thread Yonghong Song
Before func_info and line_info are added to the kernel, there are several fields in structure bpf_prog_info specifying the "count" of a user buffer, e.g., __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; The naming convention has the prefix "nr_". The func_info and line_info support

[PATCH bpf-next 3/3] tools/bpf: rename *_info_cnt to nr_*_info

2018-12-10 Thread Yonghong Song
Rename all occurances of *_info_cnt field access to nr_*_info in tools directory. The local variables finfo_cnt, linfo_cnt and jited_linfo_cnt in function do_dump() of tools/bpf/bpftool/prog.c are also changed to nr_finfo, nr_linfo and nr_jited_linfo to keep naming convention consistent. Acked-by

[iproute] rdma broken on 32 bit

2018-12-10 Thread Stephen Hemminger
It appears that RDMA is broken on 32 bit platforms. Sure you don't run on 32bit, but iproute2 needs to build everywhere. The issue is that you are assuming a C enum can hold 64 bits. The standard says enum only has to hold "int" values. So it breaks on 32bit. The issue is deeper than just a triv

Re: [PATCH V2 mlx5-next 0/9] mlx5 core updates and cleanups

2018-12-10 Thread Saeed Mahameed
On Mon, Dec 10, 2018 at 1:15 PM Saeed Mahameed wrote: > > Hi > > This patchset is for mlx5-next shared branch, and will be applied there > once the review is done. > > 1) From Eli Britstein, add mlx5 core support for flow steering extended > destination > 2) From Mikhael Goikhman, port module even

Re: [PATCH 3/5] net: dsa: ksz: Factor out common tag code

2018-12-10 Thread Marek Vasut
On 12/10/2018 09:32 PM, tristram...@microchip.com wrote: >> On Fri, Dec 07, 2018 at 07:18:43PM +0100, Marek Vasut wrote: >>> From: Tristram Ha >>> >>> Factor out common code from the tag_ksz , so that the code can be used >>> with other KSZ family switches which use differenly sized tags. >> >> I

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Marek Vasut
On 12/10/2018 10:49 PM, tristram...@microchip.com wrote: >> I am not looking for a hack-around, I am looking for a proper solution. >> > > As you have the hardware you can try something to correct the problem. > > The change was introduced in commit 9421c9015047 on Nov 15. In the > net-next tree

[PATCH] hamradio, ppp: change semaphore to completion

2018-12-10 Thread Arnd Bergmann
ppp and hamradio have copies of the same code that uses a semaphore in place of a completion for historic reasons. Make it use the proper interface instead in all copies. Signed-off-by: Arnd Bergmann --- drivers/net/hamradio/6pack.c | 10 +- drivers/net/hamradio/mkiss.c | 8 dr

[PATCH net-next] neighbor: gc_list changes should be protected by table lock

2018-12-10 Thread David Ahern
From: David Ahern Adding and removing neighbor entries to / from the gc_list need to be done while holding the table lock; a couple of places were missed in the original patch. Move the list_add_tail in neigh_alloc to ___neigh_create where the lock is already obtained. Since neighbor entries sho

[PATCH iproute2] lib/bpf: fix build warning if no elf

2018-12-10 Thread Stephen Hemminger
Function was not used unlesss HAVE_ELF causing: bpf.c:105:13: warning: ‘bpf_map_offload_neutral’ defined but not used [-Wunused-function] Signed-off-by: Stephen Hemminger --- lib/bpf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bpf.c b/lib/bpf.c index 6a

[PATCH iproute2] ipmacsec: fix warning on 32bit platform

2018-12-10 Thread Stephen Hemminger
On some 32 bit platforms, the printf was causing warning: ipmacsec.c: In function ‘getattr_u64’: ipmacsec.c:655:47: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] fprintf(stderr, "invalid attribute length %lu\n", Resolve b

RE: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Tristram.Ha
> I am not looking for a hack-around, I am looking for a proper solution. > As you have the hardware you can try something to correct the problem. The change was introduced in commit 9421c9015047 on Nov 15. In the net-next tree it is about -42 commits. git log -42 cpsw.c git diff f5b589488ea5

Re: [PATCH bpf-next 1/2] bpf: include sub program tags in bpf_prog_info

2018-12-10 Thread Martin Lau
On Mon, Dec 10, 2018 at 11:06:43AM -0800, Song Liu wrote: > This patch adds nr_prog_tags and prog_tags to bpf_prog_info. This is a > reliable way for user space to get tags of all sub programs. Before this > patch, user space need to find sub program tags via kallsyms. > > This feature will be use

Re: [PATCH bpf-next] bpf: clean up bpf_prog_get_info_by_fd()

2018-12-10 Thread Martin Lau
On Mon, Dec 10, 2018 at 11:17:50AM -0800, Song Liu wrote: > info.nr_jited_ksyms and info.nr_jited_func_lens cannot be 0 in these two > statements, so we don't need to check them. Acked-by: Martin KaFai Lau

Re: [PATCH] ipv4: Fix potential Spectre v1 vulnerability

2018-12-10 Thread Gustavo A. R. Silva
On 12/10/18 2:11 PM, David Miller wrote: Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Applied and queued up for -stable. Please do not CC: stable for networking bug fixes, thank you. OK. I've got it. Thanks -- Gustavo

Re: general protection fault in __ipv6_sock_mc_join

2018-12-10 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:40e020c129cf Linux 4.20-rc6 git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=1296c56d40 kernel config: https://syzkaller.appspot.com/x/.config?x=c8970c89a0efbb23 dashboard link: https://syz

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Florian Fainelli
On 12/10/18 12:04 PM, tristram...@microchip.com wrote: >> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; >> +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- >>> len; >>> Oh so they add the internal VLAN at the end of the frame, not the >>> be

RE: [Patch net] tipc: fix a double kfree_skb()

2018-12-10 Thread Jon Maloy
Acked. Thank you for both your quick fixes, Cong. ///jon > -Original Message- > From: Cong Wang > Sent: 10-Dec-18 15:46 > To: netdev@vger.kernel.org > Cc: Cong Wang ; Ying Xue > ; Jon Maloy > Subject: [Patch net] tipc: fix a double kfree_skb() > > tipc_udp_xmit() drops the packet on

Re: IP (rtl8169) forwarding bug (performance)

2018-12-10 Thread Heiner Kallweit
Did you test also with the latest linux-next kernel? Some recent changes like 2e6eedb4813e "r8169: make use of xmit_more and __netdev_sent_queue" may have a positive impact. On 10.12.2018 00:28, Risto Pajula wrote: > > Hello. > > Old subject: "Re: IP fragmentation performance and don't fragmen

[PATCH net 1/2] ibmvnic: Convert reset work item mutex to spin lock

2018-12-10 Thread Thomas Falcon
ibmvnic_reset can create and schedule a reset work item from an IRQ context, so do not use a mutex, which can sleep. Convert the reset work item mutex to a spin lock. Locking debugger generated the trace output below. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908

[PATCH net 0/2] net/ibmvnic: Fix reset work item locking bugs

2018-12-10 Thread Thomas Falcon
This patch set fixes issues with scheduling reset work items in a tasklet context. Since ibmvnic_reset can called in an interrupt, it should not use a mutex or allocate memory non-atomically. Thomas Falcon (2): ibmvnic: Convert reset work item mutex to spin lock ibmvnic: Fix non-atomic memory

[PATCH net 2/2] ibmvnic: Fix non-atomic memory allocation in IRQ context

2018-12-10 Thread Thomas Falcon
ibmvnic_reset allocated new reset work item objects in a non-atomic context. This can be called from a tasklet, generating the output below. Allocate work items with the GFP_ATOMIC flag instead. BUG: sleeping function called from invalid context at mm/slab.h:421 in_atomic(): 1, irqs_disabled(): 1,

[PATCH] test_rhashtable: remove semaphore usage

2018-12-10 Thread Arnd Bergmann
This is one of only two files that initialize a semaphore to a negative value. We don't really need the two semaphores here at all, but can do the same thing in more conventional and more effient way, by using a single waitqueue and an atomic thread counter. This gets us a little bit closer to eli

Re: [PATCH mlx5-next 07/10] net/mlx5: E-Switch, Change vhca id valid bool field to bit flag

2018-12-10 Thread Saeed Mahameed
On Mon, Dec 10, 2018 at 1:05 PM Or Gerlitz wrote: > > On Mon, Dec 10, 2018 at 10:09 PM Saeed Mahameed > wrote: > > > > On Mon, Dec 10, 2018 at 8:12 AM Jason Gunthorpe wrote: > > > > > > On Sun, Dec 09, 2018 at 07:04:39PM -0800, Saeed Mahameed wrote: > > > > From: Eli Britstein > > > > > > > > C

[PATCH V2 mlx5-next 4/9] net/mlx5: Add monitor commands layout and event data

2018-12-10 Thread Saeed Mahameed
From: Eyal Davidovich Will be used in downstream patch to monitor counter changes by the HCA and report it to the driver by an event. The driver will update its counters cached data accordingly. Signed-off-by: Eyal Davidovich Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- dri

[PATCH V2 mlx5-next 3/9] net/mlx5: Add support for plugged-disabled cable status in PME

2018-12-10 Thread Saeed Mahameed
From: Mikhael Goikhman Support a new hardware module status in port module events: - module_status=0x4 (Cable plugged, but disabled) Signed-off-by: Mikhael Goikhman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/events.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/

[PATCH V2 mlx5-next 7/9] net/mlx5: E-Switch, Change vhca id valid bool field to bit flag

2018-12-10 Thread Saeed Mahameed
From: Eli Britstein Change the driver flow destination struct to use bit flags with the vhca id valid being the 1st one. The flags field is more extendable and will be used in downstream patch. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Ma

[PATCH V2 mlx5-next 8/9] net/mlx5: Support extended destination format in flow steering command

2018-12-10 Thread Saeed Mahameed
From: Eli Britstein Update the flow steering command formatting according to the extended destination API. Note that the FW dictates that multi destination FTEs that involve at least one encap must use the extended destination format, while single destination ones must use the legacy format. Usin

[PATCH V2 mlx5-next 9/9] net/mlx5: Remove the get protocol device interface entry

2018-12-10 Thread Saeed Mahameed
From: Or Gerlitz This isn't used anywhere across the mlx5 driver stack, remove it. Signed-off-by: Or Gerlitz Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 22 --- .../net/ethernet/mellanox/mlx5/core/en_main.c |

[PATCH V2 mlx5-next 6/9] net/mlx5: Introduce extended destination fields

2018-12-10 Thread Saeed Mahameed
From: Eli Britstein Extended destinations provide the ability to configure different encapsulation properties per destination on a single FTE. This is needed for use-cases such as remote mirroring over tunneled networks. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlo

[PATCH V2 mlx5-next 5/9] net/mlx5: Revise gre and nvgre key formats

2018-12-10 Thread Saeed Mahameed
From: Oz Shlomo GRE RFC defines a 32 bit key field. NVGRE RFC splits the 32 bit key field to 24 bit VSID (gre_key_h) and 8 bit flow entropy (gre_key_l). Define the two key parsing alternatives in a union, thus enabling both access methods. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein S

  1   2   3   >