Re: Unable to establish rdma connection, breaks rdma basic functionality

2016-01-06 Thread Matan Barak
nd the commit which introduced this regression is > > commit abae1b71dd37bab506b14a6cf6ba7148f4d57232 > Author: Matan Barak <mat...@mellanox.com> > Date: Thu Oct 15 18:38:49 2015 +0300 > > IB/cma: cma_validate_port should verify the port and netdevice > > Previously, cma

[PATCH] IB/cma: Fix RDMA port validation for iWarp

2016-01-06 Thread Matan Barak
and netdevice') Reported-by: Hariprasad Shenai <haripra...@chelsio.com> Tested-by: Hariprasad Shenai <haripra...@chelsio.com> Signed-off-by: Matan Barak <mat...@mellanox.com> --- Hi Doug, This patch fixes an iWarp issue that was introduced in the RoCE refactorin

Re: [PATCH rdma-RC] IB/cm: Fix sleeping while atomic when creating AH from WC

2016-01-05 Thread Matan Barak
On Thu, Dec 24, 2015 at 9:46 AM, Matan Barak <mat...@dev.mellanox.co.il> wrote: > On Wed, Dec 23, 2015 at 10:04 PM, Doug Ledford <dledf...@redhat.com> wrote: >> On 10/15/2015 12:58 PM, Hefty, Sean wrote: >>>>>> ib_create_ah_from_wc needs to resolve th

[PATCH V1 for-next 2/2] IB/core: Use hop-limit from IP stack for RoCE

2016-01-04 Thread Matan Barak
Previously, IPV6_DEFAULT_HOPLIMIT was used as the hop limit value for RoCE. Fixing that by taking ip4_dst_hoplimit and ip6_dst_hoplimit as hop limit values. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/addr.c | 9 - drivers/infiniband/cor

[PATCH V1 for-next 0/2] Fix hop-limit for RoCE

2016-01-04 Thread Matan Barak
patch refactors the name of rdma_addr_find_dmac_by_grh to rdma_addr_find_l2_eth_by_grh while the second one does the actual change. Regards, Matan Changes from V0: - Hop limit in IB when using reversible path should be 0xff. Matan Barak (2): IB/core: Rename rdma_addr_find_dmac_by_grh IB/core

[PATCH V1 for-next 1/2] IB/core: Rename rdma_addr_find_dmac_by_grh

2016-01-04 Thread Matan Barak
rdma_addr_find_dmac_by_grh resolves dmac, vlan_id and if_index and downsteram patch will also add hop_limit as an output parameter, thus we rename it to rdma_addr_find_l2_eth_by_grh. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/addr.c

Re: [PATCH for-next 2/2] IB/core: Use hop-limit from IP stack for RoCE

2016-01-04 Thread Matan Barak
On Sun, Jan 3, 2016 at 9:03 PM, Jason Gunthorpe <jguntho...@obsidianresearch.com> wrote: > On Sun, Jan 03, 2016 at 03:59:11PM +0200, Matan Barak wrote: >> @@ -434,6 +434,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 >> port_num, >> int ret; >

[PATCH for-next 1/2] IB/core: Rename rdma_addr_find_dmac_by_grh

2016-01-03 Thread Matan Barak
rdma_addr_find_dmac_by_grh resolves dmac, vlan_id and if_index and downsteram patch will also add hop_limit as an output parameter, thus we rename it to rdma_addr_find_l2_eth_by_grh. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/addr.c

[PATCH for-next 2/2] IB/core: Use hop-limit from IP stack for RoCE

2016-01-03 Thread Matan Barak
Previously, IPV6_DEFAULT_HOPLIMIT was used as the hop limit value for RoCE. Fixing that by taking ip4_dst_hoplimit and ip6_dst_hoplimit as hop limit values. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/addr.c | 9 - drivers/infiniband/cor

[PATCH for-next 0/2] Fix hop-limit for RoCE

2016-01-03 Thread Matan Barak
patch refactors the name of rdma_addr_find_dmac_by_grh to rdma_addr_find_l2_eth_by_grh while the second one does the actual change. Regards, Matan Matan Barak (2): IB/core: Rename rdma_addr_find_dmac_by_grh IB/core: Use hop-limit from IP stack for RoCE drivers/infiniband/core/addr.c

