get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86824,
    "url": "http://patches.dpdk.org/api/patches/86824/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210118203508.1332-5-aboyer@pensando.io/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210118203508.1332-5-aboyer@pensando.io>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210118203508.1332-5-aboyer@pensando.io",
    "date": "2021-01-18T20:34:59",
    "name": "[04/13] net/ionic: add an array-size macro",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "eb2222224330126e8acf458766d8e9db0d65364a",
    "submitter": {
        "id": 2036,
        "url": "http://patches.dpdk.org/api/people/2036/?format=api",
        "name": "Andrew Boyer",
        "email": "aboyer@pensando.io"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210118203508.1332-5-aboyer@pensando.io/mbox/",
    "series": [
        {
            "id": 14820,
            "url": "http://patches.dpdk.org/api/series/14820/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14820",
            "date": "2021-01-18T20:34:55",
            "name": "net/ionic: fixes and optimizations",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/14820/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/86824/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/86824/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 97E31A0A03;\n\tMon, 18 Jan 2021 21:36:00 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D97D3140E44;\n\tMon, 18 Jan 2021 21:35:42 +0100 (CET)",
            "from mail-pj1-f51.google.com (mail-pj1-f51.google.com\n [209.85.216.51])\n by mails.dpdk.org (Postfix) with ESMTP id 1A3F4140E31\n for <dev@dpdk.org>; Mon, 18 Jan 2021 21:35:41 +0100 (CET)",
            "by mail-pj1-f51.google.com with SMTP id my11so374853pjb.1\n for <dev@dpdk.org>; Mon, 18 Jan 2021 12:35:41 -0800 (PST)",
            "from driver-dev1.pensando.io ([12.226.153.42])\n by smtp.gmail.com with ESMTPSA id g201sm795160pfb.81.2021.01.18.12.35.39\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 18 Jan 2021 12:35:39 -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=5V0utI41IP4n5uHU/CUDc8Z62D/2K4NuChrdE9DQSYU=;\n b=XgTVj/o/f/G5Hs8AJkmJczEIXWUBdLntnc20aAARgD6M52dnalYQEwstjNlFwaqLJ4\n DwPNg8puMFH2+EHeOIOAGmzpIQ+soXnSjGE7g4wpSRgE4FuoE261Aotw0sT322J7DD+E\n T94U7sWIhs8xfm0NBPFj5KGwAZPHWk5BHv1DBQI31vuNbNRHuq8sxUyLF1YBEwZyFfa4\n pfStCoZnvET8n1nnmqbZUecisoKZxLtORZTUl3aQaKqWZj2P+KsLfKidjMIt22Rw7eix\n rFvvpYLSCRgrgUBV/K4A8k8ixIuyS+5wSy6/ad0K+8JZwFwSgeujD/4SdXBeZH4Otizw\n giTw==",
        "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=5V0utI41IP4n5uHU/CUDc8Z62D/2K4NuChrdE9DQSYU=;\n b=f2HXJaUFTpx1p9ze47UKF6qvoFV1TsZ5/Y5xZ+31GnbXxqaXJbVC/QcvRpxCI0SksK\n 9aGTXvpdiyMtv5PBbbmrdaFKW6lVVo3sFB5N6KIsoW239HGG2C5u24bmCADiXT7ZTDK6\n Nj2YMsmZp8ZNaRVEKMuatXN3VcJODeB0/n2xsj26273keAcBNqw9y3+zM3NnpJDMExOj\n 1d1OAv9iYwqzQoDCngv60Ai7XpGhq/zgeAfvfzpcpY5nSVwGMG2G4pBnrQeRw87Jz66r\n n55vIE618dp7LfJE1I7KCkhJFJCU+O4jzGBHL7UfUqbApBc/PVJgAZNkEgBbQKwkZHv5\n 4Q0w==",
        "X-Gm-Message-State": "AOAM533YXc++Wo6X5Z3NBwBQ5mIojkn9SWIbjzfUvII3Btymn/iqqnCZ\n ifyIXsWZVrOFuBtgXUsuRhkzT7HrgxDYSw==",
        "X-Google-Smtp-Source": "\n ABdhPJx60XZOAPToiiixnH2h3nL0xmNEKfjCp0raJMcev0L9aQvIQO2g8locIc7TOF2d6SotEoBHWw==",
        "X-Received": "by 2002:a17:90a:bc49:: with SMTP id\n t9mr1145647pjv.95.1611002140091;\n Mon, 18 Jan 2021 12:35:40 -0800 (PST)",
        "From": "Andrew Boyer <aboyer@pensando.io>",
        "To": "dev@dpdk.org",
        "Cc": "Alfredo Cardigliano <cardigliano@ntop.org>,\n Andrew Boyer <aboyer@pensando.io>",
        "Date": "Mon, 18 Jan 2021 12:34:59 -0800",
        "Message-Id": "<20210118203508.1332-5-aboyer@pensando.io>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210118203508.1332-1-aboyer@pensando.io>",
        "References": "<20210118203508.1332-1-aboyer@pensando.io>",
        "Subject": "[dpdk-dev] [PATCH 04/13] net/ionic: add an array-size macro",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Using the IONIC_ARRAY_SIZE() macro makes the code clearer.\n\nSigned-off-by: Andrew Boyer <aboyer@pensando.io>\n---\n drivers/net/ionic/ionic_dev.c    | 10 ++++------\n drivers/net/ionic/ionic_ethdev.c |  3 +--\n drivers/net/ionic/ionic_lif.c    |  9 +++------\n drivers/net/ionic/ionic_main.c   | 32 +++++++++++---------------------\n drivers/net/ionic/ionic_osdep.h  |  2 ++\n 5 files changed, 21 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c\nindex c3016b2d50..c4e871187d 100644\n--- a/drivers/net/ionic/ionic_dev.c\n+++ b/drivers/net/ionic/ionic_dev.c\n@@ -87,9 +87,8 @@ void\n ionic_dev_cmd_comp(struct ionic_dev *idev, void *mem)\n {\n \tunion ionic_dev_cmd_comp *comp = mem;\n-\tunsigned int i;\n-\tuint32_t comp_size = sizeof(comp->words) /\n-\t\tsizeof(comp->words[0]);\n+\tuint32_t comp_size = IONIC_ARRAY_SIZE(comp->words);\n+\tuint32_t i;\n \n \tfor (i = 0; i < comp_size; i++)\n \t\tcomp->words[i] = ioread32(&idev->dev_cmd->comp.words[i]);\n@@ -98,9 +97,8 @@ ionic_dev_cmd_comp(struct ionic_dev *idev, void *mem)\n void\n ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd)\n {\n-\tunsigned int i;\n-\tuint32_t cmd_size = sizeof(cmd->words) /\n-\t\tsizeof(cmd->words[0]);\n+\tuint32_t cmd_size = IONIC_ARRAY_SIZE(cmd->words);\n+\tuint32_t i;\n \n \tIONIC_PRINT(DEBUG, \"Sending %s (%d) via dev_cmd\",\n \t\t    ionic_opcode_to_str(cmd->cmd.opcode), cmd->cmd.opcode);\ndiff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c\nindex a5b2301e46..9238bf7d36 100644\n--- a/drivers/net/ionic/ionic_ethdev.c\n+++ b/drivers/net/ionic/ionic_ethdev.c\n@@ -207,8 +207,7 @@ static const struct rte_ionic_xstats_name_off rte_ionic_xstats_strings[] = {\n \t\t\ttx_desc_data_error)},\n };\n \n-#define IONIC_NB_HW_STATS (sizeof(rte_ionic_xstats_strings) / \\\n-\t\tsizeof(rte_ionic_xstats_strings[0]))\n+#define IONIC_NB_HW_STATS IONIC_ARRAY_SIZE(rte_ionic_xstats_strings)\n \n static int\n ionic_dev_fw_version_get(struct rte_eth_dev *eth_dev,\ndiff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c\nindex 15e291b604..df8832f908 100644\n--- a/drivers/net/ionic/ionic_lif.c\n+++ b/drivers/net/ionic/ionic_lif.c\n@@ -1729,13 +1729,10 @@ ionic_lif_identify(struct ionic_adapter *adapter)\n \tstruct ionic_dev *idev = &adapter->idev;\n \tstruct ionic_identity *ident = &adapter->ident;\n \tunion ionic_lif_config *cfg = &ident->lif.eth.config;\n+\tuint32_t lif_words = IONIC_ARRAY_SIZE(ident->lif.words);\n+\tuint32_t cmd_words = IONIC_ARRAY_SIZE(idev->dev_cmd->data);\n+\tuint32_t i, nwords;\n \tint err;\n-\tunsigned int i;\n-\tunsigned int lif_words = sizeof(ident->lif.words) /\n-\t\tsizeof(ident->lif.words[0]);\n-\tunsigned int cmd_words = sizeof(idev->dev_cmd->data) /\n-\t\tsizeof(idev->dev_cmd->data[0]);\n-\tunsigned int nwords;\n \n \tionic_dev_cmd_lif_identify(idev, IONIC_LIF_TYPE_CLASSIC,\n \t\tIONIC_IDENTITY_VERSION_1);\ndiff --git a/drivers/net/ionic/ionic_main.c b/drivers/net/ionic/ionic_main.c\nindex 3f15a6f2f2..12b8d682cd 100644\n--- a/drivers/net/ionic/ionic_main.c\n+++ b/drivers/net/ionic/ionic_main.c\n@@ -263,15 +263,11 @@ ionic_identify(struct ionic_adapter *adapter)\n {\n \tstruct ionic_dev *idev = &adapter->idev;\n \tstruct ionic_identity *ident = &adapter->ident;\n-\tint err = 0;\n-\tuint32_t i;\n-\tunsigned int nwords;\n-\tuint32_t drv_size = sizeof(ident->drv.words) /\n-\t\tsizeof(ident->drv.words[0]);\n-\tuint32_t cmd_size = sizeof(idev->dev_cmd->data) /\n-\t\tsizeof(idev->dev_cmd->data[0]);\n-\tuint32_t dev_size = sizeof(ident->dev.words) /\n-\t\tsizeof(ident->dev.words[0]);\n+\tuint32_t drv_size = IONIC_ARRAY_SIZE(ident->drv.words);\n+\tuint32_t cmd_size = IONIC_ARRAY_SIZE(idev->dev_cmd->data);\n+\tuint32_t dev_size = IONIC_ARRAY_SIZE(ident->dev.words);\n+\tuint32_t i, nwords;\n+\tint err;\n \n \tmemset(ident, 0, sizeof(*ident));\n \n@@ -323,12 +319,9 @@ ionic_port_identify(struct ionic_adapter *adapter)\n {\n \tstruct ionic_dev *idev = &adapter->idev;\n \tstruct ionic_identity *ident = &adapter->ident;\n-\tunsigned int port_words = sizeof(ident->port.words) /\n-\t\tsizeof(ident->port.words[0]);\n-\tunsigned int cmd_words = sizeof(idev->dev_cmd->data) /\n-\t\tsizeof(idev->dev_cmd->data[0]);\n-\tunsigned int i;\n-\tunsigned int nwords;\n+\tuint32_t port_words = IONIC_ARRAY_SIZE(ident->port.words);\n+\tuint32_t cmd_words = IONIC_ARRAY_SIZE(idev->dev_cmd->data);\n+\tuint32_t i, nwords;\n \tint err;\n \n \tionic_dev_cmd_port_identify(idev);\n@@ -374,12 +367,9 @@ ionic_port_init(struct ionic_adapter *adapter)\n \tstruct ionic_dev *idev = &adapter->idev;\n \tstruct ionic_identity *ident = &adapter->ident;\n \tchar z_name[RTE_MEMZONE_NAMESIZE];\n-\tunsigned int config_words = sizeof(ident->port.config.words) /\n-\t\tsizeof(ident->port.config.words[0]);\n-\tunsigned int cmd_words = sizeof(idev->dev_cmd->data) /\n-\t\tsizeof(idev->dev_cmd->data[0]);\n-\tunsigned int nwords;\n-\tunsigned int i;\n+\tuint32_t config_words = IONIC_ARRAY_SIZE(ident->port.config.words);\n+\tuint32_t cmd_words = IONIC_ARRAY_SIZE(idev->dev_cmd->data);\n+\tuint32_t i, nwords;\n \tint err;\n \n \tif (idev->port_info)\ndiff --git a/drivers/net/ionic/ionic_osdep.h b/drivers/net/ionic/ionic_osdep.h\nindex a55d599184..157b0ca516 100644\n--- a/drivers/net/ionic/ionic_osdep.h\n+++ b/drivers/net/ionic/ionic_osdep.h\n@@ -20,6 +20,8 @@\n \n #include \"ionic_logs.h\"\n \n+#define IONIC_ARRAY_SIZE(_arr) (sizeof(_arr) / sizeof((_arr)[0]))\n+\n #define BIT(nr)            (1UL << (nr))\n #define BIT_ULL(nr)        (1ULL << (nr))\n \n",
    "prefixes": [
        "04/13"
    ]
}