get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87884,
    "url": "https://patches.dpdk.org/api/patches/87884/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210212110630.2605-1-viacheslavo@nvidia.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": "<20210212110630.2605-1-viacheslavo@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210212110630.2605-1-viacheslavo@nvidia.com",
    "date": "2021-02-12T11:06:30",
    "name": "net/mlx5: fix external buffer pool registration for Rx queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9c6f62fd644fa6b54439775635bb784d67c5d40a",
    "submitter": {
        "id": 1926,
        "url": "https://patches.dpdk.org/api/people/1926/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@nvidia.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/20210212110630.2605-1-viacheslavo@nvidia.com/mbox/",
    "series": [
        {
            "id": 15248,
            "url": "https://patches.dpdk.org/api/series/15248/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15248",
            "date": "2021-02-12T11:06:30",
            "name": "net/mlx5: fix external buffer pool registration for Rx queue",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15248/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87884/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/87884/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 F229EA0547;\n\tFri, 12 Feb 2021 12:06:34 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 80C6922A259;\n\tFri, 12 Feb 2021 12:06:34 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id A2AC822A240\n for <dev@dpdk.org>; Fri, 12 Feb 2021 12:06:32 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@nvidia.com) with SMTP; 12 Feb 2021 13:06:31 +0200",
            "from nvidia.com (pegasus11.mtr.labs.mlnx [10.210.16.104])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 11CB6Vl4015241;\n Fri, 12 Feb 2021 13:06:31 +0200"
        ],
        "From": "Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "rasland@nvidia.com, matan@nvidia.com, stable@dpdk.org",
        "Date": "Fri, 12 Feb 2021 13:06:30 +0200",
        "Message-Id": "<20210212110630.2605-1-viacheslavo@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.1",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: fix external buffer pool registration\n for Rx queue",
        "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": "On Rx queue creation the mlx5 PMD registers the data buffers of the\nspecified pools for DMA operations. It scans the mem_list of the pools\nand creates the MRs (DMA related NIC objects) for the chunks found.\nIf the pool is created with rte_pktmbuf_pool_create_extbuf() and\nrefers to the external attached buffers (whose are in the area of\napplication responsibility and it should explicitly register the\ndata buffer memory for DMA with rte_dev_dma_map() call) the chunks\ncontain the mbuf structures only, w/o any built-in data buffers.\nHence, DMA with mlx5 NIC never happens to this area and there is\nno need to create MRs for these ones.\n\nThe extra not needed MRs were created for the pools with external\nbuffers causing MR cache load and performance was slightly affected.\nThe patch checks the mbuf pool type and skips MR creation for the\npools with external buffers.\n\nFixes: bdb8e5b1ea7b (\"net/mlx5: allow allocated mbuf with external buffer\")\nCc: stable@dpdk.org\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n drivers/net/mlx5/mlx5_mr.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c\nindex 8b20ee3f83..da4e91fc24 100644\n--- a/drivers/net/mlx5/mlx5_mr.c\n+++ b/drivers/net/mlx5/mlx5_mr.c\n@@ -535,7 +535,18 @@ mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,\n \t\t.mr_ctrl = mr_ctrl,\n \t\t.ret = 0,\n \t};\n+\tuint32_t flags = rte_pktmbuf_priv_flags(mp);\n \n+\tif (flags & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF) {\n+\t\t/*\n+\t\t * The pinned external buffer should be registered for DMA\n+\t\t * operations by application. The mem_list of the pool contains\n+\t\t * the list of chunks with mbuf structures w/o built-in data\n+\t\t * buffers and DMA actually does not happen there, no need\n+\t\t * to create MR for these chunks.\n+\t\t */\n+\t\treturn 0;\n+\t}\n \tDRV_LOG(DEBUG, \"Port %u Rx queue registering mp %s \"\n \t\t       \"having %u chunks.\", dev->data->port_id,\n \t\t       mp->name, mp->nb_mem_chunks);\n",
    "prefixes": []
}