Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52912/?format=api
https://patches.dpdk.org/api/patches/52912/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1555586930-109097-7-git-send-email-orika@mellanox.com/", "project": { "id": 1, "url": "https://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": "<1555586930-109097-7-git-send-email-orika@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1555586930-109097-7-git-send-email-orika@mellanox.com", "date": "2019-04-18T11:28:47", "name": "[v2,6/9] net/mlx5: add transfer attribute to matcher", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1cb7a8c6381a9e1ee2f4ffa79d012d2af1e737f4", "submitter": { "id": 795, "url": "https://patches.dpdk.org/api/people/795/?format=api", "name": "Ori Kam", "email": "orika@mellanox.com" }, "delegate": { "id": 6624, "url": "https://patches.dpdk.org/api/users/6624/?format=api", "username": "shahafs", "first_name": "Shahaf", "last_name": "Shuler", "email": "shahafs@mellanox.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1555586930-109097-7-git-send-email-orika@mellanox.com/mbox/", "series": [ { "id": 4373, "url": "https://patches.dpdk.org/api/series/4373/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4373", "date": "2019-04-18T11:28:44", "name": "net/mlx5: add Direct Verbs E-Switch support", "version": 2, "mbox": "https://patches.dpdk.org/series/4373/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/52912/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/52912/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 057F61B9A4;\n\tThu, 18 Apr 2019 13:29:14 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 65B821B965\n\tfor <dev@dpdk.org>; Thu, 18 Apr 2019 13:29:05 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\torika@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 18 Apr 2019 14:28:59 +0300", "from pegasus03.mtr.labs.mlnx (pegasus03.mtr.labs.mlnx\n\t[10.210.16.124])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3IBSwk0024378;\n\tThu, 18 Apr 2019 14:28:58 +0300" ], "From": "Ori Kam <orika@mellanox.com>", "To": "yskoh@mellanox.com, shahafs@mellanox.com, matan@mellanox.com,\n\tviacheslavo@mellanox.com, motih@mellanox.com", "Cc": "dev@dpdk.org, orika@mellanox.com", "Date": "Thu, 18 Apr 2019 11:28:47 +0000", "Message-Id": "<1555586930-109097-7-git-send-email-orika@mellanox.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1555586930-109097-1-git-send-email-orika@mellanox.com>", "References": "<1555276357-4892-1-git-send-email-orika@mellanox.com>\n\t<1555586930-109097-1-git-send-email-orika@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v2 6/9] net/mlx5: add transfer attribute to\n\tmatcher", "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": "In current implementation the DV steering supported only NIC steering.\nThis commit adds the transfer attribute in order to create a matcher\non the FDB tabels.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\n---\nv2:\n* Address ML comments.\n---\n drivers/net/mlx5/mlx5_flow.c | 1 +\n drivers/net/mlx5/mlx5_flow.h | 2 ++\n drivers/net/mlx5/mlx5_flow_dv.c | 22 ++++++++++++++++++----\n 3 files changed, 21 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex b1effda..8afb966 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -2095,6 +2095,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,\n \tflow = rte_calloc(__func__, 1, flow_size, 0);\n \tflow->drv_type = flow_get_drv_type(dev, attr);\n \tflow->ingress = attr->ingress;\n+\tflow->transfer = attr->transfer;\n \tassert(flow->drv_type > MLX5_FLOW_TYPE_MIN &&\n \t flow->drv_type < MLX5_FLOW_TYPE_MAX);\n \tflow->queue = (void *)(flow + 1);\ndiff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex 85954c2..9d72024 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -210,6 +210,7 @@ struct mlx5_flow_dv_matcher {\n \tuint16_t crc; /**< CRC of key. */\n \tuint16_t priority; /**< Priority of matcher. */\n \tuint8_t egress; /**< Egress matcher. */\n+\tuint8_t transfer; /**< 1 if the flow is E-Switch flow. */\n \tuint32_t group; /**< The matcher group. */\n \tstruct mlx5_flow_dv_match_params mask; /**< Matcher mask. */\n };\n@@ -382,6 +383,7 @@ struct rte_flow {\n \tstruct mlx5_fdir *fdir; /**< Pointer to associated FDIR if any. */\n \tuint8_t ingress; /**< 1 if the flow is ingress. */\n \tuint32_t group; /**< The group index. */\n+\tuint8_t transfer; /**< 1 if the flow is E-Switch flow. */\n };\n \n typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex e3d9aa2..182abb3 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -3192,6 +3192,8 @@ struct field_modify_info modify_tcp[] = {\n * Table id to use.\n * @param[in] egress\n * Direction of the table.\n+ * @param[in] transfer\n+ * E-Switch or NIC flow.\n * @param[out] error\n * pointer to error structure.\n *\n@@ -3201,6 +3203,7 @@ struct field_modify_info modify_tcp[] = {\n static struct mlx5_flow_tbl_resource *\n flow_dv_tbl_resource_get(struct rte_eth_dev *dev,\n \t\t\t uint32_t table_id, uint8_t egress,\n+\t\t\t uint8_t transfer,\n \t\t\t struct rte_flow_error *error)\n {\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n@@ -3208,7 +3211,12 @@ struct field_modify_info modify_tcp[] = {\n \tstruct mlx5_flow_tbl_resource *tbl;\n \n #ifdef HAVE_MLX5DV_DR\n-\tif (egress) {\n+\tif (transfer) {\n+\t\ttbl = &sh->fdb_tbl[table_id];\n+\t\tif (!tbl->obj)\n+\t\t\ttbl->obj = mlx5_glue->dr_create_flow_tbl\n+\t\t\t\t(sh->fdb_ns, table_id);\n+\t} else if (egress) {\n \t\ttbl = &sh->tx_tbl[table_id];\n \t\tif (!tbl->obj)\n \t\t\ttbl->obj = mlx5_glue->dr_create_flow_tbl\n@@ -3230,7 +3238,9 @@ struct field_modify_info modify_tcp[] = {\n #else\n \t(void)error;\n \t(void)tbl;\n-\tif (egress)\n+\tif (transfer)\n+\t\treturn &sh->fdb_tbl[table_id];\n+\telse if (egress)\n \t\treturn &sh->tx_tbl[table_id];\n \telse\n \t\treturn &sh->rx_tbl[table_id];\n@@ -3295,6 +3305,7 @@ struct field_modify_info modify_tcp[] = {\n \t\t matcher->priority == cache_matcher->priority &&\n \t\t matcher->egress == cache_matcher->egress &&\n \t\t matcher->group == cache_matcher->group &&\n+\t\t matcher->transfer == cache_matcher->transfer &&\n \t\t !memcmp((const void *)matcher->mask.buf,\n \t\t\t (const void *)cache_matcher->mask.buf,\n \t\t\t cache_matcher->mask.size)) {\n@@ -3316,7 +3327,8 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,\n \t\t\t\t\t \"cannot allocate matcher memory\");\n \ttbl = flow_dv_tbl_resource_get(dev, matcher->group * MLX5_GROUP_FACTOR,\n-\t\t\t\t matcher->egress, error);\n+\t\t\t\t matcher->egress, matcher->transfer,\n+\t\t\t\t error);\n \tif (!tbl) {\n \t\trte_free(cache_matcher);\n \t\treturn rte_flow_error_set(error, ENOMEM,\n@@ -3643,7 +3655,8 @@ struct field_modify_info modify_tcp[] = {\n \t\t\tjump_data = action->conf;\n \t\t\ttbl = flow_dv_tbl_resource_get(dev, jump_data->group *\n \t\t\t\t\t\t MLX5_GROUP_FACTOR,\n-\t\t\t\t\t\t attr->egress, error);\n+\t\t\t\t\t\t attr->egress,\n+\t\t\t\t\t\t attr->transfer, error);\n \t\t\tif (!tbl)\n \t\t\t\treturn rte_flow_error_set\n \t\t\t\t\t\t(error, errno,\n@@ -3871,6 +3884,7 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t\t matcher.priority);\n \tmatcher.egress = attr->egress;\n \tmatcher.group = attr->group;\n+\tmatcher.transfer = attr->transfer;\n \tif (flow_dv_matcher_register(dev, &matcher, dev_flow, error))\n \t\treturn -rte_errno;\n \treturn 0;\n", "prefixes": [ "v2", "6/9" ] }{ "id": 52912, "url": "