1. 16 9月, 2020 9 次提交
  2. 15 9月, 2020 6 次提交
  3. 13 9月, 2020 1 次提交
  4. 11 9月, 2020 1 次提交
    • J
      mlx4: make sure to always set the port type · 0313c7c2
      Jakub Kicinski 提交于
      Even tho mlx4_core registers the devlink ports, it's mlx4_en
      and mlx4_ib which set their type. In situations where one of
      the two is not built yet the machine has ports of given type
      we see the devlink warning from devlink_port_type_warn() trigger.
      
      Having ports of a type not supported by the kernel may seem
      surprising, but it does occur in practice - when the unsupported
      port is not plugged in to a switch anyway users are more than happy
      not to see it (and potentially allocate any resources to it).
      
      Set the type in mlx4_core if type-specific driver is not built.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0313c7c2
  5. 10 9月, 2020 3 次提交
    • P
      devlink: Introduce controller number · 3a2d9588
      Parav Pandit 提交于
      A devlink port may be for a controller consist of PCI device.
      A devlink instance holds ports of two types of controllers.
      (1) controller discovered on same system where eswitch resides
      This is the case where PCI PF/VF of a controller and devlink eswitch
      instance both are located on a single system.
      (2) controller located on external host system.
      This is the case where a controller is located in one system and its
      devlink eswitch ports are located in a different system.
      
      When a devlink eswitch instance serves the devlink ports of both
      controllers together, PCI PF/VF numbers may overlap.
      Due to this a unique phys_port_name cannot be constructed.
      
      For example in below such system controller-0 and controller-1, each has
      PCI PF pf0 whose eswitch ports can be present in controller-0.
      These results in phys_port_name as "pf0" for both.
      Similar problem exists for VFs and upcoming Sub functions.
      
      An example view of two controller systems:
      
                   ---------------------------------------------------------
                   |                                                       |
                   |           --------- ---------         ------- ------- |
      -----------  |           | vf(s) | | sf(s) |         |vf(s)| |sf(s)| |
      | server  |  | -------   ----/---- ---/----- ------- ---/--- ---/--- |
      | pci rc  |=== | pf0 |______/________/       | pf1 |___/_______/     |
      | connect |  | -------                       -------                 |
      -----------  |     | controller_num=1 (no eswitch)                   |
                   ------|--------------------------------------------------
                   (internal wire)
                         |
                   ---------------------------------------------------------
                   | devlink eswitch ports and reps                        |
                   | ----------------------------------------------------- |
                   | |ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 |ctrl-0 | |
                   | |pf0    | pf0vfN | pf0sfN | pf1    | pf1vfN |pf1sfN | |
                   | ----------------------------------------------------- |
                   | |ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 |ctrl-1 | |
                   | |pf1    | pf1vfN | pf1sfN | pf1    | pf1vfN |pf0sfN | |
                   | ----------------------------------------------------- |
                   |                                                       |
                   |                                                       |
                   |           --------- ---------         ------- ------- |
                   |           | vf(s) | | sf(s) |         |vf(s)| |sf(s)| |
                   | -------   ----/---- ---/----- ------- ---/--- ---/--- |
                   | | pf0 |______/________/       | pf1 |___/_______/     |
                   | -------                       -------                 |
                   |                                                       |
                   |  local controller_num=0 (eswitch)                     |
                   ---------------------------------------------------------
      
      An example devlink port for external controller with controller
      number = 1 for a VF 1 of PF 0:
      
      $ devlink port show pci/0000:06:00.0/2
      pci/0000:06:00.0/2: type eth netdev ens2f0pf0vf1 flavour pcivf controller 1 pfnum 0 vfnum 1 external true splittable false
        function:
          hw_addr 00:00:00:00:00:00
      
      $ devlink port show pci/0000:06:00.0/2 -jp
      {
          "port": {
              "pci/0000:06:00.0/2": {
                  "type": "eth",
                  "netdev": "ens2f0pf0vf1",
                  "flavour": "pcivf",
                  "controller": 1,
                  "pfnum": 0,
                  "vfnum": 1,
                  "external": true,
                  "splittable": false,
                  "function": {
                      "hw_addr": "00:00:00:00:00:00"
                  }
              }
          }
      }
      Signed-off-by: NParav Pandit <parav@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a2d9588
    • P
      devlink: Introduce external controller flag · 05b595e9
      Parav Pandit 提交于
      A devlink eswitch port may represent PCI PF/VF ports of a controller.
      
      A controller either located on same system or it can be an external
      controller located in host where such NIC is plugged in.
      
      Add the ability for driver to specify if a port is for external
      controller.
      
      Use such flag in the mlx5_core driver.
      
      An example of an external controller having VF1 of PF0 belong to
      controller 1.
      
      $ devlink port show pci/0000:06:00.0/2
      pci/0000:06:00.0/2: type eth netdev ens2f0pf0vf1 flavour pcivf pfnum 0 vfnum 1 external true splittable false
        function:
          hw_addr 00:00:00:00:00:00
      $ devlink port show pci/0000:06:00.0/2 -jp
      {
          "port": {
              "pci/0000:06:00.0/2": {
                  "type": "eth",
                  "netdev": "ens2f0pf0vf1",
                  "flavour": "pcivf",
                  "pfnum": 0,
                  "vfnum": 1,
                  "external": true,
                  "splittable": false,
                  "function": {
                      "hw_addr": "00:00:00:00:00:00"
                  }
              }
          }
      }
      Signed-off-by: NParav Pandit <parav@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05b595e9
    • P
      net/mlx5: E-switch, Read controller number from device · a53cf949
      Parav Pandit 提交于
      ECPF supports one external host controller. Read controller number
      from the device.
      Signed-off-by: NParav Pandit <parav@nvidia.com>
      Reviewed-by: NRoi Dayan <roid@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a53cf949
  6. 04 9月, 2020 3 次提交
  7. 02 9月, 2020 1 次提交
    • S
      net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() · cbedcb04
      Shung-Hsi Yu 提交于
      On machines with much memory (> 2 TByte) and log_mtts_per_seg == 0, a
      max_order of 31 will be passed to mlx_buddy_init(), which results in
      s = BITS_TO_LONGS(1 << 31) becoming a negative value, leading to
      kvmalloc_array() failure when it is converted to size_t.
      
        mlx4_core 0000:b1:00.0: Failed to initialize memory region table, aborting
        mlx4_core: probe of 0000:b1:00.0 failed with error -12
      
      Fix this issue by changing the left shifting operand from a signed literal to
      an unsigned one.
      
      Fixes: 225c7b1f ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
      Signed-off-by: NShung-Hsi Yu <shung-hsi.yu@suse.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbedcb04
  8. 01 9月, 2020 3 次提交
  9. 27 8月, 2020 2 次提交
  10. 25 8月, 2020 2 次提交
  11. 24 8月, 2020 1 次提交
  12. 20 8月, 2020 1 次提交
  13. 04 8月, 2020 7 次提交