get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128044,
    "url": "http://patchwork.dpdk.org/api/patches/128044/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-17-ivan.malov@arknetworks.am/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230604232523.6746-17-ivan.malov@arknetworks.am>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230604232523.6746-17-ivan.malov@arknetworks.am",
    "date": "2023-06-04T23:25:05",
    "name": "[v3,16/34] net/sfc: switch driver-internal flows to use generic methods",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fc790d5ac45cf42f32cc173566556536c1a09e2e",
    "submitter": {
        "id": 2962,
        "url": "http://patchwork.dpdk.org/api/people/2962/?format=api",
        "name": "Ivan Malov",
        "email": "ivan.malov@arknetworks.am"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-17-ivan.malov@arknetworks.am/mbox/",
    "series": [
        {
            "id": 28336,
            "url": "http://patchwork.dpdk.org/api/series/28336/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28336",
            "date": "2023-06-04T23:24:49",
            "name": "net/sfc: support HW conntrack assistance",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/28336/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128044/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128044/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 7199042C2C;\n\tMon,  5 Jun 2023 01:27:12 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 317FD42D61;\n\tMon,  5 Jun 2023 01:25:45 +0200 (CEST)",
            "from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80])\n by mails.dpdk.org (Postfix) with ESMTP id 7D95542D49\n for <dev@dpdk.org>; Mon,  5 Jun 2023 01:25:33 +0200 (CEST)",
            "from localhost.localdomain (unknown [78.109.68.201])\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 agw.arknetworks.am (Postfix) with ESMTPSA id 0D649E12C8;\n Mon,  5 Jun 2023 03:25:32 +0400 (+04)"
        ],
        "From": "Ivan Malov <ivan.malov@arknetworks.am>",
        "To": "dev@dpdk.org",
        "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ferruh Yigit <ferruh.yigit@amd.com>, Andy Moreton <amoreton@xilinx.com>",
        "Subject": "[PATCH v3 16/34] net/sfc: switch driver-internal flows to use generic\n methods",
        "Date": "Mon,  5 Jun 2023 03:25:05 +0400",
        "Message-Id": "<20230604232523.6746-17-ivan.malov@arknetworks.am>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "References": "<20230601195538.8265-1-ivan.malov@arknetworks.am>\n <20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Doing so helps to consolidate flow operation and ensure that\nevery FW-allocatable resource can be shared by several flows.\nThat is useful in the light of upcoming support for embedded\nconntrack assistance, where several flows will ideally share\neverything but unique 5-tuple entries in the conntrack table.\n\nSigned-off-by: Ivan Malov <ivan.malov@arknetworks.am>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/net/sfc/sfc_mae.c        | 186 +++++++------------------------\n drivers/net/sfc/sfc_mae.h        |  51 ++-------\n drivers/net/sfc/sfc_repr_proxy.c |  38 ++-----\n drivers/net/sfc/sfc_repr_proxy.h |   2 +-\n 4 files changed, 61 insertions(+), 216 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c\nindex f7bf682c11..51b2a22357 100644\n--- a/drivers/net/sfc/sfc_mae.c\n+++ b/drivers/net/sfc/sfc_mae.c\n@@ -74,137 +74,48 @@ sfc_mae_counter_registry_fini(struct sfc_mae_counter_registry *registry)\n \tsfc_mae_counters_fini(&registry->counters);\n }\n \n-static int\n-sfc_mae_internal_rule_find_empty_slot(struct sfc_adapter *sa,\n-\t\t\t\t      struct sfc_mae_rule **rule)\n-{\n-\tstruct sfc_mae *mae = &sa->mae;\n-\tstruct sfc_mae_internal_rules *internal_rules = &mae->internal_rules;\n-\tunsigned int entry;\n-\tint rc;\n-\n-\tfor (entry = 0; entry < SFC_MAE_NB_RULES_MAX; entry++) {\n-\t\tif (internal_rules->rules[entry].spec == NULL)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (entry == SFC_MAE_NB_RULES_MAX) {\n-\t\trc = ENOSPC;\n-\t\tsfc_err(sa, \"failed too many rules (%u rules used)\", entry);\n-\t\tgoto fail_too_many_rules;\n-\t}\n-\n-\t*rule = &internal_rules->rules[entry];\n-\n-\treturn 0;\n-\n-fail_too_many_rules:\n-\treturn rc;\n-}\n-\n-int\n-sfc_mae_rule_add_mport_match_deliver(struct sfc_adapter *sa,\n-\t\t\t\t     const efx_mport_sel_t *mport_match,\n-\t\t\t\t     const efx_mport_sel_t *mport_deliver,\n-\t\t\t\t     int prio, struct sfc_mae_rule **rulep)\n+struct rte_flow *\n+sfc_mae_repr_flow_create(struct sfc_adapter *sa, int prio, uint16_t port_id,\n+\t\t\t enum rte_flow_action_type dst_type,\n+\t\t\t enum rte_flow_item_type src_type)\n {\n+\tconst struct rte_flow_item_ethdev item_spec = { .port_id = port_id };\n+\tconst struct rte_flow_action_ethdev action = { .port_id = port_id };\n+\tconst void *item_mask = &rte_flow_item_ethdev_mask;\n+\tstruct rte_flow_attr attr = { .transfer = 1 };\n+\tconst struct rte_flow_action actions[] = {\n+\t\t{ .type = dst_type, .conf = &action },\n+\t\t{ .type = RTE_FLOW_ACTION_TYPE_END }\n+\t};\n+\tconst struct rte_flow_item items[] = {\n+\t\t{ .type = src_type, .mask = item_mask, .spec = &item_spec },\n+\t\t{ .type = RTE_FLOW_ITEM_TYPE_END }\n+\t};\n \tstruct sfc_mae *mae = &sa->mae;\n-\tstruct sfc_mae_rule *rule;\n-\tint rc;\n-\n-\tsfc_log_init(sa, \"entry\");\n+\tstruct rte_flow_error error;\n \n \tif (prio > 0 && (unsigned int)prio >= mae->nb_action_rule_prios_max) {\n-\t\trc = EINVAL;\n \t\tsfc_err(sa, \"failed: invalid priority %d (max %u)\", prio,\n \t\t\tmae->nb_action_rule_prios_max);\n-\t\tgoto fail_invalid_prio;\n+\t\treturn NULL;\n \t}\n \tif (prio < 0)\n \t\tprio = mae->nb_action_rule_prios_max - 1;\n \n-\trc = sfc_mae_internal_rule_find_empty_slot(sa, &rule);\n-\tif (rc != 0)\n-\t\tgoto fail_find_empty_slot;\n-\n-\tsfc_log_init(sa, \"init MAE match spec\");\n-\trc = efx_mae_match_spec_init(sa->nic, EFX_MAE_RULE_ACTION,\n-\t\t\t\t     (uint32_t)prio, &rule->spec);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to init MAE match spec\");\n-\t\tgoto fail_match_init;\n-\t}\n-\n-\trc = efx_mae_match_spec_mport_set(rule->spec, mport_match, NULL);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to get MAE match mport selector\");\n-\t\tgoto fail_mport_set;\n-\t}\n-\n-\trc = efx_mae_action_set_spec_init(sa->nic, &rule->actions);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to init MAE action set\");\n-\t\tgoto fail_action_init;\n-\t}\n-\n-\trc = efx_mae_action_set_populate_deliver(rule->actions,\n-\t\t\t\t\t\t mport_deliver);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to populate deliver action\");\n-\t\tgoto fail_populate_deliver;\n-\t}\n-\n-\trc = efx_mae_action_set_alloc(sa->nic, rule->actions,\n-\t\t\t\t      &rule->action_set);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to allocate action set\");\n-\t\tgoto fail_action_set_alloc;\n-\t}\n-\n-\trc = efx_mae_action_rule_insert(sa->nic, rule->spec, NULL,\n-\t\t\t\t\t&rule->action_set,\n-\t\t\t\t\t&rule->rule_id);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to insert action rule\");\n-\t\tgoto fail_rule_insert;\n-\t}\n-\n-\t*rulep = rule;\n-\n-\tsfc_log_init(sa, \"done\");\n-\n-\treturn 0;\n-\n-fail_rule_insert:\n-\tefx_mae_action_set_free(sa->nic, &rule->action_set);\n-\n-fail_action_set_alloc:\n-fail_populate_deliver:\n-\tefx_mae_action_set_spec_fini(sa->nic, rule->actions);\n+\tattr.priority = prio;\n \n-fail_action_init:\n-fail_mport_set:\n-\tefx_mae_match_spec_fini(sa->nic, rule->spec);\n-\n-fail_match_init:\n-fail_find_empty_slot:\n-fail_invalid_prio:\n-\tsfc_log_init(sa, \"failed: %s\", rte_strerror(rc));\n-\treturn rc;\n+\treturn sfc_flow_create_locked(sa, true, &attr, items, actions, &error);\n }\n \n void\n-sfc_mae_rule_del(struct sfc_adapter *sa, struct sfc_mae_rule *rule)\n+sfc_mae_repr_flow_destroy(struct sfc_adapter *sa, struct rte_flow *flow)\n {\n-\tif (rule == NULL || rule->spec == NULL)\n-\t\treturn;\n-\n-\tefx_mae_action_rule_remove(sa->nic, &rule->rule_id);\n-\tefx_mae_action_set_free(sa->nic, &rule->action_set);\n-\tefx_mae_action_set_spec_fini(sa->nic, rule->actions);\n-\tefx_mae_match_spec_fini(sa->nic, rule->spec);\n+\tstruct rte_flow_error error;\n+\tint rc;\n \n-\trule->spec = NULL;\n+\trc = sfc_flow_destroy_locked(sa, flow, &error);\n+\tif (rc != 0)\n+\t\tsfc_err(sa, \"failed to destroy the internal flow\");\n }\n \n int\n@@ -4311,11 +4222,9 @@ sfc_mae_flow_query(struct rte_eth_dev *dev,\n int\n sfc_mae_switchdev_init(struct sfc_adapter *sa)\n {\n-\tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);\n+\tstruct sfc_adapter_shared *sas = sfc_sa2shared(sa);\n \tstruct sfc_mae *mae = &sa->mae;\n-\tefx_mport_sel_t pf;\n-\tefx_mport_sel_t phy;\n-\tint rc;\n+\tint rc = EINVAL;\n \n \tsfc_log_init(sa, \"entry\");\n \n@@ -4330,31 +4239,20 @@ sfc_mae_switchdev_init(struct sfc_adapter *sa)\n \t\tgoto fail_no_mae;\n \t}\n \n-\trc = efx_mae_mport_by_pcie_function(encp->enc_pf, EFX_PCI_VF_INVALID,\n-\t\t\t\t\t    &pf);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed get PF mport\");\n-\t\tgoto fail_pf_get;\n-\t}\n-\n-\trc = efx_mae_mport_by_phy_port(encp->enc_assigned_port, &phy);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed get PHY mport\");\n-\t\tgoto fail_phy_get;\n-\t}\n-\n-\trc = sfc_mae_rule_add_mport_match_deliver(sa, &pf, &phy,\n-\t\t\tSFC_MAE_RULE_PRIO_LOWEST,\n-\t\t\t&mae->switchdev_rule_pf_to_ext);\n-\tif (rc != 0) {\n+\tmae->switchdev_rule_pf_to_ext = sfc_mae_repr_flow_create(sa,\n+\t\t\t\t\t SFC_MAE_RULE_PRIO_LOWEST, sas->port_id,\n+\t\t\t\t\t RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,\n+\t\t\t\t\t RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR);\n+\tif (mae->switchdev_rule_pf_to_ext == NULL) {\n \t\tsfc_err(sa, \"failed add MAE rule to forward from PF to PHY\");\n \t\tgoto fail_pf_add;\n \t}\n \n-\trc = sfc_mae_rule_add_mport_match_deliver(sa, &phy, &pf,\n-\t\t\tSFC_MAE_RULE_PRIO_LOWEST,\n-\t\t\t&mae->switchdev_rule_ext_to_pf);\n-\tif (rc != 0) {\n+\tmae->switchdev_rule_ext_to_pf = sfc_mae_repr_flow_create(sa,\n+\t\t\t\t\t SFC_MAE_RULE_PRIO_LOWEST, sas->port_id,\n+\t\t\t\t\t RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,\n+\t\t\t\t\t RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT);\n+\tif (mae->switchdev_rule_ext_to_pf == NULL) {\n \t\tsfc_err(sa, \"failed add MAE rule to forward from PHY to PF\");\n \t\tgoto fail_phy_add;\n \t}\n@@ -4364,11 +4262,9 @@ sfc_mae_switchdev_init(struct sfc_adapter *sa)\n \treturn 0;\n \n fail_phy_add:\n-\tsfc_mae_rule_del(sa, mae->switchdev_rule_pf_to_ext);\n+\tsfc_mae_repr_flow_destroy(sa, mae->switchdev_rule_pf_to_ext);\n \n fail_pf_add:\n-fail_phy_get:\n-fail_pf_get:\n fail_no_mae:\n \tsfc_log_init(sa, \"failed: %s\", rte_strerror(rc));\n \treturn rc;\n@@ -4382,6 +4278,6 @@ sfc_mae_switchdev_fini(struct sfc_adapter *sa)\n \tif (!sa->switchdev)\n \t\treturn;\n \n-\tsfc_mae_rule_del(sa, mae->switchdev_rule_pf_to_ext);\n-\tsfc_mae_rule_del(sa, mae->switchdev_rule_ext_to_pf);\n+\tsfc_mae_repr_flow_destroy(sa, mae->switchdev_rule_pf_to_ext);\n+\tsfc_mae_repr_flow_destroy(sa, mae->switchdev_rule_ext_to_pf);\n }\ndiff --git a/drivers/net/sfc/sfc_mae.h b/drivers/net/sfc/sfc_mae.h\nindex 307236ea11..f9434e1ab6 100644\n--- a/drivers/net/sfc/sfc_mae.h\n+++ b/drivers/net/sfc/sfc_mae.h\n@@ -180,33 +180,6 @@ struct sfc_mae_counter_registry {\n \t} polling;\n };\n \n-/**\n- * MAE rules used to capture traffic generated by VFs and direct it to\n- * representors (one for each VF).\n- */\n-#define SFC_MAE_NB_REPR_RULES_MAX\t(64)\n-\n-/** Rules to forward traffic from PHY port to PF and from PF to PHY port */\n-#define SFC_MAE_NB_SWITCHDEV_RULES\t(2)\n-/** Maximum required internal MAE rules */\n-#define SFC_MAE_NB_RULES_MAX\t\t(SFC_MAE_NB_SWITCHDEV_RULES + \\\n-\t\t\t\t\t SFC_MAE_NB_REPR_RULES_MAX)\n-\n-struct sfc_mae_rule {\n-\tefx_mae_match_spec_t\t\t*spec;\n-\tefx_mae_actions_t\t\t*actions;\n-\tefx_mae_aset_id_t\t\taction_set;\n-\tefx_mae_rule_id_t\t\trule_id;\n-};\n-\n-struct sfc_mae_internal_rules {\n-\t/*\n-\t * Rules required to sustain switchdev mode or to provide\n-\t * port representor functionality.\n-\t */\n-\tstruct sfc_mae_rule\t\trules[SFC_MAE_NB_RULES_MAX];\n-};\n-\n struct sfc_mae {\n \t/** Assigned switch domain identifier */\n \tuint16_t\t\t\tswitch_domain_id;\n@@ -234,14 +207,12 @@ struct sfc_mae {\n \tbool\t\t\t\tcounter_rxq_running;\n \t/** Counter registry */\n \tstruct sfc_mae_counter_registry\tcounter_registry;\n-\t/** Driver-internal flow rules */\n-\tstruct sfc_mae_internal_rules\tinternal_rules;\n \t/**\n \t * Switchdev default rules. They forward traffic from PHY port\n \t * to PF and vice versa.\n \t */\n-\tstruct sfc_mae_rule\t\t*switchdev_rule_pf_to_ext;\n-\tstruct sfc_mae_rule\t\t*switchdev_rule_ext_to_pf;\n+\tstruct rte_flow\t\t\t*switchdev_rule_pf_to_ext;\n+\tstruct rte_flow\t\t\t*switchdev_rule_ext_to_pf;\n };\n \n struct sfc_adapter;\n@@ -396,16 +367,18 @@ sfc_flow_query_cb_t sfc_mae_flow_query;\n \n /**\n  * Insert a driver-internal flow rule that matches traffic originating from\n- * some m-port selector and redirects it to another one\n- * (eg. PF --> PHY, PHY --> PF).\n+ * a source port (REPRESENTED_PORT or PORT_REPRESENTOR) and directs it to\n+ * its destination counterpart (PORT_REPRESENTOR or REPRESENTED_PORT).\n  *\n- * If requested priority is negative, use the lowest priority.\n+ * If the prio argument is negative, the lowest level will be picked.\n  */\n-int sfc_mae_rule_add_mport_match_deliver(struct sfc_adapter *sa,\n-\t\t\t\t\t const efx_mport_sel_t *mport_match,\n-\t\t\t\t\t const efx_mport_sel_t *mport_deliver,\n-\t\t\t\t\t int prio, struct sfc_mae_rule **rulep);\n-void sfc_mae_rule_del(struct sfc_adapter *sa, struct sfc_mae_rule *rule);\n+struct rte_flow *sfc_mae_repr_flow_create(struct sfc_adapter *sa,\n+\t\t\t\t\t  int prio, uint16_t port_id,\n+\t\t\t\t\t  enum rte_flow_action_type dst_type,\n+\t\t\t\t\t  enum rte_flow_item_type src_type);\n+\n+void sfc_mae_repr_flow_destroy(struct sfc_adapter *sa, struct rte_flow *flow);\n+\n int sfc_mae_switchdev_init(struct sfc_adapter *sa);\n void sfc_mae_switchdev_fini(struct sfc_adapter *sa);\n \ndiff --git a/drivers/net/sfc/sfc_repr_proxy.c b/drivers/net/sfc/sfc_repr_proxy.c\nindex 74c3494c35..ff13795c97 100644\n--- a/drivers/net/sfc/sfc_repr_proxy.c\n+++ b/drivers/net/sfc/sfc_repr_proxy.c\n@@ -681,47 +681,25 @@ static int\n sfc_repr_proxy_mae_rule_insert(struct sfc_adapter *sa,\n \t\t\t       struct sfc_repr_proxy_port *port)\n {\n-\tstruct sfc_repr_proxy *rp = &sa->repr_proxy;\n-\tefx_mport_sel_t mport_alias_selector;\n-\tefx_mport_sel_t mport_vf_selector;\n-\tstruct sfc_mae_rule *mae_rule;\n-\tint rc;\n+\tint rc = EINVAL;\n \n \tsfc_log_init(sa, \"entry\");\n \n-\trc = efx_mae_mport_by_id(&port->egress_mport,\n-\t\t\t\t &mport_vf_selector);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to get VF mport for repr %u\",\n-\t\t\tport->repr_id);\n-\t\tgoto fail_get_vf;\n-\t}\n-\n-\trc = efx_mae_mport_by_id(&rp->mport_alias, &mport_alias_selector);\n-\tif (rc != 0) {\n-\t\tsfc_err(sa, \"failed to get mport selector for repr %u\",\n-\t\t\tport->repr_id);\n-\t\tgoto fail_get_alias;\n-\t}\n-\n-\trc = sfc_mae_rule_add_mport_match_deliver(sa, &mport_vf_selector,\n-\t\t\t\t\t\t  &mport_alias_selector, -1,\n-\t\t\t\t\t\t  &mae_rule);\n-\tif (rc != 0) {\n+\tport->mae_rule = sfc_mae_repr_flow_create(sa,\n+\t\t\t\t    SFC_MAE_RULE_PRIO_LOWEST, port->rte_port_id,\n+\t\t\t\t    RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,\n+\t\t\t\t    RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT);\n+\tif (port->mae_rule == NULL) {\n \t\tsfc_err(sa, \"failed to insert MAE rule for repr %u\",\n \t\t\tport->repr_id);\n \t\tgoto fail_rule_add;\n \t}\n \n-\tport->mae_rule = mae_rule;\n-\n \tsfc_log_init(sa, \"done\");\n \n \treturn 0;\n \n fail_rule_add:\n-fail_get_alias:\n-fail_get_vf:\n \tsfc_log_init(sa, \"failed: %s\", rte_strerror(rc));\n \treturn rc;\n }\n@@ -730,9 +708,7 @@ static void\n sfc_repr_proxy_mae_rule_remove(struct sfc_adapter *sa,\n \t\t\t       struct sfc_repr_proxy_port *port)\n {\n-\tstruct sfc_mae_rule *mae_rule = port->mae_rule;\n-\n-\tsfc_mae_rule_del(sa, mae_rule);\n+\tsfc_mae_repr_flow_destroy(sa, port->mae_rule);\n }\n \n static int\ndiff --git a/drivers/net/sfc/sfc_repr_proxy.h b/drivers/net/sfc/sfc_repr_proxy.h\nindex 260e2cab30..0a4dedc3e1 100644\n--- a/drivers/net/sfc/sfc_repr_proxy.h\n+++ b/drivers/net/sfc/sfc_repr_proxy.h\n@@ -67,7 +67,7 @@ struct sfc_repr_proxy_port {\n \tuint32_t\t\t\t\tremote_vnic_mcdi_client_handle;\n \tstruct sfc_repr_proxy_rxq\t\trxq[SFC_REPR_RXQ_MAX];\n \tstruct sfc_repr_proxy_txq\t\ttxq[SFC_REPR_TXQ_MAX];\n-\tstruct sfc_mae_rule\t\t\t*mae_rule;\n+\tstruct rte_flow\t\t\t\t*mae_rule;\n \tbool\t\t\t\t\tenabled;\n \tbool\t\t\t\t\tstarted;\n };\n",
    "prefixes": [
        "v3",
        "16/34"
    ]
}