From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0052.outbound.protection.outlook.com [104.47.37.52]) by dpdk.org (Postfix) with ESMTP id 7B5DB5911; Tue, 25 Apr 2017 09:29:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1JY5t3MVuhJXuwdhPl1dKCGvcNzuyjBxi/6FFjr5pcA=; b=klAX84j7ZMgdd/HdZHty7ay9j5RslIsIh2OJwztJfLcGU8GWRmILa7B58wkhKldTGqpjFk4WDG76Lvam0zwX5PbBoFh3PN0r70edYC7BAvfg1Zj3ftxHgOyQn5YMqs7hGtQLB2yW/0/I94K5eMKdH2bHD3WnLKNf2N48lDIvFY8= Received: from SN1PR0701CA0046.namprd07.prod.outlook.com (10.163.126.14) by BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Tue, 25 Apr 2017 07:29:50 +0000 Received: from BN1BFFO11FD023.protection.gbl (2a01:111:f400:7c10::1:155) by SN1PR0701CA0046.outlook.office365.com (2a01:111:e400:52fd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12 via Frontend Transport; Tue, 25 Apr 2017 07:29:49 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD023.mail.protection.outlook.com (10.58.144.86) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1047.9 via Frontend Transport; Tue, 25 Apr 2017 07:29:49 +0000 Received: from avsmtprelay01.qlc.com (10.1.112.194) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.309.2; Tue, 25 Apr 2017 00:29:32 -0700 Received: from avluser05.qlc.com (avluser05.qlc.com [10.1.113.115]) by avsmtprelay01.qlc.com (Postfix) with ESMTP id 9A4C88BF770A9; Tue, 25 Apr 2017 00:29:26 -0700 (PDT) Received: (from rmody@localhost) by avluser05.qlc.com (8.14.4/8.14.4/Submit) id v3P7TQbJ032106; Tue, 25 Apr 2017 00:29:26 -0700 X-Authentication-Warning: avluser05.qlc.com: rmody set sender to rasesh.mody@cavium.com using -f From: Rasesh Mody To: CC: Rasesh Mody , , Date: Tue, 25 Apr 2017 00:28:46 -0700 Message-ID: <1493105326-31984-11-git-send-email-rasesh.mody@cavium.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1493105326-31984-1-git-send-email-rasesh.mody@cavium.com> References: <1493105326-31984-1-git-send-email-rasesh.mody@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39450400003)(39410400002)(39400400002)(39840400002)(2980300002)(428002)(199003)(189002)(9170700003)(356003)(5660300001)(38730400002)(101416001)(110136004)(48376002)(42186005)(50466002)(36756003)(4720700003)(6666003)(54906002)(6916009)(2950100002)(105586002)(8676002)(4326008)(5003940100001)(47776003)(33646002)(53946003)(106466001)(81166006)(8936002)(450100002)(2906002)(189998001)(86362001)(50226002)(2351001)(87636002)(50986999)(76176999)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD023; 1:H0kerQgS2FIW5iKP9VXRJHWs/fzkIuG8+H8GUjxBrKC+lJPdFONQpV3bo+bW9QMFdhOOSi1okXfh1SAXxdxLucXquYSxB60yb40Up1t+EwxjJy+mx4RMmqXSyR3fB2Zfbw67pgtMZwaoVRJ4QQAzT2ZztscE6gH4KAqRnPeSRWiDU6FhKR2yDSBdIhQpWEu3luUSXfHUhLlTBL6UwzJaiPw8xz/AyJVr1M+xFwB1lJjZvW/fugr5DaxhnUcPqJXCwy7hp6NROGtcyfIp/kjPNMDY18OyGuWr/DAW5OOLvCcjkFaI0qZKnpP0mbCK9rN6ocAbzkn+SXcL5eR2hJMcKJXnyh91Vh4PMtPJOAI/zi3IylmO1vuEAod9HHyFPVkyf8W18nGAP7WZg28vmP9HMy9gPBCbOmys0PhdDrd2FHrdyx2gVAqwqPyajMMw7c5bfeOFfOx2wZlbyZM2/IjAV6wvhz0EqJE+Lpwni+OZY/imWDtQJF0CdFvUn7mm3XsQq5FAxImAaqMwsYB68LB3Xw== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6487745b-d0f2-449c-d784-08d48bacdb5d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:jZ+5WWRC4fBsPnJSIQ5hjqdnjUnhI9gQsuq/8id0/tWZ1Lfin2jd4A10V6Eid54Epa+W/H2tcOz8eNbuMAau1OFcJ4yvbs5V8xwQHVZbaPmZaHs5snkm1cJwQMn15TEGUc32plF0G+yaa1Hqf28l29De6Jr/mwg1d/mcyZHdbKCihj+P8cxUbEeat1bf+FyvYilZMupaYI2gDyCoT8rbKh3CCcwkiQC79FclPe33VZU5FUE3GIJQ3JYUkCPaRILNjDkguY95bNDrEZWKk5MrNBTEze1Us/aewF+PV6PJqrHuORzp4G4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mRB5itBiGmvcwI2431ueBCMmsRH60I84FpWpdGZwSqCbRKeNQnU2EFV8qZJhictRUGzlrpYNL0GSRS20nZyg/d8uzOZZ6GeLQ7n+hBAw//Z3pip5Z4Xjihfufqp7213N5jjWTrFIlzOnvCQfUVUzqS5yaTH0eVs+fYUFA4RkQrN5M6cuZE5ATH5SouPMby4kbuSwzEVn7/dGROLx0mv+DV9lU14KGbLKYllDZLUwN892krAriVEPtqzMrfjarDfFY0wB9idlRri1zpifRj8MiixCmAX1BWve1tfYUHBtAvUugdI4NqWMpWNu7B1ZYPXNfoU8XMtHTG8p+9tPCWN0M9RjvJ3lk0ZG0sP3ByhjT1qcNriKJKhnKScPzHpkzcTACjyk9lAYjs3UOn2ah7Q X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13015025)(13017025)(8121501046)(5005006)(13023025)(13024025)(13018025)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 4:krl0AhZ1/BsryGRVAQZOe7V12i6qTYOA0pUzXf7hyJRahbfZ0+/a7Lli+toJOucGyxOgbhs7dxuW3uqNDATn+2kaMzxuCvAd7qhGbdZVYhPciR7/7o1/BfufRvjCl8qSjTpSJ1BnvllrLrMpNCu/ARnnsT75DWHDgrIVeKPOnmsO9VIgBwrYPulMYelLrmte6kETtsGPnTPNm6WweW0FhmkYsta6sit1i6vXlI4AWb0Mz04i0c9Y8Grn6Ro7kE49FsbLlEygSckCwct/nC5WIjaVLrJubXWuxoAwzH8tcW2jrLFpHsYbXje9l7q1vBBx3h9ItBxAi/dewkzZJf/L2i230vWz5nopb7jTiY7H55pl1vYk3yV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MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2017 07:29:49.3646 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2513 Subject: [dpdk-stable] [PATCH 11/11] net/qede: fix to limit CFLAGS to base files X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 07:29:55 -0000 From: Rasesh Mody Changes included in this fix - limit CFLAGS to base files - fix to remove/mark unused members - add checks for debug config option - make qede_set_mtu() and qede_udp_dst_port_del() static and others non-static as appropriate - move local APIs qede_vlan_offload_set() and qede_rx_cqe_to_pkt_type() - initialize variables as required Fixes: ec94dbc57362 ("qede: add base driver") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/qede/Makefile | 32 ++++----- drivers/net/qede/base/ecore.h | 4 +- drivers/net/qede/base/ecore_int_api.h | 4 +- drivers/net/qede/qede_ethdev.c | 120 ++++++++++++++++++--------------- drivers/net/qede/qede_ethdev.h | 32 ++++----- drivers/net/qede/qede_fdir.c | 13 +--- drivers/net/qede/qede_if.h | 4 ++ drivers/net/qede/qede_main.c | 8 +-- drivers/net/qede/qede_rxtx.c | 118 +++++++++++++++++--------------- 9 files changed, 171 insertions(+), 164 deletions(-) diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile index da7968f..8acef00 100644 --- a/drivers/net/qede/Makefile +++ b/drivers/net/qede/Makefile @@ -76,25 +76,27 @@ endif # # BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))) -$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS+=$(CFLAGS_BASE_DRIVER))) +$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) + +VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dev.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_hw.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_cxt.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_l2.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sp_commands.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_fw_funcs.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_spq.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_init_ops.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_mcp.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_int.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_dcbx.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/bcm_osal.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_sriov.c -SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += base/ecore_vf.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dev.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_hw.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_cxt.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_l2.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sp_commands.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_fw_funcs.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_spq.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_init_ops.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_mcp.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_int.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_dcbx.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += bcm_osal.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_sriov.c +SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += ecore_vf.c SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_eth_if.c SRCS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede_main.c diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h index 63cbc38..80b11a4 100644 --- a/drivers/net/qede/base/ecore.h +++ b/drivers/net/qede/base/ecore.h @@ -808,8 +808,8 @@ struct ecore_dev { * * @return OSAL_INLINE u8 */ -static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct ecore_dev *p_dev, - u32 concrete_fid) +static OSAL_INLINE u8 +ecore_concrete_to_sw_fid(__rte_unused struct ecore_dev *p_dev, u32 concrete_fid) { u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); diff --git a/drivers/net/qede/base/ecore_int_api.h b/drivers/net/qede/base/ecore_int_api.h index fdfcba8..799fbe8 100644 --- a/drivers/net/qede/base/ecore_int_api.h +++ b/drivers/net/qede/base/ecore_int_api.h @@ -114,7 +114,7 @@ static OSAL_INLINE void __internal_ram_wr(struct ecore_hwfn *p_hwfn, void OSAL_IOMEM *addr, int size, u32 *data) #else -static OSAL_INLINE void __internal_ram_wr(void *p_hwfn, +static OSAL_INLINE void __internal_ram_wr(__rte_unused void *p_hwfn, void OSAL_IOMEM *addr, int size, u32 *data) #endif @@ -130,7 +130,7 @@ static OSAL_INLINE void __internal_ram_wr_relaxed(struct ecore_hwfn *p_hwfn, void OSAL_IOMEM * addr, int size, u32 *data) #else -static OSAL_INLINE void __internal_ram_wr_relaxed(void *p_hwfn, +static OSAL_INLINE void __internal_ram_wr_relaxed(__rte_unused void *p_hwfn, void OSAL_IOMEM * addr, int size, u32 *data) #endif diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index fdb6bb1..7056fed 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -298,6 +298,7 @@ static void qede_interrupt_action(struct ecore_hwfn *p_hwfn) qdev->ops = qed_ops; } +#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO static void qede_print_adapter_info(struct qede_dev *qdev) { struct ecore_dev *edev = &qdev->edev; @@ -326,6 +327,7 @@ static void qede_print_adapter_info(struct qede_dev *qdev) DP_INFO(edev, " Firmware file : %s\n", fw_file); DP_INFO(edev, "*********************************\n"); } +#endif static void qede_set_ucast_cmn_params(struct ecore_filter_ucast *ucast) { @@ -508,7 +510,7 @@ static void qede_set_cmn_tunn_param(struct ecore_tunnel_info *p_tunn, static void qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr, - uint32_t index, __rte_unused uint32_t pool) + __rte_unused uint32_t index, __rte_unused uint32_t pool) { struct ecore_filter_ucast ucast; @@ -523,9 +525,7 @@ static void qede_set_cmn_tunn_param(struct ecore_tunnel_info *p_tunn, { struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; - struct ether_addr mac_addr; struct ecore_filter_ucast ucast; - int rc; PMD_INIT_FUNC_TRACE(edev); @@ -609,46 +609,6 @@ static int qede_vlan_stripping(struct rte_eth_dev *eth_dev, bool set_stripping) return 0; } -static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask) -{ - struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); - struct rte_eth_rxmode *rxmode = ð_dev->data->dev_conf.rxmode; - - if (mask & ETH_VLAN_STRIP_MASK) { - if (rxmode->hw_vlan_strip) - (void)qede_vlan_stripping(eth_dev, 1); - else - (void)qede_vlan_stripping(eth_dev, 0); - } - - if (mask & ETH_VLAN_FILTER_MASK) { - /* VLAN filtering kicks in when a VLAN is added */ - if (rxmode->hw_vlan_filter) { - qede_vlan_filter_set(eth_dev, 0, 1); - } else { - if (qdev->configured_vlans > 1) { /* Excluding VLAN0 */ - DP_ERR(edev, - " Please remove existing VLAN filters" - " before disabling VLAN filtering\n"); - /* Signal app that VLAN filtering is still - * enabled - */ - rxmode->hw_vlan_filter = true; - } else { - qede_vlan_filter_set(eth_dev, 0, 0); - } - } - } - - if (mask & ETH_VLAN_EXTEND_MASK) - DP_INFO(edev, "No offloads are supported with VLAN Q-in-Q" - " and classification is based on outer tag only\n"); - - DP_INFO(edev, "vlan offload mask %d vlan-strip %d vlan-filter %d\n", - mask, rxmode->hw_vlan_strip, rxmode->hw_vlan_filter); -} - static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev, uint16_t vlan_id, int on) { @@ -739,6 +699,46 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev, return rc; } +static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask) +{ + struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); + struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); + struct rte_eth_rxmode *rxmode = ð_dev->data->dev_conf.rxmode; + + if (mask & ETH_VLAN_STRIP_MASK) { + if (rxmode->hw_vlan_strip) + (void)qede_vlan_stripping(eth_dev, 1); + else + (void)qede_vlan_stripping(eth_dev, 0); + } + + if (mask & ETH_VLAN_FILTER_MASK) { + /* VLAN filtering kicks in when a VLAN is added */ + if (rxmode->hw_vlan_filter) { + qede_vlan_filter_set(eth_dev, 0, 1); + } else { + if (qdev->configured_vlans > 1) { /* Excluding VLAN0 */ + DP_ERR(edev, + " Please remove existing VLAN filters" + " before disabling VLAN filtering\n"); + /* Signal app that VLAN filtering is still + * enabled + */ + rxmode->hw_vlan_filter = true; + } else { + qede_vlan_filter_set(eth_dev, 0, 0); + } + } + } + + if (mask & ETH_VLAN_EXTEND_MASK) + DP_INFO(edev, "No offloads are supported with VLAN Q-in-Q" + " and classification is based on outer tag only\n"); + + DP_INFO(edev, "vlan offload mask %d vlan-strip %d vlan-filter %d\n", + mask, rxmode->hw_vlan_strip, rxmode->hw_vlan_filter); +} + static int qede_init_vport(struct qede_dev *qdev) { struct ecore_dev *edev = &qdev->edev; @@ -778,7 +778,9 @@ static void qede_prandom_bytes(uint32_t *buff) int qede_config_rss(struct rte_eth_dev *eth_dev) { struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); +#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); +#endif uint32_t def_rss_key[ECORE_RSS_KEY_SIZE]; struct rte_eth_rss_reta_entry64 reta_conf[2]; struct rte_eth_rss_conf rss_conf; @@ -819,7 +821,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; struct rte_eth_rxmode *rxmode = ð_dev->data->dev_conf.rxmode; - int rc, i, j; + int rc; PMD_INIT_FUNC_TRACE(edev); @@ -1045,10 +1047,12 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev) { +#ifdef RTE_LIBRTE_QEDE_DEBUG_INIT struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; PMD_INIT_FUNC_TRACE(edev); +#endif enum qed_filter_rx_mode_type type = QED_FILTER_RX_MODE_TYPE_PROMISC; @@ -1060,10 +1064,12 @@ static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev) static void qede_promiscuous_disable(struct rte_eth_dev *eth_dev) { +#ifdef RTE_LIBRTE_QEDE_DEBUG_INIT struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; PMD_INIT_FUNC_TRACE(edev); +#endif if (rte_eth_allmulticast_get(eth_dev->data->port_id) == 1) qed_configure_filter_rx_mode(eth_dev, @@ -1180,8 +1186,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev) RTE_ETHDEV_QUEUE_STAT_CNTRS); txq_stat_cntrs = RTE_MIN(QEDE_TSS_COUNT(qdev), RTE_ETHDEV_QUEUE_STAT_CNTRS); - if ((rxq_stat_cntrs != QEDE_RSS_COUNT(qdev)) || - (txq_stat_cntrs != QEDE_TSS_COUNT(qdev))) + if ((rxq_stat_cntrs != (unsigned int)QEDE_RSS_COUNT(qdev)) || + (txq_stat_cntrs != (unsigned int)QEDE_TSS_COUNT(qdev))) DP_VERBOSE(edev, ECORE_MSG_DEBUG, "Not all the queue stats will be displayed. Set" " RTE_ETHDEV_QUEUE_STAT_CNTRS config param" @@ -1234,7 +1240,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev) static int qede_get_xstats_names(__rte_unused struct rte_eth_dev *dev, - struct rte_eth_xstat_name *xstats_names, unsigned limit) + struct rte_eth_xstat_name *xstats_names, + __rte_unused unsigned int limit) { struct qede_dev *qdev = dev->data->dev_private; const unsigned int stat_cnt = qede_get_xstats_count(qdev); @@ -1462,8 +1469,8 @@ static void qede_init_rss_caps(uint8_t *rss_caps, uint64_t hf) *rss_caps |= (hf & ETH_RSS_NONFRAG_IPV6_UDP) ? ECORE_RSS_IPV6_UDP : 0; } -static int qede_rss_hash_update(struct rte_eth_dev *eth_dev, - struct rte_eth_rss_conf *rss_conf) +int qede_rss_hash_update(struct rte_eth_dev *eth_dev, + struct rte_eth_rss_conf *rss_conf) { struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); @@ -1567,9 +1574,9 @@ static int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev, return 0; } -static int qede_rss_reta_update(struct rte_eth_dev *eth_dev, - struct rte_eth_rss_reta_entry64 *reta_conf, - uint16_t reta_size) +int qede_rss_reta_update(struct rte_eth_dev *eth_dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size) { struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); @@ -1655,7 +1662,7 @@ static int qede_rss_reta_query(struct rte_eth_dev *eth_dev, return 0; } -int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) +static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) { struct qede_dev *qdev = QEDE_INIT_QDEV(dev); struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); @@ -1749,14 +1756,14 @@ int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) return 0; } -int +static int qede_udp_dst_port_del(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *tunnel_udp) { return qede_conf_udp_dst_port(eth_dev, tunnel_udp, false); } -int +static int qede_udp_dst_port_add(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *tunnel_udp) { @@ -2090,7 +2097,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) /* Fix up ecore debug level */ uint32_t dp_module = ~0 & ~ECORE_MSG_HW; uint8_t dp_level = ECORE_LEVEL_VERBOSE; - uint32_t max_mac_addrs; int rc; /* Extract key data structures */ @@ -2248,7 +2254,9 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; if (do_once) { +#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO qede_print_adapter_info(adapter); +#endif do_once = false; } diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 6d5e616..26b6332 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -215,29 +215,16 @@ struct qede_dev { char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE]; }; -/* Static functions */ -static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev, - uint16_t vlan_id, int on); - -static int qede_rss_hash_update(struct rte_eth_dev *eth_dev, - struct rte_eth_rss_conf *rss_conf); - -static int qede_rss_reta_update(struct rte_eth_dev *eth_dev, - struct rte_eth_rss_reta_entry64 *reta_conf, - uint16_t reta_size); - -static void qede_init_rss_caps(uint8_t *rss_caps, uint64_t hf); - -static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags); - -static uint16_t qede_fdir_construct_pkt(struct rte_eth_dev *eth_dev, - struct rte_eth_fdir_filter *fdir, - void *buff, - struct ecore_arfs_config_params *param); - /* Non-static functions */ int qede_config_rss(struct rte_eth_dev *eth_dev); +int qede_rss_hash_update(struct rte_eth_dev *eth_dev, + struct rte_eth_rss_conf *rss_conf); + +int qede_rss_reta_update(struct rte_eth_dev *eth_dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size); + int qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info); int qede_dev_set_link_state(struct rte_eth_dev *eth_dev, bool link_up); @@ -253,6 +240,11 @@ int qede_ntuple_filter_conf(struct rte_eth_dev *eth_dev, int qede_check_fdir_support(struct rte_eth_dev *eth_dev); +uint16_t qede_fdir_construct_pkt(struct rte_eth_dev *eth_dev, + struct rte_eth_fdir_filter *fdir, + void *buff, + struct ecore_arfs_config_params *params); + void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev); #endif /* _QEDE_ETHDEV_H_ */ diff --git a/drivers/net/qede/qede_fdir.c b/drivers/net/qede/qede_fdir.c index 18fb8d6..7bd5c5d 100644 --- a/drivers/net/qede/qede_fdir.c +++ b/drivers/net/qede/qede_fdir.c @@ -74,9 +74,7 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev) void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev) { struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev); - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); struct qede_fdir_entry *tmp = NULL; - struct qede_fdir_entry *fdir; SLIST_FOREACH(tmp, &qdev->fdir_info.fdir_list_head, list) { if (tmp) { @@ -98,12 +96,11 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev) struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); char mz_name[RTE_MEMZONE_NAMESIZE] = {0}; struct qede_fdir_entry *tmp = NULL; - struct qede_fdir_entry *fdir; + struct qede_fdir_entry *fdir = NULL; const struct rte_memzone *mz; struct ecore_hwfn *p_hwfn; enum _ecore_status_t rc; uint16_t pkt_len; - uint16_t len; void *pkt; if (add) { @@ -251,7 +248,7 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev) } /* Fills the L3/L4 headers and returns the actual length of flowdir packet */ -static uint16_t +uint16_t qede_fdir_construct_pkt(struct rte_eth_dev *eth_dev, struct rte_eth_fdir_filter *fdir, void *buff, @@ -268,8 +265,6 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev) struct ipv6_hdr *ip6; struct udp_hdr *udp; struct tcp_hdr *tcp; - struct sctp_hdr *sctp; - uint8_t size, dst = 0; uint16_t len; static const uint8_t next_proto[] = { [RTE_ETH_FLOW_NONFRAG_IPV4_TCP] = IPPROTO_TCP, @@ -425,8 +420,7 @@ int qede_ntuple_filter_conf(struct rte_eth_dev *eth_dev, struct rte_eth_fdir_filter fdir_entry; struct rte_eth_tcpv4_flow *tcpv4_flow; struct rte_eth_udpv4_flow *udpv4_flow; - struct ecore_hwfn *p_hwfn; - bool add; + bool add = false; switch (filter_op) { case RTE_ETH_FILTER_NOP: @@ -440,7 +434,6 @@ int qede_ntuple_filter_conf(struct rte_eth_dev *eth_dev, add = true; break; case RTE_ETH_FILTER_DELETE: - add = false; break; case RTE_ETH_FILTER_INFO: case RTE_ETH_FILTER_GET: diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h index 09b6912..405c525 100644 --- a/drivers/net/qede/qede_if.h +++ b/drivers/net/qede/qede_if.h @@ -198,6 +198,10 @@ struct qed_common_ops { dma_addr_t sb_phy_addr, uint16_t sb_id, enum qed_sb_type type); + int (*get_sb_info)(struct ecore_dev *edev, + struct ecore_sb_info *sb, u16 qid, + struct ecore_sb_info_dbg *sb_dbg); + bool (*can_link_change)(struct ecore_dev *edev); void (*update_msglvl)(struct ecore_dev *edev, diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index 009dbb4..712c03f 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -74,7 +74,7 @@ static void qed_init_pci(struct ecore_dev *edev, struct rte_pci_device *pci_dev) static int qed_nic_setup(struct ecore_dev *edev) { - int rc, i; + int rc; rc = ecore_resc_alloc(edev); if (rc) @@ -226,7 +226,6 @@ static int qed_slowpath_start(struct ecore_dev *edev, struct ecore_hwfn *hwfn; struct ecore_mcp_drv_version drv_version; struct ecore_hw_init_params hw_init_params; - struct qede_dev *qdev = (struct qede_dev *)edev; struct ecore_ptt *p_ptt; int rc; @@ -268,9 +267,9 @@ static int qed_slowpath_start(struct ecore_dev *edev, goto err1; } } +#endif qed_start_iov_task(edev); -#endif #ifdef CONFIG_ECORE_BINARY_FW if (IS_PF(edev)) @@ -401,7 +400,6 @@ static int qed_slowpath_start(struct ecore_dev *edev, int qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info) { - struct qede_dev *qdev = (struct qede_dev *)edev; uint8_t queues = 0; int i; @@ -498,7 +496,6 @@ static void qed_fill_link(struct ecore_hwfn *hwfn, struct ecore_mcp_link_params params; struct ecore_mcp_link_state link; struct ecore_mcp_link_capabilities link_caps; - uint32_t media_type; uint8_t change = 0; memset(if_link, 0, sizeof(*if_link)); @@ -732,6 +729,7 @@ static int qed_get_sb_info(struct ecore_dev *edev, struct ecore_sb_info *sb, INIT_STRUCT_FIELD(chain_alloc, &ecore_chain_alloc), INIT_STRUCT_FIELD(chain_free, &ecore_chain_free), INIT_STRUCT_FIELD(sb_init, &qed_sb_init), + INIT_STRUCT_FIELD(get_sb_info, &qed_get_sb_info), INIT_STRUCT_FIELD(get_link, &qed_get_current_link), INIT_STRUCT_FIELD(set_link, &qed_set_link), INIT_STRUCT_FIELD(drain, &qed_drain), diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index 47ebba7..83e1bc4 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -83,7 +83,7 @@ static void qede_tx_queue_release_mbufs(struct qede_tx_queue *txq) int qede_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id, - const struct rte_eth_rxconf *rx_conf, + __rte_unused const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) { struct qede_dev *qdev = dev->data->dev_private; @@ -330,8 +330,8 @@ void qede_tx_queue_release(void *tx_queue) static void qede_init_fp(struct qede_dev *qdev) { struct qede_fastpath *fp; - uint8_t i, rss_id, tc; - int fp_rx = qdev->fp_num_rx, rxq = 0, txq = 0; + uint8_t i; + int fp_rx = qdev->fp_num_rx; memset((void *)qdev->fp_array, 0, (QEDE_QUEUE_CNT(qdev) * sizeof(*qdev->fp_array))); @@ -367,11 +367,9 @@ void qede_free_fp_arrays(struct qede_dev *qdev) } } -int qede_alloc_fp_array(struct qede_dev *qdev) +static int qede_alloc_fp_array(struct qede_dev *qdev) { - struct qede_fastpath *fp; struct ecore_dev *edev = &qdev->edev; - int i; qdev->fp_array = rte_calloc("fp", QEDE_QUEUE_CNT(qdev), sizeof(*qdev->fp_array), @@ -477,7 +475,8 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev) } static inline void -qede_update_rx_prod(struct qede_dev *edev, struct qede_rx_queue *rxq) +qede_update_rx_prod(__rte_unused struct qede_dev *edev, + struct qede_rx_queue *rxq) { uint16_t bd_prod = ecore_chain_get_prod_idx(&rxq->rx_bd_ring); uint16_t cqe_prod = ecore_chain_get_prod_idx(&rxq->rx_comp_ring); @@ -534,7 +533,8 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev) sge_tpa_params->tpa_min_size_to_cont = mtu / 2; } -static int qede_start_queues(struct rte_eth_dev *eth_dev, bool clear_stats) +static int qede_start_queues(struct rte_eth_dev *eth_dev, + __rte_unused bool clear_stats) { struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; @@ -547,7 +547,6 @@ static int qede_start_queues(struct rte_eth_dev *eth_dev, bool clear_stats) dma_addr_t p_phys_table; int txq_index; uint16_t page_cnt; - int vlan_removal_en = 1; int rc, tc, i; for_each_queue(i) { @@ -700,6 +699,33 @@ static inline uint8_t qede_check_notunn_csum_l4(uint16_t flag) return 0; } +static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags) +{ + uint16_t val; + + /* Lookup table */ + static const uint32_t + ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = { + [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_L3_IPV4, + [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_L3_IPV6, + [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP, + [QEDE_PKT_TYPE_IPV6_TCP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP, + [QEDE_PKT_TYPE_IPV4_UDP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP, + [QEDE_PKT_TYPE_IPV6_UDP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, + }; + + /* Bits (0..3) provides L3/L4 protocol type */ + val = ((PARSING_AND_ERR_FLAGS_L3TYPE_MASK << + PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT) | + (PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK << + PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT)) & flags; + + if (val < QEDE_PKT_TYPE_MAX) + return ptype_lkup_tbl[val] | RTE_PTYPE_L2_ETHER; + else + return RTE_PTYPE_UNKNOWN; +} + static inline uint8_t qede_check_notunn_csum_l3(struct rte_mbuf *m, uint16_t flag) { @@ -735,7 +761,7 @@ static inline void qede_rx_bd_ring_consume(struct qede_rx_queue *rxq) } static inline void -qede_reuse_page(struct qede_dev *qdev, +qede_reuse_page(__rte_unused struct qede_dev *qdev, struct qede_rx_queue *rxq, struct qede_rx_entry *curr_cons) { struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq->rx_bd_ring); @@ -768,39 +794,11 @@ static inline void qede_rx_bd_ring_consume(struct qede_rx_queue *rxq) } } -static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags) -{ - uint16_t val; - - /* Lookup table */ - static const uint32_t - ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = { - [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_L3_IPV4, - [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_L3_IPV6, - [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP, - [QEDE_PKT_TYPE_IPV6_TCP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP, - [QEDE_PKT_TYPE_IPV4_UDP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP, - [QEDE_PKT_TYPE_IPV6_UDP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, - }; - - /* Bits (0..3) provides L3/L4 protocol type */ - val = ((PARSING_AND_ERR_FLAGS_L3TYPE_MASK << - PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT) | - (PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK << - PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT)) & flags; - - if (val < QEDE_PKT_TYPE_MAX) - return ptype_lkup_tbl[val] | RTE_PTYPE_L2_ETHER; - else - return RTE_PTYPE_UNKNOWN; -} - static inline void -qede_rx_process_tpa_cmn_cont_end_cqe(struct qede_dev *qdev, +qede_rx_process_tpa_cmn_cont_end_cqe(__rte_unused struct qede_dev *qdev, struct qede_rx_queue *rxq, uint8_t agg_index, uint16_t len) { - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); struct qede_agg_info *tpa_info; struct rte_mbuf *curr_frag; /* Pointer to currently filled TPA seg */ uint16_t cons_idx; @@ -845,13 +843,11 @@ static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags) struct qede_rx_queue *rxq, struct eth_fast_path_rx_tpa_end_cqe *cqe) { - struct qede_agg_info *tpa_info; struct rte_mbuf *rx_mb; /* Pointer to head of the chained agg */ qede_rx_process_tpa_cmn_cont_end_cqe(qdev, rxq, cqe->tpa_agg_index, cqe->len_list[0]); /* Update total length and frags based on end TPA */ - tpa_info = &rxq->tpa_info[cqe->tpa_agg_index]; rx_mb = rxq->tpa_info[cqe->tpa_agg_index].tpa_head; /* TODO: Add Sanity Checks */ rx_mb->nb_segs = cqe->num_of_bds; @@ -930,7 +926,6 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) { struct qede_rx_queue *rxq = p_rxq; struct qede_dev *qdev = rxq->qdev; - struct ecore_dev *edev = &qdev->edev; register struct rte_mbuf *seg1 = NULL; register struct rte_mbuf *seg2 = NULL; uint16_t sw_rx_index; @@ -970,17 +965,19 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) uint16_t hw_comp_cons, sw_comp_cons, sw_rx_index; uint16_t rx_pkt = 0; union eth_rx_cqe *cqe; - struct eth_fast_path_rx_reg_cqe *fp_cqe; + struct eth_fast_path_rx_reg_cqe *fp_cqe = NULL; register struct rte_mbuf *rx_mb = NULL; register struct rte_mbuf *seg1 = NULL; enum eth_rx_cqe_type cqe_type; - uint16_t pkt_len; /* Sum of all BD segments */ + uint16_t pkt_len = 0; /* Sum of all BD segments */ uint16_t len; /* Length of first BD */ uint8_t num_segs = 1; uint16_t preload_idx; - uint8_t csum_flag; uint16_t parse_flag; +#ifdef RTE_LIBRTE_QEDE_DEBUG_RX + uint8_t bitfield_val; enum rss_hash_type htype; +#endif uint8_t tunn_parse_flag; uint8_t j; struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa; @@ -988,9 +985,8 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) uint32_t packet_type; uint16_t vlan_tci; bool tpa_start_flg; - uint8_t bitfield_val; uint8_t offset, tpa_agg_idx, flags; - struct qede_agg_info *tpa_info; + struct qede_agg_info *tpa_info = NULL; uint32_t rss_hash; hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr); @@ -1066,24 +1062,28 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) /* Handle regular CQE or TPA start CQE */ if (!tpa_start_flg) { parse_flag = rte_le_to_cpu_16(fp_cqe->pars_flags.flags); - bitfield_val = fp_cqe->bitfields; offset = fp_cqe->placement_offset; len = rte_le_to_cpu_16(fp_cqe->len_on_first_bd); pkt_len = rte_le_to_cpu_16(fp_cqe->pkt_len); vlan_tci = rte_le_to_cpu_16(fp_cqe->vlan_tag); rss_hash = rte_le_to_cpu_32(fp_cqe->rss_hash); +#ifdef RTE_LIBRTE_QEDE_DEBUG_RX + bitfield_val = fp_cqe->bitfields; htype = (uint8_t)GET_FIELD(bitfield_val, ETH_FAST_PATH_RX_REG_CQE_RSS_HASH_TYPE); +#endif } else { parse_flag = rte_le_to_cpu_16(cqe_start_tpa->pars_flags.flags); - bitfield_val = cqe_start_tpa->bitfields; offset = cqe_start_tpa->placement_offset; /* seg_len = len_on_first_bd */ len = rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd); vlan_tci = rte_le_to_cpu_16(cqe_start_tpa->vlan_tag); +#ifdef RTE_LIBRTE_QEDE_DEBUG_RX + bitfield_val = cqe_start_tpa->bitfields; htype = (uint8_t)GET_FIELD(bitfield_val, ETH_FAST_PATH_RX_TPA_START_CQE_RSS_HASH_TYPE); +#endif rss_hash = rte_le_to_cpu_32(cqe_start_tpa->rss_hash); } if (qede_tunn_exist(parse_flag)) { @@ -1241,7 +1241,6 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) struct rte_mbuf *mbuf; uint16_t nb_segs; uint16_t idx; - uint8_t nbds; idx = TX_CONS(txq); mbuf = txq->sw_tx_ring[idx].mbuf; @@ -1265,16 +1264,21 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) } static inline void -qede_process_tx_compl(struct ecore_dev *edev, struct qede_tx_queue *txq) +qede_process_tx_compl(__rte_unused struct ecore_dev *edev, + struct qede_tx_queue *txq) { uint16_t hw_bd_cons; +#ifdef RTE_LIBRTE_QEDE_DEBUG_TX uint16_t sw_tx_cons; +#endif rte_compiler_barrier(); hw_bd_cons = rte_le_to_cpu_16(*txq->hw_cons_ptr); +#ifdef RTE_LIBRTE_QEDE_DEBUG_TX sw_tx_cons = ecore_chain_get_cons_idx(&txq->tx_pbl); PMD_TX_LOG(DEBUG, txq, "Tx Completions = %u\n", abs(hw_bd_cons - sw_tx_cons)); +#endif while (hw_bd_cons != ecore_chain_get_cons_idx(&txq->tx_pbl)) qede_free_tx_pkt(txq); } @@ -1361,10 +1365,16 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) /* TX prepare to check packets meets TX conditions */ uint16_t +#ifdef RTE_LIBRTE_QEDE_DEBUG_TX qede_xmit_prep_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { struct qede_tx_queue *txq = p_txq; +#else +qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts, + uint16_t nb_pkts) +{ +#endif uint64_t ol_flags; struct rte_mbuf *m; uint16_t i; @@ -1411,9 +1421,11 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) } } +#ifdef RTE_LIBRTE_QEDE_DEBUG_TX if (unlikely(i != nb_pkts)) PMD_TX_LOG(ERR, txq, "TX prepare failed for %u\n", nb_pkts - i); +#endif return i; } @@ -1651,7 +1663,7 @@ static void qede_init_fp_queue(struct rte_eth_dev *eth_dev) { struct qede_dev *qdev = eth_dev->data->dev_private; struct qede_fastpath *fp; - uint8_t i, rss_id, txq_index, tc; + uint8_t i, txq_index, tc; int rxq = 0, txq = 0; for_each_queue(i) { @@ -1679,8 +1691,6 @@ int qede_dev_start(struct rte_eth_dev *eth_dev) { struct qede_dev *qdev = eth_dev->data->dev_private; struct ecore_dev *edev = &qdev->edev; - struct qed_link_output link_output; - struct qede_fastpath *fp; int rc; DP_INFO(edev, "Device state is %d\n", qdev->state); -- 1.7.10.3