From patchwork Mon Oct 25 11:04:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 102761 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 66DEFA0C52; Mon, 25 Oct 2021 13:04:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7122D4113B; Mon, 25 Oct 2021 13:04:25 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5371B407FF for ; Mon, 25 Oct 2021 13:04:23 +0200 (CEST) Received: from localhost.localdomain (unknown [5.144.121.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id B39607F670; Mon, 25 Oct 2021 14:04:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru B39607F670 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1635159862; bh=+dhUt+JaCUFQS2/5B+SUJmpEDxqfNuSEPG7wxWI9D+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tuK8ufGTM86GPnua9YRQ39KHV+vICLG46xHUajTh74Q0AKjLlbgFAsuV4kE2S4zBg ZL28HsFMU04UUY+hDg3GN1mwcNcsw5AB45B4oOADtEMUA1xaisR3Op4mMNe9MMG6Sf uxT+UpE7eW7Qm2dvyaGP9Zn8dURg6b2gD9xPXATI= From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko Date: Mon, 25 Oct 2021 14:04:10 +0300 Message-Id: <20211025110415.20683-2-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 Subject: [dpdk-dev] [PATCH 2/7] net/sfc: rename ethdev m-port retrieval helper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Andrew Rybchenko --- drivers/net/sfc/sfc_mae.c | 10 +++++----- drivers/net/sfc/sfc_switch.c | 6 +++--- drivers/net/sfc/sfc_switch.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index 455744c570..84b13925ff 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -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)); diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c index 265a17f4c4..3f7518fa30 100644 --- a/drivers/net/sfc/sfc_switch.c +++ b/drivers/net/sfc/sfc_switch.c @@ -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; diff --git a/drivers/net/sfc/sfc_switch.h b/drivers/net/sfc/sfc_switch.h index 7917141038..a5a0fb4fc5 100644 --- a/drivers/net/sfc/sfc_switch.h +++ b/drivers/net/sfc/sfc_switch.h @@ -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,