• Aya Levin's avatar
    net/mlx5e: Add support to rx reporter diagnose · 9032e719
    Aya Levin authored
    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: default avatarAya Levin <ayal@mellanox.com>
    Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    9032e719
health.c 4.21 KB