Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-28 Thread Maor Gottlieb
On 10/28/2020 2:14 PM, Jason Gunthorpe wrote: On Wed, Oct 28, 2020 at 11:19:14AM +0200, Maor Gottlieb wrote: + struct rdma_conn_param *conn_param) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-28 Thread Maor Gottlieb
On 10/27/2020 2:20 PM, Jason Gunthorpe wrote: There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the handler triggers a completion and another thread does rdma_connect() or the handler directly calls rdma_connect(). In all cases rdma_connect() needs to hold the handler_mutex

Re: [PATCH mlx5-next 01/14] net/mlx5: Export resource dump interface

2020-05-25 Thread Maor Gottlieb
On 5/25/2020 5:24 PM, Jason Gunthorpe wrote: On Wed, May 13, 2020 at 12:50:21PM +0300, Leon Romanovsky wrote: From: Maor Gottlieb Export some of the resource dump API, so it could be used by the mlx5_ib driver as well. This description doesn't really match the patch, is this other

Re: [PATCH V7 mlx5-next 00/16] Add support to get xmit slave

2020-04-30 Thread Maor Gottlieb
Please ignore this version, there was a problem with the indexing. I just sent V8. On 4/30/2020 9:50 PM, Maor Gottlieb wrote: Hi Dave, This series is a combination of netdev and RDMA, so in order to avoid conflicts, we would like to ask you to route this series through mlx5-next shared branch

[PATCH V8 rdma-next 12/16] RDMA: Group create AH arguments in struct

2020-04-30 Thread Maor Gottlieb
Following patch adds additional argument to the create AH function, so it make sense to group ah_attr and flags arguments in struct. Signed-off-by: Maor Gottlieb Acked-by: Devesh Sharma Acked-by: Gal Pressman Acked-by: Weihang Li Reviewed-by: Jason Gunthorpe --- drivers/infiniband/core

[PATCH V8 mlx5-next 05/16] bonding: Add helper function to get the xmit slave based on hash

2020-04-30 Thread Maor Gottlieb
Both xor and 802.3ad modes use bond_xmit_hash to get the xmit slave. Export the logic to helper function so it could be used in the following patches by the .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding

[PATCH V8 mlx5-next 04/16] bonding/alb: Add helper functions to get the xmit slave

2020-04-30 Thread Maor Gottlieb
-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_alb.c | 35 +- include/net/bond_alb.h | 4 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net

[PATCH V8 mlx5-next 11/16] net/mlx5: Add support to get lag physical port

2020-04-30 Thread Maor Gottlieb
Add function to get the device physical port of the lag slave. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 24 +++ include/linux/mlx5/driver.h | 2 ++ 2 files changed, 26 insertions(+) diff

[PATCH V8 mlx5-next 02/16] bonding: Export skip slave logic to function

2020-04-30 Thread Maor Gottlieb
As a preparation for following change that add array of all slaves, extract code that skip slave to function. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_main.c | 47 ++--- 1 file changed, 26

[PATCH V8 mlx5-next 00/16] Add support to get xmit slave

2020-04-30 Thread Maor Gottlieb
ons commit to multiple commits for each bond mode. 3. Extract refcotring changes to seperate commits. v2: The first patch wasn't sent in v1. v1: https://lore.kernel.org/netdev/ac373456-b838-29cf-645f-b1ea1a93e3b0@xxxxx/T/#t Maor Gottlieb (16): net/core: Introduce netdev_get_xmit_

[PATCH V8 mlx5-next 06/16] bonding: Add helper function to get the xmit slave in rr mode

2020-04-30 Thread Maor Gottlieb
Add helper function to get the xmit slave when bond is in round robin mode. Change bond_xmit_slave_id to bond_get_slave_by_id, then the logic for find the next slave for transmit could be used both by the xmit flow and the .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by

[PATCH V8 mlx5-next 03/16] bonding: Rename slave_arr to usable_slaves

2020-04-30 Thread Maor Gottlieb
Rename slave_arr to usable_slaves, since we will have two arrays, one for the usable slaves and the other to all slaves. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_alb.c | 4 ++-- drivers/net/bonding/bond_main.c | 40

[PATCH V8 rdma-next 15/16] RDMA/mlx5: Refactor affinity related code

2020-04-30 Thread Maor Gottlieb
Move affinity related code in modify qp to function. It's a preparation for next patch the extend the affinity calculation to consider the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c | 90 +++-- 1

[PATCH V8 rdma-next 14/16] RDMA/core: Get xmit slave for LAG

2020-04-30 Thread Maor Gottlieb
Add a call to rdma_lag_get_ah_roce_slave when Address handle is created. Lower driver can use it to select the QP's affinity port. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/verbs.c | 61 +++-- include/rdma/ib_ve

[PATCH V8 rdma-next 16/16] RDMA/mlx5: Set lag tx affinity according to slave

