Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-22 Thread Xin Long
On Mon, May 21, 2018 at 9:48 PM, Neil Horman wrote: > On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: >> > On 21. May 2018, at 13:39, Neil Horman wrote: >> > >> > On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo Ricardo Leitner wrote: >> >> On Sun, May 20, 2018 at 08:50:59PM -040

[PATCH net-next] cxgb4: Check for kvzalloc allocation failure

2018-05-22 Thread YueHaibing
t4_prep_fw doesn't check for card_fw pointer before store the read data, which could lead to a NULL pointer dereference if kvzalloc failed. Signed-off-by: YueHaibing --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/c

[PATCH net-next v2 01/10] qed: Add MFW interfaces for TLV request support.

2018-05-22 Thread Sudarsana Reddy Kalluru
The patch adds required management firmware (MFW) interfaces such as mailbox commands, TLV types etc. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 231 ++ 1 file changed, 231 insertions(+) diff --g

[PATCH net-next v2 00/10] qed*: Add support for management firmware TLV request.

2018-05-22 Thread Sudarsana Reddy Kalluru
From: Sudarsana Reddy Kalluru Management firmware (MFW) requires config and state information from the driver. It queries this via TLV (type-length-value) request wherein mfw specificies the list of required TLVs. Driver fills the TLV data and responds back to MFW. This patch series adds qed/qede

[PATCH net-next v2 09/10] qedi: Add support for populating ethernet TLVs.

2018-05-22 Thread Sudarsana Reddy Kalluru
From: Manish Rangankar This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi.h | 3 + drivers/scsi/qedi/qedi_iscsi.h | 6 ++ drivers/scsi/qedi/qedi_main.c | 182 +

[PATCH net-next v2 03/10] qed: Add support for processing fcoe tlv request.

2018-05-22 Thread Sudarsana Reddy Kalluru
Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 4 +- drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c | 828 ++ include/linux/qed/qed_if.h| 193 ++ 3 files changed, 1024 insertio

[PATCH net-next v2 05/10] qed: Add driver infrastucture for handling mfw requests.

2018-05-22 Thread Sudarsana Reddy Kalluru
MFW requests the TLVs in interrupt context. Extracting of the required data from upper layers and populating of the TLVs require process context. The patch adds work-queues for processing the tlv requests. It also adds the implementation for requesting the tlv values from appropriate protocol drive

[PATCH net-next v2 06/10] qede: Add support for populating ethernet TLVs.

2018-05-22 Thread Sudarsana Reddy Kalluru
This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede_main.c | 101 +++ 1 file changed, 101 insertions(+) diff --git a/drivers/net/ethernet/q

[PATCH net-next v2 02/10] qed: Add support for tlv request processing.

2018-05-22 Thread Sudarsana Reddy Kalluru
The patch adds driver support for processing TLV requests/repsonses from the mfw and upper driver layers respectively. The implementation reads the requested TLVs from the shared memory, requests the values from upper layer drivers, populates this info (TLVs) shared memory and notifies MFW about th

[PATCH net-next v2 10/10] qedi: Add get_generic_tlv_data handler.

2018-05-22 Thread Sudarsana Reddy Kalluru
From: Manish Rangankar Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index d2045a5..32ee7f6 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/dr

[PATCH net-next v2 04/10] qed: Add support for processing iscsi tlv request.

2018-05-22 Thread Sudarsana Reddy Kalluru
Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 4 +- drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c | 131 ++ include/linux/qed/qed_if.h| 36 +++ 3 files changed, 170 insertio

[PATCH net-next v2 08/10] qedf: Add get_generic_tlv_data handler.

2018-05-22 Thread Sudarsana Reddy Kalluru
From: Chad Dupuis Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf.h | 1 + drivers/scsi/qedf/qedf_main.c | 17 + 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h index 0cb0490..cabb6af 100644 --- a/drivers/scsi/qedf/

[PATCH net-next v2 07/10] qedf: Add support for populating ethernet TLVs.

