get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56850,
    "url": "http://patchwork.dpdk.org/api/patches/56850/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1563786795-14027-28-git-send-email-matan@mellanox.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1563786795-14027-28-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1563786795-14027-28-git-send-email-matan@mellanox.com",
    "date": "2019-07-22T09:13:14",
    "name": "[27/28] net/mlx5: adjust the maximum LRO message size",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4469399005b97f15c8c3b6bc0a543ac0b8cc424d",
    "submitter": {
        "id": 796,
        "url": "http://patchwork.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patchwork.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1563786795-14027-28-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 5639,
            "url": "http://patchwork.dpdk.org/api/series/5639/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=5639",
            "date": "2019-07-22T09:12:48",
            "name": "net/mlx5: support LRO",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/5639/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/56850/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/56850/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A638D1BE91;\n\tMon, 22 Jul 2019 11:14:25 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id E88BE1BDFC\n\tfor <dev@dpdk.org>; Mon, 22 Jul 2019 11:13:30 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE2 (envelope-from\n\tmatan@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 22 Jul 2019 12:13:24 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n\t[10.210.16.112])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6M9DMjq010084;\n\tMon, 22 Jul 2019 12:13:24 +0300"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>, \n\tViacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "Cc": "dev@dpdk.org, Dekel Peled <dekelp@mellanox.com>",
        "Date": "Mon, 22 Jul 2019 09:13:14 +0000",
        "Message-Id": "<1563786795-14027-28-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1563786795-14027-1-git-send-email-matan@mellanox.com>",
        "References": "<1563786795-14027-1-git-send-email-matan@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 27/28] net/mlx5: adjust the maximum LRO message\n\tsize",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "LRO message is contained in the MPRQ strides.\nWhile the LRO message size cannot be bigger than 65280 according to the\nPRM, the strides which contain it may be bigger than the maximum buffer\nsize allowed in dpdk mbuf - 0xFFFF.\n\nAdjust the maximum LRO message size to avoid buffer length overflow.\n\nSigned-off-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5.h     |  1 +\n drivers/net/mlx5/mlx5_rxq.c | 37 ++++++++++++++++++++++++++++++++++++-\n 2 files changed, 37 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 1dc8b7c..24fe817 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -624,6 +624,7 @@ struct mlx5_priv {\n \tstruct ibv_flow_action *verbs_action;\n \t/**< Verbs modify header action object. */\n \tuint8_t ft_type; /**< Flow table type, Rx or Tx. */\n+\tuint8_t max_lro_msg_size;\n \t/* Tags resources cache. */\n \tuint32_t link_speed_capa; /* Link speed capabilities. */\n \tstruct mlx5_xstats_ctrl xstats_ctrl; /* Extended stats control. */\ndiff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex 7c252e3..51b2f00 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -1544,6 +1544,39 @@ struct mlx5_rxq_obj *\n }\n \n /**\n+ * Adjust the maximum LRO massage size.\n+ * LRO massage is contained in the MPRQ strides.\n+ * While the LRO massage size cannot be bigger than 65280 according to the\n+ * PRM, the strides which contain it may be bigger.\n+ * Adjust the maximum LRO massage size to avoid the above option.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device.\n+ * @param strd_n\n+ *   Number of strides per WQE..\n+ * @param strd_sz\n+ *   The stride size.\n+ */\n+static void\n+mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint32_t strd_n,\n+\t\t\t     uint32_t strd_sz)\n+{\n+\tstruct mlx5_priv *priv = dev->data->dev_private;\n+\tuint32_t max_buf_len = strd_sz * strd_n;\n+\n+\tif (max_buf_len > (uint64_t)UINT16_MAX)\n+\t\tmax_buf_len = RTE_ALIGN_FLOOR((uint32_t)UINT16_MAX, strd_sz);\n+\tmax_buf_len /= 256;\n+\tmax_buf_len = RTE_MIN(max_buf_len, (uint32_t)UINT8_MAX);\n+\tassert(max_buf_len);\n+\tif (priv->max_lro_msg_size)\n+\t\tpriv->max_lro_msg_size =\n+\t\t\tRTE_MIN((uint32_t)priv->max_lro_msg_size, max_buf_len);\n+\telse\n+\t\tpriv->max_lro_msg_size = max_buf_len;\n+}\n+\n+/**\n  * Create a DPDK Rx queue.\n  *\n  * @param dev\n@@ -1626,6 +1659,8 @@ struct mlx5_rxq_ctrl *\n \t\ttmpl->rxq.strd_headroom_en = strd_headroom_en;\n \t\ttmpl->rxq.mprq_max_memcpy_len = RTE_MIN(mb_len -\n \t\t\t    RTE_PKTMBUF_HEADROOM, config->mprq.max_memcpy_len);\n+\t\tmlx5_max_lro_msg_size_adjust(dev, (1 << tmpl->rxq.strd_num_n),\n+\t\t\t\t\t     (1 << tmpl->rxq.strd_sz_n));\n \t\tDRV_LOG(DEBUG,\n \t\t\t\"port %u Rx queue %u: Multi-Packet RQ is enabled\"\n \t\t\t\" strd_num_n = %u, strd_sz_n = %u\",\n@@ -2168,7 +2203,7 @@ struct mlx5_hrxq *\n \t\tif (lro) {\n \t\t\ttir_attr.lro_timeout_period_usecs =\n \t\t\t\t\tpriv->config.lro.timeout;\n-\t\t\ttir_attr.lro_max_msg_sz = 0xff;\n+\t\t\ttir_attr.lro_max_msg_sz = priv->max_lro_msg_size;\n \t\t\ttir_attr.lro_enable_mask = lro;\n \t\t}\n \t\ttir = mlx5_devx_cmd_create_tir(priv->sh->ctx, &tir_attr);\n",
    "prefixes": [
        "27/28"
    ]
}