From patchwork Mon Mar 16 02:14:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222475 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 AF9D6C5ACBF for ; Mon, 16 Mar 2020 02:14:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86E9A206BE for ; Mon, 16 Mar 2020 02:14:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="ZWlgNV/c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729399AbgCPCOj (ORCPT ); Sun, 15 Mar 2020 22:14:39 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42165 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729348AbgCPCOi (ORCPT ); Sun, 15 Mar 2020 22:14:38 -0400 Received: by mail-pg1-f193.google.com with SMTP id h8so8816212pgs.9 for ; Sun, 15 Mar 2020 19:14:38 -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=yaEX+FGy9GXeskMa2/UfB7yhE2OWk5HiZrR+Tw6T+vA=; b=ZWlgNV/cXy5FujfckkixBhnC7OJYt2tptQrLuDdYGlnaf3ipnD1YkPyzTIfjD6b7cj Ok1gGuuj7EpsPb3pQcrL5+ooV8Sy2sFcabGO5Vcx/NjWBSSUJzvW5QKh8ffENiOnwRPK 2HHqOcdZlo+xo5q0pFCodywotfkfm/Make2BEipoVOGGSI6lnHAFuDADJrkst8ZFBITL T5mj5HA15ZokP4DLXcBppmAiLfpFEtJ36zHwHf4xn9ZzBInnJZuE6r2Mg4PmC1Cz/tB8 VqO9p6AZCC+bzSwgb6JCai9NcpSxPZQ5YYmhXn/GRDhT1CswKTd5acmJEC50WtaXIPUh Nd0g== 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=yaEX+FGy9GXeskMa2/UfB7yhE2OWk5HiZrR+Tw6T+vA=; b=FYqn9YkTV9p+0W7tkmNVRSu12hnzTL5G60VrO45SDQjzSK5Suhdjfy8colSslpR1Ga 4r+Xetk6q5zJ5TvMXZVBizjf3ipOpQ313DP4dql23SBZ6Svp4ozk9x5HFa8bck/dz01N fYDEO+iBDIodgGbYXtF4ckFyNY4FsFOa8h0RXK3BzUgHldKrq3BzfTxDm9cF8P9Tg/z1 fsZGmX/gMU5rgcUaClEJKAak/T8hf5qcZST4Bg4vANwFH0Qy+ezzougYdAu8Q4xAIOpg rnSmvd4SeXiqgpC7mYeI9hrNr9wLWeo0ONmneCzfypnCo+8T9EWnmZpVlSTH/iTa2qWJ SgDQ== X-Gm-Message-State: ANhLgQ0FAClInAGkJDQLwH+UcqnxvXgmSPt6OnXWL+G/do5Wjq5ThMrN cyBWsQZp9jIRUM8gb2vy7/pBo1gCrA4= X-Google-Smtp-Source: ADFU+vv+VK3019V5gkT11VG+BK2Pnyo1aSp1gMPIEjXJVUViX5cVJ/+7+UXWuKGoHoaSH1fDOu0gBQ== X-Received: by 2002:a62:bd16:: with SMTP id a22mr14288882pff.202.1584324877617; Sun, 15 Mar 2020 19:14:37 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p4sm4386142pfg.163.2020.03.15.19.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2020 19:14:37 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 1/5] ionic: don't register mgmt device as devlink port Date: Sun, 15 Mar 2020 19:14:24 -0700 Message-Id: <20200316021428.48919-2-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200316021428.48919-1-snelson@pensando.io> References: <20200316021428.48919-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If we don't set a port type, the devlink code will eventually print a WARN in the kernel log. Because the mgmt device is not really a useful port, don't register it as a devlink port. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c index ed14164468a1..273c889faaad 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c @@ -77,12 +77,16 @@ int ionic_devlink_register(struct ionic *ionic) return err; } + /* don't register the mgmt_nic as a port */ + if (ionic->is_mgmt_nic) + return 0; + devlink_port_attrs_set(&ionic->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, 0, false, 0, NULL, 0); err = devlink_port_register(dl, &ionic->dl_port, 0); if (err) dev_err(ionic->dev, "devlink_port_register failed: %d\n", err); - else if (!ionic->is_mgmt_nic) + else devlink_port_type_eth_set(&ionic->dl_port, ionic->master_lif->netdev); @@ -93,6 +97,7 @@ void ionic_devlink_unregister(struct ionic *ionic) { struct devlink *dl = priv_to_devlink(ionic); - devlink_port_unregister(&ionic->dl_port); + if (ionic->dl_port.registered) + devlink_port_unregister(&ionic->dl_port); devlink_unregister(dl); } From patchwork Mon Mar 16 02:14:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222474 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 ABA92C5ACC2 for ; Mon, 16 Mar 2020 02:14:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 834BA20663 for ; Mon, 16 Mar 2020 02:14:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="Qe+UuMsV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729422AbgCPCOl (ORCPT ); Sun, 15 Mar 2020 22:14:41 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38667 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729324AbgCPCOl (ORCPT ); Sun, 15 Mar 2020 22:14:41 -0400 Received: by mail-pg1-f194.google.com with SMTP id x7so8821328pgh.5 for ; Sun, 15 Mar 2020 19:14:40 -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=Efs90bMbd7QSQoPO39b+jNsz85imJEBsT/DmTEGo90c=; b=Qe+UuMsVLJoO/mk+2jmkPYQKb+s3ZAz9n6vwYqclyJmMlTRL2GrnJgJQ15djCUJ2oK 2MqGqPwXNF24yD2nJjoY56RNGtOznZwNqxnP2tBhFzUSlMtVb4ahyqXtqKKWl8Taan2X 6U9DyvtG998NSEECqiKDfzIPwCrYdCYhZj7F0ot877j3S5qMf1bZ9hvHRatwGKm8YXN7 M5ueCdlJOJnHqEB1efyCMLHkqq0iW4ouQT3vR9N/HIQfYbxtniF/klzo8dcObnIhFgVc jvhwBKaIYMjdYGQ9laDlud1p9bZFaSomjtJggfYNNDxYlCMux5urn8bMEew371+U/n5s 2n3Q== 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=Efs90bMbd7QSQoPO39b+jNsz85imJEBsT/DmTEGo90c=; b=mYvAHXl1LH7A8G/AowMw38DTpsIf6JF0cAjlQs/5krMrDXcVtmfgi3BempR/i6Vdx6 0DTcM9Y7XChJ5FTgTdGPvHldFnh+bbecF/vhLCxU/+8XlAvi8hMa939RGiS9qQQIhT1h RkQbnIjyM0RCUleHOgZYbCUW3C3txlIcIp67NeWcZhP91lfYAOsifztiiw1p9m9sQ4l5 qPOsv1AoWxjt2oTsG/SqXBnGtxeZdo1Qk1yYec0PbSC3NMBsP9klKpKrEhUCQv6hBSRr xCjEGo+PfVIXYpAIBQTjJd9H9H1oT1pcHoTVfkY/H5+opquLSGvIoYus6uzgNOA821F4 oDuw== X-Gm-Message-State: ANhLgQ0cb9OV3BQYZvFvgduDLPe2/jXqeGGQlZz0oiH7FQ4amEJY6Jr+ uOMZEGtDNND76vzRjjJnK3DRaxKK4iM= X-Google-Smtp-Source: ADFU+vuNRUBj2lAe6lHPGqL3azj3qMPIW11UajJD89yedEc4hVfP9nbvoYecv9JYLBXZW1dQcl+zgw== X-Received: by 2002:aa7:83d7:: with SMTP id j23mr24632199pfn.77.1584324879417; Sun, 15 Mar 2020 19:14:39 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p4sm4386142pfg.163.2020.03.15.19.14.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2020 19:14:39 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 3/5] ionic: remove adminq napi instance Date: Sun, 15 Mar 2020 19:14:26 -0700 Message-Id: <20200316021428.48919-4-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200316021428.48919-1-snelson@pensando.io> References: <20200316021428.48919-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove the adminq's napi struct when tearing down the adminq. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 19fd7cc36f28..12e3823b0bc1 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -2070,6 +2070,7 @@ static void ionic_lif_deinit(struct ionic_lif *lif) ionic_lif_rss_deinit(lif); napi_disable(&lif->adminqcq->napi); + netif_napi_del(&lif->adminqcq->napi); ionic_lif_qcq_deinit(lif, lif->notifyqcq); ionic_lif_qcq_deinit(lif, lif->adminqcq); From patchwork Mon Mar 16 02:14:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222473 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 422BEC10DCE for ; Mon, 16 Mar 2020 02:14:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13AE020663 for ; Mon, 16 Mar 2020 02:14:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="sUJfH6Dh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729432AbgCPCOo (ORCPT ); Sun, 15 Mar 2020 22:14:44 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40400 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729324AbgCPCOm (ORCPT ); Sun, 15 Mar 2020 22:14:42 -0400 Received: by mail-pf1-f194.google.com with SMTP id l184so9038460pfl.7 for ; Sun, 15 Mar 2020 19:14:41 -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=DClFRd7BWxve2DUdHfD0ILgpLsF9E3MwcetaXkuiukY=; b=sUJfH6DhkOMzxeuANQCd33zevj9xYdWaMvNuMhCQBvOL37jjW4cTYwpqSuPLBBX88D Pn2xiFc8vBPYK9m+jEzQsloJtwqW8LtcT/IKI82R6zXcKikKDQTpJwKWLAxVMJdAa9Hf a3ZODEPup1A8DDsE/54qHuHSgrypHwmT2vTkW/BgSXVDG++icrbW3aI2N3ZWg0A4Kpem A0EW4Cwpwc+FsNdFYk4ixNkj9VFTj7iijt0ts20YWJSOsWiZn1vbFkY+zvg9ej9YO74C 163ksMn5TqJOXZwPm7Cd4ZqbhbvILz8gdCubDsw3ULNl2IyoZzK6rmcUk7N0mPOlM57J QWcQ== 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=DClFRd7BWxve2DUdHfD0ILgpLsF9E3MwcetaXkuiukY=; b=oZAgtUYtlht65N+fMhmgZ5v6UBmJSzDSwPzJEWdpLLefJEJiExtDdBZjNEaW7CdAp8 H3tqE6eBWj+zl2ktmoIXlRP4G2oSxttELjMAx21RoMiTIklXV8tNtyW7hs6pTXVvJ5Fo WG8OLahLBoJq99UVq7tU5GtgikpWYw3co9Sg+zH3vGYnzrNI2lESKMVT210lDC17K95A u5QWKVUCkwx+vCBQsLZNJFpaoCHW8Q936ao1c2dh53b8UYuWwY+A2OHvQKkG5b2QKphl G9F5nTjZjz8wYkA56lXLKT7NnOTCtP1lUIL3FzyrbJScIXpYV/IinX/CEnvj9QWHzh78 gF0w== X-Gm-Message-State: ANhLgQ2oHdu6m560ihNpr2W6R8HPVAIdPQ/Jd08QUgtZZakZqn0aGnQp r+TdyWKjEpEt605fxqVRPFuoxOaYJNc= X-Google-Smtp-Source: ADFU+vuOxOQQPjSTVPZOhF0HSuaXoixlLhMfh/UlIF7Gxe89gsFr2Ar3dfkQ0EI/Ksc+HmFjUhJHPA== X-Received: by 2002:a63:87c1:: with SMTP id i184mr24017731pge.287.1584324881018; Sun, 15 Mar 2020 19:14:41 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p4sm4386142pfg.163.2020.03.15.19.14.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2020 19:14:40 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 5/5] ionic: add decode for IONIC_RC_ENOSUPP Date: Sun, 15 Mar 2020 19:14:28 -0700 Message-Id: <20200316021428.48919-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200316021428.48919-1-snelson@pensando.io> References: <20200316021428.48919-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index e4a76e66f542..c5e3d7639f7e 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -58,6 +58,8 @@ static const char *ionic_error_to_str(enum ionic_status_code code) return "IONIC_RC_BAD_ADDR"; case IONIC_RC_DEV_CMD: return "IONIC_RC_DEV_CMD"; + case IONIC_RC_ENOSUPP: + return "IONIC_RC_ENOSUPP"; case IONIC_RC_ERROR: return "IONIC_RC_ERROR"; case IONIC_RC_ERDMA: @@ -76,6 +78,7 @@ static int ionic_error_to_errno(enum ionic_status_code code) case IONIC_RC_EQTYPE: case IONIC_RC_EQID: case IONIC_RC_EINVAL: + case IONIC_RC_ENOSUPP: return -EINVAL; case IONIC_RC_EPERM: return -EPERM;