get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 51455,
    "url": "http://patches.dpdk.org/api/patches/51455/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1553155888-27498-10-git-send-email-viacheslavo@mellanox.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": "<1553155888-27498-10-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1553155888-27498-10-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-03-21T08:11:23",
    "name": "[09/14] net/mlx5: switch to the shared context IB attributes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6a29575fcdb0494c092cb6052c89d1956930442d",
    "submitter": {
        "id": 1102,
        "url": "http://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1553155888-27498-10-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 3842,
            "url": "http://patches.dpdk.org/api/series/3842/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3842",
            "date": "2019-03-21T08:11:18",
            "name": "net/mlx5: add support for multiport IB devices",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3842/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/51455/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/51455/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 983F41B479;\n\tThu, 21 Mar 2019 09:12:06 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id A14A61B443\n\tfor <dev@dpdk.org>; Thu, 21 Mar 2019 09:11:42 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tviacheslavo@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 21 Mar 2019 10:11:37 +0200",
            "from pegasus12.mtr.labs.mlnx. (pegasus12.mtr.labs.mlnx\n\t[10.210.17.40])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x2L8Bai7003643;\n\tThu, 21 Mar 2019 10:11:37 +0200"
        ],
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "shahafs@mellanox.com",
        "Date": "Thu, 21 Mar 2019 08:11:23 +0000",
        "Message-Id": "<1553155888-27498-10-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1553155888-27498-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1551376985-11096-1-git-send-email-viacheslavo@mellanox.com>\n\t<1553155888-27498-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 09/14] net/mlx5: switch to the shared context IB\n\tattributes",
        "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": "The code is updated to use the shared IB device attributes,\nlocated in the shared IB context. It saves some memory if\nthere are representors created over the single Infiniband\ndevice with multuple ports.\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5.c        |  1 -\n drivers/net/mlx5/mlx5.h        |  1 -\n drivers/net/mlx5/mlx5_ethdev.c |  6 +++---\n drivers/net/mlx5/mlx5_rxq.c    |  8 ++++----\n drivers/net/mlx5/mlx5_txq.c    | 14 +++++++-------\n 5 files changed, 14 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 16134de..a0f224b 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1113,7 +1113,6 @@ struct mlx5_dev_spawn_data {\n \tpriv->sh = sh;\n \tpriv->ctx = sh->ctx;\n \tpriv->ibv_port = spawn->ibv_port;\n-\tpriv->device_attr = sh->device_attr;\n \tpriv->mtu = ETHER_MTU;\n #ifndef RTE_ARCH_64\n \t/* Initialize UAR access locks for 32bit implementations. */\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 219addd..efa3a3c 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -227,7 +227,6 @@ struct mlx5_priv {\n \tstruct mlx5_ibv_shared *sh; /* Shared IB device context. */\n \tuint32_t ibv_port; /* IB device port number. */\n \tstruct ibv_context *ctx; /* Verbs context. */\n-\tstruct ibv_device_attr_ex device_attr; /* Device properties. */\n \tstruct ether_addr mac[MLX5_MAX_MAC_ADDRESSES]; /* MAC addresses. */\n \tBITFIELD_DECLARE(mac_own, uint64_t, MLX5_MAX_MAC_ADDRESSES);\n \t/* Bit-field of MAC addresses owned by the PMD. */\ndiff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c\nindex 2ccc743..69f238b 100644\n--- a/drivers/net/mlx5/mlx5_ethdev.c\n+++ b/drivers/net/mlx5/mlx5_ethdev.c\n@@ -515,8 +515,8 @@ struct ethtool_link_settings {\n \t * Since we need one CQ per QP, the limit is the minimum number\n \t * between the two values.\n \t */\n-\tmax = RTE_MIN(priv->device_attr.orig_attr.max_cq,\n-\t\t      priv->device_attr.orig_attr.max_qp);\n+\tmax = RTE_MIN(priv->sh->device_attr.orig_attr.max_cq,\n+\t\t      priv->sh->device_attr.orig_attr.max_qp);\n \t/* If max >= 65535 then max = 0, max_rx_queues is uint16_t. */\n \tif (max >= 65535)\n \t\tmax = 65535;\n@@ -577,7 +577,7 @@ struct ethtool_link_settings {\n int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)\n {\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n-\tstruct ibv_device_attr *attr = &priv->device_attr.orig_attr;\n+\tstruct ibv_device_attr *attr = &priv->sh->device_attr.orig_attr;\n \tsize_t size = strnlen(attr->fw_ver, sizeof(attr->fw_ver)) + 1;\n \n \tif (fw_size < size)\ndiff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex 0496c4e..fd1c3a2 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -856,10 +856,10 @@ struct mlx5_rxq_ibv *\n \t\trte_errno = ENOMEM;\n \t\tgoto error;\n \t}\n-\tDRV_LOG(DEBUG, \"port %u priv->device_attr.max_qp_wr is %d\",\n-\t\tdev->data->port_id, priv->device_attr.orig_attr.max_qp_wr);\n-\tDRV_LOG(DEBUG, \"port %u priv->device_attr.max_sge is %d\",\n-\t\tdev->data->port_id, priv->device_attr.orig_attr.max_sge);\n+\tDRV_LOG(DEBUG, \"port %u device_attr.max_qp_wr is %d\",\n+\t\tdev->data->port_id, priv->sh->device_attr.orig_attr.max_qp_wr);\n+\tDRV_LOG(DEBUG, \"port %u device_attr.max_sge is %d\",\n+\t\tdev->data->port_id, priv->sh->device_attr.orig_attr.max_sge);\n \tattr.wq.ibv = (struct ibv_wq_init_attr){\n \t\t.wq_context = NULL, /* Could be useful in the future. */\n \t\t.wq_type = IBV_WQT_RQ,\ndiff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c\nindex d3a5498..10a3040 100644\n--- a/drivers/net/mlx5/mlx5_txq.c\n+++ b/drivers/net/mlx5/mlx5_txq.c\n@@ -407,15 +407,15 @@ struct mlx5_txq_ibv *\n \t\t.cap = {\n \t\t\t/* Max number of outstanding WRs. */\n \t\t\t.max_send_wr =\n-\t\t\t\t((priv->device_attr.orig_attr.max_qp_wr <\n+\t\t\t\t((priv->sh->device_attr.orig_attr.max_qp_wr <\n \t\t\t\t  desc) ?\n-\t\t\t\t priv->device_attr.orig_attr.max_qp_wr :\n+\t\t\t\t priv->sh->device_attr.orig_attr.max_qp_wr :\n \t\t\t\t desc),\n \t\t\t/*\n \t\t\t * Max number of scatter/gather elements in a WR,\n \t\t\t * must be 1 to prevent libmlx5 from trying to affect\n \t\t\t * too much memory. TX gather is not impacted by the\n-\t\t\t * priv->device_attr.max_sge limit and will still work\n+\t\t\t * device_attr.max_sge limit and will still work\n \t\t\t * properly.\n \t\t\t */\n \t\t\t.max_send_sge = 1,\n@@ -780,10 +780,10 @@ struct mlx5_txq_ctrl *\n \ttmpl->txq.elts_n = log2above(desc);\n \ttmpl->idx = idx;\n \ttxq_set_params(tmpl);\n-\tDRV_LOG(DEBUG, \"port %u priv->device_attr.max_qp_wr is %d\",\n-\t\tdev->data->port_id, priv->device_attr.orig_attr.max_qp_wr);\n-\tDRV_LOG(DEBUG, \"port %u priv->device_attr.max_sge is %d\",\n-\t\tdev->data->port_id, priv->device_attr.orig_attr.max_sge);\n+\tDRV_LOG(DEBUG, \"port %u device_attr.max_qp_wr is %d\",\n+\t\tdev->data->port_id, priv->sh->device_attr.orig_attr.max_qp_wr);\n+\tDRV_LOG(DEBUG, \"port %u device_attr.max_sge is %d\",\n+\t\tdev->data->port_id, priv->sh->device_attr.orig_attr.max_sge);\n \ttmpl->txq.elts =\n \t\t(struct rte_mbuf *(*)[1 << tmpl->txq.elts_n])(tmpl + 1);\n \ttmpl->txq.stats.idx = idx;\n",
    "prefixes": [
        "09/14"
    ]
}