1. 29 8月, 2019 1 次提交
  2. 27 8月, 2019 1 次提交
  3. 24 8月, 2019 1 次提交
  4. 23 8月, 2019 4 次提交
  5. 22 8月, 2019 20 次提交
  6. 21 8月, 2019 13 次提交
    • G
      net/mlx5: Fix the order of fc_stats cleanup · b1b9f97a
      Gavi Teitz 提交于
      Previously, mlx5_cleanup_fc_stats() would cleanup the flow counter
      pool beofre releasing all the counters to it, which would result in
      flow counter bulks not getting freed. Resolve this by changing the
      order in which elements of fc_stats are cleaned up, so that the flow
      counter pool is cleaned up after all the counters are released.
      
      Also move cleanup actions for freeing the bulk query memory and
      destroying the idr to the end of mlx5_cleanup_fc_stats().
      Signed-off-by: NGavi Teitz <gavi@mellanox.com>
      Reviewed-by: NRoi Dayan <roid@mellanox.com>
      Reviewed-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      b1b9f97a
    • V
      net/mlx5e: Fix deallocation of non-fully init encap entries · 3c140dd5
      Vlad Buslov 提交于
      Recent rtnl lock dependency refactoring changed encap entry attach code to
      insert encap entry to hash table before it was fully initialized in order
      to allow concurrent tc users to wait on completion for encap entry to
      finish initialization. That change required all the users of encap entry to
      obtain reference to it first and for caller that creates encap to put
      reference to it on error, instead of freeing the entry memory directly.
      However, releasing reference to such encap entry that wasn't fully
      initialized causes NULL pointer dereference in
      mlx5e_rep_encap_entry_detach() which expects e->out_dev to be set and encap
      to be attached to nhe:
      
      [ 1092.454517] BUG: unable to handle page fault for address: 00000000000420e8
      [ 1092.454571] #PF: supervisor read access in kernel mode
      [ 1092.454602] #PF: error_code(0x0000) - not-present page
      [ 1092.454632] PGD 800000083032c067 P4D 800000083032c067 PUD 84107d067 PMD 0
      [ 1092.454673] Oops: 0000 [#1] SMP PTI
      [ 1092.454697] CPU: 20 PID: 22393 Comm: tc Not tainted 5.3.0-rc3+ #589
      [ 1092.454733] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017
      [ 1092.454806] RIP: 0010:mlx5e_rep_encap_entry_detach+0x1c/0x630 [mlx5_core]
      [ 1092.454845] Code: be f4 ff ff ff e9 11 ff ff ff 0f 1f 40 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 49 89 fc 53 48 89 f3 48 83 ec 30 <48> 8b 87 28 16 04 00 48 89 f7 48 05 d0 03 00 00 48 89
       45 c8 e8 cb
      [ 1092.454942] RSP: 0018:ffffb6f08421f5a0 EFLAGS: 00010286
      [ 1092.454974] RAX: 0000000000000000 RBX: ffff8ab668644e00 RCX: ffffb6f08421f56c
      [ 1092.455013] RDX: ffff8ab668644e40 RSI: ffff8ab668644e00 RDI: 0000000000000ac0
      [ 1092.455053] RBP: ffffb6f08421f5f8 R08: 0000000000000001 R09: 0000000000000000
      [ 1092.455092] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000ac0
      [ 1092.455131] R13: 00000000ffffff9b R14: ffff8ab63f200ac0 R15: ffff8ab668644e40
      [ 1092.455171] FS:  00007fa195bdc480(0000) GS:ffff8ab66fa00000(0000) knlGS:0000000000000000
      [ 1092.455216] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1092.455249] CR2: 00000000000420e8 CR3: 0000000867522001 CR4: 00000000001606e0
      [ 1092.455288] Call Trace:
      [ 1092.455315]  ? __mutex_unlock_slowpath+0x4d/0x2a0
      [ 1092.455365]  mlx5e_encap_dealloc.isra.0+0x31/0x60 [mlx5_core]
      [ 1092.455424]  mlx5e_tc_add_fdb_flow+0x596/0x750 [mlx5_core]
      [ 1092.455484]  __mlx5e_add_fdb_flow+0x152/0x210 [mlx5_core]
      [ 1092.455534]  mlx5e_configure_flower+0x4d5/0xe30 [mlx5_core]
      [ 1092.455574]  tc_setup_cb_call+0x67/0xb0
      [ 1092.455601]  fl_hw_replace_filter+0x142/0x300 [cls_flower]
      [ 1092.455639]  fl_change+0xd24/0x1bdb [cls_flower]
      [ 1092.455675]  tc_new_tfilter+0x3e0/0x970
      [ 1092.455709]  ? tc_del_tfilter+0x720/0x720
      [ 1092.455735]  rtnetlink_rcv_msg+0x389/0x4b0
      [ 1092.455763]  ? netlink_deliver_tap+0x95/0x400
      [ 1092.455791]  ? rtnl_dellink+0x2d0/0x2d0
      [ 1092.455817]  netlink_rcv_skb+0x49/0x110
      [ 1092.455844]  netlink_unicast+0x171/0x200
      [ 1092.455872]  netlink_sendmsg+0x224/0x3f0
      [ 1092.455901]  sock_sendmsg+0x5e/0x60
      [ 1092.455924]  ___sys_sendmsg+0x2ae/0x330
      [ 1092.455950]  ? task_work_add+0x43/0x50
      [ 1092.455976]  ? fput_many+0x45/0x80
      [ 1092.456004]  ? __lock_acquire+0x248/0x18e0
      [ 1092.456033]  ? find_held_lock+0x2b/0x80
      [ 1092.456058]  ? task_work_run+0x7b/0xd0
      [ 1092.456085]  __sys_sendmsg+0x59/0xa0
      [ 1092.457013]  do_syscall_64+0x5c/0xb0
      [ 1092.457924]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      [ 1092.458842] RIP: 0033:0x7fa195da27b8
      [ 1092.459918] Code: 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 65 8f 0c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83
       ec 28 89 54
      [ 1092.462634] RSP: 002b:00007fff94409298 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      [ 1092.464011] RAX: ffffffffffffffda RBX: 000000005d515b0e RCX: 00007fa195da27b8
      [ 1092.465391] RDX: 0000000000000000 RSI: 00007fff94409300 RDI: 0000000000000003
      [ 1092.466761] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006
      [ 1092.468121] R10: 0000000000404ec2 R11: 0000000000000246 R12: 0000000000000001
      [ 1092.469456] R13: 0000000000480640 R14: 0000000000000016 R15: 0000000000000001
      [ 1092.470766] Modules linked in: act_mirred act_tunnel_key cls_flower dummy vxlan ip6_udp_tunnel udp_tunnel sch_ingress nfsv3 nfs_acl nfs lockd grace fscache tun bridge stp llc sunrpc rdma_ucm rdma_cm
      iw_cm ib_cm mlx5_ib ib_uverbs ib_core intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp mlx5_core kvm_intel kvm irqbypass crct10dif_pclmul mei_me crc32_pclmul crc32
      c_intel igb iTCO_wdt ghash_clmulni_intel ses mlxfw intel_cstate iTCO_vendor_support ptp intel_uncore lpc_ich pps_core mei i2c_i801 joydev intel_rapl_perf ioatdma enclosure ipmi_ssif pcspkr dca wmi ipmi_
      si ipmi_devintf ipmi_msghandler acpi_pad acpi_power_meter ast i2c_algo_bit drm_vram_helper ttm drm_kms_helper drm mpt3sas raid_class scsi_transport_sas
      [ 1092.479618] CR2: 00000000000420e8
      [ 1092.481214] ---[ end trace ce2e0f4d9a67f604 ]---
      
      To fix the issue, set e->compl_result to positive value after encap was
      initialized successfully. Check e->compl_result value in
      mlx5e_encap_dealloc() and only detach and dealloc encap if the value is
      positive.
      
      Fixes: d589e785 ("net/mlx5e: Allow concurrent creation of encap entries")
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      3c140dd5
    • A
      net/mlx5e: Report and recover from CQE with error on RQ · 8276ea13
      Aya Levin 提交于
      Add support for report and recovery from error on completion on RQ by
      setting the queue back to ready state. Handle only errors with a
      syndrome indicating the RQ might enter error state and could be
      recovered.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      8276ea13
    • S
      net/mlx5e: RX, Handle CQE with error at the earliest stage · 0a35ab3e
      Saeed Mahameed 提交于
      Just to be aligned with the MPWQE handlers, handle RX WQE with error
      for legacy RQs in the top RX handlers, just before calling skb_from_cqe().
      
      CQE error handling will now be called at the same stage regardless of
      the RQ type or netdev mode NIC, Representor, IPoIB, etc ..
      
      This will be useful for down stream patch to improve error CQE
      handling.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      0a35ab3e
    • A
      net/mlx5e: Report and recover from rx timeout · 32c57fb2
      Aya Levin 提交于
      Add support for report and recovery from rx timeout. On driver open we
      post NOP work request on the rx channels to trigger napi in order to
      fillup the rx rings. In case napi wasn't scheduled due to a lost
      interrupt, perform EQ recovery.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      32c57fb2
    • A
      net/mlx5e: Report and recover from CQE error on ICOSQ · be5323c8
      Aya Levin 提交于
      Add support for report and recovery from error on completion on ICOSQ.
      Deactivate RQ and flush, then deactivate ICOSQ. Set the queue back to
      ready state (firmware) and reset the ICOSQ and the RQ (software
      resources). Finally, activate the ICOSQ and the RQ.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      be5323c8
    • A
      net/mlx5e: Split open/close ICOSQ into stages · 9d18b514
      Aya Levin 提交于
      Align ICOSQ open/close behaviour with RQ and SQ. Split open flow into
      open and activate where open handles creation and activate enables the
      queue. Do a symmetric thing in close flow: split into close and
      deactivate.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      9d18b514
    • A
      net/mlx5e: Add support to rx reporter diagnose · 9032e719
      Aya Levin 提交于
      Add rx reporter, which supports diagnose call-back. Diagnostics output
      include: information common to all RQs: RQ type, RQ size, RQ stride
      size, CQ size and CQ stride size. In addition advertise information per
      RQ and its related icosq and attached CQ.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
       Common config:
         RQ:
           type: 2 stride size: 2048 size: 8
         CQ:
           stride size: 64 size: 1024
       RQs:
         channel ix: 0 rqn: 4308 HW state: 1 SW state: 3 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
           cqn: 1032 HW status: 0
         channel ix: 1 rqn: 4313 HW state: 1 SW state: 3 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
           cqn: 1036 HW status: 0
         channel ix: 2 rqn: 4318 HW state: 1 SW state: 3 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
           cqn: 1040 HW status: 0
         channel ix: 3 rqn: 4323 HW state: 1 SW state: 3 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
           cqn: 1044 HW status: 0
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx -jp
      {
          "Common config": {
              "RQ": {
                  "type": 2,
                  "stride size": 2048,
                  "size": 8
              },
              "CQ": {
                  "stride size": 64,
                  "size": 1024
              }
          },
          "RQs": [ {
                  "channel ix": 0,
                  "rqn": 4308,
                  "HW state": 1,
                  "SW state": 3,
                  "posted WQEs": 7,
                  "cc": 7,
                  "ICOSQ HW state": 1,
                  "CQ": {
                      "cqn": 1032,
                      "HW status": 0
                  }
              },{
                  "channel ix": 1,
                  "rqn": 4313,
                  "HW state": 1,
                  "SW state": 3,
                  "posted WQEs": 7,
                  "cc": 7,
                  "ICOSQ HW state": 1,
                  "CQ": {
                      "cqn": 1036,
                      "HW status": 0
                  }
              },{
                  "channel ix": 2,
                  "rqn": 4318,
                  "HW state": 1,
                  "SW state": 3,
                  "posted WQEs": 7,
                  "cc": 7,
                  "ICOSQ HW state": 1,
                  "CQ": {
                      "cqn": 1040,
                      "HW status": 0
                  }
              },{
                  "channel ix": 3,
                  "rqn": 4323,
                  "HW state": 1,
                  "SW state": 3,
                  "posted WQEs": 7,
                  "cc": 7,
                  "ICOSQ HW state": 1,
                  "CQ": {
                      "cqn": 1044,
                      "HW status": 0
                  }
              } ]
      }
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      9032e719
    • A
      net/mlx5e: Add helper functions for reporter's basics · 11af6a6d
      Aya Levin 提交于
      Introduce helper functions for create and destroy reporters and update
      channels. In the following patch, rx reporter is added and it will use
      these helpers too.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      11af6a6d
    • A
      net/mlx5e: Add cq info to tx reporter diagnose · 2bf09e60
      Aya Levin 提交于
      Add cq information to general diagnose output: CQ size and stride size.
      Per SQ add information about the related CQ: cqn and CQ's HW status.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
       Common Config:
         SQ:
           stride size: 64 size: 1024
         CQ:
           stride size: 64 size: 1024
       SQs:
         channel ix: 0 tc: 0 txq ix: 0 sqn: 4307 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1030 HW status: 0
         channel ix: 1 tc: 0 txq ix: 1 sqn: 4312 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1034 HW status: 0
         channel ix: 2 tc: 0 txq ix: 2 sqn: 4317 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1038 HW status: 0
         channel ix: 3 tc: 0 txq ix: 3 sqn: 4322 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1042 HW status: 0
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx -jp
      {
          "Common Config": {
              "SQ": {
                  "stride size": 64,
                  "size": 1024
              },
              "CQ": {
                  "stride size": 64,
                  "size": 1024
              }
          },
          "SQs": [ {
                  "channel ix": 0,
                  "tc": 0,
                  "txq ix": 0,
                  "sqn": 4307,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0,
                  "CQ": {
                      "cqn": 1030,
                      "HW status": 0
                  }
              },{
                  "channel ix": 1,
                  "tc": 0,
                  "txq ix": 1,
                  "sqn": 4312,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0,
                  "CQ": {
                      "cqn": 1034,
                      "HW status": 0
                  }
              },{
                  "channel ix": 2,
                  "tc": 0,
                  "txq ix": 2,
                  "sqn": 4317,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0,
                  "CQ": {
                      "cqn": 1038,
                      "HW status": 0
                  }
              },{
                  "channel ix": 3,
                  "tc": 0,
                  "txq ix": 3,
                  "sqn": 4322,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0,
                  "CQ": {
                      "cqn": 1042,
                      "HW status": 0
              } ]
      }
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      2bf09e60
    • A
      net/mlx5e: Extend tx reporter diagnostics output · 2d708887
      Aya Levin 提交于
      Enhance tx reporter's diagnostics output to include: information common
      to all SQs: SQ size, SQ stride size.
      In addition add channel ix, tc, txq ix, cc and pc.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
       Common config:
         SQ:
           stride size: 64 size: 1024
       SQs:
         channel ix: 0 tc: 0 txq ix: 0 sqn: 4307 HW state: 1 stopped: false cc: 0 pc: 0
         channel ix: 1 tc: 0 txq ix: 1 sqn: 4312 HW state: 1 stopped: false cc: 0 pc: 0
         channel ix: 2 tc: 0 txq ix: 2 sqn: 4317 HW state: 1 stopped: false cc: 0 pc: 0
         channel ix: 3 tc: 0 txq ix: 3 sqn: 4322 HW state: 1 stopped: false cc: 0 pc: 0
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx -jp
      {
          "Common config": {
              "SQ": {
                  "stride size": 64,
                  "size": 1024
              }
          },
          "SQs": [ {
                  "channel ix": 0,
                  "tc": 0,
                  "txq ix": 0,
                  "sqn": 4307,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0
              },{
                  "channel ix": 1,
                  "tc": 0,
                  "txq ix": 1,
                  "sqn": 4312,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0
              },{
                  "channel ix": 2,
                  "tc": 0,
                  "txq ix": 2,
                  "sqn": 4317,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0
              },{
                  "channel ix": 3,
                  "tc": 0,
                  "txq ix": 3,
                  "sqn": 4322,
                  "HW state": 1,
                  "stopped": false,
                  "cc": 0,
                  "pc": 0
               } ]
      }
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      2d708887
    • A
      net/mlx5e: Extend tx diagnose function · dd921fd2
      Aya Levin 提交于
      The following patches in the set enhance the diagnostics info of tx
      reporter. Therefore, it is better to pass a pointer to the SQ for
      further data extraction.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      dd921fd2
    • A
      net/mlx5e: Generalize tx reporter's functionality · c50de4af
      Aya Levin 提交于
      Prepare for code sharing with rx reporter, which is added in the
      following patches in the set. Introduce a generic error_ctx for
      agnostic recovery despatch.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      c50de4af