Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81467/?format=api
http://patches.dpdk.org/api/patches/81467/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1603183709-23420-30-git-send-email-arybchenko@solarflare.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": "<1603183709-23420-30-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1603183709-23420-30-git-send-email-arybchenko@solarflare.com", "date": "2020-10-20T08:47:56", "name": "[29/62] net/sfc: support VLAN PUSH actions in MAE backend", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d80cdc6c506fdd05c7c4dc602e1f1a4290736622", "submitter": { "id": 607, "url": "http://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1603183709-23420-30-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 13132, "url": "http://patches.dpdk.org/api/series/13132/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13132", "date": "2020-10-20T08:47:30", "name": "net/sfc: support flow API transfer rules", "version": 1, "mbox": "http://patches.dpdk.org/series/13132/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/81467/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/81467/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 433E6A04DD;\n\tTue, 20 Oct 2020 10:58:01 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C654EBE17;\n\tTue, 20 Oct 2020 10:49:40 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 64356BADE\n for <dev@dpdk.org>; Tue, 20 Oct 2020 10:49:03 +0200 (CEST)", "from mx1-us1.ppe-hosted.com (unknown [10.7.65.64])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n BC83C6008F for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:01 +0000 (UTC)", "from us4-mdac16-6.ut7.mdlocal (unknown [10.7.65.74])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id BBD772009B\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:01 +0000 (UTC)", "from mx1-us1.ppe-hosted.com (unknown [10.7.65.200])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 2C58422004D\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:01 +0000 (UTC)", "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n D79A4800060\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:00 +0000 (UTC)", "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Tue, 20 Oct 2020 09:48:50 +0100", "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Tue, 20 Oct 2020 09:48:50 +0100", "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09K8mnEH030805;\n Tue, 20 Oct 2020 09:48:50 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 43FBE1626DA;\n Tue, 20 Oct 2020 09:48:49 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "<y@solarflare.com>", "CC": "<dev@dpdk.org>, Ivan Malov <ivan.malov@oktetlabs.ru>", "Date": "Tue, 20 Oct 2020 09:47:56 +0100", "Message-ID": "<1603183709-23420-30-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1603183709-23420-1-git-send-email-arybchenko@solarflare.com>", "References": "<1603183709-23420-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25736.003", "X-TM-AS-Result": "No-2.134200-8.000000-10", "X-TMASE-MatchedRID": "hOKbrLjOKN5EjiOYrUNIqaofqYgF6NV/x+jrF7TzRS0Ajiw/nJICh+Z5\n Gn23AeDZ8XVI39JCRnRuL3ESIrARlyHhSBQfglfsA9lly13c/gGH0N4NyO41W7vrYEyMiww4q9V\n hOmRpTapMhOK98HsSQD9ZNziQoQkP56XkomU2m5X7gWP0TNHLHGtNZoZ5+7ekBCzD0Dc8iUtPH2\n OEh/+ebHaalVKfJdYjztJEIiMQkV/ecSkNT7l/2YldKbZsGYatfS0Ip2eEHnz3IzXlXlpamPoLR\n 4+zsDTtpmd/ehreR4XdibkIw67lEU9bcnLT8dyfbk26O/KUX8Gs4pXz6bFNF1nCmg+eSVSoAejv\n 9WP+b9S3LBV+Zzde6VsVzu+vkWoeyNt630cKnsraQLtLC8aUqEPBvsmCWGHWUWQ7Bol0IqAY5tv\n H9Ry2Nw==", "X-TM-AS-User-Approved-Sender": "Yes", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--2.134200-8.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25736.003", "X-MDID": "1603183741-kneo-f3VXviW", "X-PPE-DISP": "1603183741;kneo-f3VXviW", "Subject": "[dpdk-dev] [PATCH 29/62] net/sfc: support VLAN PUSH actions in MAE\n\tbackend", "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 <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": "From: Ivan Malov <ivan.malov@oktetlabs.ru>\n\nA group of actions (OF_PUSH_VLAN, OF_VLAN_SET_VID and\nOF_VLAN_SET_PCP) maps to MAE action VLAN_PUSH.\n\nThis action group is supported only for rules which have transfer\nattribute, and can be requested once or twice per a rule.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n doc/guides/nics/sfc_efx.rst | 6 ++++\n drivers/net/sfc/sfc_mae.c | 61 +++++++++++++++++++++++++++++++++++--\n 2 files changed, 65 insertions(+), 2 deletions(-)", "diff": "diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst\nindex ed9fc9d845..b0caa4edf9 100644\n--- a/doc/guides/nics/sfc_efx.rst\n+++ b/doc/guides/nics/sfc_efx.rst\n@@ -198,6 +198,12 @@ Supported actions (***transfer*** rules):\n \n - OF_POP_VLAN\n \n+- OF_PUSH_VLAN\n+\n+- OF_VLAN_SET_VID\n+\n+- OF_VLAN_SET_PCP\n+\n - PHY_PORT\n \n Validating flow rules depends on the firmware variant.\ndiff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c\nindex 5fbf627f0a..98808ac3f0 100644\n--- a/drivers/net/sfc/sfc_mae.c\n+++ b/drivers/net/sfc/sfc_mae.c\n@@ -463,6 +463,7 @@ sfc_mae_rule_parse_pattern(struct sfc_adapter *sa,\n \n enum sfc_mae_actions_bundle_type {\n \tSFC_MAE_ACTIONS_BUNDLE_EMPTY = 0,\n+\tSFC_MAE_ACTIONS_BUNDLE_VLAN_PUSH,\n };\n \n struct sfc_mae_actions_bundle {\n@@ -470,6 +471,10 @@ struct sfc_mae_actions_bundle {\n \n \t/* Indicates actions already tracked by the current bundle */\n \tuint64_t\t\t\t\tactions_mask;\n+\n+\t/* Parameters used by SFC_MAE_ACTIONS_BUNDLE_VLAN_PUSH */\n+\trte_be16_t\t\t\t\tvlan_push_tpid;\n+\trte_be16_t\t\t\t\tvlan_push_tci;\n };\n \n /*\n@@ -479,13 +484,17 @@ struct sfc_mae_actions_bundle {\n */\n static int\n sfc_mae_actions_bundle_submit(const struct sfc_mae_actions_bundle *bundle,\n-\t\t\t __rte_unused efx_mae_actions_t *spec)\n+\t\t\t efx_mae_actions_t *spec)\n {\n \tint rc = 0;\n \n \tswitch (bundle->type) {\n \tcase SFC_MAE_ACTIONS_BUNDLE_EMPTY:\n \t\tbreak;\n+\tcase SFC_MAE_ACTIONS_BUNDLE_VLAN_PUSH:\n+\t\trc = efx_mae_action_set_populate_vlan_push(\n+\t\t\tspec, bundle->vlan_push_tpid, bundle->vlan_push_tci);\n+\t\tbreak;\n \tdefault:\n \t\tSFC_ASSERT(B_FALSE);\n \t\tbreak;\n@@ -509,6 +518,11 @@ sfc_mae_actions_bundle_sync(const struct rte_flow_action *action,\n \tint rc;\n \n \tswitch (action->type) {\n+\tcase RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:\n+\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:\n+\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:\n+\t\tbundle_type_new = SFC_MAE_ACTIONS_BUNDLE_VLAN_PUSH;\n+\t\tbreak;\n \tdefault:\n \t\t/*\n \t\t * Self-sufficient actions, including END, are handled in this\n@@ -538,6 +552,34 @@ sfc_mae_actions_bundle_sync(const struct rte_flow_action *action,\n \t\t\t\"Failed to request the (group of) action(s)\");\n }\n \n+static void\n+sfc_mae_rule_parse_action_of_push_vlan(\n+\t\t\t const struct rte_flow_action_of_push_vlan *conf,\n+\t\t\t struct sfc_mae_actions_bundle *bundle)\n+{\n+\tbundle->vlan_push_tpid = conf->ethertype;\n+}\n+\n+static void\n+sfc_mae_rule_parse_action_of_set_vlan_vid(\n+\t\t\t const struct rte_flow_action_of_set_vlan_vid *conf,\n+\t\t\t struct sfc_mae_actions_bundle *bundle)\n+{\n+\tbundle->vlan_push_tci |= (conf->vlan_vid &\n+\t\t\t\t rte_cpu_to_be_16(RTE_LEN2MASK(12, uint16_t)));\n+}\n+\n+static void\n+sfc_mae_rule_parse_action_of_set_vlan_pcp(\n+\t\t\t const struct rte_flow_action_of_set_vlan_pcp *conf,\n+\t\t\t struct sfc_mae_actions_bundle *bundle)\n+{\n+\tuint16_t vlan_tci_pcp = (uint16_t)(conf->vlan_pcp &\n+\t\t\t\t\t RTE_LEN2MASK(3, uint8_t)) << 13;\n+\n+\tbundle->vlan_push_tci |= rte_cpu_to_be_16(vlan_tci_pcp);\n+}\n+\n static int\n sfc_mae_rule_parse_action_phy_port(struct sfc_adapter *sa,\n \t\t\t\t const struct rte_flow_action_phy_port *conf,\n@@ -566,7 +608,7 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,\n \t\t\t efx_mae_actions_t *spec,\n \t\t\t struct rte_flow_error *error)\n {\n-\tint rc;\n+\tint rc = 0;\n \n \tswitch (action->type) {\n \tcase RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:\n@@ -574,6 +616,21 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,\n \t\t\t\t bundle->actions_mask);\n \t\trc = efx_mae_action_set_populate_vlan_pop(spec);\n \t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:\n+\t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN,\n+\t\t\t\t bundle->actions_mask);\n+\t\tsfc_mae_rule_parse_action_of_push_vlan(action->conf, bundle);\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:\n+\t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID,\n+\t\t\t\t bundle->actions_mask);\n+\t\tsfc_mae_rule_parse_action_of_set_vlan_vid(action->conf, bundle);\n+\t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:\n+\t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP,\n+\t\t\t\t bundle->actions_mask);\n+\t\tsfc_mae_rule_parse_action_of_set_vlan_pcp(action->conf, bundle);\n+\t\tbreak;\n \tcase RTE_FLOW_ACTION_TYPE_PHY_PORT:\n \t\tSFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_PHY_PORT,\n \t\t\t\t bundle->actions_mask);\n", "prefixes": [ "29/62" ] }{ "id": 81467, "url": "