1. 30 6月, 2017 18 次提交
  2. 28 6月, 2017 14 次提交
  3. 27 6月, 2017 8 次提交
    • I
      net/mlx5e: IPSec, Add IPSec ethtool stats · 164f16f7
      Ilan Tayari 提交于
      Add Innova IPSec SBU counters to the ethtool -S stats.
      Add IPSec offload error counters to the ethtool -S stats.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Reviewed-by: NBoris Pismenny <borisp@mellanox.com>
      Reviewed-by: NGal Pressman <galp@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      164f16f7
    • I
      net/mlx5e: IPSec, Add Innova IPSec offload TX data path · 2ac9cfe7
      Ilan Tayari 提交于
      In the TX data path, prepend a special metadata ethertype which
      instructs the hardware to perform cryptography.
      
      In addition, fill Software-Parser segment in TX descriptor so
      that the hardware may parse the ESP protocol, and perform TX
      checksum offload on the inner payload.
      
      Support GSO, by providing the inverse of gso_size in the metadata.
      This allows the FPGA to update the ESP header (seqno and seqiv) on the
      resulting packets, by calculating the packet number within the GSO
      back from the TCP sequence number.
      
      Note that for GSO SKBs, the stack does not include an ESP trailer,
      unlike the non-GSO case.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NYossi Kuperman <yossiku@mellanox.com>
      Signed-off-by: NYevgeny Kliteynik <kliteyn@mellanox.com>
      Signed-off-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      2ac9cfe7
    • I
      net/mlx5e: IPSec, Add Innova IPSec offload RX data path · 899a59d3
      Ilan Tayari 提交于
      In RX data path, the hardware prepends a special metadata ethertype
      which indicates that the packet underwent decryption, and the result of
      the authentication check.
      
      Communicate this to the stack in skb->sp.
      
      Make wqe_size large enough to account for the injected metadata.
      
      Support only Linked-list RQ type.
      
      IPSec offload RX packets may have useful CHECKSUM_COMPLETE information,
      which the stack may not be able to use yet.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NYossi Kuperman <yossiku@mellanox.com>
      Signed-off-by: NYevgeny Kliteynik <kliteyn@mellanox.com>
      Signed-off-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      899a59d3
    • I
      net/mlx5e: IPSec, Innova IPSec offload infrastructure · 547eede0
      Ilan Tayari 提交于
      Add Innova IPSec ESP crypto offload configuration paths.
      Detect Innova IPSec device and set the NETIF_F_HW_ESP flag.
      Configure Security Associations using the API introduced in a previous
      patch.
      
      Add Software-parser hardware descriptor layout
      Software-Parser (swp) is a hardware feature in ConnectX which allows the
      host software to specify protocol header offsets in the TX path, thus
      overriding the hardware parser.
      This is useful for protocols that the ASIC may not be able to parse on
      its own.
      
      Note that due to inline metadata, XDP is not supported in Innova IPSec.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NYossi Kuperman <yossiku@mellanox.com>
      Signed-off-by: NYevgeny Kliteynik <kliteyn@mellanox.com>
      Signed-off-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      547eede0
    • I
      net/mlx5: Accel, Add IPSec acceleration interface · bebb23e6
      Ilan Tayari 提交于
      Add routines for manipulating the hardware IPSec SA database (SADB).
      
      In Innova IPSec, a Security Association (SA) is added or deleted
      via a command message over the SBU connection.
      The HW then sends a response message over the same connection.
      
      Add implementation for Innova IPSec (FPGA-based) hardware.
      
      These routines will be used by the IPSec offload support in a later patch
      However they may also be used by others such as RDMA and RoCE IPSec.
      
      mlx5/accel is a middle acceleration layer to allow mlx5e and other ULPs
      to work directly with mlx5_core rather than Innova FPGA or other mlx5
      acceleration providers.
      
      In this patchset we add Innova IPSec support and mlx5/accel delegates
      IPSec offloads to Innova routines.
      
      In the future, when IPSec/TLS or any other acceleration gets integrated
      into ConnectX chip, mlx5/accel layer will provide the integrated
      acceleration, rather than the Innova one.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      bebb23e6
    • I
      net/mlx5: FPGA, Add SBU infrastructure · a9956d35
      Ilan Tayari 提交于
      Add interface to initialize and interact with Innova FPGA SBU
      connections.
      A client driver may use these functions to set up a high-speed DMA
      connection with its SBU hardware logic, and send/receive messages
      over this connection.
      
      A later patch in this patchset will make use of these functions for
      Innova IPSec offload in mlx5 Ethernet driver.
      
      Add commands to retrieve Innova FPGA SBU capabilities, and to
      read/write Innova FPGA configuration space registers and memory,
      over internal I2C.
      
      At high level, the FPGA configuration space is divided such:
       0x00000000 - 0x007fffff is reserved for the SBU
       0x00800000 - 0xffffffff is reserved for the Shell
      0x400000000 - ...        is DDR memory
      
      A later patchset will add support for accessing FPGA CrSpace and memory
      over a high-speed connection. This is the reason for the ACCESS_TYPE
      enumeration, which currently only supports I2C.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      a9956d35
    • I
      net/mlx5: FPGA, Add SBU bypass and reset flows · c43051d7
      Ilan Tayari 提交于
      The Innova FPGA includes shell hardware and Sandbox-Unit (SBU) hardware.
      The shell hardware is handled by mlx5_core itself, while the SBU is
      handled by a client driver.
      
      Reset the SBU to a well-known initial state when initializing a new
      device, and set the FPGA to bypass mode when uninitializing a device.
      This allows the client driver to assume that its device has been
      reset when a new device is detected.
      
      During SBU reset, the FPGA is put into SBU-bypass mode. In this mode
      packets do not pass through the SBU, so it cannot affect the network
      data stream at all.
      
      A factory-image does not have an SBU, so skip these flows.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      c43051d7
    • I
      net/mlx5: FPGA, Add high-speed connection routines · 537a5057
      Ilan Tayari 提交于
      An FPGA high-speed connection has two endpoints, an FPGA QP and a
      ConnectX QP.
      Add library routines to create and connect the endpoints of an
      FPGA high-speed connection.
      
      These routines allow creating and interacting with both types of
      connections: Shell and Sandbox Unit (SBU).
      
      Shell connection provides an interface to the FPGA's address space,
      which includes the configuration space and the DDR.
      Use of the shell connection will be introduced in a later patchset.
      
      SBU connection provides a command and/or data interface to the
      application-specific logic within the FPGA.
      Use of the SBU connection will be introduced in a later patch in
      this patchset.
      
      Some struct definitions are added to a new header file sdk.h, which
      will be extended in later patches in the patchset.
      This header file will contain the in-kernel FPGA client driver API.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      537a5057