get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59709,
    "url": "http://patches.dpdk.org/api/patches/59709/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1569398015-6027-13-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": "<1569398015-6027-13-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1569398015-6027-13-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-09-25T07:53:35",
    "name": "[12/12] net/mlx5: check sibling device configurations mismatch",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "569c94a8c0bb2c87c9d7abc378522666b19bea83",
    "submitter": {
        "id": 1102,
        "url": "http://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.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/1569398015-6027-13-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 6519,
            "url": "http://patches.dpdk.org/api/series/6519/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6519",
            "date": "2019-09-25T07:53:23",
            "name": "net/mlx5: add bonding configuration support",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6519/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/59709/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/59709/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 28C8C1BECD;\n\tWed, 25 Sep 2019 09:54:33 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id C24B01BE87\n\tfor <dev@dpdk.org>; Wed, 25 Sep 2019 09:54:14 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tviacheslavo@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 25 Sep 2019 10:54:10 +0300",
            "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 x8P7sAXr030375;\n\tWed, 25 Sep 2019 10:54:10 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n\tby pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id\n\tx8P7sAFv006882; Wed, 25 Sep 2019 07:54:10 GMT",
            "(from viacheslavo@localhost)\n\tby pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id x8P7sAe4006881; \n\tWed, 25 Sep 2019 07:54:10 GMT"
        ],
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n\tviacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com",
        "Date": "Wed, 25 Sep 2019 07:53:35 +0000",
        "Message-Id": "<1569398015-6027-13-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1569398015-6027-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1569398015-6027-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 12/12] net/mlx5: check sibling device\n\tconfigurations mismatch",
        "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 devices backed by mlx5 PMD might share the same multiport\nInfiniband device context. It regards representors and slaves\nof bonding device. These ports are spawned with devargs.\nThese patch check whether configuration deduced from these\ndevargs is compatible with configurations if devices\nsharing the same context. It prevents the incorrect\nwhitelists, like:\n\n-w 82:00.0,representor=0,dv_flow_en=1\n-w 82:00.0,representor=1,dv_flow_en=0\n\nThe representors with indices [0-1] are supposed to spawned\nover the same PCi device, but there is dv_flow_en parameter\nmismatch.\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 50 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 71b30d9..951b9f5 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1519,6 +1519,53 @@ struct mlx5_dev_spawn_data {\n }\n \n /**\n+ * Check sibling device configurations.\n+ *\n+ * Sibling devices sharing the Infiniband device context\n+ * should have compatible configurations. This regards\n+ * representors and bonding slaves.\n+ *\n+ * @param priv\n+ *   Private device descriptor.\n+ * @param config\n+ *   Configuration of the device is going to be created.\n+ *\n+ * @return\n+ *   0 on success, EINVAL otherwise\n+ */\n+static int\n+mlx5_dev_check_sibling_config(struct mlx5_priv *priv,\n+\t\t\t      struct mlx5_dev_config *config)\n+{\n+\tstruct mlx5_ibv_shared *sh = priv->sh;\n+\tstruct mlx5_dev_config *sh_conf = NULL;\n+\tuint16_t port_id;\n+\n+\tassert(sh);\n+\t/* Nothing to compare for the single/first device. */\n+\tif (sh->refcnt == 1)\n+\t\treturn 0;\n+\t/* Find the device with shared context. */\n+\tMLX5_ETH_FOREACH_DEV(port_id) {\n+\t\tstruct mlx5_priv *opriv =\n+\t\t\trte_eth_devices[port_id].data->dev_private;\n+\n+\t\tif (opriv && opriv != priv && opriv->sh == sh) {\n+\t\t\tsh_conf = &opriv->config;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tif (!sh_conf)\n+\t\treturn 0;\n+\tif (sh_conf->dv_flow_en ^ config->dv_flow_en) {\n+\t\tDRV_LOG(ERR, \"\\\"dv_flow_en\\\" configuration mismatch\"\n+\t\t\t     \" for shared %s context\", sh->ibdev_name);\n+\t\trte_errno = EINVAL;\n+\t\treturn rte_errno;\n+\t}\n+\treturn 0;\n+}\n+/**\n  * Spawn an Ethernet device from Verbs information.\n  *\n  * @param dpdk_dev\n@@ -1886,6 +1933,9 @@ struct mlx5_dev_spawn_data {\n \t\t\tstrerror(rte_errno));\n \t\tgoto error;\n \t}\n+\terr = mlx5_dev_check_sibling_config(priv, &config);\n+\tif (err)\n+\t\tgoto error;\n \tconfig.hw_csum = !!(sh->device_attr.device_cap_flags_ex &\n \t\t\t    IBV_DEVICE_RAW_IP_CSUM);\n \tDRV_LOG(DEBUG, \"checksum offloading is %ssupported\",\n",
    "prefixes": [
        "12/12"
    ]
}