2018-05-22 Thread Sudarsana Reddy Kalluru
From: Chad Dupuis This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf.h | 6 +++ drivers/scsi/qedf/qedf_debugfs.c | 1 - drivers/scsi/qedf/qedf_io.c | 11 + drivers/scsi/qedf/qedf_main.c| 87 +++

[PATCH bpf-next 8/8] xsk: convert atomic_t to refcount_t

2018-05-22 Thread Björn Töpel
From: Björn Töpel Introduce refcount_t, in favor of atomic_t. Signed-off-by: Björn Töpel --- net/xdp/xdp_umem.c | 6 +++--- net/xdp/xdp_umem.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index faa6ffbaf6ab..87998818116f 100644

[PATCH bpf-next 6/8] xsk: add missing write- and data-dependency barrier

2018-05-22 Thread Björn Töpel
From: Björn Töpel Here, we add a missing write-barrier, and use READ_ONCE for the data-dependency barrier. Signed-off-by: Björn Töpel --- net/xdp/xsk.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 378dd9287da5..01f010ec0

[PATCH bpf-next 1/8] xsk: remove rebind support

2018-05-22 Thread Björn Töpel
From: Björn Töpel Supporting rebind, i.e. after a successful bind the process can call bind again without closing the socket, makes the AF_XDP setup state machine more complex. Constrain the state space, by not supporting rebind. Signed-off-by: Björn Töpel --- net/xdp/xsk.c | 30 +-

[PATCH bpf-next 2/8] xsk: fill hole in struct sockaddr_xdp

2018-05-22 Thread Björn Töpel
From: Björn Töpel Move the sxdp_flags up, avoiding a hole in the uapi structure. Signed-off-by: Björn Töpel --- include/uapi/linux/if_xdp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h index 56db977221d2..c46609a0

[PATCH bpf-next 3/8] xsk: proper queue id check at bind

2018-05-22 Thread Björn Töpel
From: Magnus Karlsson Validate the queue id against both Rx and Tx on the netdev. Also, make sure that the queue exists at xmit time. Reported-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson --- net/xdp/xsk.c | 8 +++- 1 file changed, 7 inserti

[PATCH bpf-next 7/8] xsk: simplified umem setup

2018-05-22 Thread Björn Töpel
From: Björn Töpel As suggested by Daniel Borkmann, the umem setup code was a too defensive and complex. Here, we reduce the number of checks. Also, the memory pinning is now folded into the umem creation, and we do correct locking. Signed-off-by: Björn Töpel --- net/xdp/xdp_umem.c | 79 +++

[PATCH bpf-next 5/8] samples/bpf: adapt xdpsock to the new uapi

2018-05-22 Thread Björn Töpel
From: Björn Töpel Adapt xdpsock to use the new getsockopt introduced in the previous commit. Signed-off-by: Björn Töpel --- samples/bpf/xdpsock_user.c | 123 - 1 file changed, 76 insertions(+), 47 deletions(-) diff --git a/samples/bpf/xdpsock_user.c

[PATCH bpf-next 4/8] xsk: remove explicit ring structure from uapi

2018-05-22 Thread Björn Töpel
From: Björn Töpel In this commit we remove the explicit ring structure from the the uapi. It is tricky for an uapi to depend on a certain L1 cache line size, since it can differ for variants of the same architecture. Now, we let the user application determine the offsets of the producer, consumer

[PATCH bpf-next 0/8] AF_XDP follow-up patches, uapi and cleanups

2018-05-22 Thread Björn Töpel
From: Björn Töpel This the second follow-up set. The first four patches are uapi changes: * Removing rebind support * Getting rid of structure hole * Removing explicit cache line alignment * Stricter bind checks The last patches do some cleanups, where the umem and refcount_t changes were sugge

Re: [PATCH bpf-next v3 06/15] xsk: add Rx receive functions and poll support

