Re: [PATCH 1/2] eth phy: add mdio bus char device interface

2018-06-17 Thread kbuild test robot
Hi Wei, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on v4.18-rc1 next-20180615] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: linux-next: build failure in Linus' tree

2018-06-17 Thread Stephen Rothwell
Hi all, On Tue, 12 Jun 2018 12:26:40 +1000 Stephen Rothwell wrote: > > Building Linus' tree, today's linux-next build (powerpc allyesconfig) > failed like this: > > ld: net/bpfilter/bpfilter_umh.o: compiled for a little endian system and > target is big endian > ld: failed to merge target

[PATCH 2/2] eth phy: add mdio bus char device interface

2018-06-17 Thread Wei Li
Add the notifier for the change of mdio bus, since i wanna that a char device represents a mii_bus not a mdio_device. Signed-off-by: Wei Li --- drivers/net/phy/mdio_bus.c | 21 - include/linux/mdio.h | 1 + include/linux/phy.h| 2 ++ 3 files changed, 23

[PATCH 1/2] eth phy: add mdio bus char device interface

2018-06-17 Thread Wei Li
Add the char device interface of mdio bus, like what i2c-dev or spidev do. They make it possible for user-space programs to access the bus directly. Signed-off-by: Wei Li --- drivers/net/phy/Kconfig| 10 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-dev.c | 376

Re: [PATCH rdma-next v2 09/20] IB/core: Improve uverbs_cleanup_ucontext algorithm

