Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-20 Thread Christoph Hellwig
On Wed, Aug 19, 2015 at 07:50:23PM +, Hefty, Sean wrote: AFAIK, this path is rarely (never?) actually used. I think all the drivers we have can post directly from userspace. I didn't think the ipath or qib drivers post from userspace. Makes sense with their software IB stack. Guess

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-20 Thread Sagi Grimberg
On 8/19/2015 8:54 PM, Jason Gunthorpe wrote: On Wed, Aug 19, 2015 at 07:48:02PM +0200, Christoph Hellwig wrote: On Wed, Aug 19, 2015 at 11:46:14AM -0600, Jason Gunthorpe wrote: Reviewed-by: Jason Gunthorpe jguntho...@obsidianresearch.com AFAIK, this path is rarely (never?) actually used. I

Re: [PATCH 3/3] IB: remove xrc_remote_srq_num from struct ib_send_wr

2015-08-20 Thread Sagi Grimberg
On 8/19/2015 7:37 PM, Christoph Hellwig wrote: The field is only initialized in mlx, but never used. If we want to add proper XRC support it should be done with a new struct ib_xrc_wr. This shrinks the various WR structures by another 4 bytes. Signed-off-by: Christoph Hellwig h...@lst.de ---

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-20 Thread Sagi Grimberg
On 8/19/2015 7:37 PM, Christoph Hellwig wrote: We have many WR opcodes that are only supported in kernel space and/or require optional information to be copied into the WR structure. Reject all those not explicitly handled so that we can't pass invalid information to drivers. Cc:

Re: shrink struct ib_send_wr

2015-08-20 Thread Sagi Grimberg
- patch 2 now explicitly replaces the weird overloading in the mlx5 driver with an explicit embedding of struct ib_send_wr, similar to what we do for all other MRs. This is on the user-space memory registration path. Haggai, can you grab it for a Tested-by tag? -- To unsubscribe from

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-20 Thread Sagi Grimberg
1. if register - call ib_map_mr_sg (which calls dma_map_sg) else do dma_map_sg 2. if registered - call ib_dma_unmap_sg (which calles dma_unmap_sg) else do dma_unmap_sg From what I've seen in the ULPs the flow control is generally such that the MR is 'consumed' even if it isn't used by

[PATCH v1 for-next 2/7] IB/core: Allow setting create flags in QP init attribute

2015-08-20 Thread Eran Ben Elisha
Allow setting IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK at create_flags in ib_uverbs_create_qp_ex. Signed-off-by: Eran Ben Elisha era...@mellanox.com --- drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c

[PATCH v1 for-next 4/7] net/mlx4_en: Implement mcast loopback prevention for ETH qps

2015-08-20 Thread Eran Ben Elisha
From: Maor Gottlieb ma...@mellanox.com Set the mcast loopback prevention bit in the QPC for ETH MLX QPs (not RSS QPs), when the firmware supports this feature. In addition, all rx ring QPs need to be updated in order not to enforce loopback checks. This prevents getting packets we sent both from

[PATCH v1 for-next 3/7] net/mlx4_core: Add support for filtering multicast loopback

2015-08-20 Thread Eran Ben Elisha
From: Maor Gottlieb ma...@mellanox.com Update device capabilities regarding HW filtering multicast loopback support. Add MLX4_UPDATE_QP_ETH_SRC_CHECK_MC_LB attribute to mlx4_update_qp to enable changing QP context to support filtering incoming multicast loopback traffic according the sender's

[PATCH v1 for-next 7/7] IB/mlx4: Add support for blocking multicast loopback QP creation user flag

2015-08-20 Thread Eran Ben Elisha
MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK is now supported downstream. In addition, this flag was supported only for IB_QPT_UD, now, with the new implementation it is supported for all QP types. Support IB_USER_VERBS_EX_CMD_CREATE_QP in order to get the flag from user space using the extension create

[PATCH v1 for-next 5/7] IB/mlx4: Add IB counters table

2015-08-20 Thread Eran Ben Elisha
This is an infrastructure step for allocating and attaching more than one counter to QPs on the same port. Allocate a counters table and manage the insertion and removals of the counters in load and unload of mlx4 IB. Signed-off-by: Eran Ben Elisha era...@mellanox.com ---

[PATCH v1 for-next 1/7] IB/core: Extend ib_uverbs_create_qp

2015-08-20 Thread Eran Ben Elisha
ib_uverbs_ex_create_qp follows the extension verbs mechanism. New features (for example, QP creation flags field which is added in a downstream patch) could used via user-space libraries without breaking the ABI. Signed-off-by: Eran Ben Elisha era...@mellanox.com ---

[PATCH v1 for-next 0/7] Add support for multicast loopback prevention to mlx4

