get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83888,
    "url": "http://patches.dpdk.org/api/patches/83888/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201110140938.15046-2-maxime.leroy@6wind.com/",
    "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": "<20201110140938.15046-2-maxime.leroy@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201110140938.15046-2-maxime.leroy@6wind.com",
    "date": "2020-11-10T14:09:35",
    "name": "[1/4] Revert \"net/mlx5: fix Rx queue count calculation\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d49586e85cffc5f3b206c985d4064bcdf0dcf14f",
    "submitter": {
        "id": 112,
        "url": "http://patches.dpdk.org/api/people/112/?format=api",
        "name": "Maxime Leroy",
        "email": "maxime.leroy@6wind.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201110140938.15046-2-maxime.leroy@6wind.com/mbox/",
    "series": [
        {
            "id": 13774,
            "url": "http://patches.dpdk.org/api/series/13774/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13774",
            "date": "2020-11-10T14:09:34",
            "name": "net/mlx5: fixes for rx queue count calculation",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13774/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83888/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/83888/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 7D9E0A04B1;\n\tTue, 10 Nov 2020 15:10:17 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 52D005937;\n\tTue, 10 Nov 2020 15:09:56 +0100 (CET)",
            "from mail-wm1-f68.google.com (mail-wm1-f68.google.com\n [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id CACC2592C\n for <dev@dpdk.org>; Tue, 10 Nov 2020 15:09:54 +0100 (CET)",
            "by mail-wm1-f68.google.com with SMTP id p19so2095225wmg.0\n for <dev@dpdk.org>; Tue, 10 Nov 2020 06:09:54 -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 y187sm3112158wmg.33.2020.11.10.06.09.52\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Nov 2020 06:09:52 -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=hqmTb0Y+tpX4y+uu4PNRau4umDuu9/oMZ99XkWohBzc=;\n b=RRIR2m+qzDsnYCvLxsLFlAAmY30y2lMPC+kjOgtdZdZSHEMrfDWdKWdPKNFRGzkU83\n tA//k0G4sCE+k2De7vbxc8sAPuhSI71++RT4p/3Ocf6UWjxnnKO7coctOJZMg/C5QLsy\n X3LRwaaFLQ3OaAoYFOYjhxXBHLotSIHcgWal7mDLOmG4x+XhxcaIMEs5LElNdTZETOKE\n RP9mrge9FNJ4i8BmHThb4kMM054nxilytuUXGkA1wl1+6zZDx/b0frzGyauMgNaxZDUG\n YJp+KcOW6H/WqagMKP8BTShba67L8tAJPelkuzwqO+czwAwXxJJbFePXqqn0UEPJ3ofc\n Fviw==",
        "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=hqmTb0Y+tpX4y+uu4PNRau4umDuu9/oMZ99XkWohBzc=;\n b=L0g4ju6uLEAXj1oqmDHNyJNsnVJARbB3h5k9sZYIxZQSQ5sIXYXj3YfFuThVrvVUS8\n TA4Mq05A0Bfg2byKQ988qxBwJ6su8jjseN88qp0PZ8dwRgxGAoRwJN6BDN+qsR8mM6QY\n hRQEhPc6g4CF9cNF5nCnfNpFuDRe+vKsUWqXHiNL92b2bVK/+bFTiuLaHwW6sORO8lDZ\n meCNEWSVFyEgvhVxS9fuh5PwkPtqNagvkdgcJfkvfSmvOUbFL/N/G7QND4XymXR5RKSt\n YD63JHj07TmTEFsHCAe8vAQJaZ1QGVmtI0D9hA5UmlzmlYQooW4iWwQNmD9hnmwSjbuK\n ddvQ==",
        "X-Gm-Message-State": "AOAM532EDP8UO+xTZQXQln2DsEYthHGUCF5VFLKS8hjypHvQ91uFAz3S\n Xr5IpEqcISjWblOLlxO5RswaZFmEYwKpPA==",
        "X-Google-Smtp-Source": "\n ABdhPJwCv9viCF4WmuhGpAM332zEKxjmmZVv1xoO+h/JK9RRQaLqYYvZV0NoabSfubF3pBJjdePNbw==",
        "X-Received": "by 2002:a05:600c:2285:: with SMTP id\n 5mr4359738wmf.149.1605017393592;\n Tue, 10 Nov 2020 06:09:53 -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>",
        "Cc": "dev@dpdk.org,\n\tNelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "Date": "Tue, 10 Nov 2020 15:09:35 +0100",
        "Message-Id": "<20201110140938.15046-2-maxime.leroy@6wind.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201110140938.15046-1-maxime.leroy@6wind.com>",
        "References": "<20201110140938.15046-1-maxime.leroy@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/4] Revert \"net/mlx5: fix Rx queue count\n\tcalculation\"",
        "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": "This reverts commit d2d57605522d4a43be17e22e649e54033f6d8835.\n\nThis fix is uncorrect for at least two reasons.\n\nFirst issue, when there are more than 8 CQEs to uncompress, the\ncomputation done in this commit cannot work. Because the zip-ai\nvariable describes the current index inside the CQE8 array and thus is\nlimited from 0 to 7 included. So if we are decompressed the 9 packets,\nai is 0. So in this case, n is equals to cqe_cnt - 0.\n\nExample with 11 packets we will have:\nC | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0\n\nc <-- CQE compressed\na <-- Array of minicqe\nex <-- emptry entry to store uncompressed CQE.\n\nIf the 9th packet is decompressed by the soft, n is equals to 9.\nBut with this commit, n is equals to 11 (i.e. 11 - 0).\n\nSecond issue is to count the next packet.\n\nExample:\n\n     packet 1                       |    packet 2\nC | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0\n\nThere are 2 packets compressed in the first queue. For the first packet,\nn is computed correctly.\n\nBut for the second, n is not computed properly. Because the zip context\nis for the first packet. The  second packet is not yet decompressed, so\nthere are no context.\n\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 | 27 +++++++++++++++------------\n 1 file changed, 15 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 844a1c63..4c566486 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -462,11 +462,19 @@ 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;\n+\tunsigned int used;\n \n+\t/* if we are processing a compressed cqe */\n+\tif (zip->ai) {\n+\t\tused = zip->cqe_cnt - zip->ca;\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,17 +482,14 @@ 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 \t\tused += n;\n \t\tcqe = &(*rxq->cqes)[cq_ci & cqe_cnt];\n \t}\n-\tused = RTE_MIN(used, cqe_n);\n+\tused = RTE_MIN(used, (1U << rxq->elts_n) - 1);\n \treturn used;\n }\n \n@@ -507,12 +512,11 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)\n \t\t\tcontainer_of(rxq, struct mlx5_rxq_ctrl, rxq);\n \tstruct rte_eth_dev *dev = ETH_DEV(rxq_ctrl->priv);\n \n-\tif (dev->rx_pkt_burst == NULL ||\n-\t    dev->rx_pkt_burst == removed_rx_burst) {\n+\tif (dev->rx_pkt_burst != mlx5_rx_burst) {\n \t\trte_errno = ENOTSUP;\n \t\treturn -rte_errno;\n \t}\n-\tif (offset >= (1 << rxq->cqe_n)) {\n+\tif (offset >= (1 << rxq->elts_n)) {\n \t\trte_errno = EINVAL;\n \t\treturn -rte_errno;\n \t}\n@@ -642,8 +646,7 @@ mlx5_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n \tstruct mlx5_rxq_data *rxq;\n \n-\tif (dev->rx_pkt_burst == NULL ||\n-\t    dev->rx_pkt_burst == removed_rx_burst) {\n+\tif (dev->rx_pkt_burst != mlx5_rx_burst) {\n \t\trte_errno = ENOTSUP;\n \t\treturn -rte_errno;\n \t}\n",
    "prefixes": [
        "1/4"
    ]
}