Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread Saeed Mahameed
On Wed, 2018-03-07 at 15:57 -0500, Doug Ledford wrote:
> On Wed, 2018-03-07 at 15:41 -0500, Doug Ledford wrote:
> > On Wed, 2018-03-07 at 15:31 -0500, David Miller wrote:
> > > From: Saeed Mahameed 
> > > Date: Tue,  6 Mar 2018 22:35:03 -0800
> > > 
> > > > This series includes shared code updates for mlx5 core driver
> > > > for both
> > > > netdev and rdma subsystems.  This series should be pulled to
> > > > both
> > > > trees so we can continue netdev and rdma specific submissions
> > > > separately.
> > > > 
> > > > For more information please see tag log below.
> > > > 
> > > > The series doesn't cause any conflict with the latest mlx5 rc
> > > > fixes.
> > > > 
> > > > v1->v2:
> > > >   - Drop sparse fixes patch
> > > >   - Updated commit message of "net/mlx5: Add has_tag to
> > > > mlx5_flow_act"
> > > >   - Add const to  static mlx5_flow_cmd structs where needed.
> > > 
> > > Pulled, thanks Saeed.
> > 
> > Thanks, pulled here as well.
> > 
> 
> Just FYI,
> 
> My .config might have been in an unreasonable state (I had jumped
> from
> for-next to for-rc, built a kernel which ran a make oldconfig, then
> jumped back to for-next and tried to build with this series applied
> but
> without making any changes to the .config file), but I got a build
> error.  My .config had both innova and the new ipsec accelerator
> turned
> off or something like that, and I got this error:
> 
>   CC [M]  drivers/net/ethernet/mellanox/mlx5/core/en_main.o
> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c: In function
> ‘mlx5_init_fs’:
> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2645:6: error:
> implicit declaration of function ‘mlx5_accel_ipsec_device_caps’; did
> you
> mean ‘mlx5_accel_ipsec_cleanup’? [-Werror=implicit-function-
> declaration]
>   if (mlx5_accel_ipsec_device_caps(steering->dev) &
>   ^~~~
>   mlx5_accel_ipsec_cleanup
>   CC [M]  drivers/net/ethernet/silan/sc92031.o
>   CC [M]  drivers/w1/slaves/w1_smem.o
>   CC [M]  drivers/net/ethernet/mellanox/mlx5/core/en_common.o
>   CC [M]  drivers/net/ethernet/sfc/falcon/nic.o
> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2646:6: error:
> ‘MLX5_ACCEL_IPSEC_DEVICE’ undeclared (first use in this function);
> did
> you mean ‘__MLX5_ACCEL_IPSEC_H__’?
>   MLX5_ACCEL_IPSEC_DEVICE) {
>   ^~~
>   __MLX5_ACCEL_IPSEC_H__
> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2646:6: note: each
> undeclared identifier is reported only once for each function it
> appears
> in
>   CC [M]  drivers/w1/w1.o
> 
> Running make config and enabling innova support and ipsec accelerator
> support fixed it.
> 

hmm, i think there is a missing include somewhere, will check this out
now and send the fix in the next pull request, later today or tomorrow.

Thanks Doug !


Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread Doug Ledford
On Wed, 2018-03-07 at 15:41 -0500, Doug Ledford wrote:
> On Wed, 2018-03-07 at 15:31 -0500, David Miller wrote:
> > From: Saeed Mahameed 
> > Date: Tue,  6 Mar 2018 22:35:03 -0800
> > 
> > > This series includes shared code updates for mlx5 core driver for both
> > > netdev and rdma subsystems.  This series should be pulled to both
> > > trees so we can continue netdev and rdma specific submissions separately.
> > > 
> > > For more information please see tag log below.
> > > 
> > > The series doesn't cause any conflict with the latest mlx5 rc fixes.
> > > 
> > > v1->v2:
> > >   - Drop sparse fixes patch
> > >   - Updated commit message of "net/mlx5: Add has_tag to mlx5_flow_act"
> > >   - Add const to  static mlx5_flow_cmd structs where needed.
> > 
> > Pulled, thanks Saeed.
> 
> Thanks, pulled here as well.
> 

Just FYI,

My .config might have been in an unreasonable state (I had jumped from
for-next to for-rc, built a kernel which ran a make oldconfig, then
jumped back to for-next and tried to build with this series applied but
without making any changes to the .config file), but I got a build
error.  My .config had both innova and the new ipsec accelerator turned
off or something like that, and I got this error:

  CC [M]  drivers/net/ethernet/mellanox/mlx5/core/en_main.o
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c: In function
‘mlx5_init_fs’:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2645:6: error:
implicit declaration of function ‘mlx5_accel_ipsec_device_caps’; did you
mean ‘mlx5_accel_ipsec_cleanup’? [-Werror=implicit-function-declaration]
  if (mlx5_accel_ipsec_device_caps(steering->dev) &
  ^~~~
  mlx5_accel_ipsec_cleanup
  CC [M]  drivers/net/ethernet/silan/sc92031.o
  CC [M]  drivers/w1/slaves/w1_smem.o
  CC [M]  drivers/net/ethernet/mellanox/mlx5/core/en_common.o
  CC [M]  drivers/net/ethernet/sfc/falcon/nic.o
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2646:6: error:
‘MLX5_ACCEL_IPSEC_DEVICE’ undeclared (first use in this function); did
you mean ‘__MLX5_ACCEL_IPSEC_H__’?
  MLX5_ACCEL_IPSEC_DEVICE) {
  ^~~
  __MLX5_ACCEL_IPSEC_H__
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2646:6: note: each
undeclared identifier is reported only once for each function it appears
in
  CC [M]  drivers/w1/w1.o

Running make config and enabling innova support and ipsec accelerator
support fixed it.

-- 
Doug Ledford 
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

signature.asc
Description: This is a digitally signed message part


Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread Doug Ledford
On Wed, 2018-03-07 at 15:31 -0500, David Miller wrote:
> From: Saeed Mahameed 
> Date: Tue,  6 Mar 2018 22:35:03 -0800
> 
> > This series includes shared code updates for mlx5 core driver for both
> > netdev and rdma subsystems.  This series should be pulled to both
> > trees so we can continue netdev and rdma specific submissions separately.
> > 
> > For more information please see tag log below.
> > 
> > The series doesn't cause any conflict with the latest mlx5 rc fixes.
> > 
> > v1->v2:
> >   - Drop sparse fixes patch
> >   - Updated commit message of "net/mlx5: Add has_tag to mlx5_flow_act"
> >   - Add const to  static mlx5_flow_cmd structs where needed.
> 
> Pulled, thanks Saeed.

Thanks, pulled here as well.

-- 
Doug Ledford 
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

signature.asc
Description: This is a digitally signed message part


Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread David Miller
From: Saeed Mahameed 
Date: Tue,  6 Mar 2018 22:35:03 -0800

> This series includes shared code updates for mlx5 core driver for both
> netdev and rdma subsystems.  This series should be pulled to both
> trees so we can continue netdev and rdma specific submissions separately.
> 
> For more information please see tag log below.
> 
> The series doesn't cause any conflict with the latest mlx5 rc fixes.
> 
> v1->v2:
>   - Drop sparse fixes patch
>   - Updated commit message of "net/mlx5: Add has_tag to mlx5_flow_act"
>   - Add const to  static mlx5_flow_cmd structs where needed.

Pulled, thanks Saeed.


Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread Doug Ledford
On Tue, 2018-03-06 at 22:35 -0800, Saeed Mahameed wrote:
> Hi Dave and Doug,
> 
> This series includes shared code updates for mlx5 core driver for both
> netdev and rdma subsystems.  This series should be pulled to both
> trees so we can continue netdev and rdma specific submissions separately.
> 
> For more information please see tag log below.
> 
> The series doesn't cause any conflict with the latest mlx5 rc fixes.
> 
> v1->v2:
>   - Drop sparse fixes patch
>   - Updated commit message of "net/mlx5: Add has_tag to mlx5_flow_act"
>   - Add const to  static mlx5_flow_cmd structs where needed.
> 
> Thanks,
> Saeed.

FWIW, the IB portions are fine with me (they're all pretty simple).

Acked-by: Doug Ledford 

-- 
Doug Ledford 
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

signature.asc
Description: This is a digitally signed message part


[pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-06 Thread Saeed Mahameed
Hi Dave and Doug,

This series includes shared code updates for mlx5 core driver for both
netdev and rdma subsystems.  This series should be pulled to both
trees so we can continue netdev and rdma specific submissions separately.

For more information please see tag log below.

The series doesn't cause any conflict with the latest mlx5 rc fixes.

v1->v2:
  - Drop sparse fixes patch
  - Updated commit message of "net/mlx5: Add has_tag to mlx5_flow_act"
  - Add const to  static mlx5_flow_cmd structs where needed.

Thanks,
Saeed.

--- 

The following changes since commit ec9c2fb8ceb5b514c4820f732537cb2982de0620:

  IB/mlx5: Disable self loopback check when in switchdev mode (2018-02-23 
12:36:39 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git 
tags/mlx5-updates-2018-02-28-1

for you to fetch changes up to e810bf5e96e327500cc6334f9d56c8047aaabcff:

  net/mlx5: Flow steering cmd interface should get the fte when deleting 
(2018-03-06 22:20:15 -0800)


mlx5-updates-2018-02-28-1 (IPSec-1)

This series consists of some fixes and refactors for the mlx5 drivers,
especially around the FPGA and flow steering. Most of them are trivial
fixes and are the foundation of allowing IPSec acceleration from user-space.

We use flow steering abstraction in order to accelerate IPSec packets.
When a user creates a steering rule, [s]he states that we'll carry an
encrypt/decrypt flow action (using a specific configuration) for every
packet which conforms to a certain match. Since currently offloading these
packets is done via FPGA, we'll add another set of flow steering ops.
These ops will execute the required FPGA commands and then call the
standard steering ops.

In order to achieve this, we need that the commands will get all the
required information. Therefore, we pass the fte object and embed the
flow_action struct inside the fte. In addition, we add the shim layer
that will later be used for alternating between the standard and the
FPGA steering commands.

Some fixes, like " net/mlx5e: Wait for FPGA command responses with a timeout"
are very relevant for user-space applications, as these applications could
be killed, but we still want to wait for the FPGA and update the kernel's
database.

Regards,
Aviad and Matan


Aviad Yehezkel (7):
  IB/mlx5: Removed not used parameters
  net/mlx5: Fixed compilation issue when CONFIG_MLX5_ACCEL is disabled
  net/mlx5e: Wait for FPGA command responses with a timeout
  net/mlx5e: Fixed sleeping inside atomic context
  net/mlx5e: Removed not need synchronize_rcu
  net/mlx5: Add empty egress namespace to flow steering core
  net/mlx5: Flow steering cmd interface should get the fte when deleting

Boris Pismenny (2):
  IB/mlx5: Pass mlx5_flow_act struct instead of multiple arguments
  {net,IB}/mlx5: Add flow steering helpers

Matan Barak (4):
  net/mlx5: FPGA and IPSec initialization to be before flow steering
  {net,IB}/mlx5: Add has_tag to mlx5_flow_act
  net/mlx5: Add shim layer between fs and cmd
  net/mlx5: Embed mlx5_flow_act into fs_fte

 drivers/infiniband/hw/mlx5/main.c  |  30 ++-
 drivers/infiniband/hw/mlx5/qp.c|   3 -
 .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h  |   4 +-
 .../mellanox/mlx5/core/diag/fs_tracepoint.c|   3 +
 .../mellanox/mlx5/core/diag/fs_tracepoint.h|   4 +-
 .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c   |  17 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c|   1 +
 .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c   |   9 +-
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c   | 207 +
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h   |  72 +++
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  | 136 +-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h  |   8 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c |  39 ++--
 include/linux/mlx5/fs.h|   2 +
 include/linux/mlx5/fs_helpers.h| 134 +
 include/linux/mlx5/mlx5_ifc.h  |   9 +-
 16 files changed, 494 insertions(+), 184 deletions(-)
 create mode 100644 include/linux/mlx5/fs_helpers.h