]> git.droids-corp.org - dpdk.git/commitdiff
net/sfc: rename ethdev m-port retrieval helper
authorIvan Malov <ivan.malov@oktetlabs.ru>
Mon, 25 Oct 2021 11:04:10 +0000 (14:04 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 2 Nov 2021 18:26:13 +0000 (19:26 +0100)
The function in question has an unfortunate name that reads
like finding a SW switch port entry. In fact just one of
the two m-ports is retrieved from that entry.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/sfc/sfc_mae.c
drivers/net/sfc/sfc_switch.c
drivers/net/sfc/sfc_switch.h

index 455744c570bb6564c458c218766259c14eae94fd..84b13925ffd391aae4fbe0035ad6012dee1193e4 100644 (file)
@@ -1276,8 +1276,8 @@ sfc_mae_rule_parse_item_port_id(const struct rte_flow_item *item,
                                          "The port ID is too large");
        }
 
-       rc = sfc_mae_switch_port_by_ethdev(ctx_mae->sa->mae.switch_domain_id,
-                                          spec->id, &mport_sel);
+       rc = sfc_mae_switch_get_ethdev_mport(ctx_mae->sa->mae.switch_domain_id,
+                                            spec->id, &mport_sel);
        if (rc != 0) {
                return rte_flow_error_set(error, rc,
                                RTE_FLOW_ERROR_TYPE_ITEM, item,
@@ -1335,7 +1335,7 @@ sfc_mae_rule_parse_item_port_representor(const struct rte_flow_item *item,
        if (spec == NULL)
                return 0;
 
-       rc = sfc_mae_switch_port_by_ethdev(
+       rc = sfc_mae_switch_get_ethdev_mport(
                        ctx_mae->sa->mae.switch_domain_id,
                        spec->port_id, &mport_sel);
        if (rc != 0) {
@@ -3406,8 +3406,8 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
 
        port_id = (conf->original != 0) ? sas->port_id : conf->id;
 
-       rc = sfc_mae_switch_port_by_ethdev(mae->switch_domain_id,
-                                          port_id, &mport);
+       rc = sfc_mae_switch_get_ethdev_mport(mae->switch_domain_id,
+                                            port_id, &mport);
        if (rc != 0) {
                sfc_err(sa, "failed to find MAE switch port SW entry for RTE ethdev port %u: %s",
                        port_id, strerror(rc));
index 265a17f4c4509b631c7eeb0fe05168118812b595..3f7518fa3066b8daadd3fbb1179f6dd2f1d7463e 100644 (file)
@@ -537,9 +537,9 @@ sfc_mae_find_switch_port_by_ethdev(uint16_t switch_domain_id,
 }
 
 int
-sfc_mae_switch_port_by_ethdev(uint16_t switch_domain_id,
-                             uint16_t ethdev_port_id,
-                             efx_mport_sel_t *mport_sel)
+sfc_mae_switch_get_ethdev_mport(uint16_t switch_domain_id,
+                               uint16_t ethdev_port_id,
+                               efx_mport_sel_t *mport_sel)
 {
        struct sfc_mae_switch_port *port;
        int rc;
index 79171410388ea88a2d7bea9ea5eb494de86d3894..a5a0fb4fc5edba6f826dd68603d547f385cb259c 100644 (file)
@@ -102,9 +102,9 @@ int sfc_mae_assign_switch_port(uint16_t switch_domain_id,
 int sfc_mae_clear_switch_port(uint16_t switch_domain_id,
                              uint16_t switch_port_id);
 
-int sfc_mae_switch_port_by_ethdev(uint16_t switch_domain_id,
-                                 uint16_t ethdev_port_id,
-                                 efx_mport_sel_t *mport_sel);
+int sfc_mae_switch_get_ethdev_mport(uint16_t switch_domain_id,
+                                   uint16_t ethdev_port_id,
+                                   efx_mport_sel_t *mport_sel);
 
 int sfc_mae_switch_port_id_by_entity(uint16_t switch_domain_id,
                                     const efx_mport_sel_t *entity_mportp,