1. 22 8月, 2019 14 次提交
  2. 21 8月, 2019 26 次提交
    • B
      ice: improve print for VF's when adding/deleting MAC filters · be6f7ef6
      Brett Creeley 提交于
      When we fail to add/delete MAC filters in the VF, the print doesn't
      distinguish between the two. Fix that by printing whether or not we
      failed to add/delete the MAC filter respectively.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      be6f7ef6
    • P
      ice: Change type for queue counts · cbfe31b5
      Pawel Kaminski 提交于
      These queue variables are being assigned values that are type u16.
      Change the local variables to match these types. Since these
      represent queue counts, they should never be negative.
      Signed-off-by: NPawel Kaminski <pawel.kaminski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cbfe31b5
    • A
      ice: Move VF resources definition to SR-IOV specific file · c275684b
      Akeem G Abodunrin 提交于
      In order to use some of the VF resources definition in the SR-IOV specific
      virtchnl header file, this patch moves applicable code to
      ice_virtchnl_pf.h file accordingly... and they should have been defined in
      the destination file originally.
      Signed-off-by: NAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c275684b
    • B
      ice: Increase size of Mailbox receive queue for many VFs · 11836214
      Brett Creeley 提交于
      Currently we use the ICE_MBXQ_LEN for both the Mailbox send and receive
      queues that are used to communicate with VFs. This is fine for the send
      queue because the PF driver will lock the queue for every single send,
      but for the Mailbox receive queue every VF is posting to its Mailbox
      send queue and the hardware is then handing the message to the PF on its
      Mailbox receive queue. This becomes a problem with many VFs because it
      seems to overburden the Mailbox receive queue on the PF. Fix this by
      increasing the Mailbox receive queue for the PF to 512 entries.
      
      The number 512 was determined based on the number of VFs supported by
      the device. We can have a total of 256 VFs so in the worst case this
      allows the VFs to put 2 messages in the PFs Mailbox receive queue at the
      same time.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      11836214
    • B
      ice: Reduce wait times during VF bringup/reset · 60d628ea
      Brett Creeley 提交于
      Currently there are a couple places where the VF is waiting too long when
      checking the status of registers. This is causing the AVF driver to
      spin for longer than necessary in the __IAVF_STARTUP state. Sometimes
      it causes the AVF to go into the __IAVF_COMM_FAILED, which may retrigger
      the __IAVF_STARTUP state. Try to reduce the chance of this happening by
      removing unnecessary wait times in VF bringup/resets.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      60d628ea
    • P
      ice: update GLINT_DYN_CTL and GLINT_VECT2FUNC register access · 1337175d
      Paul Greenwalt 提交于
      Register access for GLINT_DYN_CTL and GLINT_VECT2FUNC should be within
      the PF space and not the absolute device space.
      Signed-off-by: NPaul Greenwalt <paul.greenwalt@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1337175d
    • T
      ice: Do not always bring up PF VSI in ice_ena_vsi() · e6c45149
      Tony Nguyen 提交于
      During rebuild ice_ena_vsi() is called to recover the VSI state.
      This function assumes the PF VSI is always to be enabled, however,
      it's possible that during reset/rebuild the interface can be
      brought down.  If this occurs, we can attempt to bring up the PF
      VSI on a downed interface which can lead to various crashes. If
      the interface is not running, do not bring up the associated VSI.
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e6c45149
    • M
      ice: allow empty Rx descriptors · ac6f733a
      Mitch Williams 提交于
      In some circumstances, the hardware will hand us a receive descriptor
      which has no data attached, but is otherwise valid. The receive code was
      improperly ignoring these descriptors, which result in an infinite loop.
      
      To fix this, change the receive code to process all descriptors,
      regardless of the size of the associated data. Add checks to the
      memory-handling functions to allow for zero size.
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ac6f733a
    • U
      ice: Fix kernel hang with DCB reset in CEE mode · 7829570e
      Usha Ketineni 提交于
      This patch fixes the set local MIB AQ call failures in the DCB rebuild path
      by setting the defaults for the ETS recommended DCB configuration. Also,
      willing bits for the DCB configuration needs to be set correctly. Resets
      works fine in IEEE mode as the ETS recommended DCB configuration is
      populated but not in CEE mode.
      Without this patch, PFR causes the kernel hang in CEE mode.
      Signed-off-by: NUsha Ketineni <usha.k.ketineni@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7829570e
    • B
      ice: Set WB_ON_ITR when we don't re-enable interrupts · 2ab28bb0
      Brett Creeley 提交于
      Currently when busy polling is enabled we aren't setting/enabling
      WB_ON_ITR in the driver. This doesn't break the driver, but it does
      cause issues. If we don't enable WB_ON_ITR mode we will still get
      write-backs from hardware during polling when a cache line has been
      filled, but if a cache line is not filled we will not get the
      write-back because WB_ON_ITR is not set. Fix this by enabling
      WB_ON_ITR in the driver when interrupts are disabled.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2ab28bb0
    • P
      ice: fix set pause param autoneg check · f1a4a66d
      Paul Greenwalt 提交于
      When ETHTOOL_GLINKSETTINGS is defined get pause param pause->autoneg
      reports SW configured setting, however when not defined get pause param
      pause->autoneg reports the link status. Set pause param needs to compare
      pause->autoneg with the same source as get pause param to block the user
      from changing autoneg with the set pause param option, or the user
      may be incorrectly blocked from changing Rx|Tx pause settings.
      Signed-off-by: NPaul Greenwalt <paul.greenwalt@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f1a4a66d
    • 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
    • A
      net/mlx5e: Change naming convention for reporter's functions · 06293ae4
      Aya Levin 提交于
      Change from mlx5e_tx_reporter_* to mlx5e_reporter_tx_*. In the following
      patches in the set rx reporter is added, the new naming convention is
      more uniformed.
      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>
      06293ae4
    • A
      net/mlx5e: Rename reporter header file · 4edc17fd
      Aya Levin 提交于
      Rename reporter.h -> health.h so patches in the set can use it for
      health related functionality.
      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>
      4edc17fd