2020-04-30 Thread Maor Gottlieb
connected QPs, the driver sets the affinity of the xmit slave. The above, ensure that RC QP and it's corresponding GSI QP will transmit from the same physical port. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ah.c | 9 +++-- drivers/infiniba

[PATCH V8 rdma-next 13/16] RDMA/core: Add LAG functionality

2020-04-30 Thread Maor Gottlieb
Add support to get the RoCE LAG xmit slave by building skb of the RoCE packet and call to master_get_xmit_slave. If driver wants to get the slave assume all slaves are available, then need to set RDMA_LAG_FLAGS_HASH_ALL_SLAVES in flags. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky

[PATCH V8 mlx5-next 08/16] bonding: Add array of all slaves

2020-04-30 Thread Maor Gottlieb
Keep all slaves in array so it could be used to get the xmit slave assume all the slaves are active. The logic to add slave to the array is like the usable slaves, except that we also add slaves that currently can't transmit - not up or active. Signed-off-by: Maor Gottlieb Reviewed-by:

[PATCH V8 mlx5-next 01/16] net/core: Introduce netdev_get_xmit_slave

2020-04-30 Thread Maor Gottlieb
Add new ndo to get the xmit slave of master device. The reference counters are not incremented so the caller must be careful with locks. User can ask to get the xmit slave assume all the slaves can transmit by set all_slaves arg to true. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko

[PATCH V8 mlx5-next 07/16] bonding: Add function to get the xmit slave in active-backup mode

2020-04-30 Thread Maor Gottlieb
Add helper function to get the xmit slave in active-backup mode. It's only one line function that return the curr_active_slave, but it will used both in the xmit flow and by the new .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vos

[PATCH V8 mlx5-next 09/16] bonding: Implement ndo_get_xmit_slave

2020-04-30 Thread Maor Gottlieb
Add implementation of ndo_get_xmit_slave. Find the slave by using the helper function according to the bond mode. If the caller set all_slaves to true, then it assumes that all slaves are available to transmit. Signed-off-by: Maor Gottlieb Reviewed-by: Jay Vosburgh Reviewed-by: Jiri Pirko

[PATCH V8 mlx5-next 10/16] net/mlx5: Change lag mutex lock to spin lock

2020-04-30 Thread Maor Gottlieb
ition there is no need to hold this lock when query the congestion counters. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 42 +-- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/net/eth

[PATCH V7 mlx5-next 06/11] bonding: Add helper function to get the xmit slave in rr mode

2020-04-30 Thread Maor Gottlieb
Add helper function to get the xmit slave when bond is in round robin mode. Change bond_xmit_slave_id to bond_get_slave_by_id, then the logic for find the next slave for transmit could be used both by the xmit flow and the .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by

[PATCH V7 mlx5-next 00/16] Add support to get xmit slave

2020-04-30 Thread Maor Gottlieb
s for each bond mode. 3. Extract refcotring changes to seperate commits. v2: The first patch wasn't sent in v1. v1: https://lore.kernel.org/netdev/ac373456-b838-29cf-645f-b1ea1a93e3b0@xxxxx/T/#t Maor Gottlieb (16): net/core: Introduce netdev_get_xmit_slave bonding: Export skip

[PATCH V7 mlx5-next 02/11] bonding: Export skip slave logic to function

2020-04-30 Thread Maor Gottlieb
As a preparation for following change that add array of all slaves, extract code that skip slave to function. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_main.c | 47 ++--- 1 file changed, 26

[PATCH V7 rdma-next 16/16] RDMA/mlx5: Set lag tx affinity according to slave

2020-04-30 Thread Maor Gottlieb
connected QPs, the driver sets the affinity of the xmit slave. The above, ensure that RC QP and it's corresponding GSI QP will transmit from the same physical port. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ah.c | 9 +++-- drivers/infiniba

[PATCH V7 rdma-next 15/16] RDMA/mlx5: Refactor affinity related code

2020-04-30 Thread Maor Gottlieb
Move affinity related code in modify qp to function. It's a preparation for next patch the extend the affinity calculation to consider the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c | 90 +++-- 1

[PATCH V7 mlx5-next 03/11] bonding: Rename slave_arr to usable_slaves

2020-04-30 Thread Maor Gottlieb
Rename slave_arr to usable_slaves, since we will have two arrays, one for the usable slaves and the other to all slaves. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_alb.c | 4 ++-- drivers/net/bonding/bond_main.c | 40

[PATCH V7 rdma-next 12/16] RDMA: Group create AH arguments in struct

2020-04-30 Thread Maor Gottlieb
Following patch adds additional argument to the create AH function, so it make sense to group ah_attr and flags arguments in struct. Signed-off-by: Maor Gottlieb Acked-by: Devesh Sharma Acked-by: Gal Pressman Acked-by: Weihang Li Reviewed-by: Jason Gunthorpe --- drivers/infiniband/core

[PATCH V7 rdma-next 13/16] RDMA/core: Add LAG functionality