2018-06-17 Thread Jason Gunthorpe
On Sun, Jun 17, 2018 at 12:59:55PM +0300, Leon Romanovsky wrote: > +void uverbs_cleanup_ucontext(struct ib_ucontext *ucontext, bool > device_removed) > +{ > /* >* Waits for all remove_commit and alloc_commit to finish. Logically, We >* want to hold this forever as the

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-17 Thread David Ahern
On 6/15/18 3:44 AM, Kirill Tkhai wrote: > Hm, but is this a likely case, when real device is moved to net ns, so it > requires moving to init_net back? It seems the most devices moved to !init_net > are virtual and they just destroyed in default_device_exit_batch(). Or we have > more devices to

[PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-17 Thread dsahern
From: David Ahern For ACLs implemented using either FIB rules or FIB entries, the BPF program needs the FIB lookup status to be able to drop the packet. Since the bpf_fib_lookup API has not reached a released kernel yet, change the return code to contain an encoding of the FIB lookup result and

[PATCH v1 net] stmmac: fix DMA channel hang in half-duplex mode

2018-06-17 Thread Bhadram Varka
HW does not support Half-duplex mode in multi-queue scenario. Fix it by not advertising the Half-Duplex mode if multi-queue enabled. Signed-off-by: Bhadram Varka --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH mlx5-next v2 11/20] IB/mlx5: Introduce DEVX

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Introduce DEVX to enable direct device commands in downstream patches from this series. In that mode of work the firmware manages the isolation between processes' resources and as such a DEVX user id is created and assigned to the given user context upon allocation request.

[PATCH rdma-next v2 06/20] IB/uverbs: Add PTR_IN attributes that are allocated/copied automatically

2018-06-17 Thread Leon Romanovsky
From: Matan Barak Adding UVERBS_ATTR_SPEC_F_ALLOC_AND_COPY flag to PTR_IN attributes. By using this flag, the parse automatically allocates and copies the user-space data. This data is accessible by using uverbs_attr_get_len and uverbs_attr_get_alloced_ptr inline accessor functions from the

[PATCH rdma-next v2 08/20] IB/uverbs: Allow an empty namespace in ioctl() framework

2018-06-17 Thread Leon Romanovsky
From: Matan Barak The ioctl parser framework wrongly assumed that each namespace is populated. This could lead to NULL dereferences. Fix the parser to always check that a given namespace indeed exists. Fixes: fac9658cabb9 ("IB/core: Add new ioctl interface") Signed-off-by: Matan Barak

[PATCH rdma-next v2 20/20] IB/mlx5: Expose DEVX tree

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Expose DEVX tree to be used by upper layers. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c| 5 + drivers/infiniband/hw/mlx5/main.c| 7 ++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ 3 files changed, 14

[PATCH rdma-next v2 19/20] IB/mlx5: Add DEVX query EQN support

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Return the matching device EQN for a given user vector number via the DEVX interface. Note: EQs are owned by the kernel and shared by all user processes. Basically, a user CQ can point to any EQ. The kernel doesn't enforce any such limitation today either. Signed-off-by:

[PATCH mlx5-next v2 16/20] IB/mlx5: Add DEVX support for modify and query commands

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Add support in DEVX for modify and query commands, the required lock is taken (i.e. READ/WRITE) by the KABI infrastructure accordingly. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c | 348

[PATCH mlx5-next v2 18/20] IB/mlx5: Add DEVX support for memory registration

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Add support to register a memory with the firmware via the DEVX interface. The driver translates a given user address to ib_umem then it will register the physical addresses with the firmware and get a unique id for this registration to be used for this virtual address.

[PATCH rdma-next v2 15/20] IB/mlx5: Add obj create and destroy functionality

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Add support to create and destroy firmware objects via the DEVX interface. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c| 332 ++- include/uapi/rdma/mlx5_user_ioctl_cmds.h | 16 ++ 2

[PATCH rdma-next v2 17/20] IB/mlx5: Add support for DEVX query UAR

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Return a device UAR index for a given user index via the DEVX interface. Security note: The hardware protection mechanism works like this: Each device object that is subject to UAR doorbells (QP/SQ/CQ) gets a UAR ID (called uar_page in the device specification manual) upon

[PATCH rdma-next v2 14/20] IB/mlx5: Add support for DEVX general command

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Add support to run general firmware command via the DEVX interface. A command that works on some object (e.g. CQ, WQ, etc.) will be added in next patches while maintaining the required object lock. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky ---

[PATCH rdma-next v2 07/20] IB/uverbs: Add a macro to define a type with no kernel known size

2018-06-17 Thread Leon Romanovsky
From: Matan Barak Sometimes the uverbs uAPI doesn't really care about the structure it gets from user-space. All it wants to do is to allocate enough space and send it to the hardware/provider driver. Adding a UVERBS_ATTR_MIN_SIZE that could be used for this scenarios. We use USHRT_MAX as the

[PATCH rdma-next v2 09/20] IB/core: Improve uverbs_cleanup_ucontext algorithm

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Improve uverbs_cleanup_ucontext algorithm to work properly even when there are two objects from the same type and one points to the other. For that case to work the 'destroy_order' is not used any more as it's static per type and can't support this use case. Instead, the new

[PATCH rdma-next v2 12/20] IB/core: Introduce DECLARE_UVERBS_GLOBAL_METHODS

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Introduce a new macro to be used for global methods on a singleton object. This macros sets internally the type_attrs to be NULL as such an object can't be created. Downstream patches from this series will use this macro. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH mlx5-next v2 10/20] net/mlx5: Expose DEVX ifc structures

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas This patch updates the mlx5_ifc structures with the following: - Expose general command header in/out format. - Expose user context format. - Expose umem format. Downstream patches from this series will use this stuff. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH mlx5-next v2 01/20] net/mlx5_core: Prevent warns in dmesg upon firmware commands

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas When DEVX is used application builds by itself the command mail box, this patch prevents warns upon firmware commands as of invalid user space usage. In addition, A failure in destroy_mkey command was changed to be printed only under debug mode. This prevents a redundant

[PATCH rdma-next v2 13/20] IB: Expose ib_ucontext from a given ib_uverbs_file

2018-06-17 Thread Leon Romanovsky
From: Yishai Hadas Drivers that use the IOCTL API may have the ib_uverbs_file and need a way to get the related ib_ucontext from it, this is enabled by this patch. Downstream patches from this series will use it. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky ---

[PATCH rdma-next v2 05/20] IB/uverbs: Refactor uverbs_finalize_objects

2018-06-17 Thread Leon Romanovsky
From: Matan Barak uverbs_finalize_objects is currently used only to commit or abort objects. Since we want to add automatic allocation/free of PTR_IN attributes, moving it to uverbs_ioctl.c and renamit it to uverbs_finalize_attrs. Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky ---

[PATCH rdma-next v2 03/20] kernel.h: Reuse u64_to_ptr macro to cast __user pointers

2018-06-17 Thread Leon Romanovsky
From: Leon Romanovsky Redefine u64_to_user_ptr() macro to be implemented with u64_to_ptr(). Signed-off-by: Leon Romanovsky --- include/linux/kernel.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index

[PATCH rdma-next v2 04/20] IB/uverbs: Export uverbs idr and fd types

2018-06-17 Thread Leon Romanovsky
From: Matan Barak As provider drivers could use UVERBS_ATTR_FD and UVERBS_ATTR_IDR macros need to export them. Signed-off-by: Matan Barak Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/rdma_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH rdma-next v2 00/20] Introduce mlx5 DEVX interface

2018-06-17 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v1->v2: * Rebase on top of v4.18-rc1 v0 -> v1: * Dropped few validation/debug patches from the KABI part as of Jason's comments. * Use kvmalloc/kvfree instead of kmalloc/kfree to prevent higher order allocation under user control. * Cleaned up a dependency

[PATCH rdma-next v2 02/20] drm/i915: Move u64-to-ptr helpers to general header

2018-06-17 Thread Leon Romanovsky
From: Leon Romanovsky The macro u64_to_ptr() and function ptr_to_u64() are useful enough to be part of general header, so move them there and allow RDMA subsystem reuse them. Reviewed-by: Joonas Lahtinen Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/i915/i915_utils.h | 12 ++--

[PATCH] tc, bpf: add option to dump bpf verifier as C program fragment

2018-06-17 Thread Ophir Munk
Similar to cbpf used within tcpdump utility with a "-d" option to dump the compiled packet-matching code in a human readable form - tc has the "verbose" option to dump ebpf verifier output. Another useful option of cbpf using tcpdump "-dd" option is to dump packet-matching code a C program

Re: [PATCH COMMITTED] bluetooth: hci_nokia: Don't include linux/unaligned/le_struct.h directly.

2018-06-17 Thread Marcel Holtmann
Hi Dave, > This breaks the build as this header is not meant to be used in this > way. > > ./include/linux/unaligned/access_ok.h:8:28: error: redefinition of > ‘get_unaligned_le16’ > static __always_inline u16 get_unaligned_le16(const void *p) >^~ >