2018-05-22 Thread Björn Töpel
2018-05-04 14:59 GMT+02:00 Daniel Borkmann : [...] >> + >> +int xsk_rcv(struct xdp_sock *xs, struct xdp_buff *xdp) >> +{ >> + int err; >> + >> + err = __xsk_rcv(xs, xdp); >> + if (likely(!err)) >> + xdp_return_buff(xdp); >> + else >> + xs->rx_dropped++; > > T

Re: About the alx WoL feature

2018-05-22 Thread Johannes Berg
+netdev Hi, > Sorry to write to you directly, I'm not sure if I should CC some > public lists, please feel free to add them if that's the right way to > do. I think it is, adding netdev. > I would like to add back the alx WoL feature which is reverted by you > 5 years ago, and we have some disc

Re: [RFC feedback] AF_XDP and non-Intel hardware

2018-05-22 Thread Mykyta Iziumtsev
On 21 May 2018 at 20:55, Björn Töpel wrote: > 2018-05-21 14:34 GMT+02:00 Mykyta Iziumtsev : >> Hi Björn and Magnus, >> >> (This thread is a follow up to private dialogue. The intention is to >> let community know that AF_XDP can be enhanced further to make it >> compatible with wider range of NIC

Re: [PATCH] ipvs: drop templates for never established TCP connections

2018-05-22 Thread Julian Anastasov
Hello, On Mon, 21 May 2018, Michal Koutný wrote: > IPVS includes protection against filling the ip_vs_conn_tab by dropping 1/32 > of > feasible entries every second. The template entries (for persistent services) > are never directly deleted by this mechanism but when a picked TCP conne

Re: [PATCH net-next 00/13] nfp: abm: add basic support for advanced buffering NIC

2018-05-22 Thread Jakub Kicinski
On Mon, May 21, 2018 at 11:32 PM, Or Gerlitz wrote: > On Tue, May 22, 2018 at 8:12 AM, Jakub Kicinski wrote: >> Hi! >> >> This series lays groundwork for advanced buffer management NIC feature. >> It makes necessary NFP core changes, spawns representors and adds devlink >> glue. Following series w

Re: CONTACT MONEY GRAM OFFICE FOR YOUR PAYMENT OF $5,000.00

2018-05-22 Thread Janet Keucker
Attention: Beneficiary, Re:CONTACT MONEY GRAM OFFICE FOR YOUR PAYMENT OF $5,000.00 This is the second time we are notifying you about the statue of your compensation payment of ( $1,500,000.00).Be inform that We have been authorized by the United Nations Compensation Commission (UNCC) to releas

[RFC v5 4/5] virtio_ring: add event idx support in packed ring

2018-05-22 Thread Tiwei Bie
This commit introduces the EVENT_IDX support in packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 67 ++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index eb9fd

[RFC v5 5/5] virtio_ring: enable packed ring

2018-05-22 Thread Tiwei Bie
Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1ee52a89cb04..355dfef4f1eb 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -1956,6 +195

[RFC v5 2/5] virtio_ring: support creating packed ring

2018-05-22 Thread Tiwei Bie
This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 801 +++ include/linux/virtio_r

[RFC v5 0/5] virtio: support packed ring

2018-05-22 Thread Tiwei Bie
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost (RFC v4): https://lkml.org/lkml/2018/5/16/501 Both of ping and netperf worked as expected w/ EVENT_IDX disabled. Ping worked as

[RFC v5 1/5] virtio: add packed ring definitions

2018-05-22 Thread Tiwei Bie
Signed-off-by: Tiwei Bie --- include/uapi/linux/virtio_config.h | 5 - include/uapi/linux/virtio_ring.h | 36 ++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 308e209

[RFC v5 3/5] virtio_ring: add packed ring support

2018-05-22 Thread Tiwei Bie
This commit introduces the support (without EVENT_IDX) for packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 474 ++- 1 file changed, 468 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c

[PATCH] net/mlx4: fix spelling mistake: "Inrerface" -> "Interface"

2018-05-22 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in mlx4_dbg debug message Signed-off-by: Colin Ian King --- drivers/net/ethernet/mellanox/mlx4/intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/intf.c b/drivers/net/ethernet/mella

Re: KASAN: use-after-free Read in vhost_chr_write_iter

2018-05-22 Thread DaeRyong Jeong
On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote: > > > On 2018年05月18日 17:24, Jason Wang wrote: > > > > > > On 2018年05月17日 21:45, DaeRyong Jeong wrote: > > > We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter > > > > > > This crash has been found in v4.17-rc1 usi

Re: [PATCH net-next 08/13] devlink: don't take instance lock around eswitch mode set

2018-05-22 Thread Jiri Pirko
Tue, May 22, 2018 at 07:12:50AM CEST, jakub.kicin...@netronome.com wrote: >Changing switch mode may want to register and unregister devlink >ports. Therefore similarly to DEVLINK_CMD_PORT_SPLIT/UNSPLIT it >should not take the instance lock. Drivers don't depend on existing >locking since it's a v

Re: KASAN: use-after-free Read in vhost_chr_write_iter

2018-05-22 Thread Jason Wang
On 2018年05月22日 16:38, DaeRyong Jeong wrote: On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote: On 2018年05月18日 17:24, Jason Wang wrote: On 2018年05月17日 21:45, DaeRyong Jeong wrote: We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter This crash has been found in v4

Re: [Cake] [PATCH net-next v14 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-22 Thread Toke Høiland-Jørgensen
On 22 May 2018 01:45:13 CEST, Marcelo Ricardo Leitner wrote: >On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: >> +static u32 cake_overhead(struct cake_sched_data *q, const struct >sk_buff *skb) >> +{ >> +const struct skb_shared_info *shinfo = skb_shinfo(skb); >> +

Re: [Cake] [PATCH net-next v14 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-22 Thread Toke Høiland-Jørgensen
On 22 May 2018 01:34:06 CEST, Marcelo Ricardo Leitner wrote: >[Cc'ing netfilter-devel@ for awareness] Thanks! I'll add a Cc in the next version. >On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: >> When CAKE is deployed on a gateway that also performs NAT (which is a >>

Re: [PATCH bpf v2 6/6] bpf: fix JITed dump for multi-function programs via syscall

2018-05-22 Thread Daniel Borkmann
On 05/21/2018 09:42 PM, Sandipan Das wrote: > On 05/18/2018 09:21 PM, Daniel Borkmann wrote: >> On 05/18/2018 02:50 PM, Sandipan Das wrote: >>> Currently, for multi-function programs, we cannot get the JITed >>> instructions using the bpf system call's BPF_OBJ_GET_INFO_BY_FD >>> command. Because of

Re: [PATCH v2 net] stmmac: strip vlan tag on reception only for 8021q tagged frames

2018-05-22 Thread Jose Abreu
On 21-05-2018 17:42, Florian Fainelli wrote: > On 05/21/2018 08:48 AM, David Miller wrote: >> From: David Miller >> Date: Thu, 17 May 2018 12:43:56 -0400 (EDT) >> >>> Giuseppe and Alexandre, please review this patch. >> If nobody thinks this patch is important enough to actually >> review, I'm tos

Re: [PATCH v2 bpf-next 0/3] bpf: Add MTU check to fib lookup helper

2018-05-22 Thread Daniel Borkmann
On 05/21/2018 06:08 PM, dsah...@kernel.org wrote: > From: David Ahern > > Packets that exceed the egress MTU can not be forwarded in the fast path. > Add IPv4 and IPv6 MTU helpers that take a FIB lookup result (versus the > typical dst path) and add the calls to bpf_ipv{4,6}_fib_lookup. > > v2 >

Re: [PATCH net-next v11 3/5] net: Introduce net_failover driver

2018-05-22 Thread Jiri Pirko
Tue, May 22, 2018 at 04:06:19AM CEST, sridhar.samudr...@intel.com wrote: >The net_failover driver provides an automated failover mechanism via APIs >to create and destroy a failover master netdev and mananges a primary and >standby slave netdevs that get registered via the generic failover >infrast

Re: [PATCH bpf-next 0/8] AF_XDP follow-up patches, uapi and cleanups

2018-05-22 Thread Daniel Borkmann
On 05/22/2018 09:34 AM, Björn Töpel wrote: > From: Björn Töpel > > This the second follow-up set. The first four patches are uapi > changes: > > * Removing rebind support > * Getting rid of structure hole > * Removing explicit cache line alignment > * Stricter bind checks > > The last patches d

Re: [PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-22 Thread Jiri Pirko
Tue, May 22, 2018 at 04:06:18AM CEST, sridhar.samudr...@intel.com wrote: >Use the registration/notification framework supported by the generic >failover infrastructure. > >Signed-off-by: Sridhar Samudrala In previous patchset versions, the common code did netdev_rx_handler_register() and netdev_u

Re: [PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-22 Thread Jiri Pirko
Tue, May 22, 2018 at 11:06:37AM CEST, j...@resnulli.us wrote: >Tue, May 22, 2018 at 04:06:18AM CEST, sridhar.samudr...@intel.com wrote: >>Use the registration/notification framework supported by the generic >>failover infrastructure. >> >>Signed-off-by: Sridhar Samudrala > >In previous patchset ve

Re: [RFC feedback] AF_XDP and non-Intel hardware

2018-05-22 Thread Luke Gorrie
On 21 May 2018 at 20:55, Björn Töpel wrote: > > 2018-05-21 14:34 GMT+02:00 Mykyta Iziumtsev : > > Hi Björn and Magnus, > > > > (This thread is a follow up to private dialogue. The intention is to > > let community know that AF_XDP can be enhanced further to make it > > compatible with wider range

Re: [PATCH net-next 0/2] net: sfp: small improvements

2018-05-22 Thread Antoine Tenart
Hi David, On Mon, May 21, 2018 at 11:51:15AM -0400, David Miller wrote: > From: Antoine Tenart > Date: Thu, 17 May 2018 10:29:05 +0200 > > > This series was part of the mvpp2 phylink one but as we reworked it to > > use fixed-link on the DB boards, the SFP commits weren't needed > > anymore for

[PATCH net-next v2 0/3] net: sfp: small improvements

2018-05-22 Thread Antoine Tenart
Hi Russell, David, A small series of patches improving the SFP support by adding a warning when no Tx disable pin is available, and making the i2c-bus property mandatory. Thanks! Antoine Since v1: - Removed the patch fixing the sfp driver when no i2c bus was described. - Made two new patches

[PATCH net-next v2 2/3] net: phy: sfp: make the i2c-bus dt property mandatory

2018-05-22 Thread Antoine Tenart
This patch makes the i2c-bus property mandatory when using a device tree. If the sfp i2c bus isn't described it's impossible to guess the protocol to use for a given module, and the sfp module would then not work in most cases. Signed-off-by: Antoine Tenart --- drivers/net/phy/sfp.c | 28 +++

Re: [net-next 2/6] net/mlx5: Add pbmc and pptb in the port_access_reg_cap_mask

2018-05-22 Thread Or Gerlitz
On Tue, May 22, 2018 at 12:04 AM, Saeed Mahameed wrote: > From: Huy Nguyen > > Add pbmc and pptb in the port_access_reg_cap_mask. These two > bits determine if device supports receive buffer configuration. > > Signed-off-by: Huy Nguyen Huy, Parav reviewed your code to death (but he's still aliv

[PATCH net-next v2 1/3] net: phy: sfp: warn the user when no tx_disable pin is available

2018-05-22 Thread Antoine Tenart
In case no Tx disable pin is available the SFP modules will always be emitting. This could be an issue when using modules using laser as their light source as we would have no way to disable it when the fiber is removed. This patch adds a warning when registering an SFP cage which do not have its t

[PATCH net-next v2 3/3] Documentation/bindings: net: the sfp i2c-bus property is now mandatory

2018-05-22 Thread Antoine Tenart
The i2c-bus property for sfp modules was made mandatory. Update the documentation to keep it in sync with the driver's behaviour. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/net/sff,sfp.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentat

Re: [net-next 2/6] net/mlx5: Add pbmc and pptb in the port_access_reg_cap_mask

2018-05-22 Thread Or Gerlitz
On Tue, May 22, 2018 at 1:19 PM, Or Gerlitz wrote: > On Tue, May 22, 2018 at 12:04 AM, Saeed Mahameed wrote: >> From: Huy Nguyen >> >> Add pbmc and pptb in the port_access_reg_cap_mask. These two >> bits determine if device supports receive buffer configuration. >> >> Signed-off-by: Huy Nguyen

[PATCH net-next v2 0/7] Add support for QCA8334 switch

2018-05-22 Thread Michal Vokáč
This series basically adds support for a QCA8334 ethernet switch to the qca8k driver. It is a four-port variant of the already supported seven port QCA8337. Register map is the same for the whole familly and all chips have the same device ID. Major part of this series enhances the CPU port setting

[PATCH net-next v2 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-22 Thread Michal Vokáč
By default autonegotiation is enabled to configure MAC on all ports. For the CPU port autonegotiation can not be used so we need to set some sensible defaults manually. This patch forces the default setting of the CPU port to 1000Mbps/full duplex which is the chip maximum capability. Also correct

[PATCH net-next v2 2/7] net: dsa: qca8k: Add support for QCA8334 switch

2018-05-22 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. Signed-off-by: Michal Vokáč --- Changes in v2: - Add commit message. drivers/net/dsa/qca8k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 3684e56..6a3ffb2 100644

[PATCH net-next v2 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-22 Thread Michal Vokáč
When a port is brought up/down do not enable/disable only the TXMAC but the RXMAC as well. This is essential for the CPU port to work. Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli ---

[PATCH net-next v2 7/7] net: dsa: qca8k: Remove redundant parentheses

2018-05-22 Thread Michal Vokáč
Fix warning reported by checkpatch. Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- Changes in v2: - Fix typo in subject. - Add "Reviewed-by" tags from Andrew and Florian. drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH net-next v2 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-22 Thread Michal Vokáč
Replace the GPLv2 license boilerplate with the SPDX license identifier. Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- Changes in v2: - Add commit message. - Add "Reviewed-by" tags from Andrew and Florian. drivers/net/dsa/qca8k.c | 10 +- 1 fi

[PATCH net-next v2 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-22 Thread Michal Vokáč
Implement adjust_link function that allows to overwrite default CPU port setting using fixed-link device tree subnode. Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- Changes in v2: - Add "Reviewed-by" tags from Andrew and Florian. drivers/net/dsa/qca8k

[PATCH net-next v2 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-22 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. The CPU port default link settings can be reconfigured using a fixed-link sub-node. Signed-off-by: Michal Vokáč --- Changes in v2: - Add commit message and document fixed-link binding. .../devicetree/bindings/net/dsa/qca8k.

[PATCH 11/31] net: add support for ->poll_mask in proto_ops

2018-05-22 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 | 1 + net/socket.c| 48 - 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/includ

[PATCH 30/31] timerfd: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/timerfd.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/timerfd.c b/fs/timerfd.c index cdad49da3ff7..d84a2bee4f82 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -226,21 +226,20 @@ static int timerfd_release

[PATCH 31/31] random: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
The big change is that random_read_wait and random_write_wait are merged into a single waitqueue that uses keyed wakeups. Because wait_event_* doesn't know about that this will lead to occassional spurious wakeups in _random_read and add_hwgenerator_randomness, but wait_event_* is designed to hand

[PATCH 28/31] pipe: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/pipe.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 39d6f431da83..bb0840e234f3 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -509,19 +509,22 @@ static long pipe_ioctl(struct file *filp,

[PATCH 29/31] eventfd: switch to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/eventfd.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 08d3bd602f73..61c9514da5e9 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -101,14 +101,20 @@ static int eventfd_release(struct

[PATCH 26/31] net/rxrpc: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/rxrpc/af_rxrpc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 9a2c8e7c000e..6b170f2e47f2 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -734,15 +734,11 @@

[PATCH 25/31] net/iucv: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/iucv/af_iucv.h | 2 -- net/iucv/af_iucv.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index f4c21b5a1242..b0eaeb02d46d 100644 --- a/include/net/iucv/af_

[PATCH 27/31] crypto: af_alg: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 13 +++-- crypto/algif_aead.c | 4 ++-- crypto/algif_skcipher.c | 4 ++-- include/crypto/if_alg.h | 3 +-- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 80838c1c

[PATCH 23/31] net/nfc: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/nfc/llcp_sock.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c index ea0c0c6f1874..ab5bb14b49af 100644 --- a/net/nfc/llcp_sock.c +++ b/net/nfc/llcp_sock.c @@ -548,16 +548,13 @@ static

[PATCH 22/31] net/caif: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/caif/caif_socket.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index a6fb1b3bcad9..c7991867d622 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -934,15

[PATCH 24/31] net/phonet: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/phonet/socket.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 9ecf02def928..ea2bfc3aafb9 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -340,15 +340,12 @@ static in

[PATCH 19/31] net/tipc: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 252a52ae0893..58549338582a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -692,10 +692,9 @@ static int t

[PATCH 21/31] net/bluetooth: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/af_bluetooth.c | 7 ++- net/bluetooth/l2cap_sock.c| 2 +- net/bluetooth/rfcomm/sock.c | 2 +- net/bluetooth/sco.c | 2 +- 5 files changed, 6 insertions(+), 9 deletions

[PATCH 18/31] net/vmw_vsock: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/vmw_vsock/af_vsock.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index c1076c19b858..bb5d5fa68c35 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_

[PATCH 20/31] net/sctp: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/sctp/sctp.h | 3 +-- net/sctp/ipv6.c | 2 +- net/sctp/protocol.c | 2 +- net/sctp/socket.c | 4 +--- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 28b996d634

[PATCH 16/31] net/dccp: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/dccp/dccp.h | 3 +-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dccp/proto.c | 13 ++--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f91e3816806b..0ea2ee56ac1b 100644 --- a/

[PATCH 17/31] net/atm: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/atm/common.c | 11 +++ net/atm/common.h | 2 +- net/atm/pvc.c| 2 +- net/atm/svc.c| 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/net/atm/common.c b/net/atm/common.c index fc78a0508ae1..1f2af59935db 100644 --- a/n

[PATCH 15/31] net: convert datagram_poll users tp ->poll_mask

2018-05-22 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 +- include/linux/skbuff.h | 3 +-- include/net/udp.h| 2 +- net/appletalk/ddp.c | 2 +-

[PATCH 13/31] net/tcp: convert to ->poll_mask

2018-05-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/tcp.h | 3 +-- net/ipv4/af_inet.c | 2 +- net/ipv4/tcp.c | 23 ++- net/ipv6/af_inet6.c | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 9c9b3768b350..

[PATCH 14/31] net/unix: convert to ->poll_mask

2018-05-22 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 68bb70a62afe..1a9cdad4ab82 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -638,9

[PATCH 08/31] aio: implement IOCB_CMD_POLL

2018-05-22 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 thi

[PATCH 10/31] net: refactor socket_poll

2018-05-22 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 - 2 files

[PATCH 09/31] aio: try to complete poll iocbs without context switch

2018-05-22 Thread Christoph Hellwig
If we can acquire ctx_lock without spinning we can just remove our iocb from the active_reqs list, and thus complete the iocbs from the wakeup context. Signed-off-by: Christoph Hellwig --- fs/aio.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/fs/aio.c

[PATCH 12/31] net: remove sock_no_poll

2018-05-22 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 - drivers/net/ppp/pptp.c | 1 -

[PATCH 07/31] aio: simplify cancellation

2018-05-22 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 need

[PATCH 06/31] aio: simplify KIOCB_KEY handling

2018-05-22 Thread Christoph Hellwig
No need to pass the key field to lookup_iocb to compare it with KIOCB_KEY, as we can do that right after retrieving it from userspace. Also move the KIOCB_KEY definition to aio.c as it is an internal value not used by any other place in the kernel. Signed-off-by: Christoph Hellwig --- fs/aio.c

[PATCH 05/31] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-05-22 Thread Christoph Hellwig
->get_poll_head returns the waitqueue that the poll operation is going to sleep on. Note that this means we can only use a single waitqueue for the poll, unlike some current drivers that use two waitqueues for different events. But now that we have keyed wakeups and heavily use those for poll the

[PATCH 02/31] fs: cleanup do_pollfd

2018-05-22 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 +++- 1 file changed, 23 insertions(+), 25 d

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

2018-05-22 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 --- drivers/staging/comedi/drivers/serial2002.c | 4 ++-- drivers/vfio/virqfd.c | 2 +- d

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

2018-05-22 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 deletions(-) diff --git a/Documentation/filesystems/Locking b/Documentation

[PATCH 01/31] fs: unexport poll_schedule_timeout

2018-05-22 Thread Christoph Hellwig
No users outside of select.c. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 3 +-- include/linux/poll.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/select.c b/fs/select.c index ba879c51288f.

aio poll and a new in-kernel poll API V12

2018-05-22 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 meth

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-22 Thread Neil Horman
On Tue, May 22, 2018 at 03:07:57PM +0800, Xin Long wrote: > On Mon, May 21, 2018 at 9:48 PM, Neil Horman wrote: > > On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: > >> > On 21. May 2018, at 13:39, Neil Horman wrote: > >> > > >> > On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo

[PATCH net] vhost: synchronize IOTLB message with dev cleanup

2018-05-22 Thread Jason Wang
DaeRyong Jeong reports a race between vhost_dev_cleanup() and vhost_process_iotlb_msg(): Thread interleaving: CPU0 (vhost_process_iotlb_msg) CPU1 (vhost_dev_cleanup) (In the case of both VHOST_IOTLB_UPDATE and VHOST_IOTLB_INVALIDATE) =

Re: [RFC feedback] AF_XDP and non-Intel hardware

2018-05-22 Thread Björn Töpel
2018-05-22 9:45 GMT+02:00 Mykyta Iziumtsev : > On 21 May 2018 at 20:55, Björn Töpel wrote: >> 2018-05-21 14:34 GMT+02:00 Mykyta Iziumtsev : >>> Hi Björn and Magnus, >>> >>> (This thread is a follow up to private dialogue. The intention is to >>> let community know that AF_XDP can be enhanced furth

netdev 0x12 conference update

2018-05-22 Thread Jamal Hadi Salim
Folks, This is a small update to the community on the Netdev 0x12 conference (July 11-13, 2018 in Montreal, Canada, https://www.netdevconf.org/0x12). Early registration fees (20% off) are still in effect until June 1st. To Register: https://www.netdevconf.org/0x12/registration.html Our bursarie

Re: [RFC PATCH net-next 01/12] vhost_net: introduce helper to initialize tx iov iter

2018-05-22 Thread Jason Wang
On 2018年05月22日 00:24, Jesse Brandeburg wrote: Hi Jason, a few nits. On Mon, 21 May 2018 17:04:22 +0800 Jason wrote: Signed-off-by: Jason Wang --- drivers/vhost/net.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/vhost/net.

  1   2   3   4   >