From patchwork Fri Mar 31 10:22:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 22992 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 0F72C2C66; Fri, 31 Mar 2017 12:22:55 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 8E265FE5 for ; Fri, 31 Mar 2017 12:22:41 +0200 (CEST) Received: from pure.maildistiller.com (unknown [10.110.50.29]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id 2899460053 for ; Fri, 31 Mar 2017 10:22:41 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx8-us1.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 95BAC6004F for ; Fri, 31 Mar 2017 10:22:40 +0000 (UTC) Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx8-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 37485440082 for ; Fri, 31 Mar 2017 10:22:39 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 31 Mar 2017 03:22:31 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Fri, 31 Mar 2017 03:22:30 -0700 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id v2VAMTYA030665 for ; Fri, 31 Mar 2017 11:22:29 +0100 Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id v2VAMTQn009951 for ; Fri, 31 Mar 2017 11:22:29 +0100 From: Andrew Rybchenko To: Date: Fri, 31 Mar 2017 11:22:19 +0100 Message-ID: <1490955743-9868-10-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1490955743-9868-1-git-send-email-arybchenko@solarflare.com> References: <1490955743-9868-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 X-MDID: 1490955761-vP749GoCBlzb Subject: [dpdk-dev] [PATCH 09/13] net/sfc: clarify Rx subsystem configure/close function names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Prepare to fix device reconfigure. Make it clear that corresponding functions should be called on device configure and close operations. No functional change. Fixes: a8e64c6b455f ("net/sfc: implement Rx subsystem stubs") Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc.c | 10 +++++----- drivers/net/sfc/sfc_rx.c | 4 ++-- drivers/net/sfc/sfc_rx.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c index 8da7879..88228ae 100644 --- a/drivers/net/sfc/sfc.c +++ b/drivers/net/sfc/sfc.c @@ -413,9 +413,9 @@ sfc_configure(struct sfc_adapter *sa) if (rc != 0) goto fail_port_configure; - rc = sfc_rx_init(sa); + rc = sfc_rx_configure(sa); if (rc != 0) - goto fail_rx_init; + goto fail_rx_configure; rc = sfc_tx_init(sa); if (rc != 0) @@ -426,9 +426,9 @@ sfc_configure(struct sfc_adapter *sa) return 0; fail_tx_init: - sfc_rx_fini(sa); + sfc_rx_close(sa); -fail_rx_init: +fail_rx_configure: sfc_port_close(sa); fail_port_configure: @@ -452,7 +452,7 @@ sfc_close(struct sfc_adapter *sa) sa->state = SFC_ADAPTER_CLOSING; sfc_tx_fini(sa); - sfc_rx_fini(sa); + sfc_rx_close(sa); sfc_port_close(sa); sfc_intr_close(sa); diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 9ca5eeb..92c5424 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -1216,7 +1216,7 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) * It should be used to allocate NUMA-unaware resources. */ int -sfc_rx_init(struct sfc_adapter *sa) +sfc_rx_configure(struct sfc_adapter *sa) { struct rte_eth_conf *dev_conf = &sa->eth_dev->data->dev_conf; unsigned int sw_index; @@ -1271,7 +1271,7 @@ sfc_rx_init(struct sfc_adapter *sa) * reconfiguration or shutdown. */ void -sfc_rx_fini(struct sfc_adapter *sa) +sfc_rx_close(struct sfc_adapter *sa) { unsigned int sw_index; diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h index 521e50e..9e6282e 100644 --- a/drivers/net/sfc/sfc_rx.h +++ b/drivers/net/sfc/sfc_rx.h @@ -149,8 +149,8 @@ struct sfc_rxq_info { boolean_t deferred_started; }; -int sfc_rx_init(struct sfc_adapter *sa); -void sfc_rx_fini(struct sfc_adapter *sa); +int sfc_rx_configure(struct sfc_adapter *sa); +void sfc_rx_close(struct sfc_adapter *sa); int sfc_rx_start(struct sfc_adapter *sa); void sfc_rx_stop(struct sfc_adapter *sa);