Show a patch.

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

{
    "id": 45259,
    "url": "http://patches.dpdk.org/api/patches/45259/",
    "web_url": "http://patches.dpdk.org/patch/45259/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180924231721.15799-12-yskoh@mellanox.com>",
    "date": "2018-09-24T23:17:54",
    "name": "[v3,11/11] net/mlx5: add runtime parameter to enable Direct Verbs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "73f348e09ca545bf4e39997da1e1118eeafdaec8",
    "submitter": {
        "id": 636,
        "url": "http://patches.dpdk.org/api/people/636/",
        "name": "Yongseok Koh",
        "email": "yskoh@mellanox.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/45259/mbox/",
    "series": [
        {
            "id": 1476,
            "url": "http://patches.dpdk.org/api/series/1476/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1476",
            "date": "2018-09-24T23:17:33",
            "name": "net/mlx5: add Direct Verbs flow driver support",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1476/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45259/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45259/checks/",
    "tags": {},
    "headers": {
        "x-forefront-antispam-report": "SFV:NSPM;\n\tSFS:(10009020)(1496009)(396003)(376002)(346002)(366004)(39860400002)(136003)(199004)(189003)(66066001)(2616005)(476003)(446003)(486006)(11346002)(6436002)(305945005)(7736002)(386003)(6506007)(6486002)(6512007)(186003)(102836004)(5250100002)(76176011)(25786009)(26005)(68736007)(6116002)(54906003)(110136005)(99286004)(1076002)(3846002)(71200400001)(52116002)(86362001)(53936002)(71190400001)(97736004)(8936002)(107886003)(14444005)(256004)(4326008)(316002)(2900100001)(81156014)(8676002)(36756003)(81166006)(105586002)(2906002)(106356001)(6636002)(478600001)(5660300001)(14454004)(6666003)(309714004);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3996;\n\tH:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; \n\tPTR:InfoNoRecords; A:1; MX:1; ",
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<20180924231721.15799-1-yskoh@mellanox.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-MS-Exchange-CrossTenant-originalarrivaltime": "24 Sep 2018 23:17:54.4045\n\t(UTC)",
        "x-ms-office365-filtering-correlation-id": "cc5225e5-4b40-414d-a06a-08d62273f4a3",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 100AE1B155;\n\tTue, 25 Sep 2018 01:18:13 +0200 (CEST)",
            "from EUR02-HE1-obe.outbound.protection.outlook.com\n\t(mail-eopbgr10050.outbound.protection.outlook.com [40.107.1.50])\n\tby dpdk.org (Postfix) with ESMTP id 9E1001B149\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 01:18:07 +0200 (CEST)",
            "from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by\n\tDB3PR0502MB3996.eurprd05.prod.outlook.com (52.134.65.142) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.1164.25; Mon, 24 Sep 2018 23:18:06 +0000",
            "from DB3PR0502MB3980.eurprd05.prod.outlook.com\n\t([fe80::1cb0:661b:ecab:6045]) by\n\tDB3PR0502MB3980.eurprd05.prod.outlook.com\n\t([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1164.017;\n\tMon, 24 Sep 2018 23:18:06 +0000"
        ],
        "References": "<20180919072143.23211-1-yskoh@mellanox.com>\n\t<20180924231721.15799-1-yskoh@mellanox.com>",
        "spamdiagnosticmetadata": "NSPM",
        "x-ms-exchange-senderadcheck": "1",
        "MIME-Version": "1.0",
        "Accept-Language": "en-US",
        "Thread-Index": "AQHUVFzSKIklkix+D0KqO7KBYKdG4g==",
        "x-microsoft-antispam": "BCL:0; PCL:0;\n\tRULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);\n\tSRVR:DB3PR0502MB3996; ",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "x-ms-traffictypediagnostic": "DB3PR0502MB3996:",
        "X-Original-To": "patchwork@dpdk.org",
        "Content-Type": "text/plain; charset=\"iso-8859-1\"",
        "x-ms-publictraffictype": "Email",
        "x-microsoft-antispam-prvs": "<DB3PR0502MB39965807CF10DC6CB85C4765C3170@DB3PR0502MB3996.eurprd05.prod.outlook.com>",
        "x-clientproxiedby": "BN6PR03CA0021.namprd03.prod.outlook.com\n\t(2603:10b6:404:23::31) To DB3PR0502MB3980.eurprd05.prod.outlook.com\n\t(2603:10a6:8:10::27)",
        "CC": "\"dev@dpdk.org\" <dev@dpdk.org>, Ori Kam <orika@mellanox.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "received-spf": "None (protection.outlook.com: mellanox.com does not designate\n\tpermitted sender hosts)",
        "List-Post": "<mailto:dev@dpdk.org>",
        "To": "Thomas Monjalon <thomas@monjalon.net>,\n\tShahaf Shuler <shahafs@mellanox.com>",
        "x-exchange-antispam-report-cfa-test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(6055026)(149066)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201708071742011)(7699051);\n\tSRVR:DB3PR0502MB3996; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3996; ",
        "Delivered-To": "patchwork@dpdk.org",
        "X-MS-Exchange-CrossTenant-id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
        "x-forefront-prvs": "0805EC9467",
        "Precedence": "list",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Date": "Mon, 24 Sep 2018 23:17:54 +0000",
        "x-ld-processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr",
        "From": "Yongseok Koh <yskoh@mellanox.com>",
        "Thread-Topic": "[PATCH v3 11/11] net/mlx5: add runtime parameter to enable\n\tDirect Verbs",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "cc5225e5-4b40-414d-a06a-08d62273f4a3",
        "x-originating-ip": "[209.116.155.178]",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n\ts=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=qcohSrrtsNWhMiGPM51J1JUAtahSv6t5z9LhBgqCJnw=;\n\tb=W6CirrDtDlYXD5LA1lS3AfTA4lPF+I4zFFb3/enPZh4zVxA45FFLGUDVzzGdCOwGUWB3usRhIoNnET3D5FilpEAyQicFpnwlGjzmnKJhHHFgKU1XqHOAHONq/7flFCSU4VJ3JbSAkE/ZN4VDf4JBAFn3tRgDO/j6UQDrzCQv4J8=",
        "Message-ID": "<20180924231721.15799-12-yskoh@mellanox.com>",
        "spamdiagnosticoutput": "1:99",
        "x-ms-office365-filtering-ht": "Tenant",
        "Content-Language": "en-US",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-MS-TNEF-Correlator": "",
        "x-exchange-antispam-report-test": "UriScan:;",
        "X-OriginatorOrg": "Mellanox.com",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "x-microsoft-exchange-diagnostics": "1; DB3PR0502MB3996;\n\t6:WRwHLcx8cFTaEJfKD370ZeISZuMNWRqLFog6+zNbQxIbMBrvXOpFKO4tcP1bwFwJUNu45y5/fXQQmxDicKf3tszDECgHd5l4GIY1un+F9vBAUVjW19qHuGJml/rtNDGTO9glalGAFIQ7RSpyA/SCY8Hv4aycSn6ZD2Ele03cWbE30BGyHSXr7Syrvr71OWElzWfjtiy3OlBaPsSySC0S7bpvfzKamONDRVuqgfkqsH4cY9NE0W6x208qjqYtTLed1+dHeo0vgqJBAjKxaEsk5fvgujsu26x3zHtmwTI/1Y3rKy0a1GsLCsVqdTWxNVzwAK3MM/ry19RwzQ3H/r2cHjH2RzUVUzoI59Gmq5BCjVBfJAHfj0LXKpeu6F/Ty6M0fd+YcIq0W7YvuI5rdVDtus/7K3xOQPlC2vhF6LgJM1DRJMuDe8JFTK4Op/9twqUyEJnYIUiLxr23vtxqE3N9zg==;\n\t5:WC9WmdXhyQxCyzoAfV1aIewy7qRbN0bkKHxFnijaESh2PPnZ8st1se5ne2/yFo+6WZC9TqVLiz2SWVkM2MdCC2BvlMUOF0PDopEJGoZ/wVHVlYvoNGiT9Cl0fKVdwvxKepF6HtcbYQ6XAIHJTVoHkIU3F94l67F/L4tvAyXcE/M=;\n\t7:4T6H3CmbJ66tFyG9SdYpUiR4aQjRPFokCHGGGeY4YM9SZ1xmrHY1pZtLUI/iuyMW1+LrI+MMtrFlB/QpLncW0IOMnzFq5+zbnE/sGeEVCFSd2IsyxsxOBKQLMrp+XuaEEW1QJyLghvRw8yYVGfcG9XLKeeEYn4C5pYeM78RGUF/QZjcmNgM5ECSfP4N1yMJLJgtBXa5MZFloXZ4oZPoyMVjaDdKBvtH/XMsKhyzPhRNCbwuLJzaor3cLfArtAAw2",
        "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
        "X-MS-Has-Attach": "",
        "authentication-results": "spf=none (sender IP is )\n\tsmtp.mailfrom=yskoh@mellanox.com; ",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "x-ms-exchange-messagesentrepresentingtype": "1",
        "X-BeenThere": "dev@dpdk.org",
        "x-microsoft-antispam-message-info": "mWCAQpdHU/RmpuS3HVlhqKK3kpzKxWm7ZhgOoQYxvopD5o8xgai3BJx1U/ZB+HeKM2dOahfeSijUDOoeRsVI0RuwJ9U0rp+RGzb7d5LNZYfqt76BG/EfQU0LN/Uc4KmR+/jsNmyOE1RnneS4b2fnlW3WGad00y4YdcMlAPV5odN5rOB7Od2bQrZ5wLqV7b8OMKec78BnVxU1520cl7AfqYB/UCVMLSsj3mrb5A9sX7eAGwQE+u55Fab8kpRdrNiD4HIPOo0aJPkT5qMBepmBvCl9G4d8DIgaJa2GiMo0eS5xhGZxmjOdAIDkLX8/h3J5YazN1iUAMTU4V8P7DSYapIfvXir6MN/cz8j39J9GIwY=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DB3PR0502MB3996",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Subject": "[dpdk-dev] [PATCH v3 11/11] net/mlx5: add runtime parameter to\n\tenable Direct Verbs"
    },
    "content": "From: Ori Kam <orika@mellanox.com>\n\nDV flow API is based on new kernel API and is\nmissing some functionality like counter but add other functionality\nlike encap.\n\nIn order not to affect current users even if the kernel supports\nthe new DV API it should be enabled only manually.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\nAcked-by: Yongseok Koh <yskoh@mellanox.com>\n---\n doc/guides/nics/mlx5.rst     | 7 +++++++\n drivers/net/mlx5/mlx5.c      | 6 ++++++\n drivers/net/mlx5/mlx5.h      | 1 +\n drivers/net/mlx5/mlx5_flow.c | 9 +++++++--\n 4 files changed, 21 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex dbdb90b59..67696283e 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -397,6 +397,13 @@ Run-time configuration\n \n   Disabled by default.\n \n+- ``dv_flow_en`` parameter [int]\n+\n+  A nonzero value enables the DV flow steering assuming it is supported\n+  by the driver.\n+\n+  Disabled by default.\n+\n - ``representor`` parameter [list]\n \n   This parameter can be used to instantiate DPDK Ethernet devices from\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex ab44864e9..9b208109b 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -90,6 +90,9 @@\n /* Allow L3 VXLAN flow creation. */\n #define MLX5_L3_VXLAN_EN \"l3_vxlan_en\"\n \n+/* Activate DV flow steering. */\n+#define MLX5_DV_FLOW_EN \"dv_flow_en\"\n+\n /* Activate Netlink support in VF mode. */\n #define MLX5_VF_NL_EN \"vf_nl_en\"\n \n@@ -491,6 +494,8 @@ mlx5_args_check(const char *key, const char *val, void *opaque)\n \t\tconfig->l3_vxlan_en = !!tmp;\n \t} else if (strcmp(MLX5_VF_NL_EN, key) == 0) {\n \t\tconfig->vf_nl_en = !!tmp;\n+\t} else if (strcmp(MLX5_DV_FLOW_EN, key) == 0) {\n+\t\tconfig->dv_flow_en = !!tmp;\n \t} else {\n \t\tDRV_LOG(WARNING, \"%s: unknown parameter\", key);\n \t\trte_errno = EINVAL;\n@@ -528,6 +533,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)\n \t\tMLX5_RX_VEC_EN,\n \t\tMLX5_L3_VXLAN_EN,\n \t\tMLX5_VF_NL_EN,\n+\t\tMLX5_DV_FLOW_EN,\n \t\tMLX5_REPRESENTOR,\n \t\tNULL,\n \t};\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 8ff6d6987..8bb619d9e 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -111,6 +111,7 @@ struct mlx5_dev_config {\n \tunsigned int mpw_hdr_dseg:1; /* Enable DSEGs in the title WQEBB. */\n \tunsigned int l3_vxlan_en:1; /* Enable L3 VXLAN flow creation. */\n \tunsigned int vf_nl_en:1; /* Enable Netlink requests in VF mode. */\n+\tunsigned int dv_flow_en:1; /* Enable DV flow. */\n \tunsigned int swp:1; /* Tx generic tunnel checksum and TSO offload. */\n \tstruct {\n \t\tunsigned int enabled:1; /* Whether MPRQ is enabled. */\ndiff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex c6c145021..6a4a5d17e 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -2487,10 +2487,15 @@ mlx5_dev_filter_ctrl(struct rte_eth_dev *dev,\n  *   Pointer to Ethernet device structure.\n  */\n void\n-mlx5_flow_init_driver_ops(struct rte_eth_dev *dev __rte_unused)\n+mlx5_flow_init_driver_ops(struct rte_eth_dev *dev)\n {\n+\tstruct priv *priv __rte_unused = dev->data->dev_private;\n+\n #ifdef HAVE_IBV_FLOW_DV_SUPPORT\n-\tmlx5_flow_dv_get_driver_ops(&nic_ops);\n+\tif (priv->config.dv_flow_en)\n+\t\tmlx5_flow_dv_get_driver_ops(&nic_ops);\n+\telse\n+\t\tmlx5_flow_verbs_get_driver_ops(&nic_ops);\n #else\n \tmlx5_flow_verbs_get_driver_ops(&nic_ops);\n #endif\n",
    "prefixes": [
        "v3",
        "11/11"
    ]
}