1. 30 Apr, 2018 1 commit
  2. 27 Apr, 2018 33 commits
  3. 23 Apr, 2018 5 commits
    • Parav Pandit's avatar
      IB/core: Fix deleting default GIDs when changing mac adddress · dc5640f2
      Parav Pandit authored
      Before [1], When MAC address of the netdevice is changed, default GID is
      supposed to get deleted and added back which affects the node and/or port
      GUID in below sequence.
      
      netdevice_event()
      -> NETDEV_CHANGEADDR
         default_del_cmd()
            del_netdev_default_ips()
                bond_delete_netdev_default_gids()
                    ib_cache_gid_set_default_gid()
                        ib_cache_gid_del()
         add_cmd()
         [..]
      
      However, ib_cache_gid_del() was not getting invoked in non bonding
      scenarios because event_ndev and rdma_ndev are same.
      Therefore, fix such condition to ignore checking upper device when event
      ndev and rdma_dev are same; similar to bond_set_netdev_default_gids().
      
      Which this fix ib_cache_gid_del() is invoked correctly; however
      ib_cache_gid_del() doesn't find the default GID for deletion because
      find_gid() was given default_gid = false with
      GID_ATTR_FIND_MASK_DEFAULT set.
      But it was getting overwritten by ib_cache_gid_set_default_gid() later
      on as part of add_cmd().
      Therefore, mac address change used to work for default GID.
      
      With refactor series [1], this incorrect behavior is detected.
      
      Therefore,
      when deleting default GID, set default_gid and set MASK flag.
      when deleting IP based GID, clear default_gid and set MASK flag.
      
      [1] https://patchwork.kernel.org/patch/10319151/
      
      Fixes: 238fdf48 ("IB/core: Add RoCE table bonding support")
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      dc5640f2
    • Parav Pandit's avatar
      IB/core: Fix to avoid deleting IPv6 look alike default GIDs · 22c01ee4
      Parav Pandit authored
      When IPv6 link local address is removed, if it matches with the default
      GID, default GID(s)s gets removed which may not be a desired behavior.
      This behavior is introduced by refactor work in Fixes tag.
      
      When IPv6 link address is removed, removing its equivalent RoCEv2 GID
      which exactly matches with default RoCEv2 GID, is right thing to do.
      However achieving it correctly requires lot more changes, likely in
      roce_gid_mgmt.c and core/cache.c. This should be done as independent
      patch.
      
      Therefore, this patch preserves behavior of not deleteing default GIDs.
      This is done by providing explicit hint to consider default GID property
      using mask and default_gid; similar to add_gid().
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      22c01ee4
    • Parav Pandit's avatar
      IB/core: Don't allow default GID addition at non reseved slots · a66ed149
      Parav Pandit authored
      Default GIDs are marked reserved at the start of the GID table at index
      0 and 1 by gid_table_reserve_default().  Currently when default GID is
      requested, it can still allocates an empty slot which was not marked as
      RESERVED for default GID, which is incorrect.
      
      At least in current code flow of roce_gid_mgmt.c, in theory we can
      still request to allocate more than one/two default GIDs depending
      on how upper devices are setup.
      
      Therefore, it is better for cache layer to only allow our reserved slots
      to be used by default GID allocation requests.
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      a66ed149
    • Jason Gunthorpe's avatar
      uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license · d50e14ab
      Jason Gunthorpe authored
      Based on discussion with Kate Stewart this license is not a
      BSD-2-Clause, but is now formally identified as Linux-OpenIB
      by SPDX.
      
      The key difference between the licenses is in the 'warranty'
      paragraph.
      
      if_infiniband.h refers to the 'OpenIB.org' license, but
      does not include the text, instead it links to an obsolete
      web site that contains a license that matches the BSD-2-Clause
      SPX. There is no 'three clause' version of the OpenIB.org
      license.
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      d50e14ab
    • Roland Dreier's avatar
      RDMA/ucma: Allow resolving address w/o specifying source address · 09abfe7b
      Roland Dreier authored
      The RDMA CM will select a source device and address by consulting
      the routing table if no source address is passed into
      rdma_resolve_address().  Userspace will ask for this by passing an
      all-zero source address in the RESOLVE_IP command.  Unfortunately
      the new check for non-zero address size rejects this with EINVAL,
      which breaks valid userspace applications.
      
      Fix this by explicitly allowing a zero address family for the source.
      
      Fixes: 2975d5de ("RDMA/ucma: Check AF family prior resolving address")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      09abfe7b
  4. 20 Apr, 2018 1 commit