Show a patch.

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

{
    "id": 45256,
    "url": "http://patches.dpdk.org/api/patches/45256/",
    "web_url": "http://patches.dpdk.org/patch/45256/",
    "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-9-yskoh@mellanox.com>",
    "date": "2018-09-24T23:17:49",
    "name": "[v3,08/11] net/mlx5: add Direct Verbs translate actions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f80c31e1a2d0145ed9f6db1a5cc9834bab63e05f",
    "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/45256/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/45256/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45256/checks/",
    "tags": {},
    "headers": {
        "x-forefront-antispam-report": "SFV:NSPM;\n\tSFS:(10009020)(1496009)(396003)(376002)(346002)(366004)(39860400002)(136003)(199004)(189003)(51234002)(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)(256004)(4326008)(316002)(2900100001)(81156014)(8676002)(36756003)(81166006)(105586002)(2906002)(106356001)(6636002)(478600001)(5660300001)(14454004);\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:49.3732\n\t(UTC)",
        "x-ms-office365-filtering-correlation-id": "1e2c61fd-36d0-49e2-62dc-08d62273f19a",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8A1981B161;\n\tTue, 25 Sep 2018 01:18:00 +0200 (CEST)",
            "from EUR02-HE1-obe.outbound.protection.outlook.com\n\t(mail-eopbgr10080.outbound.protection.outlook.com [40.107.1.80])\n\tby dpdk.org (Postfix) with ESMTP id 7345E1B10E\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 01:17:50 +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:17:49 +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:17:49 +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": "AQHUVFzPycJEA98qvE6JD8Yd0KROCQ==",
        "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": "<DB3PR0502MB3996B3BD7C9C3887B4F3F7A1C3170@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:49 +0000",
        "x-ld-processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr",
        "From": "Yongseok Koh <yskoh@mellanox.com>",
        "Thread-Topic": "[PATCH v3 08/11] net/mlx5: add Direct Verbs translate actions",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "1e2c61fd-36d0-49e2-62dc-08d62273f19a",
        "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=KQIfoa7sdiYQmsaWUU8ULw6t0rbQp+0iEnPjRIODTdU=;\n\tb=iwujc9gSrj4ZiD8kUEaZQi8gZZ/4eB/j6eyPMvDpvjSOHvYz+P+Tw7Oj8+E3xH9Oot1CXaz5S5BL54oIlBkurdBuzV59/S7N4XtjrgRslecPOfdhpiKEGKYR9Cb/TjiwnmhJFJzre2qfLMirQWq5cAiNH2qywEzyOaZyaWShTr4=",
        "Message-ID": "<20180924231721.15799-9-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:DzoxApaBUuCzJk8ugnIbsLQe/hSWTlsgUxjIj5wn45lFSYH/ReaYTbOryVvkMT/9M6LETi3vWrg3E0h09/p/6ycdTWly1AQjdYRYNU5v94MmnE/gk2m/Usf8z6nhZwooDdtBEL2tZYoQc41YZvjE5ORgSmfeNGvQnU50m2ENuRnqSxpQqga+gMojv4AEDkey7GmBgNVkPt9ozWkYUY3qd7z02Ka8JCEnQfEbtCLDgjnPH1G6Yagu3a2xoQVoVrMFXjPM/+yzkwUbdJzVeo8O1Buu1JUHaR2I6szGDnxJPOQiNcZDbJKiFslhZLYHLNFgMXSo1/AX5Ao+6Qyynp71dyGaWWUTO1URFacoNcbSBFbUEiMhFv0q97hqeq7TNZKIDyvX+QknkUZmGP2d+TK6RIU38EaVA/hUoQio+cqeZyIa7csuUNCZw+Z+c7Nr9JSviJ3CzU2+r4aeYcrn5XC9JQ==;\n\t5:3D79Kc3Tqy52yFQbaQtKG+fiaUuz3w1TFYO61s2igNgDTydczY6WHAi7D+8QC6TvemhIyCZ+64Lj8Y9Ijkjw6YVOptsDKg1CIZynHnWahpm1cEd1+z4ZmdHXIjvdgjv9jKaDfMuwPe2BOpJnpl3W9jcDzYbc9QU3/Xo/i6K1HC4=;\n\t7:tRoz4GC0pGShgFgQj68caIqep7Q2T+GMAj0w81FfJ/QC3Oqqe18d6lPQH1o28dpNmaYvfx0b9+9q3Faa+Qpu8lQbi3Bvi37cin3qSRiLw5vrTpnKSRVwWCHKpP8qCtvpSFSzzHRkuS00frzTvXsL6a0Lo4Kjbi93w7uVQ3qIHbK2oMJ4vFbkOSiZxrvGaeV8KGvSwf1z5ELROduMt1xPjeEDXH10x6TjgNoy8iyGT4LjFegnEoXAL5pLS2TJzd84",
        "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": "3GJKSRVCSkuVw/zuT8ZFiboZ54y2TqR4baFSZnthmagyijtHbwV6ff28dUIxWNxLObaLdH2YYVUaPifwfrUD3aQYqAy1xZOrT1UTL08wiKPGz/cyrpy3ppP8tqxRJs4aGsy37kkluULeOHFuyK3LUdeOr/uCRWep6st/fE0PCuUA9A+Mo7xO+8LPbnMYVpy6KudCcSiymN4+rm//snKQ+V9OSaqQ7xs8+Dh1Q7qaWOkMRAnHMg3LHW+n9Gj/CEgURlHWVQtq0FUma2YB9V81+jpJ9TXoXZxgngt6p/KerGNfHhmQYrbPHuZ/u03RbMLd9lTL97IM1XckpRLswOcrN1ahBmD8Vg+5jpjuMhxz/lk=",
        "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 08/11] net/mlx5: add Direct Verbs translate\n\tactions"
    },
    "content": "From: Ori Kam <orika@mellanox.com>\n\nIn this commit we add the translation of flow actions.\nUnlike the Verbs API actions are separeted from the items and are passed\nto the API in array structure.\nSince the target action like RSS require the QP information those\nactions are handled both in the translate action and in the apply.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\nAcked-by: Yongseok Koh <yskoh@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.h    |  7 +++++\n drivers/net/mlx5/mlx5_flow_dv.c | 61 +++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 68 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex 7f0566fc9..ec860ef4b 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -136,6 +136,8 @@ struct mlx5_flow_dv_match_params {\n \t/**< Matcher value. This value is used as the mask or as a key. */\n };\n \n+#define MLX5_DV_MAX_NUMBER_OF_ACTIONS 8\n+\n /* Matcher structure. */\n struct mlx5_flow_dv_matcher {\n \tstruct mlx5_cache cache; /**< Cache to struct mlx5dv_flow_matcher. */\n@@ -154,6 +156,11 @@ struct mlx5_flow_dv {\n \tstruct mlx5_flow_dv_match_params value;\n \t/**< Holds the value that the packet is compared to. */\n \tstruct ibv_flow *flow; /**< Installed flow. */\n+#ifdef HAVE_IBV_FLOW_DV_SUPPORT\n+\tstruct mlx5dv_flow_action_attr actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS];\n+\t/**< Action list. */\n+#endif\n+\tint actions_n; /**< number of actions. */\n };\n \n /* Verbs specification header. */\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex acb1b7549..916989988 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -942,6 +942,65 @@ flow_dv_create_item(void *matcher, void *key,\n \t}\n }\n \n+/**\n+ * Store the requested actions in an array.\n+ *\n+ * @param[in] action\n+ *   Flow action to translate.\n+ * @param[in, out] dev_flow\n+ *   Pointer to the mlx5_flow.\n+ */\n+static void\n+flow_dv_create_action(const struct rte_flow_action *action,\n+\t\t      struct mlx5_flow *dev_flow)\n+{\n+\tconst struct rte_flow_action_queue *queue;\n+\tconst struct rte_flow_action_rss *rss;\n+\tint actions_n = dev_flow->dv.actions_n;\n+\tstruct rte_flow *flow = dev_flow->flow;\n+\n+\tswitch (action->type) {\n+\tcase RTE_FLOW_ACTION_TYPE_VOID:\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_FLAG:\n+\t\tdev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_TAG;\n+\t\tdev_flow->dv.actions[actions_n].tag_value =\n+\t\t\tMLX5_FLOW_MARK_DEFAULT;\n+\t\tactions_n++;\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_MARK:\n+\t\tdev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_TAG;\n+\t\tdev_flow->dv.actions[actions_n].tag_value =\n+\t\t\t((const struct rte_flow_action_mark *)\n+\t\t\t (action->conf))->id;\n+\t\tactions_n++;\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_DROP:\n+\t\tdev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_DROP;\n+\t\tflow->actions |= MLX5_ACTION_DROP;\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_QUEUE:\n+\t\tqueue = action->conf;\n+\t\tflow->rss.queue_num = 1;\n+\t\t(*flow->queue)[0] = queue->index;\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\trss = action->conf;\n+\t\tif (flow->queue)\n+\t\t\tmemcpy((*flow->queue), rss->queue,\n+\t\t\t       rss->queue_num * sizeof(uint16_t));\n+\t\tflow->rss.queue_num = rss->queue_num;\n+\t\tmemcpy(flow->key, rss->key, MLX5_RSS_HASH_KEY_LEN);\n+\t\tflow->rss.types = rss->types;\n+\t\tflow->rss.level = rss->level;\n+\t\t/* Added to array only in apply since we need the QP */\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\tdev_flow->dv.actions_n = actions_n;\n+}\n+\n static uint32_t matcher_zero[MLX5_ST_SZ_DW(fte_match_param)] = { 0 };\n \n #define HEADER_IS_ZERO(match_criteria, headers)\t\t\t\t     \\\n@@ -1103,6 +1162,8 @@ flow_dv_translate(struct rte_eth_dev *dev,\n \tmatcher.egress = attr->egress;\n \tif (flow_dv_matcher_register(dev, &matcher, dev_flow, error))\n \t\treturn -rte_errno;\n+\tfor (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++)\n+\t\tflow_dv_create_action(actions, dev_flow);\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v3",
        "08/11"
    ]
}