2015-08-20 Thread Eran Ben Elisha
Hi Doug, This patch-set adds a new implementation for multicast loopback prevention for mlx4 driver. The current implementation is very limited, especially if link layer is Ethernet. The new implementation is based on HW feature of dropping incoming multicast packets if the sender QP counter

[PATCH for-next 10/10] IB/mlx5: Support RoCE

2015-08-20 Thread Achiad Shochat
Advertise RoCE support for IB/core layer and set the hardware to work in RoCE mode. Signed-off-by: Achiad Shochat ach...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git

[PATCH for-next 02/10] IB/mlx5: Support IB device's callback for getting its netdev

2015-08-20 Thread Achiad Shochat
For Eth ports only. Maintain a net device pointer in mlx5_ib_device and update it upon NETDEV_REGISTER and NETDEV_UNREGISTER events if the net-device and IB device have the same PCI parent device. Implement the get_netdev callback to return this net device. Signed-off-by: Achiad Shochat

[PATCH for-next 07/10] IB/mlx5: Set network_hdr_type upon RoCE responder completion

2015-08-20 Thread Achiad Shochat
When handling a responder completion, if the link layer is Ethernet, set the work completion network_hdr_type field according to CQE's info and the IB_WC_WITH_NETWORK_HDR_TYPE flag. Signed-off-by: Achiad Shochat ach...@mellanox.com --- drivers/infiniband/hw/mlx5/cq.c | 17 +

[PATCH for-next 06/10] IB/mlx5: Extend query_device/port to support RoCE

2015-08-20 Thread Achiad Shochat
Using the vport access functions to retrieve the Ethernet specific information and return this information in ib_query_device and ib_query_port. Signed-off-by: Achiad Shochat ach...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 75 +++

[PATCH for-next 09/10] IB/mlx5: Add RoCE fields to Address Vector

2015-08-20 Thread Achiad Shochat
Set the address handle and QP address path fields according to the link layer type (IB/Eth). Signed-off-by: Achiad Shochat ach...@mellanox.com --- drivers/infiniband/hw/mlx5/ah.c | 32 +-- drivers/infiniband/hw/mlx5/main.c| 21 ++

[PATCH for-next 04/10] net/mlx5_core: Introduce access functions to enable/disable RoCE

2015-08-20 Thread Achiad Shochat
A mlx5 Ethernet port must be explicitly enabled for RoCE. When RoCE is not enabled on the port, the NIC will refuse to create QPs attached to it and incoming RoCE packets will be considered by the NIC as plain Ethernet packets. Signed-off-by: Achiad Shochat ach...@mellanox.com ---

[PATCH for-next 00/10] Add RoCE support to the mlx5 driver

2015-08-20 Thread Achiad Shochat
Hi Doug, This patchset adds RoCE V1 and RoCE V2 support to the mlx5 device driver. This patchset was applied and tested over patchset Add RoCE v2 support which was sent to the mailing list by Matan Barak. Achiad Shochat (10): IB/mlx5: Support IB device's callback for getting the link layer

[PATCH for-next 03/10] net/mlx5_core: Break down the vport mac address query function

2015-08-20 Thread Achiad Shochat
Introduce a new function called mlx5_query_nic_vport_context(). This function gets all the NIC vport attributes from the device. The MAC address is just one of the NIC vport attributes, so mlx5_query_nic_vport_mac_address() is now just a wrapper function above mlx5_query_nic_vport_context().

[PATCH for-next 08/10] IB/mlx5: Support IB device's callbacks for adding/deleting GIDs

2015-08-20 Thread Achiad Shochat
These callbacks write into the mlx5 RoCE address table. Upon del_gid we write a zero'd GID. Signed-off-by: Achiad Shochat ach...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 89 +++ include/linux/mlx5/device.h | 20 + 2 files changed, 109

[PATCH for-next 01/10] IB/mlx5: Support IB device's callback for getting the link layer

2015-08-20 Thread Achiad Shochat
Make the existing mlx5_ib_port_link_layer() signature match the ib device callback signature (add port_num parameter). Refactor it to use a sub function so that the link layer could be queried also before the ibdev is created. Signed-off-by: Achiad Shochat ach...@mellanox.com ---

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-20 Thread Steve Wise
On 8/20/2015 3:49 AM, Sagi Grimberg wrote: On 8/19/2015 8:54 PM, Jason Gunthorpe wrote: On Wed, Aug 19, 2015 at 07:48:02PM +0200, Christoph Hellwig wrote: On Wed, Aug 19, 2015 at 11:46:14AM -0600, Jason Gunthorpe wrote: Reviewed-by: Jason Gunthorpe jguntho...@obsidianresearch.com AFAIK, this