get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84964,
    "url": "http://patches.dpdk.org/api/patches/84964/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201210150648.8784-7-talshn@nvidia.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": "<20201210150648.8784-7-talshn@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201210150648.8784-7-talshn@nvidia.com",
    "date": "2020-12-10T15:06:21",
    "name": "[v2,06/33] net/mlx5: define mprq functions as static inline",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6dd26adb62bee8ff6f5ed0ef9475ef23443b765c",
    "submitter": {
        "id": 1893,
        "url": "http://patches.dpdk.org/api/people/1893/?format=api",
        "name": "Tal Shnaiderman",
        "email": "talshn@nvidia.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/20201210150648.8784-7-talshn@nvidia.com/mbox/",
    "series": [
        {
            "id": 14240,
            "url": "http://patches.dpdk.org/api/series/14240/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14240",
            "date": "2020-12-10T15:06:17",
            "name": "mlx5 Windows support - part #5",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/14240/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/84964/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/84964/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 6E295A04DB;\n\tThu, 10 Dec 2020 16:12:39 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 757D7CA12;\n\tThu, 10 Dec 2020 16:08:10 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 067BEC980\n for <dev@dpdk.org>; Thu, 10 Dec 2020 16:07:47 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n talshn@nvidia.com) with SMTP; 10 Dec 2020 17:07:45 +0200",
            "from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BAF7h8w007994;\n Thu, 10 Dec 2020 17:07:44 +0200"
        ],
        "From": "Tal Shnaiderman <talshn@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com,\n ophirmu@nvidia.com",
        "Date": "Thu, 10 Dec 2020 17:06:21 +0200",
        "Message-Id": "<20201210150648.8784-7-talshn@nvidia.com>",
        "X-Mailer": "git-send-email 2.16.1.windows.4",
        "In-Reply-To": "<20201210150648.8784-1-talshn@nvidia.com>",
        "References": "<20201027232335.31427-2-ophirmu@nvidia.com>\n <20201210150648.8784-1-talshn@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v2 06/33] net/mlx5: define mprq functions as\n\tstatic inline",
        "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": "From: Ophir Munk <ophirmu@nvidia.com>\n\nFunctions mlx5_check_mprq_support(), mlx5_rxq_mprq_enabled(),\nmlx5_mprq_enabled() are moved from source file mlx5_rxq.c to header file\nmlx5_rxtx.h and their type is updated to 'static __rte_always_inline'.\nPreviously the functions were declared as 'inline' in the source file\nwhich was reported as 'unresolved external symbol' error by some Windows\nlinkers.\n\nSigned-off-by: Ophir Munk <ophirmu@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/mlx5_rxq.c  | 71 ------------------------------------------\n drivers/net/mlx5/mlx5_rxtx.h | 73 ++++++++++++++++++++++++++++++++++++++++++--\n 2 files changed, 70 insertions(+), 74 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex da7a8b3cd7..c89e55b1c0 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -48,77 +48,6 @@ static_assert(MLX5_RSS_HASH_KEY_LEN ==\n \t      (unsigned int)sizeof(rss_hash_default_key),\n \t      \"wrong RSS default key size.\");\n \n-/**\n- * Check whether Multi-Packet RQ can be enabled for the device.\n- *\n- * @param dev\n- *   Pointer to Ethernet device.\n- *\n- * @return\n- *   1 if supported, negative errno value if not.\n- */\n-inline int\n-mlx5_check_mprq_support(struct rte_eth_dev *dev)\n-{\n-\tstruct mlx5_priv *priv = dev->data->dev_private;\n-\n-\tif (priv->config.mprq.enabled &&\n-\t    priv->rxqs_n >= priv->config.mprq.min_rxqs_num)\n-\t\treturn 1;\n-\treturn -ENOTSUP;\n-}\n-\n-/**\n- * Check whether Multi-Packet RQ is enabled for the Rx queue.\n- *\n- *  @param rxq\n- *     Pointer to receive queue structure.\n- *\n- * @return\n- *   0 if disabled, otherwise enabled.\n- */\n-inline int\n-mlx5_rxq_mprq_enabled(struct mlx5_rxq_data *rxq)\n-{\n-\treturn rxq->strd_num_n > 0;\n-}\n-\n-/**\n- * Check whether Multi-Packet RQ is enabled for the device.\n- *\n- * @param dev\n- *   Pointer to Ethernet device.\n- *\n- * @return\n- *   0 if disabled, otherwise enabled.\n- */\n-inline int\n-mlx5_mprq_enabled(struct rte_eth_dev *dev)\n-{\n-\tstruct mlx5_priv *priv = dev->data->dev_private;\n-\tuint32_t i;\n-\tuint16_t n = 0;\n-\tuint16_t n_ibv = 0;\n-\n-\tif (mlx5_check_mprq_support(dev) < 0)\n-\t\treturn 0;\n-\t/* All the configured queues should be enabled. */\n-\tfor (i = 0; i < priv->rxqs_n; ++i) {\n-\t\tstruct mlx5_rxq_data *rxq = (*priv->rxqs)[i];\n-\t\tstruct mlx5_rxq_ctrl *rxq_ctrl = container_of\n-\t\t\t(rxq, struct mlx5_rxq_ctrl, rxq);\n-\n-\t\tif (rxq == NULL || rxq_ctrl->type != MLX5_RXQ_TYPE_STANDARD)\n-\t\t\tcontinue;\n-\t\tn_ibv++;\n-\t\tif (mlx5_rxq_mprq_enabled(rxq))\n-\t\t\t++n;\n-\t}\n-\t/* Multi-Packet RQ can't be partially configured. */\n-\tMLX5_ASSERT(n == 0 || n == n_ibv);\n-\treturn n == n_ibv;\n-}\n-\n /**\n  * Calculate the number of CQEs in CQ for the Rx queue.\n  *\ndiff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h\nindex 7989a50403..1e9345af61 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.h\n+++ b/drivers/net/mlx5/mlx5_rxtx.h\n@@ -311,9 +311,6 @@ struct mlx5_txq_ctrl {\n \n extern uint8_t rss_hash_default_key[];\n \n-int mlx5_check_mprq_support(struct rte_eth_dev *dev);\n-int mlx5_rxq_mprq_enabled(struct mlx5_rxq_data *rxq);\n-int mlx5_mprq_enabled(struct rte_eth_dev *dev);\n unsigned int mlx5_rxq_cqe_num(struct mlx5_rxq_data *rxq_data);\n int mlx5_mprq_free_mp(struct rte_eth_dev *dev);\n int mlx5_mprq_alloc_mp(struct rte_eth_dev *dev);\n@@ -920,4 +917,74 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,\n \treturn MLX5_RXQ_CODE_EXIT;\n }\n \n+/**\n+ * Check whether Multi-Packet RQ can be enabled for the device.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device.\n+ *\n+ * @return\n+ *   1 if supported, negative errno value if not.\n+ */\n+static __rte_always_inline int\n+mlx5_check_mprq_support(struct rte_eth_dev *dev)\n+{\n+\tstruct mlx5_priv *priv = dev->data->dev_private;\n+\n+\tif (priv->config.mprq.enabled &&\n+\t    priv->rxqs_n >= priv->config.mprq.min_rxqs_num)\n+\t\treturn 1;\n+\treturn -ENOTSUP;\n+}\n+\n+/**\n+ * Check whether Multi-Packet RQ is enabled for the Rx queue.\n+ *\n+ *  @param rxq\n+ *     Pointer to receive queue structure.\n+ *\n+ * @return\n+ *   0 if disabled, otherwise enabled.\n+ */\n+static __rte_always_inline int\n+mlx5_rxq_mprq_enabled(struct mlx5_rxq_data *rxq)\n+{\n+\treturn rxq->strd_num_n > 0;\n+}\n+\n+/**\n+ * Check whether Multi-Packet RQ is enabled for the device.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device.\n+ *\n+ * @return\n+ *   0 if disabled, otherwise enabled.\n+ */\n+static __rte_always_inline int\n+mlx5_mprq_enabled(struct rte_eth_dev *dev)\n+{\n+\tstruct mlx5_priv *priv = dev->data->dev_private;\n+\tuint32_t i;\n+\tuint16_t n = 0;\n+\tuint16_t n_ibv = 0;\n+\n+\tif (mlx5_check_mprq_support(dev) < 0)\n+\t\treturn 0;\n+\t/* All the configured queues should be enabled. */\n+\tfor (i = 0; i < priv->rxqs_n; ++i) {\n+\t\tstruct mlx5_rxq_data *rxq = (*priv->rxqs)[i];\n+\t\tstruct mlx5_rxq_ctrl *rxq_ctrl = container_of\n+\t\t\t(rxq, struct mlx5_rxq_ctrl, rxq);\n+\n+\t\tif (rxq == NULL || rxq_ctrl->type != MLX5_RXQ_TYPE_STANDARD)\n+\t\t\tcontinue;\n+\t\tn_ibv++;\n+\t\tif (mlx5_rxq_mprq_enabled(rxq))\n+\t\t\t++n;\n+\t}\n+\t/* Multi-Packet RQ can't be partially configured. */\n+\tMLX5_ASSERT(n == 0 || n == n_ibv);\n+\treturn n == n_ibv;\n+}\n #endif /* RTE_PMD_MLX5_RXTX_H_ */\n",
    "prefixes": [
        "v2",
        "06/33"
    ]
}