Re: [PATCH net-next 0/9] devlink: Add support for region access

2018-03-29 Thread Alex Vesker
On 3/29/2018 10:51 PM, Andrew Lunn wrote: Show all of the exposed regions with region sizes: $ devlink region show pci/:00:05.0/cr-space: size 1048576 snapshot [1 2] So you have 2Mbytes of snapshot data. Is this held in the device, or kernel memory? This is allocated in devlink, the

[PATCH net-next 3/6] inet: frags: add a pointer to struct netns_frags

2018-03-29 Thread Eric Dumazet
In order to simplify the API, add a pointer to struct inet_frags. This will allow us to make things less complex. These functions no longer have a struct inet_frags parameter : inet_frag_destroy(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_put(struct inet_frag_queue *q /*,

[PATCH net-next 5/6] inet: frags: remove some helpers

2018-03-29 Thread Eric Dumazet
Remove sum_frag_mem_limit(), ip_frag_mem() & ip6_frag_mem() Also since we use rhashtable we can bring back the number of fragments in "grep FRAG /proc/net/sockstat /proc/net/sockstat6" that was removed in commit 434d305405ab ("inet: frag: don't account number of fragment queues") Signed-off-by:

[PATCH net-next 6/6] inet: frags: break the 2GB limit for frags storage

2018-03-29 Thread Eric Dumazet
Some users are willing to provision huge amounts of memory to be able to perform reassembly reasonnably well under pressure. Current memory tracking is using one atomic_t and integers. Switch to atomic_long_t so that 64bit arches can use more than 2GB, without any cost for 32bit arches. Tested:

[PATCH net-next 4/6] inet: frags: use rhashtables for reassembly units

2018-03-29 Thread Eric Dumazet
Some applications still rely on IP fragmentation, and to be fair linux reassembly unit is not working under any serious load. It uses static hash tables of 1024 buckets, and up to 128 items per bucket (!!!) A work queue is supposed to garbage collect items when host is under memory pressure, and

[PATCH net-next 2/6] inet: frags: change inet_frags_init_net() return value

2018-03-29 Thread Eric Dumazet
We will soon initialize one rhashtable per struct netns_frags in inet_frags_init_net(). This patch changes the return value to eventually propagate an error. Signed-off-by: Eric Dumazet --- include/net/inet_frag.h | 3 ++-

[PATCH net-next 1/6] ipv6: frag: remove unused field

2018-03-29 Thread Eric Dumazet
csum field in struct frag_queue is not used, remove it. Signed-off-by: Eric Dumazet --- include/net/ipv6.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index

[PATCH net-next 0/6] inet: frags: bring rhashtables to IP defrag

2018-03-29 Thread Eric Dumazet
IP defrag processing is one of the remaining problematic layer in linux. It uses static hash tables of 1024 buckets, and up to 128 items per bucket. A work queue is supposed to garbage collect items when host is under memory pressure, and doing a hash rebuild, changing seed used in hash

Re: [RFC PATCH ghak32 V2 01/13] audit: add container id

2018-03-29 Thread Richard Guy Briggs
On 2018-03-29 07:03, Jonathan Corbet wrote: > On Thu, 29 Mar 2018 05:01:32 -0400 > Richard Guy Briggs wrote: > > > > A little detail, but still... > > > > I am understanding that you would prefer more context (as opposed to > > operational detail) in the description, laying

Re: [PATCH v2 bpf-next 1/2] lib/scatterlist: add sg_init_marker() helper

2018-03-29 Thread John Fastabend
On 03/29/2018 05:20 PM, Prashant Bhole wrote: > sg_init_marker initializes sg_magic in the sg table and calls > sg_mark_end() on the last entry of the table. This can be useful to > avoid memset in sg_init_table() when scatterlist is already zeroed out > > For example: when scatterlist is

Re: [PATCH v2 bpf-next 0/2] sockmap: fix sg api usage

2018-03-29 Thread John Fastabend
On 03/29/2018 05:20 PM, Prashant Bhole wrote: > These patches fix sg api usage in sockmap. Previously sockmap didn't > use sg_init_table(), which caused hitting BUG_ON in sg api, when > CONFIG_DEBUG_SG is enabled > > v1: added sg_init_table() calls wherever needed. > > v2: > - Patch1 adds new

Re: [PATCH v2 bpf-next 2/2] bpf: sockmap: initialize sg table entries properly

2018-03-29 Thread John Fastabend
On 03/29/2018 05:21 PM, Prashant Bhole wrote: > When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized in > sg_init_table() and it is verified in sg api while navigating. We hit > BUG_ON when magic check is failed. > > In functions sg_tcp_sendpage and sg_tcp_sendmsg, the struct containing > the

Re: [PATCH net-next] net/mlx4_en: CHECKSUM_COMPLETE support for fragments

2018-03-29 Thread Eric Dumazet
On Thu, Mar 29, 2018 at 5:44 PM Saeed Mahameed wrote: > On Thu, Mar 29, 2018 at 11:07 AM, David Miller wrote: > > From: Eric Dumazet > > Date: Tue, 27 Mar 2018 14:21:14 -0700 > > > >> Refine the RX check summing handling to

Re: [RFC PATCH V2 8/8] vhost: event suppression for packed ring

2018-03-29 Thread Jason Wang
On 2018年03月30日 10:05, Tiwei Bie wrote: On Mon, Mar 26, 2018 at 11:38:53AM +0800, Jason Wang wrote: This patch introduces basic support for event suppression aka driver and device area. Compile tested only. Signed-off-by: Jason Wang --- [...] + +static bool

Re: [PATCH net] vhost: validate log when IOTLB is enabled

2018-03-29 Thread Jason Wang
On 2018年03月29日 22:44, Michael S. Tsirkin wrote: On Thu, Mar 29, 2018 at 04:00:04PM +0800, Jason Wang wrote: Vq log_base is the userspace address of bitmap which has nothing to do with IOTLB. So it needs to be validated unconditionally otherwise we may try use 0 as log_base which may lead to

[PATCH net-next V2] net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree()

2018-03-29 Thread Wei Yongjun
There is no need for explicit calls of devm_kfree(), as the allocated memory will be freed during driver's detach. The driver core clears the driver data to NULL after device_release. Thus, it is not needed to manually clear the device driver data to NULL. So remove the unnecessary

[PATCH] net: sched: do not emit messages while holding spinlock

2018-03-29 Thread Li RongQing
move messages emitting out of sch_tree_lock to avoid holding this lock too long. Signed-off-by: Li RongQing --- net/sched/sch_htb.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index

Re: [RFC PATCH V2 8/8] vhost: event suppression for packed ring

2018-03-29 Thread Tiwei Bie
On Mon, Mar 26, 2018 at 11:38:53AM +0800, Jason Wang wrote: > This patch introduces basic support for event suppression aka driver > and device area. Compile tested only. > > Signed-off-by: Jason Wang > --- [...] > + > +static bool vhost_notify_packed(struct vhost_dev *dev,

Re: [PATCH net-next 0/6] rxrpc: Fixes

2018-03-29 Thread David Miller
From: David Howells Date: Thu, 29 Mar 2018 23:25:46 +0100 > David Miller wrote: > >> David, this GIT URL has tons of unrelated changes. It seems to bring in >> the parts of Linus's tree that haven't proagated to 'net' yet. > > Sorry about that, I

[PATCH net] vlan: also check phy_driver ts_info for vlan's real device

2018-03-29 Thread Hangbin Liu
Just like function ethtool_get_ts_info(), we should also consider the phy_driver ts_info call back. For example, driver dp83640. Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.") Acked-by: Richard Cochran Signed-off-by: Hangbin Liu

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Benjamin Herrenschmidt
On Thu, 2018-03-29 at 09:56 -0400, Sinan Kaya wrote: > On 3/28/2018 11:55 AM, David Miller wrote: > > From: Benjamin Herrenschmidt > > Date: Thu, 29 Mar 2018 02:13:16 +1100 > > > > > Let's fix all archs, it's way easier than fixing all drivers. Half of > > > the archs

Re: [PATCH net] net/ipv6: Fix route leaking between VRFs

2018-03-29 Thread David Ahern
On 3/29/18 6:44 PM, David Ahern wrote: > Donald reported that IPv6 route leaking between VRFs is not working. > The root cause is the strict argument in the call to rt6_lookup when > validating the nexthop spec. > > ip6_route_check_nh validates the gateway and device (if given) of a > route spec.

Re: [PATCH net-next] bridge: Allow max MTU when multiple VLANs present

2018-03-29 Thread Toshiaki Makita
On 2018/03/30 1:49, Roopa Prabhu wrote: > On Thu, Mar 22, 2018 at 9:53 PM, Roopa Prabhu > wrote: >> On Thu, Mar 22, 2018 at 8:34 AM, Chas Williams <3ch...@gmail.com> wrote: >>> If the bridge is allowing multiple VLANs, some VLANs may have >>> different MTUs. Instead

Re: [PATCH net-next] net/mlx4_en: CHECKSUM_COMPLETE support for fragments

2018-03-29 Thread Saeed Mahameed
On Thu, Mar 29, 2018 at 11:07 AM, David Miller wrote: > From: Eric Dumazet > Date: Tue, 27 Mar 2018 14:21:14 -0700 > >> Refine the RX check summing handling to propagate the >> hardware provided checksum so that we do not have to >> compute it later in

[PATCH net] net/ipv6: Fix route leaking between VRFs

2018-03-29 Thread David Ahern
Donald reported that IPv6 route leaking between VRFs is not working. The root cause is the strict argument in the call to rt6_lookup when validating the nexthop spec. ip6_route_check_nh validates the gateway and device (if given) of a route spec. It in turn could call rt6_lookup (e.g., lookup in

Re: [PATCH net-next] net/mlx4_en: CHECKSUM_COMPLETE support for fragments

2018-03-29 Thread Saeed Mahameed
On Tue, Mar 27, 2018 at 2:21 PM, Eric Dumazet wrote: > Refine the RX check summing handling to propagate the > hardware provided checksum so that we do not have to > compute it later in software. > > Signed-off-by: Eric Dumazet > Cc: Willem de Bruijn

[PATCH v2 bpf-next 1/2] lib/scatterlist: add sg_init_marker() helper

2018-03-29 Thread Prashant Bhole
sg_init_marker initializes sg_magic in the sg table and calls sg_mark_end() on the last entry of the table. This can be useful to avoid memset in sg_init_table() when scatterlist is already zeroed out For example: when scatterlist is embedded inside other struct and that container struct is

[PATCH v2 bpf-next 0/2] sockmap: fix sg api usage

2018-03-29 Thread Prashant Bhole
These patches fix sg api usage in sockmap. Previously sockmap didn't use sg_init_table(), which caused hitting BUG_ON in sg api, when CONFIG_DEBUG_SG is enabled v1: added sg_init_table() calls wherever needed. v2: - Patch1 adds new helper function in sg api. sg_init_marker() - Patch2

[PATCH v2 bpf-next 2/2] bpf: sockmap: initialize sg table entries properly

2018-03-29 Thread Prashant Bhole
When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized in sg_init_table() and it is verified in sg api while navigating. We hit BUG_ON when magic check is failed. In functions sg_tcp_sendpage and sg_tcp_sendmsg, the struct containing the scatterlist is already zeroed out. So to avoid extra

Re: Regression in 4.16-rc7 - ipsec vpn broken

2018-03-29 Thread Derek Robson
Thanks, that patch has solved issue. On Thu, Mar 29, 2018 at 7:51 PM, Steffen Klassert wrote: > Please always make sure to Cc netdev@vger.kernel.org > on networking problems. > > On Wed, Mar 28, 2018 at 10:21:32PM +, Derek Robson wrote: >> The ipsec VPN is

Re: [PATCH bpf-next] bpf: sockmap: initialize sg table entries properly

2018-03-29 Thread Prashant Bhole
On 3/28/2018 5:51 PM, Daniel Borkmann wrote: On 03/28/2018 08:18 AM, Prashant Bhole wrote: On 3/27/2018 6:05 PM, Daniel Borkmann wrote: On 03/27/2018 10:41 AM, Prashant Bhole wrote: On 3/27/2018 12:15 PM, John Fastabend wrote: On 03/25/2018 11:54 PM, Prashant Bhole wrote: When

Re: [PATCH v2 bpf-next 3/9] bpf: Hooks for sys_bind

2018-03-29 Thread Alexei Starovoitov
On 3/29/18 4:06 PM, Daniel Borkmann wrote: On 03/28/2018 05:41 AM, Alexei Starovoitov wrote: [...] diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index e8c7fad8c329..2dec266507dc 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -450,6 +450,13 @@ int inet_bind(struct socket

Re: [PATCH v2 bpf-next 3/9] bpf: Hooks for sys_bind

2018-03-29 Thread Daniel Borkmann
On 03/28/2018 05:41 AM, Alexei Starovoitov wrote: [...] > diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c > index e8c7fad8c329..2dec266507dc 100644 > --- a/net/ipv4/af_inet.c > +++ b/net/ipv4/af_inet.c > @@ -450,6 +450,13 @@ int inet_bind(struct socket *sock, struct sockaddr > *uaddr, int

[PATCH net-next v1 1/2] dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC

2018-03-29 Thread Martin Blumenstingl
The Meson8m2 SoC uses a similar (potentially even identical) register layout for the dwmac glue as Meson8b and GXBB. Unfortunately there is no documentation available. Testing shows that both, RMII and RGMII PHYs are working if they are configured as on Meson8b. Add a new compatible string to the

[PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b

2018-03-29 Thread Martin Blumenstingl
The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the peripherals are shared with Meson8b (for example the watchdog registers and the internal temperature sensor calibration procedure). Meson8m2 also seems to include the same Gigabit MAC register layout as Meson8b. The registers

[PATCH net-next v1 2/2] net: stmmac: dwmac-meson8b: Add support for the Meson8m2 SoC

2018-03-29 Thread Martin Blumenstingl
The Meson8m2 SoC uses a similar (potentially even identical) register layout as the Meson8b and GXBB SoCs for the dwmac glue. Add a new compatible string and update the module description to indicate support for these SoCs. Signed-off-by: Martin Blumenstingl

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-03-29 Thread Edward Cree
On 29/03/18 23:44, Edward Cree wrote: > By storing subprog boundaries as a subprogno mark on each insn, rather than > a start (and implicit end) for each subprog, we collect a number of gains: > * More efficient determination of which subprog contains a given insn, and > thus of find_subprog

RE: [iproute2-next 0/2] tipc: changes to addressing structure

2018-03-29 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of David Ahern > Sent: Thursday, March 29, 2018 13:59 > To: Jon Maloy ; da...@davemloft.net; > netdev@vger.kernel.org > Cc: Mohan Krishna Ghanta

[PATCH v2 bpf-next 2/3] bpf/verifier: update selftests

2018-03-29 Thread Edward Cree
Error messages for some bad programs have changed, partly because we now check for loops / out-of-bounds jumps before checking subprogs. Also added a test ("calls: interleaved functions") to ensure that subprogs are required to be contiguous. It wasn't entirely clear to me what "calls: wrong

[PATCH v2 bpf-next 3/3] bpf/verifier: per-register parent pointers

2018-03-29 Thread Edward Cree
By giving each register its own liveness chain, we elide the skip_callee() logic. Instead, each register's parent is the state it inherits from; both check_func_call() and prepare_func_exit() automatically connect reg states to the correct chain since when they copy the reg state across

[PATCH v2 bpf-next 1/3] bpf/verifier: validate func_calls by marking at do_check() time

2018-03-29 Thread Edward Cree
Removes a couple of passes from the verifier, one to check subprogs don't overlap etc., and one to compute max stack depth (which now is done by topologically sorting the call graph). This improves the asymptotic complexity of a number of operations, for instance the max stack depth check is

[PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-03-29 Thread Edward Cree
By storing subprog boundaries as a subprogno mark on each insn, rather than a start (and implicit end) for each subprog, we collect a number of gains: * More efficient determination of which subprog contains a given insn, and thus of find_subprog (which subprog begins at a given insn). * Number

Re: [PATCH 07/30] aio: add delayed cancel support

2018-03-29 Thread Al Viro
On Thu, Mar 29, 2018 at 10:33:05PM +0200, Christoph Hellwig wrote: > The upcoming aio poll support would like to be able to complete the > iocb inline from the cancellation context, but that would cause a > double lock of ctx_lock with the current locking scheme. Move the > cancelation outside

Re: [PATCH net-next 0/6] rxrpc: Fixes

2018-03-29 Thread David Howells
David Miller wrote: > David, this GIT URL has tons of unrelated changes. It seems to bring in > the parts of Linus's tree that haven't proagated to 'net' yet. Sorry about that, I rebased on the wrong branch by accident. I've got some more fixes. Should I just give the

[PATCH iproute2-next 1/1] tc: add online mode

2018-03-29 Thread Roman Mashak
Add initial support for oneline mode in tc; actions, filters and qdiscs will be gradually updated in the follow-up patches. Signed-off-by: Roman Mashak --- man/man8/tc.8 | 15 ++- tc/tc.c | 8 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff

WARNING in refcount_sub_and_test (2)

2018-03-29 Thread syzbot
Hello, syzbot hit the following crash on bpf-next commit 22527437e0a0c96ee3153e9d0382942b0fd4f9dd (Thu Mar 29 02:36:15 2018 +) Merge branch 'nfp-bpf-updates' syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=c7b0dde061c523bc4b0f C reproducer:

[PATCH v4 iproute2-next 7/7] rdma: Add PD resource tracking information

2018-03-29 Thread Steve Wise
Sample output: Without CAP_NET_ADMIN capability: dev mlx4_0 users 0 pid 0 comm [ib_srpt] dev mlx4_0 users 0 pid 0 comm [ib_srp] dev mlx4_0 users 1 pid 0 comm [ib_core] dev cxgb4_0 users 0 pid 0 comm [ib_srp] With CAP_NET_ADMIN capability: dev mlx4_0 local_dma_lkey 0x8000 users 0 pid 0 comm

[PATCH v4 iproute2-next 6/7] rdma: Add MR resource tracking information

2018-03-29 Thread Steve Wise
Sample output: Without CAP_NET_ADMIN: $ rdma resource show mr mrlen 65536 dev mlx4_0 mrlen 65536 pid 0 comm [nvme_rdma] dev cxgb4_0 mrlen 65536 pid 0 comm [nvme_rdma] With CAP_NET_ADMIN: # rdma resource show mr mrlen 65536 dev mlx4_0 rkey 0x12702 lkey 0x12702 iova 0x85724a000 mrlen 65536 pid 0

[PATCH v4 iproute2-next 5/7] rdma: Add CQ resource tracking information

2018-03-29 Thread Steve Wise
Sample output: # rdma resource show cq dev cxgb4_0 cqe 46 users 2 pid 30503 comm rping dev cxgb4_0 cqe 46 users 2 pid 30498 comm rping dev mlx4_0 cqe 63 users 2 pid 30494 comm rping dev mlx4_0 cqe 63 users 2 pid 30489 comm rping dev mlx4_0 cqe 1023 users 2 poll_ctx WORKQUEUE pid 0 comm [ib_core]

[PATCH v4 iproute2-next 4/7] rdma: Add CM_ID resource tracking information

2018-03-29 Thread Steve Wise
Sample output: # rdma resource 2: cxgb4_0: pd 5 cq 2 qp 2 cm_id 3 mr 7 3: mlx4_0: pd 7 cq 3 qp 3 cm_id 3 mr 7 # rdma resource show cm_id link cxgb4_0/- lqpn 0 qp-type RC state LISTEN ps TCP pid 30485 comm rping src-addr 0.0.0.0:7174 link cxgb4_0/2 lqpn 1048 qp-type RC state CONNECT ps TCP pid

[PATCH v4 iproute2-next 3/7] rdma: initialize the rd struct

2018-03-29 Thread Steve Wise
Initialize the rd struct so port_idx is 0 unless set otherwise. Otherwise, strict_port queries end up passing an uninitialized PORT nlattr. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky --- rdma/rdma.c | 2 +- 1 file changed, 1

[PATCH v4 iproute2-next 1/7] rdma: update rdma_netlink.h

2018-03-29 Thread Steve Wise
From: Steve Wise Pull in the latest rdma_netlink.h which has support for the rdma nldev resource tracking objects being added with this patch series. Signed-off-by: Steve Wise --- rdma/include/uapi/rdma/rdma_netlink.h | 38

[PATCH v4 iproute2-next 2/7] rdma: add UAPI rdma_user_cm.h

2018-03-29 Thread Steve Wise
This allows parsing rdma_cm_id UAPI values. Signed-off-by: Steve Wise --- rdma/include/uapi/rdma/rdma_user_cm.h | 324 ++ 1 file changed, 324 insertions(+) create mode 100644 rdma/include/uapi/rdma/rdma_user_cm.h diff --git

[PATCH v4 iproute2-next 0/7] cm_id, cq, mr, and pd resource tracking

2018-03-29 Thread Steve Wise
This series enhances the iproute2 rdma tool to include dumping of connection manager id (cm_id), completion queue (cq), memory region (mr), and protection domain (pd) rdma resources. It is the user-space part of the kernel resource tracking series merged into rdma-next for 4.17 [1] and [2].

Re: [PATCH iproute2] json_print: fix print_uint hidden type promotion

2018-03-29 Thread Kevin Darbyshire-Bryant
> On 29 Mar 2018, at 22:02, Stephen Hemminger > wrote: > > On Thu, 29 Mar 2018 20:22:20 +0100 > Kevin Darbyshire-Bryant wrote: > >> print_int used 'int' type internally, whereas print_uint used 'uint64_t' >> >> These helper

[net-next v2 2/5] tipc: refactor name table translate function

2018-03-29 Thread Jon Maloy
The function tipc_nametbl_translate() function is ugly and hard to follow. This can be improved somewhat by introducing a stack variable for holding the publication list to be used and re-ordering the if- clauses for selection of algorithm. Signed-off-by: Jon Maloy ---

[net-next v2 5/5] tipc: avoid possible string overflow

2018-03-29 Thread Jon Maloy
gcc points out that the combined length of the fixed-length inputs to l->name is larger than the destination buffer size: net/tipc/link.c: In function 'tipc_link_create': net/tipc/link.c:465:26: error: '%s' directive writing up to 32 bytes into a region of size between 26 and 58

[net-next v2 1/5] tipc: replace name table service range array with rb tree

2018-03-29 Thread Jon Maloy
The current design of the binding table has an unnecessary memory consuming and complex data structure. It aggregates the service range items into an array, which is expanded by a factor two every time it becomes too small to hold a new item. Furthermore, the arrays never shrink when the number of

[net-next v2 3/5] tipc: permit overlapping service ranges in name table

2018-03-29 Thread Jon Maloy
With the new RB tree structure for service ranges it becomes possible to solve an old problem; - we can now allow overlapping service ranges in the table. When inserting a new service range to the tree, we use 'lower' as primary key, and when necessary 'upper' as secondary key. Since there may

[net-next v2 4/5] tipc: tipc: rename address types in user api

2018-03-29 Thread Jon Maloy
The three address type structs in the user API have names that in reality reflect the specific, non-Linux environment where they were originally created. We now give them more intuitive names, in accordance with how TIPC is described in the current documentation. struct tipc_portid -> struct

[net-next v2 0/5] tipc: slim down name table

2018-03-29 Thread Jon Maloy
We clean up and improve the name binding table: - Replace the memory consuming 'sub_sequence/service range' array with an RB tree. - Introduce support for overlapping service sequences/ranges v2: #1: Fixed a missing initialization reported by David Miller #4: Obsoleted and replaced a

Re: possible deadlock in perf_event_detach_bpf_prog

2018-03-29 Thread Daniel Borkmann
On 03/29/2018 11:04 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (Sun Mar 25 22:44:30 2018 +) > Linux 4.16-rc7 > syzbot dashboard link: > https://syzkaller.appspot.com/bug?extid=dc5ca0e4c9bfafaf2bae > >

Re: Passing uninitialised local variable

2018-03-29 Thread Arend van Spriel
On 3/28/2018 1:20 PM, Himanshu Jha wrote: Hello everyone, You added everyone, but me :-( Not really a problem, but it would help if the driver name was mentioned in the subject. I recently found that a local variable in passed uninitialised to the function at

[next-queue PATCH v6 02/10] igb: Fix queue selection on MAC filters on i210

2018-03-29 Thread Vinicius Costa Gomes
On the RAH registers there are semantic differences on the meaning of the "queue" parameter for traffic steering depending on the controller model: there is the 82575 meaning, which "queue" means a RX Hardware Queue, and the i350 meaning, where it is a reception pool. The previous behaviour was

[next-queue PATCH v6 03/10] igb: Enable the hardware traffic class feature bit for igb models

2018-03-29 Thread Vinicius Costa Gomes
This will allow functionality depending on the hardware being traffic class aware to work. In particular the tc-flower offloading checks verifies that this bit is set. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file

[next-queue PATCH v6 09/10] igb: Add the skeletons for tc-flower offloading

2018-03-29 Thread Vinicius Costa Gomes
This adds basic functions needed to implement offloading for filters created by tc-flower. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 66 +++ 1 file changed, 66 insertions(+) diff --git

[next-queue PATCH v6 04/10] igb: Add support for MAC address filters specifying source addresses

2018-03-29 Thread Vinicius Costa Gomes
Makes it possible to direct packets to queues based on their source address. Documents the expected usage of the 'flags' parameter. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + drivers/net/ethernet/intel/igb/igb.h

[next-queue PATCH v6 06/10] igb: Allow filters to be added for the local MAC address

2018-03-29 Thread Vinicius Costa Gomes
Users expect that when adding a steering filter for the local MAC address, that all the traffic directed to that address will go to some queue. Currently, it's not possible to configure entries in the "in use" state, which is the normal state of the local MAC address entry (it is the default),

[next-queue PATCH v6 00/10] igb: offloading of receive filters

2018-03-29 Thread Vinicius Costa Gomes
Hi, Changes from v5: - Filters can now be added for local MAC addresses, when removed, they return to their initial configuration (thanks for the testing Aaron); Changes from v4: - Added a new bit to the MAC address filters internal representation to mean that some filters are steering

[next-queue PATCH v6 10/10] igb: Add support for adding offloaded clsflower filters

2018-03-29 Thread Vinicius Costa Gomes
This allows filters added by tc-flower and specifying MAC addresses, Ethernet types, and the VLAN priority field, to be offloaded to the controller. This reuses most of the infrastructure used by ethtool, but clsflower filters are kept in a separated list, so they are invisible to ethtool.

[next-queue PATCH v6 05/10] igb: Add support for enabling queue steering in filters

2018-03-29 Thread Vinicius Costa Gomes
On some igb models (82575 and i210) the MAC address filters can control to which queue the packet will be assigned. This extends the 'state' with one more state to signify that queue selection should be enabled for that filter. As 82575 parts are no longer easily obtained (and this was developed

[next-queue PATCH v6 08/10] igb: Add MAC address support for ethtool nftuple filters

2018-03-29 Thread Vinicius Costa Gomes
This adds the capability of configuring the queue steering of arriving packets based on their source and destination MAC addresses. In practical terms this adds support for the following use cases, characterized by these examples: $ ethtool -N eth0 flow-type ether dst aa:aa:aa:aa:aa:aa action 0

[next-queue PATCH v6 07/10] igb: Enable nfc filters to specify MAC addresses

2018-03-29 Thread Vinicius Costa Gomes
This allows igb_add_filter()/igb_erase_filter() to work on filters that include MAC addresses (both source and destination). For now, this only exposes the functionality, the next commit glues ethtool into this. Later in this series, these APIs are used to allow offloading of cls_flower filters.

[next-queue PATCH v6 01/10] igb: Fix not adding filter elements to the list

2018-03-29 Thread Vinicius Costa Gomes
Because the order of the parameters passes to 'hlist_add_behind()' was inverted, the 'parent' node was added "behind" the 'input', as input is not in the list, this causes the 'input' node to be lost. Fixes: 0e71def25281 ("igb: add support of RX network flow classification") Signed-off-by:

Re: [PATCH iproute2-next] json_print: fix print_uint with helper type extensions

2018-03-29 Thread Kevin Darbyshire-Bryant
> On 29 Mar 2018, at 22:03, Stephen Hemminger > wrote: > > On Thu, 29 Mar 2018 20:32:10 +0100 > Kevin Darbyshire-Bryant wrote: > >> Introduce print helper functions for int, uint, explicit int32, uint32, >> int64 & uint64. >> >>

possible deadlock in perf_event_detach_bpf_prog

2018-03-29 Thread syzbot
Hello, syzbot hit the following crash on upstream commit 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (Sun Mar 25 22:44:30 2018 +) Linux 4.16-rc7 syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=dc5ca0e4c9bfafaf2bae Unfortunately, I don't have any reproducer for this crash yet.

Re: [PATCH iproute2-next] json_print: fix print_uint with helper type extensions

2018-03-29 Thread Stephen Hemminger
On Thu, 29 Mar 2018 20:32:10 +0100 Kevin Darbyshire-Bryant wrote: > Introduce print helper functions for int, uint, explicit int32, uint32, > int64 & uint64. > > print_int used 'int' type internally, whereas print_uint used 'uint64_t' > > These helper functions

Re: [PATCH iproute2] json_print: fix print_uint hidden type promotion

2018-03-29 Thread Stephen Hemminger
On Thu, 29 Mar 2018 20:22:20 +0100 Kevin Darbyshire-Bryant wrote: > print_int used 'int' type internally, whereas print_uint used 'uint64_t' > > These helper functions eventually call vfprintf(fp, fmt, args) which is > a variable argument list function and is

aio poll and a new in-kernel poll API V8

2018-03-29 Thread Christoph Hellwig
Hi all, this series adds support for the IOCB_CMD_POLL operation to poll for the readyness of file descriptors using the aio subsystem. The API is based on patches that existed in RHAS2.1 and RHEL3, which means it already is supported by libaio. To implement the poll support efficiently new

[PATCH 02/30] fs: cleanup do_pollfd

2018-03-29 Thread Christoph Hellwig
Use straightline code with failure handling gotos instead of a lot of nested conditionals. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 48

[PATCH 04/30] fs: add new vfs_poll and file_can_poll helpers

2018-03-29 Thread Christoph Hellwig
These abstract out calls to the poll method in preparation for changes in how we poll. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong ---

[PATCH 03/30] fs: update documentation to mention __poll_t and match the code

2018-03-29 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Greg Kroah-Hartman --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 06/30] aio: simplify cancellation

2018-03-29 Thread Christoph Hellwig
With the current aio code there is no need for the magic KIOCB_CANCELLED value, as a cancelation just kicks the driver to queue the completion ASAP, with all actual completion handling done in another thread. Given that both the completion path and cancelation take the context lock there is no

[PATCH 07/30] aio: add delayed cancel support

2018-03-29 Thread Christoph Hellwig
The upcoming aio poll support would like to be able to complete the iocb inline from the cancellation context, but that would cause a double lock of ctx_lock with the current locking scheme. Move the cancelation outside the context lock to avoid this reversal, which suits the existing usb gadgets

[PATCH net-next 00/11] mlxsw: Various cleanups

2018-03-29 Thread Ido Schimmel
Hi, The first 10 patches from Jiri perform small and unrelated cleanups. The largest being the conversion of the KVD linear partitions from a list to an array, which simplifies the code. The last patch from Petr is a bug fix for a recent net-next commit that prevented the "kvd" resource from

[PATCH net-next 02/11] mlxsw: spectrum_kvdl: Fix handling of resource_size_param

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko Current code uses global variables, adjusts them and passes pointer down to devlink. With every other mlxsw_core instance, the previously passed pointer values are rewritten. Fix this by de-globalize the variables. Fixes: 7f47b19bd744 ("mlxsw: spectrum_kvdl:

[PATCH 08/30] aio: implement IOCB_CMD_POLL

2018-03-29 Thread Christoph Hellwig
Simple one-shot poll through the io_submit() interface. To poll for a file descriptor the application should submit an iocb of type IOCB_CMD_POLL. It will poll the fd for the events specified in the the first 32 bits of the aio_buf field of the iocb. Unlike poll or epoll without EPOLLONESHOT

[PATCH net-next 01/11] mlxsw: spectrum_acl: Fix flex actions header ifndef define construct

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko Fix copy error in flex actions header ifndef define construct Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_actions.h | 4 ++-- 1 file changed, 2

[PATCH net-next 04/11] mlxsw: spectrum: Change KVD linear parts from list to array

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko The parts info is array. The parts copy this info array, yet they are a list. So make the indexing according to the id and change the list of parts into array of parts. This helps to eliminate lookups and constructs like mlxsw_sp_kvdl_part_update() (took me

[PATCH 09/30] net: refactor socket_poll

2018-03-29 Thread Christoph Hellwig
Factor out two busy poll related helpers for late reuse, and remove a command that isn't very helpful, especially with the __poll_t annotations in place. Signed-off-by: Christoph Hellwig --- include/net/busy_poll.h | 15 +++ net/socket.c| 21

[PATCH net-next 06/11] mlxsw: core: Fix arg name of MLXSW_CORE_RES_VALID and MLXSW_CORE_RES_GET

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko First arg of these helpers should be "mlxsw_core". Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH net-next 05/11] mlxsw: remove kvd_hash_granularity from config profile struct

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko This should not be part of the struct, as the struct fields are tightly coupled with the FW command payload of the same name. Just use the "granularity" define directly, as in other places. Signed-off-by: Jiri Pirko Signed-off-by: Ido

[PATCH net-next 07/11] mlxsw: Move "used_kvd_sizes" check to mlxsw_pci_config_profile

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko The check should be done directly in mlxsw_pci_config_profile, as for other profile items. Also, be consistent in naming with the rest and rename to "used_kvd_sizes". Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel

[PATCH 10/30] net: add support for ->poll_mask in proto_ops

2018-03-29 Thread Christoph Hellwig
The socket file operations still implement ->poll until all protocols are switched over. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 3 +++ net/socket.c| 51 ++- 2 files changed, 49 insertions(+), 5

[PATCH net-next 08/11] mlxsw: Move "resources_query_enable" out of mlxsw_config_profile

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko As struct mlxsw_config_profile is mapped to the payload of the FW command of the same name, resources_query_enable flag does not belong there. Move it to struct mlxsw_driver. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel

[PATCH 12/30] net/tcp: convert to ->poll_mask

2018-03-29 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/tcp.h | 4 ++-- net/ipv4/af_inet.c | 3 ++- net/ipv4/tcp.c | 31 ++- net/ipv6/af_inet6.c | 3 ++- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/include/net/tcp.h

[PATCH 11/30] net: remove sock_no_poll

2018-03-29 Thread Christoph Hellwig
Now that sock_poll handles a NULL ->poll or ->poll_mask there is no need for a stub. Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 1 - crypto/algif_hash.c | 2 -- crypto/algif_rng.c | 1 - drivers/isdn/mISDN/socket.c | 1 -

[PATCH net-next 09/11] devlink: convert occ_get op to separate registration

2018-03-29 Thread Ido Schimmel
From: Jiri Pirko This resolves race during initialization where the resources with ops are registered before driver and the structures used by occ_get op is initialized. So keep occ_get callbacks registered only when all structs are initialized. Signed-off-by: Jiri Pirko

[PATCH 13/30] net/unix: convert to ->poll_mask

2018-03-29 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/unix/af_unix.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 2d465bdeccbc..619c6921dd46 100644 --- a/net/unix/af_unix.c +++

[PATCH 14/30] net: convert datagram_poll users tp ->poll_mask

2018-03-29 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman --- drivers/isdn/mISDN/socket.c| 2 +- drivers/net/ppp/pppoe.c| 2 +- drivers/staging/ipx/af_ipx.c | 2 +- drivers/staging/irda/net/af_irda.c | 6 +++---

  1   2   3   4   >