Re: [PATCH net 0/2] IB/ipoib: ip link support

2018-01-02 Thread Erez Shitrit
On Tue, Jan 2, 2018 at 9:29 AM, Or Gerlitz wrote: > On Sun, Dec 31, 2017 at 2:28 PM, Or Gerlitz wrote: >> On Sun, Dec 31, 2017 at 1:16 PM, Denis Drozdov wrote: >>> IP link was broken due to the changes in IPoIB for the rdma_netdev >>> support after commit cd565b4b51e5 >>> ("IB/IPoIB: Support acc

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Erez Shitrit
On Tue, Apr 25, 2017 at 2:14 PM, Or Gerlitz wrote: > On Tue, Apr 25, 2017 at 2:11 PM, Erez Shitrit > wrote: >> On Tue, Apr 25, 2017 at 1:32 PM, Or Gerlitz wrote: >>> On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: >>>> From: Honggang Li >>

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Erez Shitrit
On Tue, Apr 25, 2017 at 1:32 PM, Or Gerlitz wrote: > On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: >> From: Honggang Li >> >> Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which >> is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the >> size of headroom t

Re: [RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API

2017-03-16 Thread Erez Shitrit
On Mon, Mar 13, 2017 at 10:01 PM, Jason Gunthorpe wrote: > On Mon, Mar 13, 2017 at 08:31:15PM +0200, Erez Shitrit wrote: > >> diff --git a/include/rdma/ib_ipoib_accel_ops.h >> b/include/rdma/ib_ipoib_accel_ops.h >> new file mode 100644 >> index ..148a

Re: [RFC v1 for accelerated IPoIB 25/25] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops

2017-03-14 Thread Erez Shitrit
On Tue, Mar 14, 2017 at 6:10 PM, Jason Gunthorpe wrote: > On Tue, Mar 14, 2017 at 04:53:24PM +0200, Erez Shitrit wrote: > >> > Why isn't this stuff in open/close? >> >> According to ipoib control flows, there is a different between >> open/close to init/

Re: [RFC v1 for accelerated IPoIB 25/25] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops

2017-03-14 Thread Erez Shitrit
On Mon, Mar 13, 2017 at 10:27 PM, Jason Gunthorpe wrote: > On Mon, Mar 13, 2017 at 08:31:36PM +0200, Erez Shitrit wrote: > >> +struct net_device *mlx5_alloc_rdma_netdev(struct ib_device *hca, >> + u8 port_num, >> +

Re: [RFC v1 for accelerated IPoIB 05/25] IB/ipoib: Support ipoib acceleration options callbacks

2017-03-14 Thread Erez Shitrit
On Tue, Mar 14, 2017 at 8:35 AM, Vishwanathapura, Niranjana wrote: > On Mon, Mar 13, 2017 at 08:31:16PM +0200, Erez Shitrit wrote: >> >> +static struct net_device *ipoib_create_netdev_default(struct ib_device >> *hca, >> +

Re: [RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API

2017-03-14 Thread Erez Shitrit
On Tue, Mar 14, 2017 at 9:01 AM, Vishwanathapura, Niranjana wrote: > On Mon, Mar 13, 2017 at 02:01:36PM -0600, Jason Gunthorpe wrote: >>> >>> + /* multicast */ >>> + int (*attach_mcast)(struct net_device *dev, struct ib_device >>> *hca, >>> + union ib_gid *gid

[RFC v1 for accelerated IPoIB 18/25] net/mlx5e: Export open/close api for IB link

2017-03-13 Thread Erez Shitrit
Now IB device is able to call open or close for its net device. TBD: There is one change that is waiting for the new channels api, till then used an "if" in the code. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mel

[RFC v1 for accelerated IPoIB 13/25] net/mlx5e: Export resource creation function to be used in IB link

2017-03-13 Thread Erez Shitrit
mlx5i_attach that creates the resources of IB network device. mlx5i_detach cleans resources for IB device. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 122 +++--- 1 file changed, 87 insertions(+), 35 deletions(-) diff --git a/drivers/net

[RFC v1 for accelerated IPoIB 16/25] net/mlx5e: Change cleanup API in order to enable IB link

2017-03-13 Thread Erez Shitrit
1. Change the mlx5e_detach_netdev api. 2. Let that function to be called after the rtnl_lock is already held, like done in IB link. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 18

[RFC v1 for accelerated IPoIB 17/25] net/mlx5e: Change mlx5e_open_locked and mlx5e_close_locked api

2017-03-13 Thread Erez Shitrit
Let the IB link to call it directly with the relevant priv. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +-- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 24 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31

[RFC v1 for accelerated IPoIB 09/25] net/mlx5e: Creating and Destroying flow-steering tables for IB link

2017-03-13 Thread Erez Shitrit
New function to handle RSS table for IB link type. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h| 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 41 + 2 files changed, 43 insertions(+) diff --git a/drivers/net/ethernet

[RFC v1 for accelerated IPoIB 11/25] net/mlx5e: Refactor attach_netdev API

2017-03-13 Thread Erez Shitrit
Use priv object instead of netdev object, will give tha ability to use it for IB link. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4

[RFC v1 for accelerated IPoIB 12/25] net/mlx5e: Use underlay_qpn in tis creation

2017-03-13 Thread Erez Shitrit
Enable IB link to use the same code, by default the underlay_qp is zero for ETH link. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/net

[RFC v1 for accelerated IPoIB 22/25] net/mlx5e: New function pointer for build_rx_skb is

2017-03-13 Thread Erez Shitrit
In order to have the ability to support IB link with the same base code. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 6 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10

[RFC v1 for accelerated IPoIB 14/25] net/mlx5: Enable flow-steering for IB link

2017-03-13 Thread Erez Shitrit
Get the relevant capabilities if supports ipoib_enhanced_offloads and init the flow steering table accordingly. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 3 ++- 2 files changed, 7

[RFC v1 for accelerated IPoIB 23/25] net/mlx5e: Change the function that checks the packet type

2017-03-13 Thread Erez Shitrit
Now we can use it for non-ethernet type packets (like IB). After changing the order of the skb processing the function now can check the skb->protocol field to check if it is ETH_P_IP/ETH_P_IPV6 packet. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

[RFC v1 for accelerated IPoIB 25/25] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops

2017-03-13 Thread Erez Shitrit
Signed-off-by: Erez Shitrit --- drivers/infiniband/hw/mlx5/Makefile | 2 +- drivers/infiniband/hw/mlx5/main.c | 10 + drivers/infiniband/hw/mlx5/mlx5_ipoib_ops.c | 289 3 files changed, 300 insertions(+), 1 deletion(-) create mode 100644

[RFC v1 for accelerated IPoIB 21/25] net/mlx5e: Export send function for IB link type

2017-03-13 Thread Erez Shitrit
The function will be used in IB link in order to send packets. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 55 + include/linux/mlx5/driver.h | 5 ++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git

[RFC v1 for accelerated IPoIB 24/25] net/mlx5e: Add support for build_rx_skb for packet from IB type

2017-03-13 Thread Erez Shitrit
New function that parse and build the skb for IPoIB traffic. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 49 +++ 2 files changed, 57 insertions(+) diff --git a/drivers/net

[RFC v1 for accelerated IPoIB 15/25] net/mlx5e: Enhanced flow table creation to support ETH and IB links.

2017-03-13 Thread Erez Shitrit
IB link needs the the underlay_qp to support flow-steering, so change the API of the flow-steering creation for supporting both types in the same set of functions. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 12 +++- drivers/net/ethernet/mellanox/mlx5

[RFC v1 for accelerated IPoIB 20/25] net/mlx5e: Refactor TX send flow

2017-03-13 Thread Erez Shitrit
prepare of IB link type packets sending. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h| 4 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 237 ++-- 2 files changed, 141 insertions(+), 100 deletions(-) diff --git a/drivers/net

[RFC v1 for accelerated IPoIB 19/25] include/linux/mlx5: Add mlx5_wqe_eth_pad and enhanced-ipoib-qp-mode

2017-03-13 Thread Erez Shitrit
mlx5_wqe_eth_pad will be used for TX flow for IB link type. enhanced-ipoib-qp-mode for QP creation. Signed-off-by: Erez Shitrit --- drivers/infiniband/hw/mlx5/qp.c | 4 include/linux/mlx5/qp.h | 8 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers

[RFC v1 for accelerated IPoIB 10/25] net/mlx5e: Support netdevice creation for IB link type

2017-03-13 Thread Erez Shitrit
Implement required interface that will able the IB link to be run on top of the ETH data structures. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 98 +++ include/linux/mlx5/driver.h | 12 +++ 2 files changed, 110

[RFC v1 for accelerated IPoIB 05/25] IB/ipoib: Support ipoib acceleration options callbacks

2017-03-13 Thread Erez Shitrit
the driver implementation as it was without HW vendor support. TODO: We added remote qkey to ipoib_send in order to match send op signature. In accel mode this param will be used but in regular mode this param is redundant. Need to think about better solution. Signed-off-by: Erez Shitrit

[RFC v1 for accelerated IPoIB 03/25] IB/ipoib: Rename qpn to dqpn in ipoib_send and post_send functions

2017-03-13 Thread Erez Shitrit
Signed-off-by: Erez Shitrit --- drivers/infiniband/ulp/ipoib/ipoib.h| 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index b3900b253ad5

[RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API

2017-03-13 Thread Erez Shitrit
-off-by: Erez Shitrit --- include/rdma/ib_ipoib_accel_ops.h | 59 +++ include/rdma/ib_verbs.h | 36 2 files changed, 95 insertions(+) create mode 100644 include/rdma/ib_ipoib_accel_ops.h diff --git a/include/rdma

[RFC v1 for accelerated IPoIB 08/25] net/mlx5e: Refactor EN code to support IB link

2017-03-13 Thread Erez Shitrit
cleanup flows not to be specific for ETH link. Signed-off-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 120 ++ 1 file changed, 80 insertions(+), 40 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet

[RFC v1 for accelerated IPoIB 01/25] IB/ipoib: Separate control and data related initializations

2017-03-13 Thread Erez Shitrit
resources. Signed-off-by: Erez Shitrit --- drivers/infiniband/ulp/ipoib/ipoib.h | 5 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c| 39 +++--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 116 - drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 40 +- 4

[RFC v1 for accelerated IPoIB 07/25] linux/mlx5/mlx5_ifc.h: Add underlay_qpn field to PRM objects

2017-03-13 Thread Erez Shitrit
Add to the TIS and flow_table objects, and to hca capability table. 1. New capability bit: ipoib_enhanced_offloads, indicates new ability for UD QP to do RSS. 2. In order to support SET_ROOT cmd, to connect between QP to FS table. Signed-off-by: Erez Shitrit --- include/linux/mlx5/mlx5_ifc.h

[RFC v1 for accelerated IPoIB 06/25] hw/mlx5: Add New bit to check over QP creation

2017-03-13 Thread Erez Shitrit
Add check for bit IB_QP_CREATE_NETIF_QP while creating QP. Signed-off-by: Erez Shitrit --- drivers/infiniband/hw/mlx5/qp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index dc0ea63900c1..41e14d57fec9 100644 --- a/drivers

[RFC v1 for accelerated IPoIB 00/25] Enhanced mode for IPoIB driver

2017-03-13 Thread Erez Shitrit
he use of exported function from the mlx5_core layer to the ib layer. Changes fron v0: --- 1. Use the vnic/hfi API as a base for the new design/impl. 2. Change the low level driver to support the new struct. Erez Shitrit (25): IB/ipoib: Separate control and data related initializa

[RFC v1 for accelerated IPoIB 02/25] IB/ipoib: separate control from HW operation on ipoib_open/stop ndo

2017-03-13 Thread Erez Shitrit
ipoib_stop. Signed-off-by: Erez Shitrit --- drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 228 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 3 files changed, 129 insertions(+), 103 deletions(-) diff --git a/drivers

[PATCH V1 net-next] IB/ipoib: Fix ndo_get_iflink

2015-04-16 Thread Erez Shitrit
make sure to set the parent pointer prior to invoking register_netdevice(), this allows the new ndo to be called by the stack immediately after the child device is registered. Fixes: 5aa7add8f14b ('infiniband/ipoib: implement ndo_get_iflink') Reported-by: Honggang Li Signed-off-by: Erez

[PATCH net-next] IB/ipoib: Fix ndo_get_iflink

2015-04-16 Thread Erez Shitrit
make sure to set the parent pointer prior to invoking register_netdevice(), this allows the new ndo to be called by the stack immediately after the child device is registered. Fixes: 5aa7add8f14b ('infiniband/ipoib: implement ndo_get_iflink') Reported-by: Honggang Li Signed-off-by: Erez

Re: [PATCH linux-next 1/4] infiniband/ipoib: fix possible NULL pointer dereference in ipoib_get_iflink

2015-04-16 Thread Erez Shitrit
On Wed, Apr 15, 2015 at 7:06 PM, Jason Gunthorpe wrote: > On Wed, Apr 15, 2015 at 09:17:14AM +0300, Erez Shitrit wrote: >> >>+ /* parent interface */ >> >>+ if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) >> >>+ ret