1. 19 4月, 2020 5 次提交
  2. 28 3月, 2020 1 次提交
  3. 27 3月, 2020 5 次提交
  4. 25 3月, 2020 4 次提交
  5. 13 3月, 2020 13 次提交
  6. 11 3月, 2020 3 次提交
    • A
      IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads · 41e684ef
      Alex Vesker 提交于
      Until now the flex parser capability was used in ib_query_device() to
      indicate tunnel_offloads_caps support for mpls_over_gre/mpls_over_udp.
      
      Newer devices and firmware will have configurations with the flexparser
      but without mpls support.
      
      Testing for the flex parser capability was a mistake, the tunnel_stateless
      capability was intended for detecting mpls and was introduced at the same
      time as the flex parser capability.
      
      Otherwise userspace will be incorrectly informed that a future device
      supports MPLS when it does not.
      
      Link: https://lore.kernel.org/r/20200305123841.196086-1-leon@kernel.org
      Cc: <stable@vger.kernel.org> # 4.17
      Fixes: e818e255 ("IB/mlx5: Expose MPLS related tunneling offloads")
      Signed-off-by: NAlex Vesker <valex@mellanox.com>
      Reviewed-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      41e684ef
    • E
      RDMA/mlx5: Remove duplicate definitions of SW_ICM macros · 0897f301
      Erez Shitrit 提交于
      Those macros are already defined in include/linux/mlx5/driver.h, so delete
      their duplicate variants.
      
      Link: https://lore.kernel.org/r/20200310075706.238592-1-leon@kernel.orgSigned-off-by: NAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: NYevgeny Kliteynik <kliteyn@mellanox.com>
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Reviewed-by: NAlex Vesker <valex@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      0897f301
    • M
      RDMA/mlx5: Fix the number of hwcounters of a dynamic counter · ec16b6bb
      Mark Zhang 提交于
      When we read the global counter and there's any dynamic counter allocated,
      the value of a hwcounter is the sum of the default counter and all dynamic
      counters. So the number of hwcounters of a dynamically allocated counter
      must be same as of the default counter, otherwise there will be read
      violations.
      
      This fixes the KASAN slab-out-of-bounds bug:
      
        BUG: KASAN: slab-out-of-bounds in rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core]
        Read of size 8 at addr ffff8884192a5778 by task rdma/10138
      
        CPU: 7 PID: 10138 Comm: rdma Not tainted 5.5.0-for-upstream-dbg-2020-02-06_18-30-19-27 #1
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
        Call Trace:
         dump_stack+0xb7/0x10b
         print_address_description.constprop.4+0x1e2/0x400
         ? rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core]
         __kasan_report+0x15c/0x1e0
         ? mlx5_ib_query_q_counters+0x13f/0x270 [mlx5_ib]
         ? rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core]
         kasan_report+0xe/0x20
         rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core]
         ? rdma_counter_query_stats+0xd0/0xd0 [ib_core]
         ? memcpy+0x34/0x50
         ? nla_put+0xe2/0x170
         nldev_stat_get_doit+0x9c7/0x14f0 [ib_core]
         ...
         do_syscall_64+0x95/0x490
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
        RIP: 0033:0x7fcc457fe65a
        Code: bb 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 8b 05 fa f1 2b 00 45 89 c9 4c 63 d1 48 63 ff 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 f3 c3 0f 1f 40 00 41 55 41 54 4d 89 c5 55
        RSP: 002b:00007ffc0586f868 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
        RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcc457fe65a
        RDX: 0000000000000020 RSI: 00000000013db920 RDI: 0000000000000003
        RBP: 00007ffc0586fa90 R08: 00007fcc45ac10e0 R09: 000000000000000c
        R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004089c0
        R13: 0000000000000000 R14: 00007ffc0586fab0 R15: 00000000013dc9a0
      
        Allocated by task 9700:
         save_stack+0x19/0x80
         __kasan_kmalloc.constprop.7+0xa0/0xd0
         mlx5_ib_counter_alloc_stats+0xd1/0x1d0 [mlx5_ib]
         rdma_counter_alloc+0x16d/0x3f0 [ib_core]
         rdma_counter_bind_qpn_alloc+0x216/0x4e0 [ib_core]
         nldev_stat_set_doit+0x8c2/0xb10 [ib_core]
         rdma_nl_rcv_msg+0x3d2/0x730 [ib_core]
         rdma_nl_rcv+0x2a8/0x400 [ib_core]
         netlink_unicast+0x448/0x620
         netlink_sendmsg+0x731/0xd10
         sock_sendmsg+0xb1/0xf0
         __sys_sendto+0x25d/0x2c0
         __x64_sys_sendto+0xdd/0x1b0
         do_syscall_64+0x95/0x490
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 18d422ce ("IB/mlx5: Add counter_alloc_stats() and counter_update_stats() support")
      Link: https://lore.kernel.org/r/20200305124052.196688-1-leon@kernel.orgSigned-off-by: NMark Zhang <markz@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      ec16b6bb
  7. 10 3月, 2020 1 次提交
  8. 05 3月, 2020 5 次提交
  9. 02 3月, 2020 1 次提交
  10. 20 2月, 2020 1 次提交
    • P
      net/mlx5: E-Switch, Move source port on reg_c0 to the upper 16 bits · 0f0d3827
      Paul Blakey 提交于
      Multi chain support requires the miss path to continue the processing
      from the last chain id, and for that we need to save the chain
      miss tag (a mapping for 32bit chain id) on reg_c0 which will
      come in a next patch.
      
      Currently reg_c0 is exclusively used to store the source port
      metadata, giving it 32bit, it is created from 16bits of vcha_id,
      and 16bits of vport number.
      
      We will move this source port metadata to upper 16bits, and leave the
      lower bits for the chain miss tag. We compress the reg_c0 source port
      metadata to 16bits by taking 8 bits from vhca_id, and 8bits from
      the vport number.
      
      Since we compress the vport number to 8bits statically, and leave two
      top ids for special PF/ECPF numbers, we will only support a max of 254
      vports with this strategy.
      Signed-off-by: NPaul Blakey <paulb@mellanox.com>
      Reviewed-by: NOz Shlomo <ozsh@mellanox.com>
      Reviewed-by: NMark Bloch <markb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      0f0d3827
  11. 15 2月, 2020 1 次提交