get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84245,
    "url": "https://patches.dpdk.org/api/patches/84245/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201116170258.18583-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": "<20201116170258.18583-2-maxime.leroy@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201116170258.18583-2-maxime.leroy@6wind.com",
    "date": "2020-11-16T17:02:57",
    "name": "[v3,1/2] net/mlx5: fix Rx queue count calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20201116170258.18583-2-maxime.leroy@6wind.com/mbox/",
    "series": [
        {
            "id": 13908,
            "url": "https://patches.dpdk.org/api/series/13908/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13908",
            "date": "2020-11-16T17:02:56",
            "name": "net/mlx5: fixes for rx queue count calculation",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/13908/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/84245/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/84245/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 6EF7DA04B5;\n\tMon, 16 Nov 2020 18:03:32 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DC644C8C6;\n\tMon, 16 Nov 2020 18:03:15 +0100 (CET)",
            "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 71FAAC8BC\n for <dev@dpdk.org>; Mon, 16 Nov 2020 18:03:14 +0100 (CET)",
            "by mail-wr1-f66.google.com with SMTP id b6so19483814wrt.4\n for <dev@dpdk.org>; Mon, 16 Nov 2020 09:03:14 -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 l13sm24570935wrm.24.2020.11.16.09.03.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 16 Nov 2020 09:03:12 -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=F04WFJXyuqVYfYkdCo481dMSjL13TLzJBHMulm05igt8R4oTbA8XGvQYtmW+7wS5XU\n yI+lSHu8s3er1zbgG+G+hPcH5CR5BKL3n4MsNNrmBNCIL9hKUctO6bc19YPatIrzADYy\n LCLEyi+bGfzzmHZDWec+e/2vs6e+6FUDM+DdO/AKDGfquSfDAcmRc9dHqit3ApIVyzWM\n 5Bvyrh+vNJi6RK8ovrrevbAtzayVkqUi2kzDI0UbqS2h62gJe2AMW+gCP1kIC5+j8VGc\n mfs5ohyf0DcsLUs9Dq97kLbHJ9NhxrhmFzbf1kR68wzw7rULONNREckLvL1OcyR5m66E\n Dejg==",
        "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=BtCNfTCY7nepPA4YruUgsT35nK9K965sw3A8IUBqse/EHdlKMT5d43w+/KlqFRfDHu\n zOQjGCnKqliOPrlAgsWi3jy5YE/oqnzd/8WsrSbOnH7qozdnDYZV9Hm/njUeDQlh5uOd\n M+htio5t/pnoZ6MIWy/nalEoXI41BN2r5pf9KygjWlYOZwKG7EwHm6lrrrl4UjdjaAfi\n ua9Fmo2UITmBNT2U4ckO+UlTYCGayzuPwlal1N0bDv4NxWw8ppGzMMBgN9m5rjkqreqx\n mGAlhSViVH7iHdBOghn4XOIqsktty/s5xN8bqxDA/pgdZb+46BL1O32Ldt6Ja7UViJY1\n /XvQ==",
        "X-Gm-Message-State": "AOAM533bA/fVItG6NaOiRnRnH/VH/H4w/hoIYQj59racIEToWNQ985Kt\n Kqlgm4+UMmD2ZvgzP5XBQQ0EyQ==",
        "X-Google-Smtp-Source": "\n ABdhPJwmtyanNRjUAiLorEiV+DZLZCn7woep6kD9NIUYvHe2rqp5aKhg5sG0OXLsZIYRpD/axYftAw==",
        "X-Received": "by 2002:adf:fec6:: with SMTP id q6mr20665369wrs.168.1605546193210;\n Mon, 16 Nov 2020 09:03:13 -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": "Mon, 16 Nov 2020 18:02:57 +0100",
        "Message-Id": "<20201116170258.18583-2-maxime.leroy@6wind.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201116170258.18583-1-maxime.leroy@6wind.com>",
        "References": "<20201116170258.18583-1-maxime.leroy@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 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": [
        "v3",
        "1/2"
    ]
}