From patchwork Tue Jul 27 17:43:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85138C4338F for ; Tue, 27 Jul 2021 17:43:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F93F60F9F for ; Tue, 27 Jul 2021 17:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbhG0Rno (ORCPT ); Tue, 27 Jul 2021 13:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbhG0Rno (ORCPT ); Tue, 27 Jul 2021 13:43:44 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A75C061760 for ; Tue, 27 Jul 2021 10:43:43 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id m10-20020a17090a34cab0290176b52c60ddso5892356pjf.4 for ; Tue, 27 Jul 2021 10:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N+iRzCc5w+nQ3FtDNsr4EOv16/0Zg5i++kmtnA72Sz0=; b=G79ifbr8ePs3x4FtPhH/ykorW63aFvWzoUHNmB5dz+xhSBWqXbOqdULVnzdzWV09GQ XRungCLi6H7CpVb1uNulNsQbzbZUbXDmHCo9G3TX2Ute7a2ZAfCZXqD1JoTJrRFZm26L laPMGGTimCE7nwiYGkMAVwqmCQv5UhiN8yX/Yiwjk34e1tjLdOR9Hu5avrv0Gb6envpe fLBduTepioq6jzGeOySwk6nALDSiMyuGVCvGfQCvnTv03zkZFwCnguBT9bM+sIff35+2 HXX1vyCE6ahk9lliifjdfeaqNOM73K8A2G5UCi9BrJ4PPN7aZHvDPRiKGLOUXAD64SA4 LYiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N+iRzCc5w+nQ3FtDNsr4EOv16/0Zg5i++kmtnA72Sz0=; b=UO8RghxpDb7CeSYvVIAKOAIvugAT4dnMlakjscnIH97KGEfnOdNYGcBqdJ9GHdP6aK uvjTDwurANdtJv4bsojElxxC1hiE2hjwIEtaacAxoDDCbjxeyDt3onDEtG4lSr+wYAej /H1IVVn63RUuZE0u27ohs7L3ceyTY96G5nmsFjVnOQoh/h5cWdM1iefyrwZrdmEp2hrv NJIOsNxenge9Cpg983tT3J7cw/y2Fj9bZGG+eJdDO13tumT5jEDTJiy+cs+1oz/nTypq ouGjAa1hIs+jjuTR7Bm8qD2Oz+pUbUKoYRoApcEoQH5VR0cjDmwxNsLF+AYE2kqeh58m 5FiQ== X-Gm-Message-State: AOAM531XTArFjBacu73vaamkxcebcJVnb806r7O5JCb3OesMCfxvyztl s/PFkHv/7FpTxUipnufvLxGukg== X-Google-Smtp-Source: ABdhPJzC2lAundGMKUSyuVeJ7F52LsLO3HprO5B+gfu/WVX+BE4O66+TPf7CLSN1B1nBWD7JrrsLsw== X-Received: by 2002:a17:90b:3905:: with SMTP id ob5mr9348401pjb.211.1627407823512; Tue, 27 Jul 2021 10:43:43 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:43 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 01/10] ionic: minimize resources when under kdump Date: Tue, 27 Jul 2021 10:43:25 -0700 Message-Id: <20210727174334.67931-2-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When running in a small kdump kernel, we can play nice and minimize our resource use to help make sure that kdump is successful in its mission. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index af3a5368529c..e839680070ba 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "ionic.h" #include "ionic_bus.h" @@ -2834,8 +2835,14 @@ int ionic_lif_alloc(struct ionic *ionic) lif->ionic = ionic; lif->index = 0; - lif->ntxq_descs = IONIC_DEF_TXRX_DESC; - lif->nrxq_descs = IONIC_DEF_TXRX_DESC; + + if (is_kdump_kernel()) { + lif->ntxq_descs = IONIC_MIN_TXRX_DESC; + lif->nrxq_descs = IONIC_MIN_TXRX_DESC; + } else { + lif->ntxq_descs = IONIC_DEF_TXRX_DESC; + lif->nrxq_descs = IONIC_DEF_TXRX_DESC; + } /* Convert the default coalesce value to actual hw resolution */ lif->rx_coalesce_usecs = IONIC_ITR_COAL_USEC_DEFAULT; @@ -3519,6 +3526,7 @@ int ionic_lif_size(struct ionic *ionic) unsigned int min_intrs; int err; + /* retrieve basic values from FW */ lc = &ident->lif.eth.config; dev_nintrs = le32_to_cpu(ident->dev.nintrs); neqs_per_lif = le32_to_cpu(ident->lif.rdma.eq_qtype.qid_count); @@ -3526,6 +3534,15 @@ int ionic_lif_size(struct ionic *ionic) ntxqs_per_lif = le32_to_cpu(lc->queue_count[IONIC_QTYPE_TXQ]); nrxqs_per_lif = le32_to_cpu(lc->queue_count[IONIC_QTYPE_RXQ]); + /* limit values to play nice with kdump */ + if (is_kdump_kernel()) { + dev_nintrs = 2; + neqs_per_lif = 0; + nnqs_per_lif = 0; + ntxqs_per_lif = 1; + nrxqs_per_lif = 1; + } + /* reserve last queue id for hardware timestamping */ if (lc->features & cpu_to_le64(IONIC_ETH_HW_TIMESTAMP)) { if (ntxqs_per_lif <= 1 || nrxqs_per_lif <= 1) { From patchwork Tue Jul 27 17:43:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 488541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66692C4320A for ; Tue, 27 Jul 2021 17:43:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 479A060F57 for ; Tue, 27 Jul 2021 17:43:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbhG0Rnv (ORCPT ); Tue, 27 Jul 2021 13:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbhG0Rnp (ORCPT ); Tue, 27 Jul 2021 13:43:45 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1805BC061757 for ; Tue, 27 Jul 2021 10:43:45 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id i1so16605596plr.9 for ; Tue, 27 Jul 2021 10:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lAgM0C3Ib8PZKXvR7JBagHFKelvNn/rbZOCkYbxtxKg=; b=u1hvwEKPLyxLCVGlsaZXDUYrq+mh4FSwTM7FwhkMK5/Rk7z2rHGh2a38TiXUTmqonE GZKYag450H5574uOCQ5qLgps6giJ42T/MN+bwg19HfN/jMIsOIoOa6Ts/DhzUCslH3o0 fxydd2PHm2ElsT92wsJe89DYsHtl7XF+F4XmUS358tO2MvqRiVXVE9IjzQpoAFDsBCY5 Tm4sTK/FvblqmS1wOnmFjPDejwEaZPDSmqcAs3hiBCqoy1CiM7iw9RjsKbb33j24OkPK IUKcIjoH3fmqEf/LREGMy0xy5Pr/cATk0Fic15hCw3VEbabEhAarIyRJV4McAyVDqBqf nZJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lAgM0C3Ib8PZKXvR7JBagHFKelvNn/rbZOCkYbxtxKg=; b=l5FPWIw5i6HFBwPPOzTh/jRaXac46FuhBucBq1LqBA2bq/pifQQbaQ5FL1173ge1r5 iZXGT/4bLmpRvjaiThCnjIlU2I1JeWWWP+77H9l6LFTqE5D4AwR+Pc78ZY66ELxsEiwX FWnli06tXHPGazlb6CHS30l/C8ImjxKupFGrI8ex2Op4tNmW4BRDvP0XtiC27VghYJ9c JiDuwCqcHWx597iIEDv+0iaVhgj3FbyYyJGSduZSdTFz8qX+RsBEpkf+Zlb6u01QO2Wj 0lZvMXK2176+E8mh3lP9l0dHvvRYs6tK8/l6EkvAnjEVpnKDpjz2sa7UHsLbhJcM1fgN W3RA== X-Gm-Message-State: AOAM533lCX985d/0uWdE3DIHGzUVle+UybKgpMM4+A5Q4Jh+TStdo1f0 iYadeI7Ox7o1v9q56ou4TLlwxA== X-Google-Smtp-Source: ABdhPJwWaaR7/qa0PuApLxNI2FPGb8/zLIOJkPWbAG3Y2/uEo6D+nUIkoBC0UaWk6NV99dVdTCt/fw== X-Received: by 2002:a65:645a:: with SMTP id s26mr516724pgv.270.1627407824453; Tue, 27 Jul 2021 10:43:44 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:44 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 02/10] ionic: monitor fw status generation Date: Tue, 27 Jul 2021 10:43:26 -0700 Message-Id: <20210727174334.67931-3-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The top 4 bits of the fw_status in dev_info_regs is reserved for the status generation. This generation number is an arbitrary value defined when firmware starts up. If the FW is killed/crashed/stopped and then restarted, it will create a different generation number. With this mechanism, the host driver can detect that the FW has crashed and restarted, and the driver can then take steps to re-initialize its connection. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.c | 28 +++++++++++++++++-- .../net/ethernet/pensando/ionic/ionic_dev.h | 1 + .../net/ethernet/pensando/ionic/ionic_if.h | 5 +++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c index 1dfe962e22e0..9aac647290f7 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c @@ -106,6 +106,8 @@ int ionic_dev_setup(struct ionic *ionic) idev->last_fw_hb = 0; idev->fw_hb_ready = true; idev->fw_status_ready = true; + idev->fw_generation = IONIC_FW_STS_F_GENERATION & + ioread8(&idev->dev_info_regs->fw_status); mod_timer(&ionic->watchdog_timer, round_jiffies(jiffies + ionic->watchdog_period)); @@ -121,7 +123,9 @@ int ionic_heartbeat_check(struct ionic *ionic) { struct ionic_dev *idev = &ionic->idev; unsigned long check_time, last_check_time; - bool fw_status_ready, fw_hb_ready; + bool fw_status_ready = true; + bool fw_hb_ready; + u8 fw_generation; u8 fw_status; u32 fw_hb; @@ -140,9 +144,29 @@ int ionic_heartbeat_check(struct ionic *ionic) /* firmware is useful only if the running bit is set and * fw_status != 0xff (bad PCI read) + * If fw_status is not ready don't bother with the generation. */ fw_status = ioread8(&idev->dev_info_regs->fw_status); - fw_status_ready = (fw_status != 0xff) && (fw_status & IONIC_FW_STS_F_RUNNING); + + if (fw_status == 0xff || !(fw_status & IONIC_FW_STS_F_RUNNING)) { + fw_status_ready = false; + } else { + fw_generation = fw_status & IONIC_FW_STS_F_GENERATION; + if (idev->fw_generation != fw_generation) { + dev_info(ionic->dev, "FW generation 0x%02x -> 0x%02x\n", + idev->fw_generation, fw_generation); + + idev->fw_generation = fw_generation; + + /* If the generation changed, the fw status is not + * ready so we need to trigger a fw-down cycle. After + * the down, the next watchdog will see the fw is up + * and the generation value stable, so will trigger + * the fw-up activity. + */ + fw_status_ready = false; + } + } /* is this a transition? */ if (fw_status_ready != idev->fw_status_ready) { diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h index c25cf9b744c5..8945aeda1b4c 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h @@ -143,6 +143,7 @@ struct ionic_dev { u32 last_fw_hb; bool fw_hb_ready; bool fw_status_ready; + u8 fw_generation; u64 __iomem *db_pages; dma_addr_t phy_db_pages; diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index 0478b48d9895..278610ed7227 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -2936,6 +2936,8 @@ struct ionic_hwstamp_regs { * @asic_type: Asic type * @asic_rev: Asic revision * @fw_status: Firmware status + * bit 0 - 1 = fw running + * bit 4-7 - 4 bit generation number, changes on fw restart * @fw_heartbeat: Firmware heartbeat counter * @serial_num: Serial number * @fw_version: Firmware version @@ -2949,7 +2951,8 @@ union ionic_dev_info_regs { u8 version; u8 asic_type; u8 asic_rev; -#define IONIC_FW_STS_F_RUNNING 0x1 +#define IONIC_FW_STS_F_RUNNING 0x01 +#define IONIC_FW_STS_F_GENERATION 0xF0 u8 fw_status; u32 fw_heartbeat; char fw_version[IONIC_DEVINFO_FWVERS_BUFLEN]; From patchwork Tue Jul 27 17:43:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13A35C4338F for ; Tue, 27 Jul 2021 17:43:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE95460F8F for ; Tue, 27 Jul 2021 17:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbhG0Rnu (ORCPT ); Tue, 27 Jul 2021 13:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbhG0Rnq (ORCPT ); Tue, 27 Jul 2021 13:43:46 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E208EC061760 for ; Tue, 27 Jul 2021 10:43:45 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id b6so330557pji.4 for ; Tue, 27 Jul 2021 10:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bFcozBPtisyVv7oPMFidPiZ9thZ5dcWN7BZBC2wzhEw=; b=QnFe1xSFSZQeVFyyyUOE2/pIjKZ0v+jOnV46EA3LEDqrFGBV1/Lp9uY7nBfh9Tkkob a9p5YRPPJ5Px9QfCyWFZSUVu6PsZqUWRNeMT6FFTm8PsI9fCypmdKQQyF+6EinHFWhtG f5sAaPQeOvhvdyH+/gwa7z2TRvOZ3ywqSGeMGP2Ix1X/t3i9jmU3TJE4tRoZjZrOpG3p xTYLVI5p+m2UrtwhudzL4Bncy1QLwAFOFMoO0s2AO6KobGPSIGcLebmbTqhunMgRFBA9 V3ZcAslKkDDHYYXnTLns+fwKATqugmpZ1ixN/D6tnU3HS81RZ2jFN2NlLlH6H2RT0H4N sB2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bFcozBPtisyVv7oPMFidPiZ9thZ5dcWN7BZBC2wzhEw=; b=KpFFbXfJ0b7zUkB9zdT3zLscG62BwfedgBkT5bINAIURNcVN66pH8HMSszDwcJz9oe NMJxbuh5bmjQqRzax+GYI4J0fPf5e9Yi5pubiCorwNEvBWnpQtYX98sgNKY1Z3pZ603H /F936ZLCssm6dfMXCKGyLF8ffqo5BH9nq1guYTQgbwzXGC7nAtc4KYopVHpMnZzR6syw Q/ZB1UVyzNpdl7yy5/64zJHcgbfsbVu4DMm9fA7NXsPnCB7yqGhNeZycuTFUzhL/ShoV 00KuXeDXmsC40G6my98ggFi58SdyG4QDiw6MYrrHXaRJPDsow27UBPU/iXcPKweKnCnO 0XKw== X-Gm-Message-State: AOAM532mWmfVo3mQ6nw1HA6Fo/wBRGQlLgQVof8nk+Rnkv9Pce+AX3Nj 7AEA28FiHrkPbiPcukvalvfX/Q== X-Google-Smtp-Source: ABdhPJzQ0i8e2NEgUWXh/pJqN+rnWc4ia9BvgZGW6GnGiyZl+l1iyYjvRxGRe9oby/p9jjv+LeyBaw== X-Received: by 2002:a63:110c:: with SMTP id g12mr24347428pgl.139.1627407825503; Tue, 27 Jul 2021 10:43:45 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:45 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 03/10] ionic: print firmware version on identify Date: Tue, 27 Jul 2021 10:43:27 -0700 Message-Id: <20210727174334.67931-4-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Print the version of the DSC firmware seen when we do a fresh ident check. Because the FW can be updated by the external orchestration system, this helps us track that FW has been updated on the DSC. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index 61cfe2120817..5f1e5b6e85c3 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -450,6 +450,8 @@ int ionic_identify(struct ionic *ionic) } mutex_unlock(&ionic->dev_cmd_lock); + dev_info(ionic->dev, "FW: %s\n", idev->dev_info.fw_version); + if (err) { dev_err(ionic->dev, "Cannot identify ionic: %dn", err); goto err_out; From patchwork Tue Jul 27 17:43:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 741AFC4320E for ; Tue, 27 Jul 2021 17:43:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C62760F9F for ; Tue, 27 Jul 2021 17:43:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbhG0Rnw (ORCPT ); Tue, 27 Jul 2021 13:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbhG0Rns (ORCPT ); Tue, 27 Jul 2021 13:43:48 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0E31C061765 for ; Tue, 27 Jul 2021 10:43:47 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id e21so12124898pla.5 for ; Tue, 27 Jul 2021 10:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iBOFT9vekrGt2zzCd6raJgApOv9Ft7mTrTQxJhe9jpw=; b=ueQcnHYZdG/Y7bMFUdw07F/yMxuhA98lnRpXm/9tWOzTHCFkLDnJDXVlgDLTQjGgxb VfOiSz6k7DaR4oNKU+gZ+Xmu4JXLWZfGOTsl30Isk7/+JRsPdoTs8Wz7FW9m3E23PRqo zKQ9x42zgbQwAkNTainGzMiK4ONPlONXuGx9c93jvx3auHOh+kpWq/bHEHXu2raQj9Di EOWW93jsQO1T+lfGZ+BW6RSCX4NnerOnk4TcKubPbKbYkIWEpfXyCGSV9QcddfdyevQl ixuATaFs9iT38cQstJpfG9o/aQWbqDvrSO7GefOyganNthxlLU+GfumeRNaoIdSFFga+ 2fZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iBOFT9vekrGt2zzCd6raJgApOv9Ft7mTrTQxJhe9jpw=; b=XXb+2JvcO5IgGGpEy/HxhJtWyRZPXveSG8oFTpC8/+qm936SHlClRPsh2kNDbtJuZ3 gVIoTitwd1bD+d4VL5ZYRbtwtt9h7pONnIBibR8KlboLMb1w7R4hGpVsEqlHlW8wK5hf 3kZdFPnJmdZmfqRid/9rsCrbiiXimy1cGp+0gfouRyOg/IBQL1o8S40MTEH8qKrfDkBZ /eLVEltNPffTyD4lmDJoeUcsvzBjpeS9gYXsijg06tC7rAy/JRNIZq0XLzrxZ3fyaFFE iPpplQEwtpHImdVL+xP009NaKTnlU7ef1rW3/jKKDOfplf8cZLBwd3+4t6sV3QWbg6Vn krmw== X-Gm-Message-State: AOAM532SDOawhzixtfMLlBldeht31HKB+ocjSXmdzAS6RYOLKNd98BE5 TuajeyNXs5HCehcYV5WVLLmtweR9+YfnZw== X-Google-Smtp-Source: ABdhPJzu/7hM+mHpRVItxYf45BEjWrQuxuBCN/tCQzKHHWxWorVRik4XNXXFbskL4wfgx77pPyFWTw== X-Received: by 2002:a63:5f55:: with SMTP id t82mr24758452pgb.226.1627407827277; Tue, 27 Jul 2021 10:43:47 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:46 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 04/10] ionic: init reconfig err to 0 Date: Tue, 27 Jul 2021 10:43:28 -0700 Message-Id: <20210727174334.67931-5-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Initialize err to 0 instead of ENOMEM, and specifically set err to ENOMEM in the devm_kcalloc() failure cases. Also, add an error message to the end of reconfig. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index e839680070ba..3a72403cf4df 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -2588,22 +2588,26 @@ int ionic_reconfigure_queues(struct ionic_lif *lif, struct ionic_qcq **tx_qcqs = NULL; struct ionic_qcq **rx_qcqs = NULL; unsigned int flags, i; - int err = -ENOMEM; + int err = 0; /* allocate temporary qcq arrays to hold new queue structs */ if (qparam->nxqs != lif->nxqs || qparam->ntxq_descs != lif->ntxq_descs) { tx_qcqs = devm_kcalloc(lif->ionic->dev, lif->ionic->ntxqs_per_lif, sizeof(struct ionic_qcq *), GFP_KERNEL); - if (!tx_qcqs) + if (!tx_qcqs) { + err = -ENOMEM; goto err_out; + } } if (qparam->nxqs != lif->nxqs || qparam->nrxq_descs != lif->nrxq_descs || qparam->rxq_features != lif->rxq_features) { rx_qcqs = devm_kcalloc(lif->ionic->dev, lif->ionic->nrxqs_per_lif, sizeof(struct ionic_qcq *), GFP_KERNEL); - if (!rx_qcqs) + if (!rx_qcqs) { + err = -ENOMEM; goto err_out; + } } /* allocate new desc_info and rings, but leave the interrupt setup @@ -2782,6 +2786,9 @@ int ionic_reconfigure_queues(struct ionic_lif *lif, ionic_qcq_free(lif, lif->rxqcqs[i]); } + if (err) + netdev_info(lif->netdev, "%s: failed %d\n", __func__, err); + return err; } From patchwork Tue Jul 27 17:43:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 488540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3496FC4338F for ; Tue, 27 Jul 2021 17:43:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17827600CD for ; Tue, 27 Jul 2021 17:43:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231466AbhG0Rnx (ORCPT ); Tue, 27 Jul 2021 13:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbhG0Rnt (ORCPT ); Tue, 27 Jul 2021 13:43:49 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E7CC061765 for ; Tue, 27 Jul 2021 10:43:49 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id mz5-20020a17090b3785b0290176ecf64922so5402471pjb.3 for ; Tue, 27 Jul 2021 10:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y7buWIGbj5gLeiQ4crzTWmYKGUE3U+OhNl6z+D6MrLk=; b=blu0dh0IwwEkwrI8ygnOvU1UarDDdba2tnbbos/COedHdxkh+/lyuNp51IgPKEK3K4 HCR9LkpglTjeyMP8tTTPxIyOmv5CofzOlU3unrYzb9r5q/c3n0txmYu9do9iCUW/XnJm NqNNARPRxyyrs2d7gPaWdx5FT/P3txsiJxYG+BBvhYc2n/CivgSH+Zc3JD49z6Sw+ntc Rdcu9VzioDOP8PukaqCRSyH8J8+Nf6mwKuxSD08JBc+HyjyDa7Y7xLJ7Zvrhrs/zO0Jc Byt/PWDTDvjbpCnhyaO3xwNw0nWyPxiJndIb0Szek889YMmd0P/0KIelDAs0N7uS6p9+ DP2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y7buWIGbj5gLeiQ4crzTWmYKGUE3U+OhNl6z+D6MrLk=; b=TsuT9foF5BoTMwOFtAxiNLIG8dzHfm8Nz0ygUL1xgj+8oMo7EFNK+lQKOrw/92vSUe xCii106cEhG8+1z6/b+sBUpFXbt2HXxckA53P/wB6C+F8Sx3CzB+8DhQ5/xDXi6bDb9n NAnfjn71+3oMJMe2r8Psv9UdbpxSY1yHQjpC8RhKZyai8U6fpt5+C9Clr/RlpN359Bc2 dnB6J/v3/BL/f16Xk4OuMqtyGdqgiq1uz8lkVtIoMQHNSYuWNkLrO3Z2awa3zUeizqgy CgoFHgjJjOF6rSD32J4PKAmvUuE8ZkdCNJ+LhJht1P2R6PNJq6IWa9EHWSOKuaz+LXE9 e3sg== X-Gm-Message-State: AOAM531c4R1oeryAHD/plJ7tBDHFpveSm+q2OG81O8G4Nvq3uZDrVXNa QN/FN9LB/0IBRHsTF50G8yTEiQ== X-Google-Smtp-Source: ABdhPJwuU+1iTxZ1PPhGJKDHe0fZehhHslBmbQss7Yr3v+qauBJtHcoGT83/dIX922rORqLnrbsW/g== X-Received: by 2002:a17:902:ec8b:b029:12c:41b1:5821 with SMTP id x11-20020a170902ec8bb029012c41b15821mr4565822plg.49.1627407828721; Tue, 27 Jul 2021 10:43:48 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:48 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 05/10] ionic: use fewer inits on the buf_info struct Date: Tue, 27 Jul 2021 10:43:29 -0700 Message-Id: <20210727174334.67931-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Based on Alex's review notes on [1], we don't need to write to the buf_info elements as often, and can tighten up how they are used. Also, use prefetchw() to warm up the page struct for a later get_page(). [1] https://lore.kernel.org/netdev/CAKgT0UfyjoAN7LTnq0NMZfXRv4v7iTCPyAb9pVr3qWMhop_BVw@mail.gmail.com/ Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index 08934888575c..2ba19246d763 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -32,19 +32,13 @@ static inline struct netdev_queue *q_to_ndq(struct ionic_queue *q) return netdev_get_tx_queue(q->lif->netdev, q->index); } -static void ionic_rx_buf_reset(struct ionic_buf_info *buf_info) -{ - buf_info->page = NULL; - buf_info->page_offset = 0; - buf_info->dma_addr = 0; -} - static int ionic_rx_page_alloc(struct ionic_queue *q, struct ionic_buf_info *buf_info) { struct net_device *netdev = q->lif->netdev; struct ionic_rx_stats *stats; struct device *dev; + struct page *page; dev = q->dev; stats = q_to_rx_stats(q); @@ -55,26 +49,27 @@ static int ionic_rx_page_alloc(struct ionic_queue *q, return -EINVAL; } - buf_info->page = alloc_pages(IONIC_PAGE_GFP_MASK, 0); - if (unlikely(!buf_info->page)) { + page = alloc_pages(IONIC_PAGE_GFP_MASK, 0); + if (unlikely(!page)) { net_err_ratelimited("%s: %s page alloc failed\n", netdev->name, q->name); stats->alloc_err++; return -ENOMEM; } - buf_info->page_offset = 0; - buf_info->dma_addr = dma_map_page(dev, buf_info->page, buf_info->page_offset, + buf_info->dma_addr = dma_map_page(dev, page, 0, IONIC_PAGE_SIZE, DMA_FROM_DEVICE); if (unlikely(dma_mapping_error(dev, buf_info->dma_addr))) { - __free_pages(buf_info->page, 0); - ionic_rx_buf_reset(buf_info); + __free_pages(page, 0); net_err_ratelimited("%s: %s dma map failed\n", netdev->name, q->name); stats->dma_map_err++; return -EIO; } + buf_info->page = page; + buf_info->page_offset = 0; + return 0; } @@ -95,7 +90,7 @@ static void ionic_rx_page_free(struct ionic_queue *q, dma_unmap_page(dev, buf_info->dma_addr, IONIC_PAGE_SIZE, DMA_FROM_DEVICE); __free_pages(buf_info->page, 0); - ionic_rx_buf_reset(buf_info); + buf_info->page = NULL; } static bool ionic_rx_buf_recycle(struct ionic_queue *q, @@ -139,7 +134,7 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, buf_info = &desc_info->bufs[0]; len = le16_to_cpu(comp->len); - prefetch(buf_info->page); + prefetchw(buf_info->page); skb = napi_get_frags(&q_to_qcq(q)->napi); if (unlikely(!skb)) { @@ -170,7 +165,7 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, if (!ionic_rx_buf_recycle(q, buf_info, frag_len)) { dma_unmap_page(dev, buf_info->dma_addr, IONIC_PAGE_SIZE, DMA_FROM_DEVICE); - ionic_rx_buf_reset(buf_info); + buf_info->page = NULL; } buf_info++; From patchwork Tue Jul 27 17:43:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5922DC43214 for ; Tue, 27 Jul 2021 17:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43FD0600CD for ; Tue, 27 Jul 2021 17:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231502AbhG0Rnz (ORCPT ); Tue, 27 Jul 2021 13:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbhG0Rnu (ORCPT ); Tue, 27 Jul 2021 13:43:50 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C048C0613C1 for ; Tue, 27 Jul 2021 10:43:50 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id ds11-20020a17090b08cbb0290172f971883bso5441728pjb.1 for ; Tue, 27 Jul 2021 10:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YBXOFCandu4G2SsFlAyt4sp3V7jHiFKqfq70fofyWQg=; b=jNmAMOYx1e934PjRgCKPwgp9PWrQwjSF0kH0yV/I6xkia1ginC1XEoT+Hdj01QtWaE xXNnEbJKfSmob2Hn0/goB6NPLEGjXgbGa0kw/Bz1CVsimgLi3lsxz3ga0rqdDy+o4TSu DNdfOFKiOuX4Jwbx0HkHJuA2+hsrslSkMGWyTrbaNcQwtcul+OL87X5OpNBLqDClkdZ3 mUz7nJNA/VVBATrxZq0hAYyUuqr/2nAaftq+4pwc+AGsL6Iozwcy//nHHbgV1X94BMwX DJBwc4leHEXjk9NaIqjs7vHhFw1TIvlXvWRRrL5l2PBReGgGf03C9O8/YMB3sywC0DvO vyxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YBXOFCandu4G2SsFlAyt4sp3V7jHiFKqfq70fofyWQg=; b=VNg5C14PyADX6M3L6cKjr9uFxIW/vXq9MoGAw+nxycwk4v5kl6xojSr0ioHSksi+MJ RMzMgYn6eVnIwjKgubDVZ8c92axd6djEw25gnGJQN9KNbAi25FOTs9BO/+tRMMk+jZN1 LI0klYPSCprUNA6rzoGh08duUvedIrykvnV8Wl4uzQtaZsPOSE9H5pAs26znapVRyUFW J27sNMNwtq2yG9QDdvMfBHCv253sIdz8Crf4NhGQwNbbHHzpq1E/rf0IAuuJGEh0x3Mm 5cC/9yd7BGkPc6fDjmyOEsI+MZKOY7dPhVq3k/UepVVSmJBr1azOGGCN5xqvyvXC0qPO 8meg== X-Gm-Message-State: AOAM531/PWjm9q3L1GkyEYjBb+g3IUaighnECJx6hrH5Ee0FL9eTNcHY LgZFRWfiIG6aD2rRxZHGIiJjUA== X-Google-Smtp-Source: ABdhPJy2UlLFZEAkumhAtHYZJySWyCWcFxYXkOh6J4l2UgYSXF500NYBLmax2v/UWODcLtv6pTNomA== X-Received: by 2002:a17:90b:1897:: with SMTP id mn23mr5213209pjb.97.1627407829935; Tue, 27 Jul 2021 10:43:49 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:49 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 06/10] ionic: increment num-vfs before configure Date: Tue, 27 Jul 2021 10:43:30 -0700 Message-Id: <20210727174334.67931-7-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add the new VF to our internal count before we start configuring it. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index 505f605fa40b..7e296fa71b36 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs) goto out; } + ionic->num_vfs++; /* ignore failures from older FW, we just won't get stats */ (void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR, (u8 *)&v->stats_pa); - ionic->num_vfs++; } out: From patchwork Tue Jul 27 17:43:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 488539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72F01C432BE for ; Tue, 27 Jul 2021 17:43:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 581EE600CD for ; Tue, 27 Jul 2021 17:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbhG0Rn5 (ORCPT ); Tue, 27 Jul 2021 13:43:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231200AbhG0Rnv (ORCPT ); Tue, 27 Jul 2021 13:43:51 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4956DC0613CF for ; Tue, 27 Jul 2021 10:43:51 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d1so9350312pll.1 for ; Tue, 27 Jul 2021 10:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZA2IzpdOyxIMsdJwDWeKgKu82j6q1PMQCVPMwrsTtMA=; b=aIJ3KGdesWxTkqUYqU0zok12rvYANjEeGQg8lcfWjfHIAXDPbPjBO0ukKNtVAtKqGg i8/zz+G7GLxvidkPAQauo5r9kqztAQLLISEOiqDAkw4k9lt/1hC2aYDab9rysbbpKtYM OS9mey1jlFYRXhiQL++Ldth0U1r/fekxchCM9upBnH5jAnU8B9bCgEzYXfRZPMffx4hc ZJo1DSD5nKZsWMWuwq09EO5O4PMCq567xvvu7bGjcuAj8mo+pAkuPm9ZCL1vdOKh704v 4j2ofQpJLYP3BlyyeW5xvOK4FOS9gpsE3O/+PkQHtQPYanqvK86LiQOKD12RZXHY8Wjc j/9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZA2IzpdOyxIMsdJwDWeKgKu82j6q1PMQCVPMwrsTtMA=; b=R16TWF5oBcbJjrVBHW86zTbU5M+40SyGeGskfim2ikI7CgR0/9+z5yoHABixZ1Pquy l7asXieCHXErSAk7VX5sA45BsQxRQbLxpcrjYWzyCENeJWcrrj0WnXEMlYHHOCZKbctb wLRMQlpcWL5JqLvUXbbl9EEaytn6GjjpyikE96eCoK1Myw/ZF8P/sXc4iQFk173s52zd C5dICT4gImVGh0aUB3jHZIZZh+FBZEsSCKZs6b5E3R9Uh5gAQfwjCaoFLYvLhar9hYhV IywR+chzqBljN198fQnweJCH121m1F1FhcJneNe65x91S9xfLjRB4g6drLPdzbQSsbGI hTiA== X-Gm-Message-State: AOAM533ki1myy39esZw5bcDGgeJNMhuAIn7pV54KQcz1XgWsSIWtAbZC ixACWfnTUnoHJZu5zhZH8yCKOJfHyKLQ3w== X-Google-Smtp-Source: ABdhPJwAq0ok4r1m1LSOXKHtkhBW0/tbKqUxsk9LvIWMketKYf6BITv9wNmq32aXYLlDxd1di7w4tg== X-Received: by 2002:a62:ee0f:0:b029:335:a681:34f6 with SMTP id e15-20020a62ee0f0000b0290335a68134f6mr24049321pfi.55.1627407830896; Tue, 27 Jul 2021 10:43:50 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:50 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 07/10] ionic: remove unneeded comp union fields Date: Tue, 27 Jul 2021 10:43:31 -0700 Message-Id: <20210727174334.67931-8-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We don't use these fields, so remove them from the definition. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_dev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h index 8945aeda1b4c..8311086fb1f4 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h @@ -161,8 +161,6 @@ struct ionic_dev { struct ionic_cq_info { union { void *cq_desc; - struct ionic_txq_comp *txcq; - struct ionic_rxq_comp *rxcq; struct ionic_admin_comp *admincq; struct ionic_notifyq_event *notifyq; }; From patchwork Tue Jul 27 17:43:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0DC2C43216 for ; Tue, 27 Jul 2021 17:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A45AF60F91 for ; Tue, 27 Jul 2021 17:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbhG0Rn7 (ORCPT ); Tue, 27 Jul 2021 13:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbhG0Rnw (ORCPT ); Tue, 27 Jul 2021 13:43:52 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41644C061757 for ; Tue, 27 Jul 2021 10:43:52 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id o44-20020a17090a0a2fb0290176ca3e5a2fso5903638pjo.1 for ; Tue, 27 Jul 2021 10:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eJboIgN6rqQCMY+eN7klOl1I+UbW2F4nnjZaOibNPb4=; b=oFNz7aKpPZ3aBpvTmeHhqz1WqNs5Gl6ocE6aMATn3nTWnxkyqQ9MugdaRtgxsfZlEG 2Bnvu50uZW77rHLPtfvHTVD6HnlbVfDM6AerXgT2ofmjsRyyonZikX/wr3cT7fms43Qx uYrWMIYzavvVg+fqBtNW2+95KpbSkoQFiSIcgY4OVJMt2zd3snH834LRAcwdvMDLyCZh MA/s1vCEmvuukpqkSpf5o4r1h7Ci3gH9lR+65twlO9SJ4v4A5R9GuKWo9V8bbTGNidQg GuOYgy8dqlJVxq9gN2kr4A0uYhMVGl1VJbOpi5J1vnHH7hnGuam6VpHRXVKLbAyBt/H1 tJwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eJboIgN6rqQCMY+eN7klOl1I+UbW2F4nnjZaOibNPb4=; b=sDn1RCXooHTk6i2dN8hdK5mXPhVSwpQ9dEhjoIDiqzLKq/ID7bnwgIV2p6ZB/vrSW8 sTddW0OxEp/ALA+BWlEx8t6S40nfr9RBsMc50hbUGLN3HNO7y99FmDGTZfA/JJPFr5cW 8hOoI3ITW4XFUa41nmww/O4aKOhURZP5SJWIdK7mYT1HcfKHJXk5n4JLAAVzVpRYGUht aKrnMFC2/oF6dXdLtkn6QrR3da7kVnlwQbUyDR1EWF8VrEw4BTDPmkXmJUdT5/oG+KgZ Ejhf4sk5wjNhGWzXQrlyu/PjJmt6nVEMep+6I38OWhDHRP7RQ4oMfqvwFZVkFzsBW0tH ipbg== X-Gm-Message-State: AOAM5305r+sDfjmFxDRVx5kxQykGo0KRkz0PqDCANSsGQcTzUPACQAq7 yvx/FZyIrBH1Nb5saCCOnFh+gQ== X-Google-Smtp-Source: ABdhPJyG8TXOwc1jVVoab8Y3fsQAVdqxSCuPAO+bv7avPztDsaHLbc1yyAEmA5mZT4Z7oO9UjDbOoA== X-Received: by 2002:a17:90b:d82:: with SMTP id bg2mr23232190pjb.28.1627407831828; Tue, 27 Jul 2021 10:43:51 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:51 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 08/10] ionic: block some ethtool operations when fw in reset Date: Tue, 27 Jul 2021 10:43:32 -0700 Message-Id: <20210727174334.67931-9-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There are a few things that we can't safely do when the fw is resetting, as the driver may be in the middle of rebuilding queue structures. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 6583be570e45..adc9fdb03e86 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -32,6 +32,9 @@ static void ionic_get_stats(struct net_device *netdev, struct ionic_lif *lif = netdev_priv(netdev); u32 i; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return; + memset(buf, 0, stats->n_stats * sizeof(*buf)); for (i = 0; i < ionic_num_stats_grps; i++) ionic_stats_groups[i].get_values(lif, &buf); @@ -274,6 +277,9 @@ static int ionic_set_link_ksettings(struct net_device *netdev, struct ionic *ionic = lif->ionic; int err = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + /* set autoneg */ if (ks->base.autoneg != idev->port_info->config.an_enable) { mutex_lock(&ionic->dev_cmd_lock); @@ -320,6 +326,9 @@ static int ionic_set_pauseparam(struct net_device *netdev, u32 requested_pause; int err; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + if (pause->autoneg) return -EOPNOTSUPP; @@ -372,6 +381,9 @@ static int ionic_set_fecparam(struct net_device *netdev, u8 fec_type; int ret = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + if (lif->ionic->idev.port_info->config.an_enable) { netdev_err(netdev, "FEC request not allowed while autoneg is enabled\n"); return -EINVAL; @@ -528,6 +540,9 @@ static int ionic_set_ringparam(struct net_device *netdev, struct ionic_queue_params qparam; int err; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + ionic_init_queue_params(lif, &qparam); if (ring->rx_mini_pending || ring->rx_jumbo_pending) { @@ -597,6 +612,9 @@ static int ionic_set_channels(struct net_device *netdev, int max_cnt; int err; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + ionic_init_queue_params(lif, &qparam); if (ch->rx_count != ch->tx_count) { @@ -947,6 +965,9 @@ static int ionic_nway_reset(struct net_device *netdev) struct ionic *ionic = lif->ionic; int err = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + /* flap the link to force auto-negotiation */ mutex_lock(&ionic->dev_cmd_lock); From patchwork Tue Jul 27 17:43:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 488538 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 744B4C4338F for ; Tue, 27 Jul 2021 17:44:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D4AD60F8F for ; Tue, 27 Jul 2021 17:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231831AbhG0RoA (ORCPT ); Tue, 27 Jul 2021 13:44:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbhG0Rnx (ORCPT ); Tue, 27 Jul 2021 13:43:53 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37446C061760 for ; Tue, 27 Jul 2021 10:43:53 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id i10so13522791pla.3 for ; Tue, 27 Jul 2021 10:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rKuYgIu2M2nAj0qfjxyQ666JNynI0dNfLdDnkg4WsaI=; b=WsJmpna1ceWjEz9tXIvjujFr2t06UZx2M3KZ+DUWd3fC6liOEKv7CL5hjA94RME5Bp JQRCQvUQ1Km60CMFEn+xf5ublOysTtYAepeG7rcYjJBiBXy8N04Z7/qs3tjZkw2KFo+X +1FI8GXxBP9UddP3eWx+ok9LA2MJa/4xeXPdI+Gszyr8rrGozEd/ZKVc6Vzlhb5ICKnC a+62OF0oWXQ3Ly0yv8Nbq+lyd4veSA01RweRoMd5IBGVDvk4pPMuQ0rCFyyUhjOYahaO fmlJfGzb23CYPd5D1LP3M40XdfdWeX/+aRIn2Lc55x0nraGGyfXV2pTxdSeNUM8cY05h vjhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rKuYgIu2M2nAj0qfjxyQ666JNynI0dNfLdDnkg4WsaI=; b=cEgW4i8fF/Njtd17yh13flz/ps8060R5T3H+Z4ornen2WPr5BJadZoP4AlwDM5KwLX uqdyqcIqpNshkuAwVJbCnzVKxzvsOF1MK7c8vOHCD+KsEGRFamRMPumIpCnOGR3nZDDi ZNZ881S1hpMzg8qf/ekFNv1631TeU/6Q262z6v1E3DMdgiOQbgnwzNBGFnr4xU4GdeiC OFLR24WWugkXsroSptY9L3iCeA/SRQnovnxmO31FOC5Y9IrP/NeLUBTj6fg7yrVWaVUc GsZc4Qp1LxfpRyXTR8Zw1Mxb/KaFoV/ziYmbf6xCAjLsHcTYSElbWJ591TaYf/8kMpwC 3jcQ== X-Gm-Message-State: AOAM533nNxmjGh8rSadSUIt0/Xa/OmWbAYAHqj45hnw6ca+/ezj4kkxs sX3le0iVkQ2i8cjuSRv9VA8CKA== X-Google-Smtp-Source: ABdhPJw9/Z15tvzMvGgC7ZJQeZ6wvLcfZ/JBYkKX+ppFqkuRkMvFXDjdNKX1rYUlYz1VdHg/4v/FMA== X-Received: by 2002:a17:90a:9483:: with SMTP id s3mr4749882pjo.22.1627407832786; Tue, 27 Jul 2021 10:43:52 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:52 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 09/10] ionic: enable rxhash only with multiple queues Date: Tue, 27 Jul 2021 10:43:33 -0700 Message-Id: <20210727174334.67931-10-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If there's only one queue, there is no need to enable the rxhashing. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 3a72403cf4df..78b3b8ca23dc 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1607,7 +1607,6 @@ static int ionic_init_nic_features(struct ionic_lif *lif) features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER | - NETIF_F_RXHASH | NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | @@ -1615,6 +1614,9 @@ static int ionic_init_nic_features(struct ionic_lif *lif) NETIF_F_TSO6 | NETIF_F_TSO_ECN; + if (lif->nxqs > 1) + features |= NETIF_F_RXHASH; + err = ionic_set_nic_features(lif, features); if (err) return err; From patchwork Tue Jul 27 17:43:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 487339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EE67C432BE for ; Tue, 27 Jul 2021 17:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48B6A600CD for ; Tue, 27 Jul 2021 17:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231785AbhG0RoD (ORCPT ); Tue, 27 Jul 2021 13:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231591AbhG0Rny (ORCPT ); Tue, 27 Jul 2021 13:43:54 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB02C061757 for ; Tue, 27 Jul 2021 10:43:54 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id ca5so321096pjb.5 for ; Tue, 27 Jul 2021 10:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Le5TK/qKnBJqL51abKei4XYG6hFpBdjJJBFRxGy2g5o=; b=428YxjwYdS2OA9BT6a+cJWezzFJNOc2z7n9CD0RzTYEEVX4O5aU/wwChxRmVzYs7EZ Cgc8QIIwRdTKl0JG6v+i8w5tbz0LrDqs8eDqduW1skgSYjnfYmITc7Wt/hf0XMRWp122 EsS3rDWX6m7zbSIy6zhuJ/cAyVy3IWk10kFbk7BRiMtYAuPTyiIpnrL+olht9xzm3lHY s/KwgOuv9uMirhYC2q8wICD2na80wSnN2r96Dpldmqb/PalfeFdkt32kDIT8bn/l3plJ EcKUh6hPzingZirmLOoCeOLXCmDrhNG+nnLu0c5oZCTGk7Ls2MYRPyquwrOVkvHgupBx eIvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Le5TK/qKnBJqL51abKei4XYG6hFpBdjJJBFRxGy2g5o=; b=ZBqaC6OSnwbeAZN4rOLeN0hszx26TBpl1va+bJWSlM4q+5kGp0/FlhDqqfEKNTpICP lj2rN4DqL2iJLA8IBOA5mA2bQNW6BXypLAk7vfopLF661HC6K6B8l0qyjtquBMkkakSj yZYC1eVXIN/NH0hAwQ6X4nd3wtUGMmdjrl+NJLfKxEDLAWcOY4Wu804YUDRxQh9rvEEg cLiVFZ8X0lksoyysYn91MljShR2rCDvMEw/hhlmQ761WoMGcORyvqjagtqKMi+VSk0sh QU2gUdBuaELbipLmvAu5MBZ8ole03jDr0wmUnPFrsZPtDt5fpxl5PebQ7zBsafYlqoPi v3ug== X-Gm-Message-State: AOAM532u9++YtXpMRgVrrDxbCZ3IyLBC4VCPcGwKqNckFvWZHxjoW2mb JolLQs7N5JoYi3a5vi+OhXfghw== X-Google-Smtp-Source: ABdhPJyq13tsqH/Zzz1RbaUmzfKQHCOKOp8mo/ri8/fIVTsxJYi3RFtDzXfLEx23j0T6tW0UOOHxzg== X-Received: by 2002:a17:90a:bd98:: with SMTP id z24mr5268666pjr.99.1627407834128; Tue, 27 Jul 2021 10:43:54 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id t9sm4671944pgc.81.2021.07.27.10.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:43:53 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 10/10] ionic: add function tag to debug string Date: Tue, 27 Jul 2021 10:43:34 -0700 Message-Id: <20210727174334.67931-11-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210727174334.67931-1-snelson@pensando.io> References: <20210727174334.67931-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Prefix the log output with the function string as in other debug messages. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c index a87c87e86aef..736ebc5da0f7 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c @@ -119,8 +119,8 @@ static int ionic_lif_hwstamp_set_ts_config(struct ionic_lif *lif, config->rx_filter = HWTSTAMP_FILTER_ALL; } - dev_dbg(ionic->dev, "config_rx_filter %d rx_filt %#llx rx_all %d\n", - config->rx_filter, rx_filt, rx_all); + dev_dbg(ionic->dev, "%s: config_rx_filter %d rx_filt %#llx rx_all %d\n", + __func__, config->rx_filter, rx_filt, rx_all); if (tx_mode) { err = ionic_lif_create_hwstamp_txq(lif);