[PATCH V1] IB/core: Do not allocate more memory than required for cma_configfs

2015-12-31 Thread Matan Barak
We were allocating larger memory space than required for cma_dev_group->default_ports_group. Fixes: 045959db65c6 ('IB/cma: Add configfs for rdma_cm') Signed-off-by: Matan Barak <mat...@mellanox.com> --- Hi Doug, This patch fixes a small issue, where we allocated more space than we

Re: [PATCH] IB/core: Allocating larger memory than required for cma_configfs

2015-12-31 Thread Matan Barak
On Thu, Dec 31, 2015 at 9:50 AM, Bart Van Assche <bart.vanass...@sandisk.com> wrote: > On 12/30/2015 03:14 PM, Matan Barak wrote: >> >> We were allocating larger memory space than requried for >> cma_dev_group->default_ports_group. > > > Please cha

Re: [PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-30 Thread Matan Barak
On 12/29/2015 4:37 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: From: Moni Shoua <mo...@mellanox.com> Some mlx4 adapters are RoCEv2 capable. To enable this feature some hardware configuration is required. This is 1. Set port general parameters 2. Configure the ou

Re: [PATCH for-next 6/7] IB/mlx4: Create and use another QP1 for RoCEv2

2015-12-30 Thread Matan Barak
On 12/29/2015 4:42 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in SW to be put before the payload that comes in with the WR. The mlx4 HW builds the packet

Re: [PATCH for-next 2/7] IB/mlx4: Add RoCE per GID support for add_gid and del_gid

2015-12-30 Thread Matan Barak
On 12/29/2015 5:24 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: [...] We use a new firmware command in order to populate the GID table and store the type along with the GID value. Its a new value to existing command.. so better say we use a new value to the SET_PORT

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-30 Thread Matan Barak
On 12/30/2015 8:04 AM, Or Gerlitz wrote: Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route() warn: variable dereferenced before check 'src_addr' (see line 500)

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-30 Thread Matan Barak
On 12/30/2015 10:44 AM, Or Gerlitz wrote: On 12/30/2015 10:27 AM, Matan Barak wrote: On 12/29/2015 5:19 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->fla

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-30 Thread Matan Barak
On 12/30/2015 1:05 PM, Or Gerlitz wrote: On 12/30/2015 12:48 PM, Matan Barak wrote: On 12/30/2015 8:04 AM, Or Gerlitz wrote: Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route

Re: [PATCH for-next 2/3] IB/core: Change per-entry lock in RoCE GID table to one lock

2015-12-30 Thread Matan Barak
On 12/30/2015 9:36 AM, Bart Van Assche wrote: On 12/30/2015 07:01 AM, Or Gerlitz wrote: On 10/28/2015 4:52 PM, Matan Barak wrote: @@ -134,16 +138,14 @@ static int write_gid(struct ib_device *ib_dev, u8 port, { int ret = 0; struct net_device *old_net_dev; -unsigned long

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-30 Thread Matan Barak
On 12/29/2015 5:19 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_EQE_STRIDE; MLX4_GET(dev_cap->bmme_flags,

Re: [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-30 Thread Matan Barak
On 12/30/2015 7:57 AM, Or Gerlitz wrote: On 12/23/2015 2:56 PM, Matan Barak wrote: +__be16 ib_ud_ip4_csum(struct ib_ud_header *header) +{ +struct iphdr iph; + +iph.ihl= 5; +iph.version= 4; +iph.tos= header->ip4.tos; +iph.tot_len= header->ip4.t

Re: [PATCH for-next 7/7] IB/mlx4: Advertise RoCE support

2015-12-30 Thread Matan Barak
On 12/29/2015 4:44 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: Advertise RoCE support in port_immutable according to the hardware capabilities. This enables the verbs stack to use RoCE v2 mode. Advertise RoCE V2 support Signed-off-by: Matan Barak <mat...@mellanox.

[PATCH] IB/core: Allocating larger memory than required for cma_configfs

2015-12-30 Thread Matan Barak
We were allocating larger memory space than requried for cma_dev_group->default_ports_group. Fixes: 045959db65c6 ('IB/cma: Add configfs for rdma_cm') Signed-off-by: Matan Barak <mat...@mellanox.com> --- Hi Doug, This patch fixes a small issue, where we allocated more space than we

[PATCH] IB/core: Fix dereference before check

2015-12-30 Thread Matan Barak
Sparse complains about dereference before check. Fixing this by moving the check before the dereference. Fixes: 200298326b27 ('IB/core: Validate route when we init ah') Signed-off-by: Matan Barak <mat...@mellanox.com> --- Hi Doug, This patch eliminates a deference before check sparse

[PATCH] IB/core: Eliminate sparse false positive warning on context imbalance

2015-12-30 Thread Matan Barak
etting the GID_TABLE_ENTRY_INVALID flag. Fixes: 9c584f049596 ('IB/core: Change per-entry lock in RoCE GID table to one lock') Signed-off-by: Matan Barak <mat...@mellanox.com> --- Hi Doug, This patch eliminates a sparse false-positive warning about context imbalance. We us

Re: [PATCH] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Matan Barak
ter to get_counter_table and get_perf_mad was changed > not to store port_num in the attribute itself when it's > querying the ClassPortInfo attribute. > > This handles issue pointed out by Matan Barak <mat...@dev.mellanox.co.il> > > Signed-off-by: Hal Rosenstock

[PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-29 Thread Matan Barak
From: Moni Shoua Query the RoCE support from firmware using the appropriate firmware commands. Downstream patches will read these capabilities and act accordingly. Signed-off-by: Moni Shoua --- drivers/net/ethernet/mellanox/mlx4/fw.c | 3 +++

[PATCH for-next 2/7] IB/mlx4: Add RoCE per GID support for add_gid and del_gid

2015-12-29 Thread Matan Barak
In RoCE, GID table is managed in the IB core driver. The role of the mlx4 driver is to synchronize the HW with the entries in the GID table. Since it is possible that the same GID value will appear more than once in the GID table (though with different attributes) it is required from the mlx4

[PATCH for-next 7/7] IB/mlx4: Advertise RoCE support

2015-12-29 Thread Matan Barak
Advertise RoCE support in port_immutable according to the hardware capabilities. This enables the verbs stack to use RoCE v2 mode. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/hw/mlx4/main.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff

[PATCH for-next 0/7] Add RoCE v2 support for mlx4 driver

2015-12-29 Thread Matan Barak
and Matan Maor Gottlieb (1): net/mlx4_core: Add handlning of RoCE v2 over IPV4 in attach_flow Matan Barak (2): IB/mlx4: Add RoCE per GID support for add_gid and del_gid IB/mlx4: Advertise RoCE support Moni Shoua (4): IB/mlx4: Query RoCE support IB/mlx4: Configure device to work in RoCEv2

[PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-29 Thread Matan Barak
From: Moni Shoua Some mlx4 adapters are RoCEv2 capable. To enable this feature some hardware configuration is required. This is 1. Set port general parameters 2. Configure the outgoing UDP destination port 3. Configure the QP that work with RoCEv2 Signed-off-by: Moni Shoua

[PATCH for-next 4/7] net/mlx4_core: Add handlning of RoCE v2 over IPV4 in attach_flow

2015-12-29 Thread Matan Barak
From: Maor Gottlieb When attaching multicast for RoCE v2, we need to be able to steer packets to the QPs. Hence, we add support for IPV4 over IB steering. Signed-off-by: Maor Gottlieb --- drivers/net/ethernet/mellanox/mlx4/mcg.c | 14 --

[PATCH for-next 5/7] IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers

2015-12-29 Thread Matan Barak
From: Moni Shoua RoCEv2 packets are sent over IP/UDP protocols. The mlx4 driver uses a type of RAW QP to send packets for QP1 and therefore needs to build the network headers below BTH in software. This patche adds option to build QP1 packets with IP and UDP headers if

[PATCH for-next 6/7] IB/mlx4: Create and use another QP1 for RoCEv2

2015-12-29 Thread Matan Barak
From: Moni Shoua The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in SW to be put before the payload that comes in with the WR. The mlx4 HW builds the packet, calculates the ICRC and puts it at the end of the

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

2015-12-27 Thread Matan Barak
On Fri, Dec 25, 2015 at 5:56 PM, Hal Rosenstock <h...@dev.mellanox.co.il> wrote: > On 12/25/2015 9:50 AM, Hal Rosenstock wrote: >> On 12/24/2015 11:09 AM, Matan Barak wrote: >>> On Thu, Dec 24, 2015 at 4:07 PM, Matan Barak <mat...@dev.mellanox.co.il> >>> w

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

2015-12-24 Thread Matan Barak
On Thu, Dec 24, 2015 at 4:07 PM, Matan Barak <mat...@dev.mellanox.co.il> wrote: > On Thu, Dec 24, 2015 at 2:38 PM, Or Gerlitz <ogerl...@mellanox.com> wrote: >> On 12/24/2015 12:42 PM, Sagi Grimberg wrote: >>> >>> >>>>> This pat

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

2015-12-24 Thread Matan Barak
On Thu, Dec 24, 2015 at 2:38 PM, Or Gerlitz wrote: > On 12/24/2015 12:42 PM, Sagi Grimberg wrote: >> >> This patch seems to generate a list corruption [1] when I test with Doug's for-4.5 tree. Eran, care to take a look at this? >>> >>> >>> This patch is part from

Re: [PATCH for-next V2 4/5] IB/mlx5: Add hca_core_clock_offset to udata in init_ucontext

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 11:03 AM, Or Gerlitz <ogerl...@mellanox.com> wrote: > On 12/22/2015 11:37 PM, Or Gerlitz wrote: >> >> On Tue, Dec 15, 2015 at 8:30 PM, Matan Barak<mat...@mellanox.com> wrote: >>> >>> >Pass hca_core_clock_offset to user-space

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

2015-12-23 Thread Matan Barak
From: Achiad Shochat Set the address handle and QP address path fields according to the link layer type (IB/Eth). Signed-off-by: Achiad Shochat --- drivers/infiniband/hw/mlx5/ah.c | 32 +--

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

2015-12-23 Thread Matan Barak
From: Achiad Shochat Advertise RoCE support for IB/core layer and set the hardware to work in RoCE mode. Signed-off-by: Achiad Shochat --- drivers/infiniband/hw/mlx5/main.c | 48 +++ 1 file changed, 44

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

2015-12-23 Thread Matan Barak
From: 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 --- drivers/infiniband/hw/mlx5/main.c | 75

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

2015-12-23 Thread Matan Barak
From: 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 --- drivers/infiniband/hw/mlx5/main.c | 89 +++

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
From: 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 ---

Re: [PATCH for-next V3 01/11] IB/core: Add gid_type to gid attribute

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 3:40 PM, Leon Romanovsky <l...@leon.nu> wrote: > On Wed, Dec 23, 2015 at 02:56:47PM +0200, Matan Barak wrote: >> In order to support multiple GID types, we need to store the gid_type >> with each GID. This is also aligned with the RoCE v2 annex &quo

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 6:08 PM, Doug Ledford <dledf...@redhat.com> wrote: > On 12/22/2015 02:26 PM, Matan Barak wrote: >> On Tue, Dec 22, 2015 at 8:58 PM, Doug Ledford <dledf...@redhat.com> wrote: >>> On 12/22/2015 05:47 AM, Or Gerlitz wrote: >>>>

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

2015-12-23 Thread Matan Barak
Hi Doug, This patchset adds RoCE V1 and RoCE V2 support to the mlx5 device driver. This patchset was applied and tested over the third version of "Add RoCE v2 support". Regards, Achiad Changes from V0: - Fixed using rwlock before initializing it. - Rebased over Doug's k.o/for-4.5 branch.

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 6:07 PM, Doug Ledford <dledf...@redhat.com> wrote: > On 12/23/2015 08:17 AM, Matan Barak wrote: >> Hi Doug, >> >> This patchset adds RoCE V1 and RoCE V2 support to the mlx5 device >> driver. >> >> This patchset was applied and

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 6:08 PM, Doug Ledford <dledf...@redhat.com> wrote: > On 12/22/2015 02:26 PM, Matan Barak wrote: >> On Tue, Dec 22, 2015 at 8:58 PM, Doug Ledford <dledf...@redhat.com> wrote: >>> On 12/22/2015 05:47 AM, Or Gerlitz wrote: >>>>

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
Hi Doug, This patchset adds RoCE V1 and RoCE V2 support to the mlx5 device driver. This patchset was applied and tested over the third version of "Add RoCE v2 support". Regards, Achiad and Matan Changes from V1: - Rebased over Doug's k.o/for-4.4-rc branch. Changes from V0: - Fixed using

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
From: 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

[PATCH for-next V2 05/10] net/mlx5_core: Introduce access functions to query vport RoCE fields

2015-12-23 Thread Matan Barak
From: Achiad Shochat Introduce access functions to query NIC vport system_image_guid, node_guid and qkey_viol_cntr. Signed-off-by: Achiad Shochat --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 62 +

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

2015-12-23 Thread Matan Barak
From: 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

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

2015-12-23 Thread Matan Barak
From: Achiad Shochat Set the address handle and QP address path fields according to the link layer type (IB/Eth). Signed-off-by: Achiad Shochat --- drivers/infiniband/hw/mlx5/ah.c | 32 +--

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

2015-12-23 Thread Matan Barak
From: 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 --- drivers/infiniband/hw/mlx5/main.c | 89 +++

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

2015-12-23 Thread Matan Barak
From: 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 --- drivers/infiniband/hw/mlx5/main.c | 75

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

2015-12-23 Thread Matan Barak
From: Achiad Shochat Advertise RoCE support for IB/core layer and set the hardware to work in RoCE mode. Signed-off-by: Achiad Shochat --- drivers/infiniband/hw/mlx5/main.c | 48 +++ 1 file changed, 44

Re: [PATCH rdma-RC] IB/cm: Fix sleeping while atomic when creating AH from WC

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 10:04 PM, Doug Ledford wrote: > On 10/15/2015 12:58 PM, Hefty, Sean wrote: > ib_create_ah_from_wc needs to resolve the DMAC in order to create the > AH (this may result sending an ARP and waiting for response). > CM uses this function

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-23 Thread Matan Barak
On Wed, Dec 23, 2015 at 7:57 PM, Doug Ledford <dledf...@redhat.com> wrote: > On 12/23/2015 11:35 AM, Matan Barak wrote: >> On Wed, Dec 23, 2015 at 6:08 PM, Doug Ledford <dledf...@redhat.com> wrote: >>> On 12/22/2015 02:26 PM, Matan Barak wrote: >>>> On

[PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-23 Thread Matan Barak
; Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/ud_header.c| 155 +--- drivers/infiniband/hw/mlx4/qp.c|7 +- drivers/infiniband/hw/mthca/mthca_qp.c |2 +- include/rdma/ib_pack.h | 45 -- 4

[PATCH for-next V3 06/11] IB/core: Move rdma_is_upper_dev_rcu to header file

2015-12-23 Thread Matan Barak
In order to validate the route, we need an easy way to check if a net-device belongs to our RDMA device. Move this helper function to a header file in order to make this check easier. Signed-off-by: Matan Barak <mat...@mellanox.com> Reviewed-by: Haggai Eran <hagg...@mellanox.com>

[PATCH for-next V3 07/11] IB/core: Validate route in ib_init_ah_from_wc and ib_init_ah_from_path

2015-12-23 Thread Matan Barak
In order to make sure API users don't try to use SGIDs which don't conform to the routing table, validate the route before searching the RoCE GID table. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/addr.c | 175 +- d

[PATCH for-next V3 04/11] IB/core: Add ROCE_UDP_ENCAP (RoCE V2) type

2015-12-23 Thread Matan Barak
Adding RoCE v2 GID type and port type. Vendors which support this type will get their GID table populated with RoCE v2 GIDs automatically. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/cache.c |1 + drivers/infiniband/core/roce_gid_mgmt.c

[PATCH for-next V3 03/11] IB/core: Add gid attributes to sysfs

2015-12-23 Thread Matan Barak
these attributes to sysfs. Signed-off-by: Matan Barak <mat...@mellanox.com> --- Documentation/ABI/testing/sysfs-class-infiniband | 16 ++ drivers/infiniband/core/sysfs.c | 184 +- 2 files changed, 198 insertions(+), 2 deletions(-) create mode

[PATCH for-next V3 01/11] IB/core: Add gid_type to gid attribute

2015-12-23 Thread Matan Barak
hich is also RoCE v1 GID type. This implies that gid_type should be added to roce_gid_table meta-data. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/cache.c | 144 +++- drivers/infiniband/core/cm.c |2 +- dri

[PATCH for-next V3 08/11] IB/rdma_cm: Add wrapper for cma reference count

2015-12-23 Thread Matan Barak
Currently, cma users can't increase or decrease the cma reference count. This is necassary when setting cma attributes (like the default GID type) in order to avoid use-after-free errors. Adding cma_ref_dev and cma_deref_dev APIs. Signed-off-by: Matan Barak <mat...@mellanox.com> --- d

[PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-23 Thread Matan Barak
Add route validation - ConfigFS - avoid compiling INFINIBAND=y and CONFIGFS_FS=m - Add documentation for configfs and sysfs ABI - Remove ifindex and gid_type from mcmember Changes from V0: - Rebased patches against Doug's latest k.o/for-4.4 tree. - Fixed a bug in configfs (rmdir caused an incorrect fre

[PATCH for-next V3 02/11] IB/cm: Use the source GID index type

2015-12-23 Thread Matan Barak
Previosuly, cm and cma modules supported only IB and RoCE v1 GID type. In order to support multiple GID types, the gid_type is passed to cm_init_av_by_path and stored in the path record. The rdma cm client would use a default GID type that will be saved in rdma_id_private. Signed-off-by: Matan

[PATCH for-next V3 09/11] IB/cma: Add configfs for rdma_cm

2015-12-23 Thread Matan Barak
it and mkdir inside rdma_cm directory. The patch adds support for a single configuration file, default_roce_mode. The mode can either be "IB/RoCE v1" or "RoCE v2". Signed-off-by: Matan Barak <mat...@mellanox.com> --- Documentation/ABI/testing/configfs-rdma_cm |

[PATCH for-next V3 11/11] IB/cma: Join and leave multicast groups with IGMP

2015-12-23 Thread Matan Barak
From: Moni Shoua Since RoCEv2 is a protocol over IP header it is required to send IGMP join and leave requests to the network when joining and leaving multicast groups. Signed-off-by: Moni Shoua --- drivers/infiniband/core/cma.c | 96

[PATCH for-next V3 05/11] IB/core: Add rdma_network_type to wc

2015-12-23 Thread Matan Barak
itself. We choose sgid_index and type from all the matching entries in RDMA-CM based on hint from the IP stack and we set hop_limit for the IP packet based on above hint from IP stack. Signed-off-by: Matan Barak <mat...@mellanox.com> Signed-off-by: Somnath Kotur <somnath.ko...@avagotech.co

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Matan Barak
On Tue, Dec 22, 2015 at 8:58 PM, Doug Ledford <dledf...@redhat.com> wrote: > On 12/22/2015 05:47 AM, Or Gerlitz wrote: >> On 12/21/2015 5:01 PM, Matan Barak wrote: >>> Previously, cma_match_net_dev called cma_protocol_roce which >>> tried to verify that the IB d

[PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-21 Thread Matan Barak
port. This made requests for unbounded rdma_ids that come from the Ethernet port fail. Fixing this by passing the port of the request and checking this port of the device. Fixes: b8cab5dab15f ('IB/cma: Accept connection without a valid netdev on RoCE') Signed-off-by: Matan Barak <mat...@mellanox.

Re: RoCE passive side failures on 4.4-rc5

2015-12-21 Thread Matan Barak
On Sun, Dec 20, 2015 at 9:29 AM, Or Gerlitz wrote: > On 12/17/2015 3:58 PM, Or Gerlitz wrote: >> >> Using 4.4-rc5+ [1] and **not** applying any of the patches I sent today, >> I noted that RoCE passive side isn't working (rdma-cm, ibv_rc_pingpong >> works). >> >> I have two

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-20 Thread Matan Barak
On Mon, Dec 14, 2015 at 6:06 PM, Christoph Lameter <c...@linux.com> wrote: > On Mon, 14 Dec 2015, Matan Barak wrote: > >> > No idea what the counter is doing. Saw another EXT counter implementation >> > use 0 so I thought that was fine. >> >> It seems

Re: [PATCH for-next V2 3/5] IB/mlx5: Add support for hca_core_clock and timestamp_mask

2015-12-16 Thread Matan Barak
On Wed, Dec 16, 2015 at 4:43 PM, Sagi Grimberg wrote: > >> Reporting the hca_core_clock (in kHZ) and the timestamp_mask in >> query_device extended verb. timestamp_mask is used by users in order >> to know what is the valid range of the raw timestamps, while >>

[PATCH for-next V2 4/5] IB/mlx5: Add hca_core_clock_offset to udata in init_ucontext

2015-12-15 Thread Matan Barak
-by: Matan Barak <mat...@mellanox.com> Reviewed-by: Moshe Lazer <mos...@mellanox.com> --- drivers/infiniband/hw/mlx5/main.c| 37 drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ drivers/infiniband/hw/mlx5/user.h| 12 ++-- includ

[PATCH for-next V2 0/5] User-space time-stamping support for mlx5_ib

2015-12-15 Thread Matan Barak
vendor part as well. Regards, Matan Changes from v1: * Change ib_is_udata_cleared to use memchr_inv. Changes from v0: * Limit mmap PAGE_SIZE to 4K (security wise). * Optimize ib_is_udata_cleared. * Pass hca_core_clock_offset in the vendor's response part of init_ucontext. Matan Barak (5): IB

[PATCH for-next V2 5/5] IB/mlx5: Mmap the HCA's core clock register to user-space

2015-12-15 Thread Matan Barak
In order to read the HCA's current cycles register, we need to map it to user-space. Add support to map this register via mmap command. Signed-off-by: Matan Barak <mat...@mellanox.com> Reviewed-by: Moshe Lazer <mos...@mellanox.com> --- drivers/infiniband/hw/mlx5/ma

[PATCH for-next V2 3/5] IB/mlx5: Add support for hca_core_clock and timestamp_mask

2015-12-15 Thread Matan Barak
Reporting the hca_core_clock (in kHZ) and the timestamp_mask in query_device extended verb. timestamp_mask is used by users in order to know what is the valid range of the raw timestamps, while hca_core_clock reports the clock frequency that is used for timestamps. Signed-off-by: Matan Barak <

[PATCH for-next V2 2/5] IB/core: Add ib_is_udata_cleared

2015-12-15 Thread Matan Barak
Extending core and vendor verb commands require us to check that the unknown part of the user's given command is all zeros. Adding ib_is_udata_cleared in order to do so. Signed-off-by: Matan Barak <mat...@mellanox.com> --- include/rdma/ib_verbs.h | 27 +++ 1 file c

[PATCH for-next V2 1/5] IB/mlx5: Add create_cq extended command

2015-12-15 Thread Matan Barak
In order to create a CQ that supports timestamp, mlx5 needs to support the extended create CQ command with the timestamp flag. Signed-off-by: Matan Barak <mat...@mellanox.com> Reviewed-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/hw/mlx5/cq.c | 7 +++ 1 file changed,

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-14 Thread Matan Barak
On Mon, Dec 14, 2015 at 4:55 PM, Christoph Lameter <c...@linux.com> wrote: > On Mon, 14 Dec 2015, Matan Barak wrote: > >> > +static PORT_PMA_ATTR(unicast_rcv_packets , 0, 64, 384, >> > IB_PMA_PORT_COUNTERS_EXT); >> > +static PORT_PMA_ATTR(mult

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-14 Thread Matan Barak
On Fri, Dec 11, 2015 at 8:25 PM, Christoph Lameter wrote: > Display the additional 64 bit counters available through the extended > set and replace the existing 32 bit counters if there is a 64 bit > alternative available. > > Note: This requires universal support of extended

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-14 Thread Matan Barak
On Sun, Dec 13, 2015 at 5:47 PM, Haggai Eran <hagg...@mellanox.com> wrote: > On 10/12/2015 19:29, Matan Barak wrote: >> On Thu, Dec 10, 2015 at 5:20 PM, Haggai Eran <hagg...@mellanox.com> wrote: >>> On 10/12/2015 16:59, Matan Barak wrote: >>>> On Mon,

Re: [PATCH for-next V2 05/11] IB/core: Add rdma_network_type to wc

2015-12-13 Thread Matan Barak
On Sun, Dec 13, 2015 at 3:56 PM, Liran Liss wrote: >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > >> >> > You are pushing abstraction into provider code instead of handling it in a >> generic way. >> >> No, I am defining an API that *make sense* and doesn't

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-10 Thread Matan Barak
On Thu, Dec 10, 2015 at 5:20 PM, Haggai Eran <hagg...@mellanox.com> wrote: > On 10/12/2015 16:59, Matan Barak wrote: >> On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran <hagg...@mellanox.com> wrote: >>> On 12/03/2015 05:44 PM, Matan Barak wrote: >>>> Extendin

Re: [PATCH for-next V2 07/11] IB/core: Validate route in ib_init_ah_from_wc and ib_init_ah_from_path

2015-12-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:42 PM, Haggai Eran <hagg...@mellanox.com> wrote: > On 12/03/2015 03:47 PM, Matan Barak wrote: >> +static int addr_resolve_neigh(struct dst_entry *dst, >> + const struct sockaddr *dst_in, >> +

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran <hagg...@mellanox.com> wrote: > On 12/03/2015 05:44 PM, Matan Barak wrote: >> Extending core and vendor verb commands require us to check that the >> unknown part of the user's given command is all zeros. >> Adding ib_is_udat

Re: [PATCH libmlx5 V1 6/6] Add always_inline check

2015-12-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:07 PM, Haggai Eran <hagg...@mellanox.com> wrote: > On 12/03/2015 06:02 PM, Matan Barak wrote: >> Always inline isn't supported by every compiler. Adding it to >> configure.ac in order to support it only when possible. >> Inline other poll_one d

[PATCH for-next V2 02/11] IB/cm: Use the source GID index type

2015-12-03 Thread Matan Barak
Previosuly, cm and cma modules supported only IB and RoCE v1 GID type. In order to support multiple GID types, the gid_type is passed to cm_init_av_by_path and stored in the path record. The rdma cm client would use a default GID type that will be saved in rdma_id_private. Signed-off-by: Matan

[PATCH for-next V2 03/11] IB/core: Add gid attributes to sysfs

2015-12-03 Thread Matan Barak
these attributes to sysfs. Signed-off-by: Matan Barak <mat...@mellanox.com> --- Documentation/ABI/testing/sysfs-class-infiniband | 16 ++ drivers/infiniband/core/sysfs.c | 184 ++- 2 files changed, 198 insertions(+), 2 deletions(-) create mode

[PATCH for-next V2 01/11] IB/core: Add gid_type to gid attribute

2015-12-03 Thread Matan Barak
hich is also RoCE v1 GID type. This implies that gid_type should be added to roce_gid_table meta-data. Signed-off-by: Matan Barak <mat...@mellanox.com> --- drivers/infiniband/core/cache.c | 144 -- drivers/infiniband/core/cm.c | 2 +- dri

[PATCH for-next V2 00/11] Add RoCE v2 support

2015-12-03 Thread Matan Barak
- Remove ifindex and gid_type from mcmember Changes from V0: - Rebased patches against Doug's latest k.o/for-4.4 tree. - Fixed a bug in configfs (rmdir caused an incorrect free). Matan Barak (8): IB/core: Add gid_type to gid attribute IB/cm: Use the source GID index type IB/core: Add gid

[PATCH for-next V2 09/11] IB/cma: Add configfs for rdma_cm

2015-12-03 Thread Matan Barak
it and mkdir inside rdma_cm directory. The patch adds support for a single configuration file, default_roce_mode. The mode can either be "IB/RoCE v1" or "RoCE v2". Signed-off-by: Matan Barak <mat...@mellanox.com> --- Documentation/ABI/testing/configfs-rdma_cm | 22 ++

[PATCH for-next V2 09/11] IB/cma: Add configfs for rdma_cm

2015-12-03 Thread Matan Barak
it and mkdir inside rdma_cm directory. The patch adds support for a single configuration file, default_roce_mode. The mode can either be "IB/RoCE v1" or "RoCE v2". Signed-off-by: Matan Barak <mat...@mellanox.com> --- Documentation/ABI/testing/configfs-rdma_cm | 22 ++

  1   2   3   4   5   >