get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84268,
    "url": "https://patches.dpdk.org/api/patches/84268/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201117112648.29725-2-maxime.leroy@6wind.com/",
    "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": "<20201117112648.29725-2-maxime.leroy@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201117112648.29725-2-maxime.leroy@6wind.com",
    "date": "2020-11-17T11:26:46",
    "name": "[v4,1/2] net/mlx5: fix Rx queue count calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2a19fe4b0c126328d14ae690d2fad3c94550f92c",
    "submitter": {
        "id": 112,
        "url": "https://patches.dpdk.org/api/people/112/?format=api",
        "name": "Maxime Leroy",
        "email": "maxime.leroy@6wind.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201117112648.29725-2-maxime.leroy@6wind.com/mbox/",
    "series": [
        {
            "id": 13925,
            "url": "https://patches.dpdk.org/api/series/13925/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13925",
            "date": "2020-11-17T11:26:45",
            "name": "net/mlx5: fixes for rx queue count calculation",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/13925/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/84268/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/84268/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 60801A04DB;\n\tTue, 17 Nov 2020 12:27:16 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E5A145928;\n\tTue, 17 Nov 2020 12:27:08 +0100 (CET)",
            "from mail-wr1-f68.google.com (mail-wr1-f68.google.com\n [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 37FD35928\n for <dev@dpdk.org>; Tue, 17 Nov 2020 12:27:07 +0100 (CET)",
            "by mail-wr1-f68.google.com with SMTP id m6so5618701wrg.7\n for <dev@dpdk.org>; Tue, 17 Nov 2020 03:27:07 -0800 (PST)",
            "from bolet.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n [62.23.145.78])\n by smtp.gmail.com with ESMTPSA id o17sm3136265wmd.34.2020.11.17.03.27.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 17 Nov 2020 03:27:05 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=a5DPaEVfhghLzmgDlc0wCxFfdnGmdTpJeXFqzldBI2A=;\n b=agqgg/BaX0AUVbb1SYWi3wbGNJxRZ7K04WwRxYceISHjL5H1gdB5Nq698hGG1qpzKQ\n nx8Drl5gStG1FHb2Y4Y+10R1OBcAxf7VX13pytdYYu6aaCRKbS37BOiNoRvQbVp/TQoz\n D3eaz98EofqWbVyBX4j7dnibNz3sS6+a1l98TMV1pMZNt1y5FOxbqcaT1NoKc+UJdBQB\n PclROuY7iiJRlLM6Z+oPQgHqwopQB3sLozs5r/FAr+luLQws5OwOBIbwVtX2KQGqQ1Bi\n HvanFO2X5v8E+BCrQ/+VWU2akSFJQMnsXBYXjGb0Ltvi6dZhhF8zzCRq5Wpprmb+5EIh\n wwSw==",
        "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:mime-version:content-transfer-encoding;\n bh=a5DPaEVfhghLzmgDlc0wCxFfdnGmdTpJeXFqzldBI2A=;\n b=L1Q11hPgph9eneedzxhTG1lK4dMEw+JqebPLgcmJacdWsxBIxN1B3NaDF4m6KnzmAS\n AYwtcl8zLypD181vHkmdFX5fetd467gc6/W0mAYFMCIPkytgzjvOgesImFwQKI/rE2X8\n SFXUpqKfWp+/E2PeePtyfMEpW8HZOetUGR/0QCq6GMfafudiA30pcSzMiCp4d1Zk/xRD\n OmMF454ykMdE3ldJIxyIoCDw5SCKXOyO4BUqSdh7uz/71UWBUeB1rchkPPurmQjNEdFM\n dtS0riu5QI1RKMZRWHwbVdr4+jKvuoWpkpjgyEVjl7OIks+gCmA9O39RlkaxTPhpGqIc\n kosw==",
        "X-Gm-Message-State": "AOAM531KGZ4a86cZ09R4l2rVwDGNT5M9ft57eopA61z4lEvj2ZxXV6C4\n IFo/8eCvHGW/PCad1gtrJI5iKA==",
        "X-Google-Smtp-Source": "\n ABdhPJy7w1vlFHJ9cJnOCK1aI7BKhm+DJXXU8tUVQEjgEkrIRKTEUxx9g1kkccDePM4S1kfxbVuo2g==",
        "X-Received": "by 2002:a5d:4e4c:: with SMTP id\n r12mr24563615wrt.348.1605612425982;\n Tue, 17 Nov 2020 03:27:05 -0800 (PST)",
        "From": "Maxime Leroy <maxime.leroy@6wind.com>",
        "To": "Matan Azrad <matan@nvidia.com>, Shahaf Shuler <shahafs@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Alexander Kozyrev <akozyrev@nvidia.com>",
        "Cc": "dev@dpdk.org,\n\tNelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "Date": "Tue, 17 Nov 2020 12:26:46 +0100",
        "Message-Id": "<20201117112648.29725-2-maxime.leroy@6wind.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201117112648.29725-1-maxime.leroy@6wind.com>",
        "References": "<20201117112648.29725-1-maxime.leroy@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 1/2] net/mlx5: fix Rx queue count calculation",
        "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": "The commit d2d57605522d (\"net/mlx5: fix Rx queue count calculation\") is\nincorrect because the count calculation is wrong for the next cqe:\n\nExample:\n\n Compressed Set of packets 1  |   Compressed Set of packets 2\nC | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0\n\nThere are 2 compressed set of packets in the first queue. For the first\nset, n is computed correctly.\n\nBut for the second, n is not computed properly. Because the zip context\nis for the first set. The  second set is not yet decompressed, so\nthere are no context.\n\nTo fix the issue, we should only use the zip context for the first CQEs\nseries.\n\nFixes: d2d57605522d (\"net/mlx5: fix Rx queue count calculation\")\nSigned-off-by: Maxime Leroy <maxime.leroy@6wind.com>\nSigned-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/mlx5_rxtx.c | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 844a1c63..2733dcd3 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -462,11 +462,18 @@ rx_queue_count(struct mlx5_rxq_data *rxq)\n {\n \tstruct rxq_zip *zip = &rxq->zip;\n \tvolatile struct mlx5_cqe *cqe;\n-\tunsigned int cq_ci = rxq->cq_ci;\n \tconst unsigned int cqe_n = (1 << rxq->cqe_n);\n \tconst unsigned int cqe_cnt = cqe_n - 1;\n-\tunsigned int used = 0;\n+\tunsigned int cq_ci, used;\n \n+\t/* if we are processing a compressed cqe */\n+\tif (zip->ai) {\n+\t\tused = zip->cqe_cnt - zip->ai;\n+\t\tcq_ci = zip->cq_ci;\n+\t} else {\n+\t\tused = 0;\n+\t\tcq_ci = rxq->cq_ci;\n+\t}\n \tcqe = &(*rxq->cqes)[cq_ci & cqe_cnt];\n \twhile (check_cqe(cqe, cqe_n, cq_ci) != MLX5_CQE_STATUS_HW_OWN) {\n \t\tint8_t op_own;\n@@ -474,10 +481,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)\n \n \t\top_own = cqe->op_own;\n \t\tif (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED)\n-\t\t\tif (unlikely(zip->ai))\n-\t\t\t\tn = zip->cqe_cnt - zip->ai;\n-\t\t\telse\n-\t\t\t\tn = rte_be_to_cpu_32(cqe->byte_cnt);\n+\t\t\tn = rte_be_to_cpu_32(cqe->byte_cnt);\n \t\telse\n \t\t\tn = 1;\n \t\tcq_ci += n;\n",
    "prefixes": [
        "v4",
        "1/2"
    ]
}