From patchwork Fri Mar 31 10:22:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 22989 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 07E8C2BF2; Fri, 31 Mar 2017 12:22:49 +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 E37282B93 for ; Fri, 31 Mar 2017 12:22:36 +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 57CA160054 for ; Fri, 31 Mar 2017 10:22:36 +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 C997A60049 for ; Fri, 31 Mar 2017 10:22:35 +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 6B192440063 for ; Fri, 31 Mar 2017 10:22:34 +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:30 -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 v2VAMTX7030629 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 v2VAMTQh009951 for ; Fri, 31 Mar 2017 11:22:29 +0100 From: Andrew Rybchenko To: Date: Fri, 31 Mar 2017 11:22:13 +0100 Message-ID: <1490955743-9868-4-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: 1490955756-Ejc+DUwuoAus Subject: [dpdk-dev] [PATCH 03/13] net/sfc: remove unused max entries from EvQ info 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" Fixes: 58294ee65afb ("net/sfc: support event queue") Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc_ev.c | 6 ------ drivers/net/sfc/sfc_ev.h | 21 +-------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c index 46de7a5..7c8ec32 100644 --- a/drivers/net/sfc/sfc_ev.c +++ b/drivers/net/sfc/sfc_ev.c @@ -814,7 +814,6 @@ sfc_ev_qinit(struct sfc_adapter *sa, unsigned int sw_index, evq_info = &sa->evq_info[sw_index]; SFC_ASSERT(rte_is_power_of_2(entries)); - SFC_ASSERT(entries <= evq_info->max_entries); evq_info->entries = entries; rc = ENOMEM; @@ -871,14 +870,9 @@ static int sfc_ev_qinit_info(struct sfc_adapter *sa, unsigned int sw_index) { struct sfc_evq_info *evq_info = &sa->evq_info[sw_index]; - unsigned int max_entries; sfc_log_init(sa, "sw_index=%u", sw_index); - max_entries = sfc_evq_max_entries(sa, sw_index); - SFC_ASSERT(rte_is_power_of_2(max_entries)); - - evq_info->max_entries = max_entries; evq_info->flags = sa->evq_flags | ((sa->intr.lsc_intr && sw_index == sa->mgmt_evq_index) ? EFX_EVQ_FLAGS_NOTIFY_INTERRUPT : diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index f5e6415..8f43d73 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -84,11 +84,7 @@ struct sfc_evq { }; struct sfc_evq_info { - /* Maximum number of EVQ entries taken into account when buffer - * table space is allocated. - */ - unsigned int max_entries; - /* Real number of EVQ entries, less or equal to max_entries */ + /* Number of EVQ entries */ unsigned int entries; /* Event queue creation flags */ uint32_t flags; @@ -114,21 +110,6 @@ sfc_ev_qcount(struct sfc_adapter *sa) } static inline unsigned int -sfc_evq_max_entries(struct sfc_adapter *sa, unsigned int sw_index) -{ - unsigned int max_entries; - - if (sw_index == sa->mgmt_evq_index) - max_entries = SFC_MGMT_EVQ_ENTRIES; - else if (sw_index <= sa->eth_dev->data->nb_rx_queues) - max_entries = EFX_RXQ_MAXNDESCS; - else - max_entries = efx_nic_cfg_get(sa->nic)->enc_txq_max_ndescs; - - return max_entries; -} - -static inline unsigned int sfc_evq_index_by_rxq_sw_index(__rte_unused struct sfc_adapter *sa, unsigned int rxq_sw_index) {