Re: [PATCH RFC ipsec-next 0/7] ipsec: add TCP encapsulation support (RFC 8229)

2019-08-20 Thread Steffen Klassert
On Fri, Aug 16, 2019 at 04:18:14PM +0200, Sabrina Dubroca wrote: > Hi Steffen, > > 2019-06-25, 12:11:33 +0200, Sabrina Dubroca wrote: > > This patchset introduces support for TCP encapsulation of IKE and ESP > > messages, as defined by RFC 8229 [0]. It is an evolution of what > > Herbert Xu propos

Re: various TLS bug fixes...

2019-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2019 22:18:30 -0700, John Fastabend wrote: > > > I suspect you've triaged through this already on your side for other > > > reasons, so perhaps you could help come up with a sane set of TLS > > > bug fix backports that would be appropriate for -stable? > > > > I'm planning to spen

Re: [PATCH ipsec] xfrm: policy: avoid warning splat when merging nodes

2019-08-20 Thread Steffen Klassert
On Mon, Aug 12, 2019 at 10:32:13AM +0200, Florian Westphal wrote: > syzbot reported a splat: > xfrm_policy_inexact_list_reinsert+0x625/0x6e0 net/xfrm/xfrm_policy.c:877 > CPU: 1 PID: 6756 Comm: syz-executor.1 Not tainted 5.3.0-rc2+ #57 > Call Trace: > xfrm_policy_inexact_node_reinsert net/xfrm/

Re: [pull request][net-next v2 00/16] Mellanox, mlx5 devlink RX health reporters

2019-08-20 Thread David Miller
From: Saeed Mahameed Date: Tue, 20 Aug 2019 20:24:10 + > This series is adding a new devlink health reporter for RX related > errors from Aya. > > Last two patches from Vlad and Gavi, are trivial fixes for previously > submitted patches on this release cycle. > > v1->v2: > - Improve revers

[PATCH net-next] net: dsa: remove bitmap operations

2019-08-20 Thread Vivien Didelot
The bitmap operations were introduced to simplify the switch drivers in the future, since most of them could implement the common VLAN and MDB operations (add, del, dump) with simple functions taking all target ports at once, and thus limiting the number of hardware accesses. Programming an MDB or

Re: various TLS bug fixes...

2019-08-20 Thread John Fastabend
Jakub Kicinski wrote: > On Tue, 20 Aug 2019 16:05:17 -0700 (PDT), David Miller wrote: > > Jakub, > > > > I just did a batch of networking -stable submissions, however I ran > > into some troubles with the various TLS backports. > > Yes, the TLS back ports are a little messy :S > > > I was able t

Re: [PATCH spi for-5.4 0/5] Deterministic SPI latency with NXP DSPI driver

2019-08-20 Thread Richard Cochran
On Tue, Aug 20, 2019 at 06:57:10PM +0300, Vladimir Oltean wrote: > I believe something similar should be possible on other hardware as well. Not for the marvell link street devices, AFAICT. Thanks, Richard

Re: [PATCH spi for-5.4 0/5] Deterministic SPI latency with NXP DSPI driver

2019-08-20 Thread Richard Cochran
On Tue, Aug 20, 2019 at 06:57:10PM +0300, Vladimir Oltean wrote: > What if all we need is just a mini-"phc2sys-over-Ethernet" that runs > on a kernel thread internally to DSA? We say that DSA switches are > "slave" to the "master" netdevice - their PTP clock can be the same. > I am fairly confident

Re: [PATCH 08/38] nfp: Convert to XArray

2019-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2019 15:32:29 -0700, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > A minor change in semantics where we simply store into the XArray rather > than insert; this only matters if there could already be something stored > at that index, and from my reading of the code tha

Re: [pull request][net-next v2 00/16] Mellanox, mlx5 devlink RX health reporters

2019-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2019 20:24:10 +, Saeed Mahameed wrote: > This patchset introduces changes in mlx5 devlink health reporters. > The highlight of these changes is adding a new reporter: RX reporter > > mlx5 RX reporter: reports and recovers from timeouts and RX completion > error. > > 1) Perform

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vivien Didelot
On Wed, 21 Aug 2019 01:09:39 +0300, Vladimir Oltean wrote: > I mean I made an argument already for the hack in 4/6 ("Don't program > the VLAN as pvid on the upstream port"). If the hack gets accepted > like that, I have no further need of any change in the implicit VLAN > configuration. But it's s