2020-04-30 Thread Maor Gottlieb
Add support to get the RoCE LAG xmit slave by building skb of the RoCE packet and call to master_get_xmit_slave. If driver wants to get the slave assume all slaves are available, then need to set RDMA_LAG_FLAGS_HASH_ALL_SLAVES in flags. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky

[PATCH V7 mlx5-next 11/11] net/mlx5: Add support to get lag physical port

2020-04-30 Thread Maor Gottlieb
Add function to get the device physical port of the lag slave. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 24 +++ include/linux/mlx5/driver.h | 2 ++ 2 files changed, 26 insertions(+) diff

[PATCH V7 rdma-next 14/16] RDMA/core: Get xmit slave for LAG

2020-04-30 Thread Maor Gottlieb
Add a call to rdma_lag_get_ah_roce_slave when Address handle is created. Lower driver can use it to select the QP's affinity port. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/verbs.c | 61 +++-- include/rdma/ib_ve

[PATCH V7 mlx5-next 10/11] net/mlx5: Change lag mutex lock to spin lock

2020-04-30 Thread Maor Gottlieb
ition there is no need to hold this lock when query the congestion counters. Signed-off-by: Maor Gottlieb Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 42 +-- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/net/eth

[PATCH V7 mlx5-next 09/11] bonding: Implement ndo_get_xmit_slave

2020-04-30 Thread Maor Gottlieb
Add implementation of ndo_get_xmit_slave. Find the slave by using the helper function according to the bond mode. If the caller set all_slaves to true, then it assumes that all slaves are available to transmit. Signed-off-by: Maor Gottlieb Reviewed-by: Jay Vosburgh Reviewed-by: Jiri Pirko

[PATCH V7 mlx5-next 01/11] net/core: Introduce netdev_get_xmit_slave

2020-04-30 Thread Maor Gottlieb
Add new ndo to get the xmit slave of master device. The reference counters are not incremented so the caller must be careful with locks. User can ask to get the xmit slave assume all the slaves can transmit by set all_slaves arg to true. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko

[PATCH V7 mlx5-next 04/11] bonding/alb: Add helper functions to get the xmit slave

2020-04-30 Thread Maor Gottlieb
-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding/bond_alb.c | 35 +- include/net/bond_alb.h | 4 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net

[PATCH V7 mlx5-next 05/11] bonding: Add helper function to get the xmit slave based on hash

2020-04-30 Thread Maor Gottlieb
Both xor and 802.3ad modes use bond_xmit_hash to get the xmit slave. Export the logic to helper function so it could be used in the following patches by the .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vosburgh --- drivers/net/bonding

[PATCH V7 mlx5-next 08/11] bonding: Add array of all slaves

2020-04-30 Thread Maor Gottlieb
Keep all slaves in array so it could be used to get the xmit slave assume all the slaves are active. The logic to add slave to the array is like the usable slaves, except that we also add slaves that currently can't transmit - not up or active. Signed-off-by: Maor Gottlieb Reviewed-by:

[PATCH V7 mlx5-next 07/11] bonding: Add function to get the xmit slave in active-backup mode

2020-04-30 Thread Maor Gottlieb
Add helper function to get the xmit slave in active-backup mode. It's only one line function that return the curr_active_slave, but it will used both in the xmit flow and by the new .ndo to get the xmit slave. Signed-off-by: Maor Gottlieb Reviewed-by: Jiri Pirko Reviewed-by: Jay Vos

Re: [PATCH V6 mlx5-next 11/16] RDMA/core: Add LAG functionality

2020-04-29 Thread Maor Gottlieb
On 4/29/2020 2:30 AM, Jason Gunthorpe wrote: On Tue, Apr 28, 2020 at 08:15:25PM -0300, Jason Gunthorpe wrote: On Sun, Apr 26, 2020 at 10:17:12AM +0300, Maor Gottlieb wrote: +int rdma_lag_get_ah_roce_slave(struct ib_device *device, + struct rdma_ah_attr *ah_attr

Re: [PATCH] mlx5: Remove call to ida_pre_get

2018-03-20 Thread Maor Gottlieb
On 3/20/2018 5:29 AM, Saeed Mahameed wrote: On Thu, 2018-03-15 at 18:30 -0700, Matthew Wilcox wrote: On Thu, Mar 15, 2018 at 11:58:07PM +, Saeed Mahameed wrote: On Wed, 2018-03-14 at 19:57 -0700, Matthew Wilcox wrote: From: Matthew Wilcox The mlx5 driver calls ida_pre_get() in a loop f

Re: linux-next: manual merge of the rdma tree with the net-next tree

2016-03-19 Thread Maor Gottlieb
2016-03-16 2:58 GMT+02:00 Stephen Rothwell : > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > drivers/net/ethernet/mellanox/mlx5/core/fs_core.c > > between commit: > > 60ab4584f5bf ("net/mlx5_core: Set flow steering dest only for forward > rules") > > from the net