Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/102764/?format=api
http://patches.dpdk.org/api/patches/102764/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211025110415.20683-6-ivan.malov@oktetlabs.ru/", "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": "<20211025110415.20683-6-ivan.malov@oktetlabs.ru>", "list_archive_url": "https://inbox.dpdk.org/dev/20211025110415.20683-6-ivan.malov@oktetlabs.ru", "date": "2021-10-25T11:04:14", "name": "[6/7] net/sfc: support port representor related flow actions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "323285f56652bbe83b7d39e47aebdeb873851e31", "submitter": { "id": 869, "url": "http://patches.dpdk.org/api/people/869/?format=api", "name": "Ivan Malov", "email": "Ivan.Malov@oktetlabs.ru" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211025110415.20683-6-ivan.malov@oktetlabs.ru/mbox/", "series": [ { "id": 19954, "url": "http://patches.dpdk.org/api/series/19954/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19954", "date": "2021-10-25T11:04:09", "name": "[1/7] net/sfc: do not allow flow rules to refer to VF representors", "version": 1, "mbox": "http://patches.dpdk.org/series/19954/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/102764/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/102764/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2A8E0A0C52;\n\tMon, 25 Oct 2021 13:04:57 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EAF8D41145;\n\tMon, 25 Oct 2021 13:04:31 +0200 (CEST)", "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id DAD43410E2\n for <dev@dpdk.org>; Mon, 25 Oct 2021 13:04:23 +0200 (CEST)", "from localhost.localdomain (unknown [5.144.121.149])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by shelob.oktetlabs.ru (Postfix) with ESMTPSA id AF9FF7F523;\n Mon, 25 Oct 2021 14:04:23 +0300 (MSK)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru AF9FF7F523", "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1635159863;\n bh=CBKnKE/FaBOfZeOD/ZjQLCur47w2tO3zx0zTHe48rMA=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=x+KU/pOMQZTnMOjPN/CBfV7yQstd09UO0SZ3lyhsz1j1+kDT5jHZzaAH5ctlGbAt9\n HczWWcuDTNSzZU3mCzB2jK70uNCWJADndWUfrYbdHb63zOHdAYmdXHkobfs+bhPSEn\n gbctKrKO14EBQCjVA1dwUZdL6T2doOtSErhOVTUY=", "From": "Ivan Malov <ivan.malov@oktetlabs.ru>", "To": "dev@dpdk.org", "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>", "Date": "Mon, 25 Oct 2021 14:04:14 +0300", "Message-Id": "<20211025110415.20683-6-ivan.malov@oktetlabs.ru>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20211025110415.20683-1-ivan.malov@oktetlabs.ru>", "References": "<20211025110415.20683-1-ivan.malov@oktetlabs.ru>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 6/7] net/sfc: support port representor related\n flow actions", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add support for actions PORT_REPRESENTOR and REPRESENTED_PORT.\n\nThe former should be used instead of ambiguous PORT_ID.\n\nThe latter sends traffic to the entity represented by\nthe given ethdev (network port or VF).\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nReviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n doc/guides/nics/features/sfc.ini | 2 +\n doc/guides/nics/sfc_efx.rst | 4 ++\n drivers/net/sfc/sfc_mae.c | 66 ++++++++++++++++++++++++++++++++\n 3 files changed, 72 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini\nindex c830426eb2..0d785f4765 100644\n--- a/doc/guides/nics/features/sfc.ini\n+++ b/doc/guides/nics/features/sfc.ini\n@@ -73,6 +73,8 @@ of_set_vlan_vid = Y\n pf = Y\n phy_port = Y\n port_id = Y\n+port_representor = Y\n+represented_port = Y\n queue = Y\n rss = Y\n vf = Y\ndiff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst\nindex 8dbd250b3c..960e25bf98 100644\n--- a/doc/guides/nics/sfc_efx.rst\n+++ b/doc/guides/nics/sfc_efx.rst\n@@ -248,6 +248,10 @@ Supported actions (***transfer*** rules):\n \n - VF\n \n+- PORT_REPRESENTOR\n+\n+- REPRESENTED_PORT\n+\n - PORT_ID\n \n - COUNT\ndiff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c\nindex 8ec4036275..411f2ac27e 100644\n--- a/drivers/net/sfc/sfc_mae.c\n+++ b/drivers/net/sfc/sfc_mae.c\n@@ -3488,6 +3488,58 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,\n \treturn rc;\n }\n \n+static int\n+sfc_mae_rule_parse_action_port_representor(struct sfc_adapter *sa,\n+\t\tconst struct rte_flow_action_ethdev *conf,\n+\t\tefx_mae_actions_t *spec)\n+{\n+\tstruct sfc_mae *mae = &sa->mae;\n+\tefx_mport_sel_t mport;\n+\tint rc;\n+\n+\trc = sfc_mae_switch_get_ethdev_mport(mae->switch_domain_id,\n+\t\t\t\t\t conf->port_id, &mport);\n+\tif (rc != 0) {\n+\t\tsfc_err(sa, \"failed to get m-port for the given ethdev (port_id=%u): %s\",\n+\t\t\tconf->port_id, strerror(rc));\n+\t\treturn rc;\n+\t}\n+\n+\trc = efx_mae_action_set_populate_deliver(spec, &mport);\n+\tif (rc != 0) {\n+\t\tsfc_err(sa, \"failed to request action DELIVER with m-port selector 0x%08x: %s\",\n+\t\t\tmport.sel, strerror(rc));\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+sfc_mae_rule_parse_action_represented_port(struct sfc_adapter *sa,\n+\t\tconst struct rte_flow_action_ethdev *conf,\n+\t\tefx_mae_actions_t *spec)\n+{\n+\tstruct sfc_mae *mae = &sa->mae;\n+\tefx_mport_sel_t mport;\n+\tint rc;\n+\n+\trc = sfc_mae_switch_get_entity_mport(mae->switch_domain_id,\n+\t\t\t\t\t conf->port_id, &mport);\n+\tif (rc != 0) {\n+\t\tsfc_err(sa, \"failed to get m-port for the given ethdev (port_id=%u): %s\",\n+\t\t\tconf->port_id, strerror(rc));\n+\t\treturn rc;\n+\t}\n+\n+\trc = efx_mae_action_set_populate_deliver(spec, &mport);\n+\tif (rc != 0) {\n+\t\tsfc_err(sa, \"failed to request action DELIVER with m-port selector 0x%08x: %s\",\n+\t\t\tmport.sel, strerror(rc));\n+\t}\n+\n+\treturn rc;\n+}\n+\n static const char * const action_names[] = {\n \t[RTE_FLOW_ACTION_TYPE_VXLAN_DECAP] = \"VXLAN_DECAP\",\n \t[RTE_FLOW_ACTION_TYPE_OF_POP_VLAN] = \"OF_POP_VLAN\",\n@@ -3501,6 +3553,8 @@ static const char * const action_names[] = {\n \t[RTE_FLOW_ACTION_TYPE_PF] = \"PF\",\n \t[RTE_FLOW_ACTION_TYPE_VF] = \"VF\",\n \t[RTE_FLOW_ACTION_TYPE_PORT_ID] = \"PORT_ID\",\n+\t[RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR] = \"PORT_REPRESENTOR\",\n+\t[RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT] = \"REPRESENTED_PORT\",\n \t[RTE_FLOW_ACTION_TYPE_DROP] = \"DROP\",\n \t[RTE_FLOW_ACTION_TYPE_JUMP] = \"JUMP\",\n };\n@@ -3609,6 +3663,18 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,\n \t\t\t\t bundle->actions_mask);\n \t\trc = sfc_mae_rule_parse_action_port_id(sa, action->conf, spec);\n \t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:\n+\t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,\n+\t\t\t\t bundle->actions_mask);\n+\t\trc = sfc_mae_rule_parse_action_port_representor(sa,\n+\t\t\t\taction->conf, spec);\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:\n+\t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,\n+\t\t\t\t bundle->actions_mask);\n+\t\trc = sfc_mae_rule_parse_action_represented_port(sa,\n+\t\t\t\taction->conf, spec);\n+\t\tbreak;\n \tcase RTE_FLOW_ACTION_TYPE_DROP:\n \t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_DROP,\n \t\t\t\t bundle->actions_mask);\n", "prefixes": [ "6/7" ] }{ "id": 102764, "url": "