Re: VRF notes when using ipv6 and flushing tables.

2019-08-20 Thread David Ahern
On 8/20/19 2:27 PM, Ben Greear wrote: > I recently spend a few days debugging what in the end was user error on > my part. > > Here are my notes in hope they help someone else. > > First, 'ip -6 route show vrf vrfX' will not show some of the > routes (like local routes) that will show up with > '

[PATCHv3 2/2] xfrm/xfrm_policy: fix dst dev null pointer dereference in collect_md mode

2019-08-20 Thread Hangbin Liu
In decode_session{4,6} there is a possibility that the skb dst dev is NULL, e,g, with tunnel collect_md mode, which will cause kernel crash. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit - ip6gre_xmit_ipv6 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->t

[PATCHv3 0/2] fix dev null pointer dereference when send packets larger than mtu in collect_md mode

2019-08-20 Thread Hangbin Liu
When we send a packet larger than PMTU, we need to reply with icmp_send(ICMP_FRAG_NEEDED) or icmpv6_send(ICMPV6_PKT_TOOBIG). But with collect_md mode, kernel will crash while accessing the dst dev as __metadata_dst_init() init dst->dev to NULL by default. Here is what the code path looks like, for

[PATCHv3 1/2] ipv4/icmp: fix rt dst dev null pointer dereference

2019-08-20 Thread Hangbin Liu
In __icmp_send() there is a possibility that the rt->dst.dev is NULL, e,g, with tunnel collect_md mode, which will cause kernel crash. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit - ip6gre_xmit_ipv4 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->tun_hle

Re: [PATCH 1/1] net: rds: add service level support in rds-info

2019-08-20 Thread Zhu Yanjun
Hi,Doug My reply is in line. On 2019/8/20 23:28, Doug Ledford wrote: On Mon, 2019-08-19 at 20:52 -0400, Zhu Yanjun wrote: diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index fd6b5f6..cba368e 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -250,6 +250,

Re: Validate Your Mailbox

2019-08-20 Thread Sobari Pelayanan Penunjang Medik dan . Sarana Kesehatan
Dear user Success alert your mailbox has exceeded it quota/limit you may not be able to receive or send new mails until you re-validate. To re-validate click the below link or copy. https://53963.8b.io/ Copyright © 2019 System Administrator. Technical Support Team

[v4] ocelot_ace: fix action of trap

2019-08-20 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Fixes: b596229448dd ("net: mscc: ocelot: Add support for tcam") Signed-off-by: Yangbo Lu Acked-by: Allan W. Nielsen --- Changes for v4: - Added ACK and Fi

Re: [PATCH v1] ocfs2/dlm: Move BITS_TO_BYTES() to bitops.h for wider use

2019-08-20 Thread Joseph Qi
On 19/8/21 00:31, Andy Shevchenko wrote: > There are users already and will be more of BITS_TO_BYTES() macro. > Move it to bitops.h for wider use. > > Signed-off-by: Andy Shevchenko > --- > drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h | 1 - > fs/ocfs2/dlm/dlmcommon.h

Re: [PATCH 23/38] cls_api: Convert tcf_net to XArray

2019-08-20 Thread Matthew Wilcox
On Tue, Aug 20, 2019 at 04:57:28PM -0700, David Miller wrote: > > From: "Matthew Wilcox (Oracle)" > > > > This module doesn't use the allocating functionality; convert it to a > > plain XArray instead of an allocating one. I've left struct tcf_net > > in place in case more objects are added to i

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
On Tue, Aug 20, 2019 at 04:58:34PM -0700, David Miller wrote: > From: Matthew Wilcox > Date: Tue, 20 Aug 2019 15:32:50 -0700 > > > - idr_replace(&head->handle_idr, fnew, fnew->handle); > > + xa_store(&head->filters, fnew->handle, fnew, 0); > > Passing a gfp_t of zero? :-) Ye

Re: various TLS bug fixes...

