get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/83441/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 83441,
    "url": "https://patches.dpdk.org/api/patches/83441/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201102183527.69209-9-aboyer@pensando.io/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20201102183527.69209-9-aboyer@pensando.io>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201102183527.69209-9-aboyer@pensando.io",
    "date": "2020-11-02T18:35:27",
    "name": "[8/8] ionic: nits - whitespace, logging, helper variables",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "08386bac79496cbdb4a6c2e4a809fde26fa030c0",
    "submitter": {
        "id": 2036,
        "url": "https://patches.dpdk.org/api/people/2036/?format=api",
        "name": "Andrew Boyer",
        "email": "aboyer@pensando.io"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201102183527.69209-9-aboyer@pensando.io/mbox/",
    "series": [
        {
            "id": 13579,
            "url": "https://patches.dpdk.org/api/series/13579/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13579",
            "date": "2020-11-02T18:35:19",
            "name": "net/ionic: minor updates and documentation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/13579/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83441/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/83441/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.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 2D637A04E7;\n\tMon,  2 Nov 2020 19:38:28 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7FCE549E0;\n\tMon,  2 Nov 2020 19:36:29 +0100 (CET)",
            "from mail-pg1-f194.google.com (mail-pg1-f194.google.com\n [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 1B0003976\n for <dev@dpdk.org>; Mon,  2 Nov 2020 19:36:27 +0100 (CET)",
            "by mail-pg1-f194.google.com with SMTP id 62so4248083pgg.12\n for <dev@dpdk.org>; Mon, 02 Nov 2020 10:36:27 -0800 (PST)",
            "from driver-dev1.pensando.io ([12.226.153.42])\n by smtp.gmail.com with ESMTPSA id s4sm178186pjp.17.2020.11.02.10.36.24\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Mon, 02 Nov 2020 10:36:24 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=Qa5LPfpYYJpSSUt5DB2QuQbo8kkVH+yKtd2MsRWbamw=;\n b=wGF81XaNrTfF+vkqXJuA+pJJ0GbvZsaBBO56r0PVXNC173fqi/iIYudhsdpSN6UluK\n cK+MHc9jvTCqcVtAWpIW5fsG6PfJ1RMgvNkIFIGnmDhlpAu8xAYgtyLAOum03/tG12el\n ljdNkODaqHTx/w03YYqZM0EhYcg1CtDTQQLlsB/TTA4nm9eQuWu58RipxwWuj/1NR1H0\n RTF6GnXphS248HYwew2ouRaU7wISu6EYgf+nrUGZJhZLxYE84meXALUPhhaZ1ZrePTvu\n I10Gsw1zGpXMK8BjnEfFUQeOf+JrdaFDMtDEXqlz/GGb/krAbwSppfeUXGllNkKt5T+e\n 0x3Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=Qa5LPfpYYJpSSUt5DB2QuQbo8kkVH+yKtd2MsRWbamw=;\n b=VnTUmXwBXuGo3aTe5KURrvyi4gufNhf5zx8PmQBcYYQJ9/nok0bJTXkHp9TXhOo8MS\n vQ0kMyxxbWActcypA456D+dBGbP3cz3B/dhm/B4vqejE+oozm+LSqSJKg9Dvlo2qNFJf\n vpaxpn7YDXkpTcTUPUwX+GZpjan9yoJ166PMpxiqd7KlAXemJdX6iAexwYDRLMLjy8kq\n x0izmzudArLQqqpUWHu/eLsI2OxtldAl757Zo89EGYo54rot6DLqq46YIHk0bIPEaOO/\n ur9rfJaPLfmCQ3g2IibYqltcZCSLqzVi3RiiXg0P+yqs6dNoJOQMAeTY2ijC5S5IqmO1\n fFew==",
        "X-Gm-Message-State": "AOAM531DwI1FbxlFstnZMMewLqrBYzQ2KolhzMcZWGZFik+LqyXBuFCf\n tOMP9eFlzx3DBB5mWlXcJ14usHi2yGUaOz78",
        "X-Google-Smtp-Source": "\n ABdhPJxYrJqvCa/YkhTIqb81o3gMK6RdbDGTdBd06hq5xSf5V6KwQv4CN9cL5jAdwxmLda1HGTbGWA==",
        "X-Received": "by 2002:a05:6a00:8ca:b029:15d:7af3:8360 with SMTP id\n s10-20020a056a0008cab029015d7af38360mr15193831pfu.12.1604342184996;\n Mon, 02 Nov 2020 10:36:24 -0800 (PST)",
        "From": "Andrew Boyer <aboyer@pensando.io>",
        "To": "dev@dpdk.org",
        "Cc": "cardigliano@ntop.org,\n\tAndrew Boyer <aboyer@pensando.io>",
        "Date": "Mon,  2 Nov 2020 10:35:27 -0800",
        "Message-Id": "<20201102183527.69209-9-aboyer@pensando.io>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201102183527.69209-1-aboyer@pensando.io>",
        "References": "<20201102183527.69209-1-aboyer@pensando.io>",
        "Subject": "[dpdk-dev] [PATCH 8/8] ionic: nits - whitespace, logging,\n\thelper variables",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "These are minor cleanups which did not deserve their own patches.\n\nSigned-off-by: Andrew Boyer <aboyer@pensando.io>\n---\n drivers/net/ionic/ionic_ethdev.c | 10 ++++------\n drivers/net/ionic/ionic_lif.c    | 22 ++++++++++-----------\n drivers/net/ionic/ionic_main.c   |  4 +---\n drivers/net/ionic/ionic_rxtx.c   | 33 ++++++++++++++------------------\n 4 files changed, 29 insertions(+), 40 deletions(-)",
    "diff": "diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c\nindex ff5c2e51a..04d4c989c 100644\n--- a/drivers/net/ionic/ionic_ethdev.c\n+++ b/drivers/net/ionic/ionic_ethdev.c\n@@ -571,7 +571,7 @@ ionic_dev_rss_reta_update(struct rte_eth_dev *eth_dev,\n \n \tif (reta_size != ident->lif.eth.rss_ind_tbl_sz) {\n \t\tIONIC_PRINT(ERR, \"The size of hash lookup table configured \"\n-\t\t\t\"(%d) doesn't match the number hardware can supported \"\n+\t\t\t\"(%d) doesn't match the number hardware can support \"\n \t\t\t\"(%d)\",\n \t\t\treta_size, ident->lif.eth.rss_ind_tbl_sz);\n \t\treturn -EINVAL;\n@@ -605,7 +605,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,\n \n \tif (reta_size != ident->lif.eth.rss_ind_tbl_sz) {\n \t\tIONIC_PRINT(ERR, \"The size of hash lookup table configured \"\n-\t\t\t\"(%d) doesn't match the number hardware can supported \"\n+\t\t\t\"(%d) doesn't match the number hardware can support \"\n \t\t\t\"(%d)\",\n \t\t\treta_size, ident->lif.eth.rss_ind_tbl_sz);\n \t\treturn -EINVAL;\n@@ -901,7 +901,7 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)\n \tstruct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);\n \tstruct ionic_adapter *adapter = lif->adapter;\n \tstruct ionic_dev *idev = &adapter->idev;\n-\tuint32_t allowed_speeds;\n+\tuint32_t speed, allowed_speeds;\n \tint err;\n \n \tIONIC_PRINT_CALL();\n@@ -929,8 +929,7 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)\n \t}\n \n \tif (eth_dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {\n-\t\tuint32_t speed = ionic_parse_link_speeds(dev_conf->link_speeds);\n-\n+\t\tspeed = ionic_parse_link_speeds(dev_conf->link_speeds);\n \t\tif (speed)\n \t\t\tionic_dev_cmd_port_speed(idev, speed);\n \t}\n@@ -1264,7 +1263,6 @@ eth_ionic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t}\n \n \terr = ionic_configure_intr(adapter);\n-\n \tif (err) {\n \t\tIONIC_PRINT(ERR, \"Failed to configure interrupts\");\n \t\tgoto err_free_adapter;\ndiff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c\nindex 2e33fb8d9..018103c5b 100644\n--- a/drivers/net/ionic/ionic_lif.c\n+++ b/drivers/net/ionic/ionic_lif.c\n@@ -85,7 +85,8 @@ ionic_lif_reset(struct ionic_lif *lif)\n }\n \n static void\n-ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats)\n+ionic_lif_get_abs_stats(const struct ionic_lif *lif,\n+\t\tstruct rte_eth_stats *stats)\n {\n \tstruct ionic_lif_stats *ls = &lif->info->stats;\n \tuint32_t i;\n@@ -305,10 +306,11 @@ ionic_dev_add_mac(struct rte_eth_dev *eth_dev,\n }\n \n void\n-ionic_dev_remove_mac(struct rte_eth_dev *eth_dev, uint32_t index __rte_unused)\n+ionic_dev_remove_mac(struct rte_eth_dev *eth_dev, uint32_t index)\n {\n \tstruct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);\n \tstruct ionic_adapter *adapter = lif->adapter;\n+\tstruct rte_ether_addr *mac_addr;\n \n \tIONIC_PRINT_CALL();\n \n@@ -319,11 +321,12 @@ ionic_dev_remove_mac(struct rte_eth_dev *eth_dev, uint32_t index __rte_unused)\n \t\treturn;\n \t}\n \n-\tif (!rte_is_valid_assigned_ether_addr(&eth_dev->data->mac_addrs[index]))\n+\tmac_addr = &eth_dev->data->mac_addrs[index];\n+\n+\tif (!rte_is_valid_assigned_ether_addr(mac_addr))\n \t\treturn;\n \n-\tionic_lif_addr_del(lif, (const uint8_t *)\n-\t\t&eth_dev->data->mac_addrs[index]);\n+\tionic_lif_addr_del(lif, (const uint8_t *)mac_addr);\n }\n \n int\n@@ -658,7 +661,6 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,\n \tnew->base_z = rte_eth_dma_zone_reserve(lif->eth_dev,\n \t\tbase /* name */, index /* queue_idx */,\n \t\ttotal_size, IONIC_ALIGN, socket_id);\n-\n \tif (!new->base_z) {\n \t\tIONIC_PRINT(ERR, \"Cannot reserve queue DMA memory\");\n \t\terr = -ENOMEM;\n@@ -682,8 +684,8 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,\n \t\tionic_q_sg_map(&new->q, sg_base, sg_base_pa);\n \t}\n \n-\tIONIC_PRINT(DEBUG, \"Q-Base-PA = %ju CQ-Base-PA = %ju \"\n-\t\t\"SG-base-PA = %ju\",\n+\tIONIC_PRINT(DEBUG, \"Q-Base-PA = %#lx CQ-Base-PA = %#lx \"\n+\t\t\"SG-base-PA = %#lx\",\n \t\tq_base_pa, cq_base_pa, sg_base_pa);\n \n \tionic_q_map(&new->q, q_base, q_base_pa);\n@@ -839,7 +841,6 @@ ionic_lif_alloc(struct ionic_lif *lif)\n \n \tlif->txqcqs = rte_zmalloc(\"ionic\", sizeof(*lif->txqcqs) *\n \t\tadapter->max_ntxqs_per_lif, 0);\n-\n \tif (!lif->txqcqs) {\n \t\tIONIC_PRINT(ERR, \"Cannot allocate tx queues array\");\n \t\treturn -ENOMEM;\n@@ -847,7 +848,6 @@ ionic_lif_alloc(struct ionic_lif *lif)\n \n \tlif->rxqcqs = rte_zmalloc(\"ionic\", sizeof(*lif->rxqcqs) *\n \t\tadapter->max_nrxqs_per_lif, 0);\n-\n \tif (!lif->rxqcqs) {\n \t\tIONIC_PRINT(ERR, \"Cannot allocate rx queues array\");\n \t\treturn -ENOMEM;\n@@ -863,8 +863,6 @@ ionic_lif_alloc(struct ionic_lif *lif)\n \n \tIONIC_PRINT(DEBUG, \"Allocating Admin Queue\");\n \n-\tIONIC_PRINT(DEBUG, \"Allocating Admin Queue\");\n-\n \terr = ionic_admin_qcq_alloc(lif);\n \tif (err) {\n \t\tIONIC_PRINT(ERR, \"Cannot allocate admin queue\");\ndiff --git a/drivers/net/ionic/ionic_main.c b/drivers/net/ionic/ionic_main.c\nindex f77bddaa4..a0cbaebe2 100644\n--- a/drivers/net/ionic/ionic_main.c\n+++ b/drivers/net/ionic/ionic_main.c\n@@ -181,15 +181,13 @@ ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx)\n \tif (err) {\n \t\tIONIC_PRINT(ERR, \"Failure posting to the admin queue %d (%d)\",\n \t\t\tctx->cmd.cmd.opcode, err);\n-\n \t\treturn err;\n \t}\n \n \tdone = ionic_wait_ctx_for_completion(lif, qcq, ctx,\n \t\tIONIC_DEVCMD_TIMEOUT);\n \n-\terr = ionic_adminq_check_err(ctx, !done /* timed out */);\n-\treturn err;\n+\treturn ionic_adminq_check_err(ctx, !done /* timed out */);\n }\n \n static int\ndiff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c\nindex b953aff49..e955fdbfe 100644\n--- a/drivers/net/ionic/ionic_rxtx.c\n+++ b/drivers/net/ionic/ionic_rxtx.c\n@@ -133,7 +133,7 @@ ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)\n {\n \tstruct ionic_qcq *txq;\n \n-\tIONIC_PRINT_CALL();\n+\tIONIC_PRINT(DEBUG, \"Stopping TX queue %u\", tx_queue_id);\n \n \ttxq = eth_dev->data->tx_queues[tx_queue_id];\n \n@@ -164,11 +164,6 @@ ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id,\n \tuint64_t offloads;\n \tint err;\n \n-\tIONIC_PRINT_CALL();\n-\n-\tIONIC_PRINT(DEBUG, \"Configuring TX queue %u with %u buffers\",\n-\t\ttx_queue_id, nb_desc);\n-\n \tif (tx_queue_id >= lif->ntxqcqs) {\n \t\tIONIC_PRINT(DEBUG, \"Queue index %u not available \"\n \t\t\t\"(max %u queues)\",\n@@ -177,6 +172,9 @@ ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id,\n \t}\n \n \toffloads = tx_conf->offloads | eth_dev->data->dev_conf.txmode.offloads;\n+\tIONIC_PRINT(DEBUG,\n+\t\t\"Configuring TX queue %u with %u buffers, offloads %lx\",\n+\t\ttx_queue_id, nb_desc, offloads);\n \n \t/* Validate number of receive descriptors */\n \tif (!rte_is_power_of_2(nb_desc) || nb_desc < IONIC_MIN_RING_DESC)\n@@ -215,10 +213,11 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)\n \tstruct ionic_qcq *txq;\n \tint err;\n \n-\tIONIC_PRINT_CALL();\n-\n \ttxq = eth_dev->data->tx_queues[tx_queue_id];\n \n+\tIONIC_PRINT(DEBUG, \"Starting TX queue %u, %u descs\",\n+\t\ttx_queue_id, txq->q.num_descs);\n+\n \terr = ionic_lif_txq_init(txq);\n \tif (err)\n \t\treturn err;\n@@ -651,11 +650,6 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,\n \tuint64_t offloads;\n \tint err;\n \n-\tIONIC_PRINT_CALL();\n-\n-\tIONIC_PRINT(DEBUG, \"Configuring RX queue %u with %u buffers\",\n-\t\trx_queue_id, nb_desc);\n-\n \tif (rx_queue_id >= lif->nrxqcqs) {\n \t\tIONIC_PRINT(ERR,\n \t\t\t\"Queue index %u not available (max %u queues)\",\n@@ -664,6 +658,9 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,\n \t}\n \n \toffloads = rx_conf->offloads | eth_dev->data->dev_conf.rxmode.offloads;\n+\tIONIC_PRINT(DEBUG,\n+\t\t\"Configuring RX queue %u with %u buffers, offloads %lx\",\n+\t\trx_queue_id, nb_desc, offloads);\n \n \t/* Validate number of receive descriptors */\n \tif (!rte_is_power_of_2(nb_desc) ||\n@@ -959,13 +956,11 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)\n \tstruct ionic_qcq *rxq;\n \tint err;\n \n-\tIONIC_PRINT_CALL();\n-\n-\tIONIC_PRINT(DEBUG, \"Allocating RX queue buffers (size: %u)\",\n-\t\tframe_size);\n-\n \trxq = eth_dev->data->rx_queues[rx_queue_id];\n \n+\tIONIC_PRINT(DEBUG, \"Starting RX queue %u, %u descs (size: %u)\",\n+\t\trx_queue_id, rxq->q.num_descs, frame_size);\n+\n \terr = ionic_lif_rxq_init(rxq);\n \tif (err)\n \t\treturn err;\n@@ -1045,7 +1040,7 @@ ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)\n {\n \tstruct ionic_qcq *rxq;\n \n-\tIONIC_PRINT_CALL();\n+\tIONIC_PRINT(DEBUG, \"Stopping RX queue %u\", rx_queue_id);\n \n \trxq = eth_dev->data->rx_queues[rx_queue_id];\n \n",
    "prefixes": [
        "8/8"
    ]
}