Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/102762/?format=api
http://patches.dpdk.org/api/patches/102762/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211025110415.20683-4-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-4-ivan.malov@oktetlabs.ru>", "list_archive_url": "https://inbox.dpdk.org/dev/20211025110415.20683-4-ivan.malov@oktetlabs.ru", "date": "2021-10-25T11:04:12", "name": "[4/7] net/sfc: assign correct m-ports to independent switch ports", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f69ec299ccf2d5a1759ead8a358ee582d4423d62", "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-4-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/102762/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/102762/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 00A3CA0C52;\n\tMon, 25 Oct 2021 13:04:44 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EE8B741152;\n\tMon, 25 Oct 2021 13:04:29 +0200 (CEST)", "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id 7F9E740E32\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 33F837F6FA;\n Mon, 25 Oct 2021 14:04:23 +0300 (MSK)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 33F837F6FA", "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1635159863;\n bh=Vi693HbEbD5V0E8eQSLHnMKCQGusqfWKoC4CPsT/IpQ=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=Xj1fE+OhFR0pqRLqcJG+XfjYxlZn17gFWyXjXJXSVGuFviDSGbcKy/A4i7ZxYrMe6\n Q3yp3Wjg6e0/Kogx1uxrAUxQukZfRS+4zga+lqm/0GiA4fdvOIXhiNvEpkTOXf+cKV\n spzfRA2wOxWkcBqK3pp0/ppg633wsH+18wVaoLlU=", "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:12 +0300", "Message-Id": "<20211025110415.20683-4-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 4/7] net/sfc: assign correct m-ports to\n independent switch ports", "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": "In accordance with patches [1-4], MAE admin ethdev represents a\nnetwork port and not the PF which it sits on. Rework the way\nhow \"ethdev\" and \"entity\" m-ports are assigned in SW switch\nport entries of independent ethdevs. Explain in comments.\n\n[1] commit 081e42dab11d (\"ethdev: add port representor item to flow API\")\n[2] commit 49863ae2bf95 (\"ethdev: add represented port item to flow API\")\n[3] commit 8edb6bc0263e (\"ethdev: add port representor action\nto flow API\")\n[4] commit 88caad251c8d (\"ethdev: add represented port action\nto flow API\")\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nReviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n drivers/net/sfc/sfc_mae.c | 41 ++++++++++++++++++++++++++++++++++++---\n 1 file changed, 38 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c\nindex a4a22f32c6..bd8a913a49 100644\n--- a/drivers/net/sfc/sfc_mae.c\n+++ b/drivers/net/sfc/sfc_mae.c\n@@ -23,7 +23,7 @@\n #include \"sfc_service.h\"\n \n static int\n-sfc_mae_assign_entity_mport(struct sfc_adapter *sa,\n+sfc_mae_assign_ethdev_mport(struct sfc_adapter *sa,\n \t\t\t efx_mport_sel_t *mportp)\n {\n \tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);\n@@ -32,6 +32,35 @@ sfc_mae_assign_entity_mport(struct sfc_adapter *sa,\n \t\t\t\t\t mportp);\n }\n \n+static int\n+sfc_mae_assign_entity_mport(struct sfc_adapter *sa,\n+\t\t\t efx_mport_sel_t *mportp)\n+{\n+\tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);\n+\tint rc = 0;\n+\n+\tif (encp->enc_mae_admin) {\n+\t\t/*\n+\t\t * This ethdev sits on MAE admin PF. The represented\n+\t\t * entity is the network port assigned to that PF.\n+\t\t */\n+\t\trc = efx_mae_mport_by_phy_port(encp->enc_assigned_port, mportp);\n+\t} else {\n+\t\t/*\n+\t\t * This ethdev sits on unprivileged PF / VF. The entity\n+\t\t * represented by the ethdev can change dynamically\n+\t\t * as MAE admin changes default traffic rules.\n+\t\t *\n+\t\t * For the sake of simplicity, do not fill in the m-port\n+\t\t * and assume that flow rules should not be allowed to\n+\t\t * reference the entity represented by this ethdev.\n+\t\t */\n+\t\tefx_mae_mport_invalid(mportp);\n+\t}\n+\n+\treturn rc;\n+}\n+\n static int\n sfc_mae_counter_registry_init(struct sfc_mae_counter_registry *registry,\n \t\t\t uint32_t nb_counters_max)\n@@ -184,6 +213,7 @@ sfc_mae_attach(struct sfc_adapter *sa)\n \tstruct sfc_adapter_shared * const sas = sfc_sa2shared(sa);\n \tstruct sfc_mae_switch_port_request switch_port_request = {0};\n \tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);\n+\tefx_mport_sel_t ethdev_mport;\n \tefx_mport_sel_t entity_mport;\n \tstruct sfc_mae *mae = &sa->mae;\n \tstruct sfc_mae_bounce_eh *bounce_eh = &mae->bounce_eh;\n@@ -218,6 +248,11 @@ sfc_mae_attach(struct sfc_adapter *sa)\n \t\t}\n \t}\n \n+\tsfc_log_init(sa, \"assign ethdev MPORT\");\n+\trc = sfc_mae_assign_ethdev_mport(sa, ðdev_mport);\n+\tif (rc != 0)\n+\t\tgoto fail_mae_assign_ethdev_mport;\n+\n \tsfc_log_init(sa, \"assign entity MPORT\");\n \trc = sfc_mae_assign_entity_mport(sa, &entity_mport);\n \tif (rc != 0)\n@@ -230,9 +265,8 @@ sfc_mae_attach(struct sfc_adapter *sa)\n \n \tsfc_log_init(sa, \"assign RTE switch port\");\n \tswitch_port_request.type = SFC_MAE_SWITCH_PORT_INDEPENDENT;\n+\tswitch_port_request.ethdev_mportp = ðdev_mport;\n \tswitch_port_request.entity_mportp = &entity_mport;\n-\t/* RTE ethdev MPORT matches that of the entity for independent ports. */\n-\tswitch_port_request.ethdev_mportp = &entity_mport;\n \tswitch_port_request.ethdev_port_id = sas->port_id;\n \tswitch_port_request.port_data.indep.mae_admin =\n \t\tencp->enc_mae_admin == B_TRUE;\n@@ -272,6 +306,7 @@ sfc_mae_attach(struct sfc_adapter *sa)\n fail_mae_assign_switch_port:\n fail_mae_assign_switch_domain:\n fail_mae_assign_entity_mport:\n+fail_mae_assign_ethdev_mport:\n \tif (encp->enc_mae_admin)\n \t\tsfc_mae_counter_registry_fini(&mae->counter_registry);\n \n", "prefixes": [ "4/7" ] }{ "id": 102762, "url": "