2019-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2019 16:05:17 -0700 (PDT), David Miller wrote: > Jakub, > > I just did a batch of networking -stable submissions, however I ran > into some troubles with the various TLS backports. Yes, the TLS back ports are a little messy :S > I was able to backport commit 414776621d10 ("net/tls

[PATCH net-next,v3, 6/6] net/mlx5e: Add mlx5e HV VHCA stats agent

2019-08-20 Thread Haiyang Zhang
From: Eran Ben Elisha HV VHCA stats agent is responsible on running a preiodic rx/tx packets/bytes stats update. Currently the supported format is version MLX5_HV_VHCA_STATS_VERSION. Block ID 1 is dedicated for statistics data transfer from the VF to the PF. The reporter fetch the statistics dat

[PATCH net-next,v3, 2/6] PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface

2019-08-20 Thread Haiyang Zhang
This interface driver is a helper driver allows other drivers to have a common interface with the Hyper-V PCI frontend driver. Signed-off-by: Haiyang Zhang Signed-off-by: Saeed Mahameed --- MAINTAINERS | 1 + drivers/pci/Kconfig | 1 + drivers

Re: [PATCH v2 3/4] bpf: clarify when bpf_trace_printk discards lines

2019-08-20 Thread Peter Wu
On Tue, Aug 20, 2019 at 04:22:23PM -0700, Alexei Starovoitov wrote: > On Wed, Aug 21, 2019 at 12:08:59AM +0100, Peter Wu wrote: > > I opened /sys/kernel/tracing/trace once and kept reading from it. > > bpf_trace_printk somehow did not seem to work, no entries were appended > > to that trace file. I

Re: [net-next v3 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-20

2019-08-20 Thread David Miller
From: Jeff Kirsher Date: Tue, 20 Aug 2019 14:50:34 -0700 > This series contains updates to ice driver only. Pulled, thanks Jeff.

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread David Miller
From: Matthew Wilcox Date: Tue, 20 Aug 2019 15:32:50 -0700 > - idr_replace(&head->handle_idr, fnew, fnew->handle); > + xa_store(&head->filters, fnew->handle, fnew, 0); Passing a gfp_t of zero? :-)

Re: [PATCH 23/38] cls_api: Convert tcf_net to XArray

2019-08-20 Thread David Miller
From: Matthew Wilcox Date: Tue, 20 Aug 2019 15:32:44 -0700 > From: "Matthew Wilcox (Oracle)" > > This module doesn't use the allocating functionality; convert it to a > plain XArray instead of an allocating one. I've left struct tcf_net > in place in case more objects are added to it in future

Re: [PATCH net-next 6/6] net: dsa: tag_8021q: Restore bridge pvid when enabling vlan_filtering

2019-08-20 Thread Florian Fainelli
On 8/19/19 5:00 PM, Vladimir Oltean wrote: > The bridge core assumes that enabling/disabling vlan_filtering will > translate into the simple toggling of a flag for switchdev drivers. > > That is clearly not the case for sja1105, which alters the VLAN table > and the pvids in order to obtain port s

Re: [PATCH v2 3/4] bpf: clarify when bpf_trace_printk discards lines

2019-08-20 Thread Alexei Starovoitov
On Wed, Aug 21, 2019 at 12:08:59AM +0100, Peter Wu wrote: > I opened /sys/kernel/tracing/trace once and kept reading from it. > bpf_trace_printk somehow did not seem to work, no entries were appended > to that trace file. It turns out that tracing is disabled when that file > is open. Save the next

[PATCH v2 4/4] bpf: sync bpf.h to tools/

2019-08-20 Thread Peter Wu
Fix a 'struct pt_reg' typo and clarify when bpf_trace_printk discards lines. Affects documentation only. Signed-off-by: Peter Wu --- tools/include/uapi/linux/bpf.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linu

[PATCH v2 3/4] bpf: clarify when bpf_trace_printk discards lines

2019-08-20 Thread Peter Wu
I opened /sys/kernel/tracing/trace once and kept reading from it. bpf_trace_printk somehow did not seem to work, no entries were appended to that trace file. It turns out that tracing is disabled when that file is open. Save the next person some time and document this. The trace file is described

[PATCH v2 0/4] BPF-related documentation fixes

2019-08-20 Thread Peter Wu
Hi, Here are some small doc updates that should hopefully save the next eBPF/uprobe user some time. Based on v5.3-rc2, but net-next appears to have no conflicts. Changes since the v1[1]: - Split bpf.h patch for kernel and userspace tools (requested by Alexei) - Add new 'bpf: clarify when bpf_trac

[PATCH v2 1/4] bpf: clarify description for CONFIG_BPF_EVENTS

2019-08-20 Thread Peter Wu
PERF_EVENT_IOC_SET_BPF supports uprobes since v4.3, and tracepoints since v4.7 via commit 04a22fae4cbc ("tracing, perf: Implement BPF programs attached to uprobes"), and commit 98b5c2c65c29 ("perf, bpf: allow bpf programs attach to tracepoints") respectively. Signed-off-by: Peter Wu --- kernel/t

[PATCH v2 2/4] bpf: fix 'struct pt_reg' typo in documentation

2019-08-20 Thread Peter Wu
There is no 'struct pt_reg'. Signed-off-by: Peter Wu --- include/uapi/linux/bpf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index fa1c753dcdbc..9ca333c3ce91 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uap

various TLS bug fixes...

2019-08-20 Thread David Miller
Jakub, I just did a batch of networking -stable submissions, however I ran into some troubles with the various TLS backports. I was able to backport commit 414776621d10 ("net/tls: prevent skb_orphan() from leaking TLS plain text with offload") to v5.2 but not to v4.19 I was not able to backpor

Re: [PATCH net-next 4/6] net: dsa: Don't program the VLAN as pvid on the upstream port

2019-08-20 Thread Florian Fainelli
On 8/20/19 5:09 AM, Vladimir Oltean wrote: > Hi Florian, > > On Tue, 20 Aug 2019 at 06:15, Florian Fainelli wrote: >> >> >> >> On 8/19/2019 5:00 PM, Vladimir Oltean wrote: >>> Commit b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members") >>> programs the VLAN from the bridge into the sp

[PATCH 14/38] tap: Convert minor_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The minor_lock can be removed as the XArray contains its own spinlock. I suspect the GFP_ATOMIC allocation could be GFP_KERNEL, but I couldn't prove it. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/tap.c | 32 +--- 1 file ch

[PATCH 04/38] mlx5: Convert cq_table to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Since mlx5_cq_table would have shrunk down to just the xarray, eliminate it and embed the xarray directly into mlx5_eq. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 27 --- .../net/ethernet/mellanox/m

[PATCH 10/38] ath10k: Convert mgmt_pending_tx IDR to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Leave the ->data_lock locking in place; it may be possible to remove it, but err on the side of double-locking for now. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/wireless/ath/ath10k/core.h| 2 +- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 8 +

[PATCH 03/38] mlx4: Convert qp_table_tree to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This XArray appears to be modifiable from interrupt context, so we have to be a little more careful with the locking. However, the lookup can be done without the spinlock held. I cannot determine whether mlx4_qp_alloc() is allowed to sleep, so I've retained the G

[PATCH 09/38] ath10k: Convert pending_tx to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Leave the tx_lock in place; it might be removable around some of the places that use the XArray, but err on the side of double locking for now. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/wireless/ath/ath10k/htt.h| 2 +- drivers/net/wireless/ath/

[PATCH 06/38] mlx5: Convert counters_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This IDR wasn't using the allocation functionality, so convert it to a plain XArray. I also suspect it could be used to replace the list_head 'counters', but I'm not willing to do that work right now. Signed-off-by: Matthew Wilcox (Oracle) --- .../ethernet/mell

[PATCH 21/38] 9p: Move lock from client to trans_fd

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The trans_fd back end is now the only transport using the client spinlock so move it into the transport connection. Signed-off-by: Matthew Wilcox (Oracle) --- include/net/9p/client.h | 2 -- net/9p/client.c | 1 - net/9p/trans_fd.c | 36 +

[PATCH 15/38] nfp: Convert internal ports to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Since nfp_fl_internal_ports was only an IDR and the lock to protect it, replace the entire data structure with an XArray (which has an embedded lock). Signed-off-by: Matthew Wilcox (Oracle) --- .../net/ethernet/netronome/nfp/flower/main.c | 44 +++--

[PATCH 11/38] mt76: Convert token IDR to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Straightforward conversion; locking is similar. It may be possible to change the GFP_ATOMIC to GFP_KERNEL, but I can't tell whether this context permits sleeping or not. Signed-off-by: Matthew Wilcox (Oracle) --- .../net/wireless/mediatek/mt76/mt7615/init.c |

[PATCH 08/38] nfp: Convert to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" A minor change in semantics where we simply store into the XArray rather than insert; this only matters if there could already be something stored at that index, and from my reading of the code that can't happen. Use xa_for_each() rather than xas_for_each() as non

[PATCH 28/38] cls_bpf: Use XArray marks to accelerate re-offload

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Propagate the skip_hw flag from the cls_bpf_prog structure into one of the XArray mark bits which lets us skip examining the unwanted programs. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_bpf.c | 12 1 file changed, 8 insertions(+), 4 d

[PATCH 25/38] cls_u32: Convert tc_u_hnode->handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Rename this IDR to 'knodes' since that's what's being stored in it. Use xa_alloc_cyclic() since that's what's being emulated in gen_new_kid(). Allow gen_new_kid() to return a "no space" indicator. Access to this XArray is now under both the rtnl lock and the XArra

[PATCH 13/38] ppp: Convert units_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Remove the unit_* wrappers around the IDR code; using the XArray API directly is more clear. I suspect the all_ppp_mutex could probably be removed, but it probably isn't a scalability bottleneck. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/ppp/ppp_ge

[PATCH 20/38] 9p: Convert fids IDR to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Locking changes to use the internal XArray spinlock instead of the client spinlock. Also remove all references to the IDR header file and a dangling define of P9_ROW_MAXTAG. Signed-off-by: Matthew Wilcox (Oracle) --- include/net/9p/client.h | 7 ++- net/9p

[PATCH 24/38] cls_u32: Convert tc_u_common->handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" There are two structures called 'handle_idr' in this module, which is most confusing. Rename this one to ht_xa. Leave the existing locking alone, which means that we're covered by both the rtnl lock and the XArray spinlock when accessing this XArray. Signed-off-

[PATCH 07/38] mlx5: Convert fpga IDRs to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Leave the locking as irq-disabling since it appears we can release entries from interrupt context. Signed-off-by: Matthew Wilcox (Oracle) --- .../ethernet/mellanox/mlx5/core/fpga/tls.c| 54 +++ .../ethernet/mellanox/mlx5/core/fpga/tls.h|

[PATCH 36/38] netlink: Convert genl_fam_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Straightforward conversion without touching the locking. Signed-off-by: Matthew Wilcox (Oracle) --- net/netlink/genetlink.c | 46 + 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/net/netlink/genetlink.c b/

[PATCH 12/38] mwifiex: Convert ack_status_frames to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Straightforward locking conversion; the only two points of note is that we can't pass the address of the tx_token_id to xa_alloc() because it's too small (an unsigned char), and mwifiex_free_ack_frame() becomes inlined into its caller. Signed-off-by: Matthew Wilco

[PATCH 33/38] act_api: Convert action_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace the mutex protecting the IDR with the XArray spinlock. Signed-off-by: Matthew Wilcox (Oracle) --- include/net/act_api.h | 6 +- net/sched/act_api.c | 127 +- 2 files changed, 53 insertions(+), 80 deletions(-)

[PATCH 05/38] mlx5: Convert mlx5_qp_table to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Fix the locking in destroy_resource_common() to be irq-disable rather than irq-save. wait_for_completion() can sleep, so this function must not be callable from interrupt context. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/ethernet/mellanox/mlx5/cor

[PATCH 22/38] sctp: Convert sctp_assocs_id to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This is a fairly straightforward conversion. The load side could be converted to RCU by appropriate handling of races between delete and lookup (eg RCU-freeing the sctp_association). One point to note is that sctp_assoc_set_id() will now return 1 if the allocatio

[PATCH 02/38] mlx4: Convert srq_table->tree to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Adjust the locking to not disable interrupts; this isn't needed as all accesses are either writes from process context or reads protected by the RCU lock. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/infiniband/hw/mlx4/cq.c | 2 +- drivers/net/e

[PATCH 18/38] rxrpc: Convert to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The XArray requires a separate cursor, but embeds the lock, so it's a minor saving. Also, there's no need to preload. Signed-off-by: Matthew Wilcox (Oracle) --- net/rxrpc/af_rxrpc.c| 2 +- net/rxrpc/ar-internal.h | 3 ++- net/rxrpc/conn_client.c | 49

[PATCH 16/38] qrtr: Convert qrtr_nodes to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Moved the kref protection under the xa_lock too. It's a little disconcerting to not be checking the error code from xa_store(), but the original code doesn't return an errno from qrtr_node_assign() and that would be a larger change to the driver than I'm conmforta

[PATCH 23/38] cls_api: Convert tcf_net to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This module doesn't use the allocating functionality; convert it to a plain XArray instead of an allocating one. I've left struct tcf_net in place in case more objects are added to it in future, although it now only contains an XArray. We don't need to call xa_de

[PATCH 35/38] tipc: Convert conn_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace idr_lock with the internal XArray lock. The idr_in_use counter isn't needed as we can free all the elements in the array without it. Signed-off-by: Matthew Wilcox (Oracle) --- net/tipc/topsrv.c | 49 ++- 1 fil

[PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Inline __fl_get() into fl_get(). Use the RCU lock explicitly for lookups and walks instead of relying on RTNL. The xa_lock protects us, but remains nested under the RTNL for now. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_flower.c | 54 ++

[PATCH 30/38] cls_flower: Use XArray list of filters in fl_walk

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Instead of iterating over every filter attached to every mark, just iterate over each filter. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_flower.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/sched/cls_flow

[PATCH 38/38] mac80211: Convert function_inst_ids to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replae the func_lock with the internal XArray spinlock. Ensuring that nan_func is fully initialised before dropping the lock allows us to iterate the array while not holding the lock, avoiding the awkward dance in ieee80211_reconfig_nan(). Signed-off-by: Matthew

[PATCH 17/38] qrtr: Convert qrtr_ports to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace the qrtr_port_lock mutex with the XArray internal spinlock. Signed-off-by: Matthew Wilcox (Oracle) --- net/qrtr/qrtr.c | 43 +++ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/net/qrtr/qrtr.c b/net

[PATCH 19/38] 9p: Convert reqs IDR to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the xarray spinlock instead of the client spinlock. Signed-off-by: Matthew Wilcox (Oracle) --- include/net/9p/client.h | 2 +- net/9p/client.c | 41 - 2 files changed, 21 insertions(+), 22 deletions(-) diff -

[PATCH 37/38] mac80211: Convert ack_status_frames to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace the ack_status_lock with the XArray internal lock. Using the xa_for_each() iterator lets us inline ieee80211_free_ack_frame(). Signed-off-by: Matthew Wilcox (Oracle) --- net/mac80211/cfg.c | 13 ++--- net/mac80211/ieee80211_i.h | 3 +--

[PATCH 34/38] net_namespace: Convert netns_ids to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This is a straightforward conversion; it should be possible to eliminate nsid_lock as it seems to only be used to protect netns_ids. The tricky part is that dropping the lock (eg to allocate memory) could end up allowing two networks which are equal to each other

[PATCH 01/38] mlx4: Convert cq_table->tree to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Remove the custom spinlock as the XArray handles its own locking. It might also be possible to remove the bitmap and use the XArray in allocating mode. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/net/ethernet/mellanox/mlx4/cq.c | 30 +++-

[PATCH 31/38] cls_flower: Use XArray marks instead of separate list

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Remove the hw_filter list in favour of using one of the XArray mark bits which lets us iterate more efficiently than walking a linked list. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_flower.c | 47 ++ 1 file

[PATCH 32/38] cls_basic: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The flist is redundant with the XArray, so remove it and use XArray operations to iterate & look up filters by ID. Locking is unadjusted, so most XArray operations continue to be protected by both the rtnl lock and the XArray spinlock. Lookups remain under the rt

[PATCH 26/38] cls_bpf: Convert handle_idr to XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Rename it to 'progs' as this is what's stored there. The locking is unchanged, so access to this XArray is protected by both the rtnl lock and the XArray spinlock. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_bpf.c | 28 +---

[PATCH 27/38] cls_bpf: Remove list of programs

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the XArray for all this functionality. Saves two pointers per program and it's faster to iterate over an XArray than a linked list. Signed-off-by: Matthew Wilcox (Oracle) --- net/sched/cls_bpf.c | 38 ++ 1 file changed, 1

[PATCH 00/38] Convert networking to use the XArray

2019-08-20 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Hello good networking folks, I am attempting to convert all IDR and radix tree users over to the XArray API so we can remove the radix tree code from the kernel. This process is already underway, and you can see all the conversions in a git tree [1]. The set o

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vladimir Oltean
On Wed, 21 Aug 2019 at 00:36, Vivien Didelot wrote: > > On Wed, 21 Aug 2019 00:02:22 +0300, Vladimir Oltean wrote: > > On Tue, 20 Aug 2019 at 23:58, Vivien Didelot > > wrote: > > > > > > On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean > > > wrote: > > > > I don't need this patch. I'm not

[net-next v3 12/14] ice: Move VF resources definition to SR-IOV specific file

2019-08-20 Thread Jeff Kirsher
From: Akeem G Abodunrin In order to use some of the VF resources definition in the SR-IOV specific virtchnl header file, this patch moves applicable code to ice_virtchnl_pf.h file accordingly... and they should have been defined in the destination file originally. Signed-off-by: Akeem G Abodunri

[net-next v3 03/14] ice: Restructure VFs initialization flows

2019-08-20 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch restructures how VFs are configured, and resources allocated. Instead of freeing resources that were never allocated, and resetting empty VFs that have never been created - the new flow will just allocate resources for number of requested VFs based on the availa

[net-next v3 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-20

2019-08-20 Thread Jeff Kirsher
This series contains updates to ice driver only. Brett fixes the detection of a hung transmit ring by checking the software based tail (next_to_use) to determine if there is pending work. Updates the driver to assume that using more than one receive queue per receive ring container is a rare case,

[net-next v3 07/14] ice: allow empty Rx descriptors

2019-08-20 Thread Jeff Kirsher
From: Mitch Williams In some circumstances, the hardware will hand us a receive descriptor which has no data attached, but is otherwise valid. The receive code was improperly ignoring these descriptors, which result in an infinite loop. To fix this, change the receive code to process all descrip

[net-next v3 01/14] ice: Use the software based tail when checking for hung Tx ring

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley Currently in ice_get_tx_pending we try to read a Tx ring's tail. This is then compared with the software based head (next_to_clean) to determine if we have pending work. This will never work because reading of the Tx ring's tail is no longer supported. Fix this by using the so

[net-next v3 11/14] ice: Increase size of Mailbox receive queue for many VFs

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley Currently we use the ICE_MBXQ_LEN for both the Mailbox send and receive queues that are used to communicate with VFs. This is fine for the send queue because the PF driver will lock the queue for every single send, but for the Mailbox receive queue every VF is posting to its M

[net-next v3 10/14] ice: Reduce wait times during VF bringup/reset

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley Currently there are a couple places where the VF is waiting too long when checking the status of registers. This is causing the AVF driver to spin for longer than necessary in the __IAVF_STARTUP state. Sometimes it causes the AVF to go into the __IAVF_COMM_FAILED, which may re

[net-next v3 06/14] ice: Fix kernel hang with DCB reset in CEE mode

2019-08-20 Thread Jeff Kirsher
From: Usha Ketineni This patch fixes the set local MIB AQ call failures in the DCB rebuild path by setting the defaults for the ETS recommended DCB configuration. Also, willing bits for the DCB configuration needs to be set correctly. Resets works fine in IEEE mode as the ETS recommended DCB conf

[net-next v3 05/14] ice: Set WB_ON_ITR when we don't re-enable interrupts

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley Currently when busy polling is enabled we aren't setting/enabling WB_ON_ITR in the driver. This doesn't break the driver, but it does cause issues. If we don't enable WB_ON_ITR mode we will still get write-backs from hardware during polling when a cache line has been filled, b

[net-next v3 13/14] ice: Change type for queue counts

2019-08-20 Thread Jeff Kirsher
From: Pawel Kaminski These queue variables are being assigned values that are type u16. Change the local variables to match these types. Since these represent queue counts, they should never be negative. Signed-off-by: Pawel Kaminski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-

[net-next v3 09/14] ice: update GLINT_DYN_CTL and GLINT_VECT2FUNC register access

2019-08-20 Thread Jeff Kirsher
From: Paul Greenwalt Register access for GLINT_DYN_CTL and GLINT_VECT2FUNC should be within the PF space and not the absolute device space. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 24 +++---

[net-next v3 02/14] ice: Assume that more than one Rx queue is rare in ice_napi_poll

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley Currently we divide budget by the number of Rx queues per Rx ring container in ice_napi_poll even if there is only 1. This is an unnecessary divide for the normal case of 1 Rx ring per Rx ring container. Fix this by using an unlikely() call in the case where we actually need t

[net-next v3 04/14] ice: fix set pause param autoneg check

2019-08-20 Thread Jeff Kirsher
From: Paul Greenwalt When ETHTOOL_GLINKSETTINGS is defined get pause param pause->autoneg reports SW configured setting, however when not defined get pause param pause->autoneg reports the link status. Set pause param needs to compare pause->autoneg with the same source as get pause param to bloc

[net-next v3 08/14] ice: Do not always bring up PF VSI in ice_ena_vsi()

2019-08-20 Thread Jeff Kirsher
From: Tony Nguyen During rebuild ice_ena_vsi() is called to recover the VSI state. This function assumes the PF VSI is always to be enabled, however, it's possible that during reset/rebuild the interface can be brought down. If this occurs, we can attempt to bring up the PF VSI on a downed inter

[net-next v3 14/14] ice: improve print for VF's when adding/deleting MAC filters

2019-08-20 Thread Jeff Kirsher
From: Brett Creeley When we fail to add/delete MAC filters in the VF, the print doesn't distinguish between the two. Fix that by printing whether or not we failed to add/delete the MAC filter respectively. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vivien Didelot
On Wed, 21 Aug 2019 00:02:22 +0300, Vladimir Oltean wrote: > On Tue, 20 Aug 2019 at 23:58, Vivien Didelot wrote: > > > > On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean > > wrote: > > > I don't need this patch. I'm not sure what my thought process was at > > > the time I added it to the pat

Re: [PATCH v4 00/14] NFC: nxp-nci: clean up and new device support

2019-08-20 Thread Sedat Dilek
> Andy Shevchenko hat am 29. Juli 2019 > 15:35 geschrieben: > > > Few people reported that some laptops are coming with new ACPI ID for the > devices should be supported by nxp-nci driver. > > This series adds new ID (patch 2), cleans up the driver from legacy platform > data and unifies G

Re: pull-request: can-next 2019-08-20,pull-request: can-next 2019-08-20

2019-08-20 Thread David Miller
From: Marc Kleine-Budde Date: Tue, 20 Aug 2019 19:32:13 +0200 > this is a pull request for net-next/master consisting of 18 patches. Pulled, thanks Marc.

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vladimir Oltean
On Tue, 20 Aug 2019 at 23:58, Vivien Didelot wrote: > > On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean wrote: > > I don't need this patch. I'm not sure what my thought process was at > > the time I added it to the patchset. > > I'm still interested in getting rid of the vlan bitmap through o

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vivien Didelot
On Tue, 20 Aug 2019 23:40:34 +0300, Vladimir Oltean wrote: > I don't need this patch. I'm not sure what my thought process was at > the time I added it to the patchset. > I'm still interested in getting rid of the vlan bitmap through other > means (picking up your old changeset). Could you take a

Re: [PATCH mlx5-next 0/5] Mellanox, Updates for mlx5-next branch 2019-08-15

2019-08-20 Thread Saeed Mahameed
On Thu, 2019-08-15 at 19:46 +, Saeed Mahameed wrote: > Hi All, > > This series includes misc updates for mlx5-next shared branch. > > mlx5 HW spec and bits updates: > 1) Aya exposes IP-in-IP capability in mlx5_core. > 2) Maxim exposes lag tx port affinity capabilities. > 3) Moshe adds VNIC_EN

Re: [PATCH net-next 0/9] s390/net: updates 2019-08-20

2019-08-20 Thread David Miller
From: Julian Wiedmann Date: Tue, 20 Aug 2019 16:46:34 +0200 > please apply the following patches to net-next. This series brings a mix > of cleanups and small improvements for various parts of qeth's control > path. Also, a minor cleanup for ctcm and lcs. Looks good, series applied, thanks.

Re: [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well

2019-08-20 Thread Vladimir Oltean
Hi Florian, On Tue, 20 Aug 2019 at 22:40, Florian Fainelli wrote: > > On 8/20/19 10:52 AM, Vivien Didelot wrote: > > Hi Vladimir, > > > > On Tue, 20 Aug 2019 12:54:44 +0300, Vladimir Oltean > > wrote: > >> I can agree that this isn't one of my brightest moments. But at least > >> we get to see

  1   2   3   >