1. 28 4月, 2018 20 次提交
  2. 27 4月, 2018 8 次提交
  3. 24 4月, 2018 3 次提交
    • P
      IB/core: Fix deleting default GIDs when changing mac adddress · dc5640f2
      Parav Pandit 提交于
      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: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      dc5640f2
    • P
      IB/core: Fix to avoid deleting IPv6 look alike default GIDs · 22c01ee4
      Parav Pandit 提交于
      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: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      22c01ee4
    • P
      IB/core: Don't allow default GID addition at non reseved slots · a66ed149
      Parav Pandit 提交于
      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: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a66ed149
  4. 23 4月, 2018 1 次提交
  5. 20 4月, 2018 1 次提交
  6. 18 4月, 2018 2 次提交
    • G
      IB/uverbs: Add missing braces in anonymous union initializers · e33514f2
      Geert Uytterhoeven 提交于
      With gcc-4.1.2:
      
          drivers/infiniband/core/uverbs_std_types_flow_action.c:366: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:376: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:383: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:384: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
      
      Add the missing braces to fix this.
      
      Fixes: 2eb9beae ("IB/uverbs: Add flow_action create and destroy verbs")
      Fixes: 7d12f8d5 ("IB/uverbs: Add modify ESP flow_action")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      e33514f2
    • R
      infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m · b3fe6c62
      Randy Dunlap 提交于
      Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
      The build error occurs when the mlx5 driver code attempts to use
      USER_ACCESS interfaces, which are built as a loadable module.
      
      Fixes these build errors:
      
      drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
      ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
      drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
      
      Build-tested with multiple config combinations.
      
      Fixes: 8c84660b ("IB/mlx5: Initialize the parsing tree root without the help of uverbs")
      Cc: stable@vger.kernel.org # reported against 4.16
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      b3fe6c62
  7. 17 4月, 2018 1 次提交
  8. 16 4月, 2018 1 次提交
  9. 06 4月, 2018 3 次提交
    • M
      IB/rxe: Fix for oops in rxe_register_device on ppc64le arch · efc365e7
      Mikhail Malygin 提交于
      On ppc64le arch rxe_add command causes oops in kernel log:
      
      [   92.495140] Oops: Kernel access of bad area, sig: 11 [#1]
      [   92.499710] SMP NR_CPUS=2048 NUMA pSeries
      [   92.499792] Modules linked in: ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) nf_conntrack_netlink(E) nfnetlink(E) xfrm_user(E) iptable
      _nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) xt_addrtype(E) iptable_filter(E) ip_tables(E) xt_conntrack(E) x_tables(E)
       nf_nat(E) nf_conntrack(E) br_netfilter(E) bridge(E) stp(E) llc(E) overlay(E) af_packet(E) rpcrdma(E) ib_isert(E) iscsi_target_mod(E) i
      b_iser(E) libiscsi(E) ib_srpt(E) target_core_mod(E) ib_srp(E) ib_ipoib(E) rdma_ucm(E) ib_ucm(E) ib_uverbs(E) ib_umad(E) bochs_drm(E) tt
      m(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) drm(E) agpgart(E) virtio_rng(E) virtio_console(E) rtc_
      generic(E) dm_ec(OEN) ttln_rdma(OEN) rdma_cm(E) configfs(E) iw_cm(E) ib_cm(E) rdma_rxe(E) ip6_udp_tunnel(E) udp_tunnel(E) ib_core(E) ql
      a2xxx(E)
      [   92.499832]  scsi_transport_fc(E) nvme_fc(E) nvme_fabrics(E) nvme_core(E) ipmi_watchdog(E) ipmi_ssif(E) ipmi_poweroff(E) ipmi_powernv(EX) ipmi_devintf(E) ipmi_msghandler(E) dummy(E) ext4(E) crc16(E) jbd2(E) mbcache(E) dm_service_time(E) scsi_transport_iscsi(E) sd_mod(E) sr_mod(E) cdrom(E) hid_generic(E) usbhid(E) virtio_blk(E) virtio_scsi(E) virtio_net(E) ibmvscsi(EX) scsi_transport_srp(E) xhci_pci(E) xhci_hcd(E) usbcore(E) usb_common(E) virtio_pci(E) virtio_ring(E) virtio(E) sunrpc(E) dm_mirror(E) dm_region_hash(E) dm_log(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) autofs4(E)
      [   92.499834] Supported: No, Unsupported modules are loaded
      [   92.499839] CPU: 3 PID: 5576 Comm: sh Tainted: G           OE   NX 4.4.120-ttln.17-default #1
      [   92.499841] task: c0000000afe8a490 ti: c0000000beba8000 task.ti: c0000000beba8000
      [   92.499842] NIP: c00000000008ba3c LR: c000000000027644 CTR: c00000000008ba10
      [   92.499844] REGS: c0000000bebab750 TRAP: 0300   Tainted: G           OE   NX  (4.4.120-ttln.17-default)
      [   92.499850] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28424428  XER: 20000000
      [   92.499871] CFAR: 0000000000002424 DAR: 0000000000000208 DSISR: 40000000 SOFTE: 1
                     GPR00: c000000000027644 c0000000bebab9d0 c000000000f09700 0000000000000000
                     GPR04: d0000000043d7192 0000000000000002 000000000000001a fffffffffffffffe
                     GPR08: 000000000000009c c00000000008ba10 d0000000043e5848 d0000000043d3828
                     GPR12: c00000000008ba10 c000000007a02400 0000000010062e38 0000010020388860
                     GPR16: 0000000000000000 0000000000000000 00000100203885f0 00000000100f6c98
                     GPR20: c0000000b3f1fcc0 c0000000b3f1fc48 c0000000b3f1fbd0 c0000000b3f1fb58
                     GPR24: c0000000b3f1fae0 c0000000b3f1fa68 00000000000005dc c0000000b3f1f9f0
                     GPR28: d0000000043e5848 c0000000b3f1f900 c0000000b3f1f320 c0000000b3f1f000
      [   92.499881] NIP [c00000000008ba3c] dma_get_required_mask_pSeriesLP+0x2c/0x1a0
      [   92.499885] LR [c000000000027644] dma_get_required_mask+0x44/0xac
      [   92.499886] Call Trace:
      [   92.499891] [c0000000bebab9d0] [c0000000bebaba30] 0xc0000000bebaba30 (unreliable)
      [   92.499894] [c0000000bebaba10] [c000000000027644] dma_get_required_mask+0x44/0xac
      [   92.499904] [c0000000bebaba30] [d0000000043cb4b4] rxe_register_device+0xc4/0x430 [rdma_rxe]
      [   92.499910] [c0000000bebabab0] [d0000000043c06c8] rxe_add+0x448/0x4e0 [rdma_rxe]
      [   92.499915] [c0000000bebabb30] [d0000000043d28dc] rxe_net_add+0x4c/0xf0 [rdma_rxe]
      [   92.499921] [c0000000bebabb60] [d0000000043d305c] rxe_param_set_add+0x6c/0x1ac [rdma_rxe]
      [   92.499924] [c0000000bebabbf0] [c0000000000e78c0] param_attr_store+0xa0/0x180
      [   92.499927] [c0000000bebabc70] [c0000000000e6448] module_attr_store+0x48/0x70
      [   92.499932] [c0000000bebabc90] [c000000000391f60] sysfs_kf_write+0x70/0xb0
      [   92.499935] [c0000000bebabcb0] [c000000000390f1c] kernfs_fop_write+0x18c/0x1e0
      [   92.499939] [c0000000bebabd00] [c0000000002e22ac] __vfs_write+0x4c/0x1d0
      [   92.499942] [c0000000bebabd90] [c0000000002e2f94] vfs_write+0xc4/0x200
      [   92.499945] [c0000000bebabde0] [c0000000002e488c] SyS_write+0x6c/0x110
      [   92.499948] [c0000000bebabe30] [c000000000009384] system_call+0x38/0xe4
      [   92.499949] Instruction dump:
      [   92.499954] 4e800020 3c4c00e8 3842dcf0 7c0802a6 f8010010 60000000 7c0802a6 fba1ffe8
      [   92.499958] fbc1fff0 fbe1fff8 f8010010 f821ffc1 <e9230208> 7c7e1b78 2fa90000 419e0078
      [   92.499962] ---[ end trace bed077e15eb420cf ]---
      
      It fails in dma_get_required_mask, that has ppc-specific implementation,
      and fail if provided device argument is NULL
      Signed-off-by: NMikhail Malygin <mikhail@malygin.me>
      Reviewed-by: NYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      efc365e7
    • A
      IB/mlx5: Device memory mr registration support · 6c29f57e
      Ariel Levkovich 提交于
      Adding mlx5_ib driver implementation for reg_dm_mr callback
      which allows registering device memory (DM) as an MR for
      local and remote access.
      Signed-off-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      6c29f57e
    • A
      net/mlx5: Mkey creation command adjustments · cdbd0d2b
      Ariel Levkovich 提交于
      This change updates the mlx5 interface to create mkey
      on the device.
      
      The updates in the command mailbox include increasing the
      access mode type field to 5 bits in order to support additional
      types such as MLX5_MKC_ACCESS_MODE_MEMIC which represents device
      memory access type and will be used when registering MR on allocated
      device memory.
      
      All the places that use the old access mode format are adjusted as
      well.
      Signed-off-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      cdbd0d2b