List comments

GET /api/patches/74590/comments/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 116735,
        "web_url": "https://patches.dpdk.org/comment/116735/",
        "msgid": "<AM6PR04MB4456F3B71DC0F9476BFC173689730@AM6PR04MB4456.eurprd04.prod.outlook.com>",
        "date": "2020-07-28T07:22:24",
        "subject": "Re: [dpdk-dev] [PATCH v4 4/8] app/proc-info: add more info to\n\tshow_ports",
        "submitter": {
            "id": 1615,
            "url": "https://patches.dpdk.org/api/people/1615/",
            "name": "Hemant Agrawal",
            "email": "hemant.agrawal@oss.nxp.com"
        },
        "content": "Will you please also print queue mempool info\n+                               printf(\"\\t  -- mempool name: %s\\n\",\n+                                       (queue_info.mp == NULL) ?\n+                                       \"NULL\" : queue_info.mp->name);\n\n-----Original Message-----\nFrom: Stephen Hemminger <stephen@networkplumber.org> \nSent: Tuesday, July 21, 2020 11:53 PM\nTo: dev@dpdk.org\nCc: Stephen Hemminger <stephen@networkplumber.org>; Hemant Agrawal <hemant.agrawal@nxp.com>\nSubject: [PATCH v4 4/8] app/proc-info: add more info to show_ports\n\nRevise the display of port information to include more data and be more human friendly.\n\n  * Display units for port speed, and decode link fields.\n  * Show driver and device information\n  * Show MAC address\n  * Show flow control information\n  * Combine lines if possible\n  * Show all multicast mode\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n app/proc-info/main.c | 88 ++++++++++++++++++++++++++++++++++++--------\n 1 file changed, 72 insertions(+), 16 deletions(-)\n\ndiff --git a/app/proc-info/main.c b/app/proc-info/main.c index e4914191bef9..7c1276b7fbc1 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -669,6 +669,8 @@ show_port(void)\n \t\tstruct rte_eth_dev_info dev_info;\n \t\tstruct rte_eth_rxq_info queue_info;\n \t\tstruct rte_eth_rss_conf rss_conf;\n+\t\tstruct rte_eth_fc_conf fc_conf;\n+\t\tstruct rte_ether_addr mac;\n \n \t\tmemset(&rss_conf, 0, sizeof(rss_conf));\n \n@@ -676,32 +678,86 @@ show_port(void)\n \t\tSTATS_BDR_STR(5, bdr_str);\n \t\tprintf(\"  - generic config\\n\");\n \n-\t\tprintf(\"\\t  -- Socket %d\\n\", rte_eth_dev_socket_id(i));\n+\t\tret = rte_eth_dev_info_get(i, &dev_info);\n+\t\tif (ret != 0) {\n+\t\t\tprintf(\"Error during getting device info: %s\\n\",\n+\t\t\t\tstrerror(-ret));\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tprintf(\"\\t  -- driver %s device %s socket %d\\n\",\n+\t\t       dev_info.driver_name, dev_info.device->name,\n+\t\t       rte_eth_dev_socket_id(i));\n+\n \t\tret = rte_eth_link_get(i, &link);\n \t\tif (ret < 0) {\n \t\t\tprintf(\"Link get failed (port %u): %s\\n\",\n \t\t\t       i, rte_strerror(-ret));\n \t\t} else {\n-\t\t\tprintf(\"\\t  -- link speed %d duplex %d,\"\n-\t\t\t\t\t\" auto neg %d status %d\\n\",\n-\t\t\t\t\tlink.link_speed,\n-\t\t\t\t\tlink.link_duplex,\n-\t\t\t\t\tlink.link_autoneg,\n-\t\t\t\t\tlink.link_status);\n+\t\t\tuint32_t speed = link.link_speed;\n+\t\t\tchar suffix = 'M';\n+\t\t\tconst char *duplex, *autoneg, *status;\n+\n+\t\t\tif (speed > 1000) {\n+\t\t\t\tsuffix = 'G';\n+\t\t\t\tspeed /= 1000;\n+\t\t\t}\n+\n+\t\t\tif (link.link_duplex == ETH_LINK_FULL_DUPLEX)\n+\t\t\t\tduplex = \"full\";\n+\t\t\telse\n+\t\t\t\tduplex = \"half\";\n+\n+\t\t\tif (link.link_autoneg == ETH_LINK_AUTONEG)\n+\t\t\t\tautoneg = \"auto neg\";\n+\t\t\telse\n+\t\t\t\tautoneg = \"fixed\";\n+\n+\t\t\tif (link.link_status == ETH_LINK_UP)\n+\t\t\t\tstatus = \"up\";\n+\t\t\telse\n+\t\t\t\tstatus = \"down\";\n+\n+\t\t\tprintf(\"\\t  -- link speed %u%cbps (%s), duplex %s, %s\\n\",\n+\t\t\t       speed, suffix, autoneg, duplex, status);\n+\t\t}\n+\n+\t\tret = rte_eth_dev_flow_ctrl_get(i, &fc_conf);\n+\t\tif (ret == 0 && fc_conf.mode != RTE_FC_NONE)  {\n+\t\t\tprintf(\"\\t  -- flow control mode %s%s high %u low %u pause %u%s%s\\n\",\n+\t\t\t       fc_conf.mode == RTE_FC_RX_PAUSE ? \"rx \" :\n+\t\t\t       fc_conf.mode == RTE_FC_TX_PAUSE ? \"tx \" :\n+\t\t\t       fc_conf.mode == RTE_FC_FULL ? \"full\" : \"???\",\n+\t\t\t       fc_conf.autoneg ? \" auto\" : \"\",\n+\t\t\t       fc_conf.high_water,\n+\t\t\t       fc_conf.low_water,\n+\t\t\t       fc_conf.pause_time,\n+\t\t\t       fc_conf.send_xon ? \" xon\" : \"\",\n+\t\t\t       fc_conf.mac_ctrl_frame_fwd ? \" mac_ctrl\" : \"\");\n \t\t}\n-\t\tprintf(\"\\t  -- promiscuous (%d)\\n\",\n-\t\t\t\trte_eth_promiscuous_get(i));\n+\n+\t\tret = rte_eth_macaddr_get(i, &mac);\n+\t\tif (ret == 0) {\n+\t\t\tchar ebuf[RTE_ETHER_ADDR_FMT_SIZE];\n+\t\t\trte_ether_format_addr(ebuf, sizeof(ebuf), &mac);\n+\t\t\tprintf(\"\\t  -- mac %s\\n\", ebuf);\n+\t\t}\n+\n+\n+\t\tret = rte_eth_promiscuous_get(i);\n+\t\tif (ret >= 0)\n+\t\t\tprintf(\"\\t  -- promiscuous mode %s\\n\",\n+\t\t\t       ret > 0 ? \"enabled\" : \"disabled\");\n+\n+\t\tret = rte_eth_allmulticast_get(i);\n+\t\tif (ret >= 0)\n+\t\t\tprintf(\"\\t  -- all multicast mode %s\\n\",\n+\t\t\t       ret > 0 ? \"enabled\" : \"disabled\");\n+\n \t\tret = rte_eth_dev_get_mtu(i, &mtu);\n \t\tif (ret == 0)\n \t\t\tprintf(\"\\t  -- mtu (%d)\\n\", mtu);\n \n-\t\tret = rte_eth_dev_info_get(i, &dev_info);\n-\t\tif (ret != 0) {\n-\t\t\tprintf(\"Error during getting device (port %u) info: %s\\n\",\n-\t\t\t\ti, strerror(-ret));\n-\t\t\treturn;\n-\t\t}\n-\n \t\tprintf(\"  - queue\\n\");\n \t\tfor (j = 0; j < dev_info.nb_rx_queues; j++) {\n \t\t\tret = rte_eth_rx_queue_info_get(i, j, &queue_info);\n--\n2.27.0",
        "headers": {
            "Accept-Language": "en-US",
            "X-Mailman-Version": "2.1.15",
            "x-ms-oob-tlc-oobclassifiers": "OLM:168;",
            "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM6PR0402MB3782",
            "authentication-results": "networkplumber.org; dkim=none (message not signed)\n header.d=none;networkplumber.org; dmarc=none action=none\n header.from=oss.nxp.com;",
            "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED",
            "Precedence": "list",
            "List-Post": "<mailto:dev@dpdk.org>",
            "x-ms-exchange-senderadcheck": "1",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "Subject": "Re: [dpdk-dev] [PATCH v4 4/8] app/proc-info: add more info to\n\tshow_ports",
            "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Delivered-To": "patchwork@inbox.dpdk.org",
            "Received": [
                "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1B82EA0521;\n\tTue, 28 Jul 2020 09:22:27 +0200 (CEST)",
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 77AEC1C0CE;\n\tTue, 28 Jul 2020 09:22:26 +0200 (CEST)",
                "from EUR04-DB3-obe.outbound.protection.outlook.com\n (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43])\n by dpdk.org (Postfix) with ESMTP id EE0A71C0CA\n for <dev@dpdk.org>; Tue, 28 Jul 2020 09:22:25 +0200 (CEST)",
                "from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25)\n by AM6PR0402MB3782.eurprd04.prod.outlook.com (2603:10a6:209:1a::25)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Tue, 28 Jul\n 2020 07:22:24 +0000",
                "from AM6PR04MB4456.eurprd04.prod.outlook.com\n ([fe80::50d:1b5:ef9f:655c]) by AM6PR04MB4456.eurprd04.prod.outlook.com\n ([fe80::50d:1b5:ef9f:655c%7]) with mapi id 15.20.3216.033; Tue, 28 Jul 2020\n 07:22:24 +0000"
            ],
            "x-originating-ip": "[182.69.57.113]",
            "x-microsoft-antispam": "BCL:0;",
            "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=RwUVh5CBPOX+cj3JylhcTySMVRydGxzIRnCndITVUk0cU8aRQGyhLwTn6p1usqV2Vdh22hO0wIER8gtW4QalIE4a9tXmNcb9C3ByXMnKv3A4zAiCvyzI1XRc9U83F1tOBvcPGkmONWsn2c5sCkvqf1D2TqdSSp2bvS2Nzbhh/KRKykoBwT1CLTW3kYJ6jHTt/h5xa7srZOVmQZqc8k/qZfgMt/UupcB2RwiZUhmsirGbFXTJEz6dM0zeWBVBdPPP/m0Sz5TXcPodBOhZXJkqJm2cP4fOmWY0Ff7InhdFCx+LJVPmgY4BQFRhpMF43eE9152KpQEbLdbac3zoDGfjzQ==",
            "Thread-Index": "AQHWZK/WEYZRJQwF70KoaLFCZiBSoQ==",
            "X-MS-Exchange-CrossTenant-AuthSource": "AM6PR04MB4456.eurprd04.prod.outlook.com",
            "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=DDh7AFU+6+M773U9MvJxfJJ4ZM7gzeyRD/1We9kKOeY=;\n b=TaiMLmFpKUZdZyVQms5OBxK77hRBDT5te5U6qkkn+OXdsYyVT4kMbo0owngc247H7r/viIkqrWQrvo/pLg9ENCf7GUR2wEXh6y+apBkI51Hy9+luQ3au3kvjiyD889igELvt2N6vigUWbnPWgJeoAO2Qc+KzBGQVjLWIGN+XIcEvR0wTEBBx2u48CNPKIxhCDoI9qIJ+WKdHe6sQzYf9W3n4d0uAg3ZYclg6ieZVLK98xs4vFJt7qkiOlDvhNqi0D/fbI5mTKNDJUoq5nrNbGPDZ9mggW1aqdrTkb5dE4xBkTyJa7NirBXUyEXG4YPVglvp+hPiZk+9bHuJjvA/lwQ==",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com;\n s=selector2-NXP1-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=DDh7AFU+6+M773U9MvJxfJJ4ZM7gzeyRD/1We9kKOeY=;\n b=WyreLh95VotUjfMsokbDiV3zJymRqStmqb1AZuaUXG4Ebs3lP5ZdROiMekPVQo4/FpLeYXTRaFNLvpTaQo9mtkryGRMrjU3FzFVXgqiTzBq6oV+zkzjqGDR9ZKyynaxHW2fIyu8mUnwP0HsjitF4GJzHb6z2RI/zA6cWXsa5H/w=",
            "Message-ID": "\n <AM6PR04MB4456F3B71DC0F9476BFC173689730@AM6PR04MB4456.eurprd04.prod.outlook.com>",
            "X-MS-Exchange-CrossTenant-userprincipalname": "\n 3Knh/Ib+xNWEDAeCHmV+nlRxi54r1ZvE+Cf5wMzMN2krJ5vrh2SPbnpQpgZPPiGSmBy8lPEnXSUFbScFS9VdTQ==",
            "To": "Stephen Hemminger <stephen@networkplumber.org>, \"dev@dpdk.org\"\n <dev@dpdk.org>",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
            "From": "\"Hemant Agrawal (OSS)\" <hemant.agrawal@oss.nxp.com>",
            "x-ms-exchange-sharedmailbox-routingagent-processed": "True",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "x-ms-publictraffictype": "Email",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com;\n dkim=pass header.d=oss.nxp.com; arc=none",
            "X-MS-TNEF-Correlator": "",
            "x-ms-exchange-transport-forked": "True",
            "X-OriginatorOrg": "oss.nxp.com",
            "X-MS-Exchange-CrossTenant-originalarrivaltime": "28 Jul 2020 07:22:24.2960 (UTC)",
            "Thread-Topic": "[PATCH v4 4/8] app/proc-info: add more info to show_ports",
            "X-Original-To": "patchwork@inbox.dpdk.org",
            "x-microsoft-antispam-message-info": "\n 6Q2lFaNQMkKVjJCOZSkyT32b9bUfiFg5OOBNam/x9VHQhXT5YSs/nVq3HFbKgRlBp601g+QJ9e6RMQ4SLuwtjHw3CLyjmHIU1Rm2drZqpEwS+Qv6TuMadvpqES0AJhwDQGl7e+PPdbElfE6vsVlTWlow3HW9D77bSlJxTHpuJENc9kuz/FRhRCNlmCm57LmuMFr1lyhReIXxxlIu57Ijt89lNO0VSAdZAryd7NraxRd2DUx7IOmf1ud+LgNiBFHsyFHIv/5NjcUcBT59MpCgbiej/7HlmwR2CoOlgIS8qxIaTWoZG5yDtD7Ivu+CBEN+KWeEVuXSdxv87TYZN3ieRA==",
            "x-ms-office365-filtering-ht": "Tenant",
            "MIME-Version": "1.0",
            "In-Reply-To": "<20200721182242.5366-5-stephen@networkplumber.org>",
            "X-BeenThere": "dev@dpdk.org",
            "References": "<20200506193741.24117-1-stephen@networkplumber.org>\n <20200721182242.5366-1-stephen@networkplumber.org>\n <20200721182242.5366-5-stephen@networkplumber.org>",
            "Content-Type": "text/plain; charset=\"us-ascii\"",
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "X-MS-Exchange-CrossTenant-id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
            "x-ms-office365-filtering-correlation-id": "253b8a8f-2b75-41c5-1ba3-08d832c6f97e",
            "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 253b8a8f-2b75-41c5-1ba3-08d832c6f97e",
            "Date": "Tue, 28 Jul 2020 07:22:24 +0000",
            "Content-Transfer-Encoding": "quoted-printable",
            "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(136003)(366004)(396003)(346002)(39860400002)(376002)(5660300002)(71200400001)(83380400001)(52536014)(86362001)(7696005)(186003)(53546011)(6506007)(8676002)(316002)(110136005)(26005)(8936002)(55016002)(66946007)(76116006)(66446008)(64756008)(66556008)(66476007)(478600001)(9686003)(33656002)(2906002);\n DIR:OUT; SFP:1101;",
            "X-MS-Has-Attach": "",
            "x-ms-exchange-antispam-messagedata": "\n esNAxlbm4pmcl3dHTjH+0Ze3eazGBsvujJHnnKimL1DYk6hRe2aelTWsyab9nq00edGBWMcEmdkIiUHI57vDH88ZKULMXm3q1xJb5bwiRuLz98jxlfJNgSHkDqFJxv1Mp+d6iQA7MieNW0dpP1QUmU77p2YWKnvCtssfy+WlUHj3WzeZGE1yjCaUAuLuS90dkHDnfF9WG+HuOMOSZis4MGMyQ5wEzZqvTub60gQYUAZ+wf9OppzFVnCRyryf2SeSl/AkyrqT9AtzNUqggJY169riSNE42NUSv3ZQNcx26NfhHopbVROGqqnbEEJOEeXd/v1RWl8D6pqRCD8n+uXB70fnFrSFRS76IUE1QS6eBbykiZ3jc+H2COLRs+RmevymkbjLis7tziffTeLhgXxCq3KI+p1P3Vj8/cppfIXRQNGRdUEVwc/+6LxFwkS2j/NZTR0p2Xq5ugxGMTeN6JEwl01o6UH4FoTJ97aHYBHYMjVth3yEE1DTziwiCMQbz8ly",
            "x-ms-traffictypediagnostic": "AM6PR0402MB3782:",
            "Content-Language": "en-US",
            "Errors-To": "dev-bounces@dpdk.org",
            "x-ms-exchange-messagesentrepresentingtype": "1",
            "x-microsoft-antispam-prvs": "\n <AM6PR0402MB3782CE44EA0093F999BD8C07C8730@AM6PR0402MB3782.eurprd04.prod.outlook.com>"
        }
    }
]