From patchwork Tue Nov 24 16:52:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 11929389 X-Patchwork-Delegate: kuba@kernel.org 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.8 required=3.0 tests=BAYES_00, 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 23E11C64E7D for ; Tue, 24 Nov 2020 16:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E798C20715 for ; Tue, 24 Nov 2020 16:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403808AbgKXQxH (ORCPT ); Tue, 24 Nov 2020 11:53:07 -0500 Received: from mga09.intel.com ([134.134.136.24]:45927 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390673AbgKXQxG (ORCPT ); Tue, 24 Nov 2020 11:53:06 -0500 IronPort-SDR: haOgHf3gVNwQ1RLqGJ27Kwzo+Pbu+WxSIrQZgxRX+IBHQeMaF9tIkp9uTJ4ws6gCSaxbqpIeJL EKyeEu8kyp4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="172134513" X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="172134513" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2020 08:53:05 -0800 IronPort-SDR: lKiIlK+tVwo/ZIt5e08G44/AOf8BZ9ADRBaY6BvXi2DZX2c2lAOtMZ0Tlsk6eN2yyaXzaR25/N nwJzasFn8G+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="365068656" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga002.fm.intel.com with ESMTP; 24 Nov 2020 08:53:05 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Marek Majtyka , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, =?utf-8?b?QmrDtnJuIFTDtnBl?= =?utf-8?b?bA==?= , George Kuruvinakunnel Subject: [net-next v2 1/3] i40e: remove redundant assignment Date: Tue, 24 Nov 2020 08:52:43 -0800 Message-Id: <20201124165245.2844118-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> References: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Marek Majtyka Remove a redundant assignment of the software ring pointer in the i40e driver. The variable is assigned twice with no use in between, so just get rid of the first occurrence. Fixes: 3b4f0b66c2b3 ("i40e, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL") Signed-off-by: Marek Majtyka Acked-by: Björn Töpel Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 567fd67e900e..67febc7b6798 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c @@ -311,7 +311,6 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget) continue; } - bi = i40e_rx_bi(rx_ring, rx_ring->next_to_clean); size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >> I40E_RXD_QW1_LENGTH_PBUF_SHIFT; if (!size) From patchwork Tue Nov 24 16:52:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 11929393 X-Patchwork-Delegate: kuba@kernel.org 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.8 required=3.0 tests=BAYES_00, 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 67B82C64E8A for ; Tue, 24 Nov 2020 16:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22706206D8 for ; Tue, 24 Nov 2020 16:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403813AbgKXQxI (ORCPT ); Tue, 24 Nov 2020 11:53:08 -0500 Received: from mga09.intel.com ([134.134.136.24]:45927 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403802AbgKXQxH (ORCPT ); Tue, 24 Nov 2020 11:53:07 -0500 IronPort-SDR: aLiWy8fjlyhMd24y8Tk88UvBDWCh7Xfr0rJBX5LONF1lNC6x3bQOW+/wMB7qy1mRDdf1kEmZs9 MTwGITcFLbSA== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="172134514" X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="172134514" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2020 08:53:05 -0800 IronPort-SDR: T3nfZ2cVD1lY4cMtrTuB2MaR7KeWeTqBshKIh0kH01oyQXWZkPVw0vhV47mfenVHfC0TFJQO5U zjEctQtmfwFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="365068660" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga002.fm.intel.com with ESMTP; 24 Nov 2020 08:53:05 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Stefan Assmann , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Aaron Brown Subject: [net-next v2 2/3] i40e: report correct VF link speed when link state is set to enable Date: Tue, 24 Nov 2020 08:52:44 -0800 Message-Id: <20201124165245.2844118-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> References: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Stefan Assmann When the virtual link state was set to "enable" ethtool would report link speed as 40000Mb/s regardless of the underlying device. Report the correct link speed. Example from a XXV710 NIC. Before: $ ip link set ens3f0 vf 0 state auto $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s $ ip link set ens3f0 vf 0 state enable $ ethtool enp8s2 | grep Speed Speed: 40000Mb/s After: $ ip link set ens3f0 vf 0 state auto $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s $ ip link set ens3f0 vf 0 state enable $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s Signed-off-by: Stefan Assmann Tested-by: Aaron Brown Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 4919d22d7b6b..2532f8eed6a8 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -63,7 +63,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf) } else if (vf->link_forced) { pfe.event_data.link_event.link_status = vf->link_up; pfe.event_data.link_event.link_speed = - (vf->link_up ? VIRTCHNL_LINK_SPEED_40GB : 0); + (vf->link_up ? i40e_virtchnl_link_speed(ls->link_speed) : 0); } else { pfe.event_data.link_event.link_status = ls->link_info & I40E_AQ_LINK_UP; @@ -4437,6 +4437,7 @@ int i40e_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link) { struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_pf *pf = np->vsi->back; + struct i40e_link_status *ls = &pf->hw.phy.link_info; struct virtchnl_pf_event pfe; struct i40e_hw *hw = &pf->hw; struct i40e_vf *vf; @@ -4474,7 +4475,7 @@ int i40e_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link) vf->link_forced = true; vf->link_up = true; pfe.event_data.link_event.link_status = true; - pfe.event_data.link_event.link_speed = VIRTCHNL_LINK_SPEED_40GB; + pfe.event_data.link_event.link_speed = i40e_virtchnl_link_speed(ls->link_speed); break; case IFLA_VF_LINK_STATE_DISABLE: vf->link_forced = true; From patchwork Tue Nov 24 16:52:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 11929395 X-Patchwork-Delegate: kuba@kernel.org 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.8 required=3.0 tests=BAYES_00, 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 73456C83011 for ; Tue, 24 Nov 2020 16:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4891120715 for ; Tue, 24 Nov 2020 16:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403817AbgKXQxJ (ORCPT ); Tue, 24 Nov 2020 11:53:09 -0500 Received: from mga09.intel.com ([134.134.136.24]:45927 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403807AbgKXQxH (ORCPT ); Tue, 24 Nov 2020 11:53:07 -0500 IronPort-SDR: LDwWNyC8KdBKd98780TGQafYLRh1ibSfpN4yOtK8brjDJaL5bcnkPgc1Vz0O52DoZP2LwFhjJ8 iu69PAbV6sGw== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="172134515" X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="172134515" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2020 08:53:05 -0800 IronPort-SDR: 47S1SMUnrqvLWgUgsMfsfjN+vCC+PjZKiL7KPro3thuwY3lJ2dMWij8vIZtrGzMAVb3e8Q9ymg LnQmW2EdD6WQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="365068662" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga002.fm.intel.com with ESMTP; 24 Nov 2020 08:53:05 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Karen Sornek , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Aleksandr Loktionov , Aaron Brown Subject: [net-next v2 3/3] igbvf: Refactor traces Date: Tue, 24 Nov 2020 08:52:45 -0800 Message-Id: <20201124165245.2844118-4-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> References: <20201124165245.2844118-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Karen Sornek Refactoring "PF still resetting" and changing "Failed to add vlan id" to "Vlan id is not added" messages because previous version looked like a bug - it informed about changes that worked as designed but might confuse users Signed-off-by: Karen Sornek Reviewed-by: Aleksandr Loktionov Tested-by: Aaron Brown Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index ee9f8c1dca83..30fdea24e94a 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -1236,7 +1236,7 @@ static int igbvf_vlan_rx_add_vid(struct net_device *netdev, spin_lock_bh(&hw->mbx_lock); if (hw->mac.ops.set_vfta(hw, vid, true)) { - dev_err(&adapter->pdev->dev, "Failed to add vlan id %d\n", vid); + dev_warn(&adapter->pdev->dev, "Vlan id %d\n is not added", vid); spin_unlock_bh(&hw->mbx_lock); return -EINVAL; } @@ -1520,7 +1520,7 @@ static void igbvf_reset(struct igbvf_adapter *adapter) /* Allow time for pending master requests to run */ if (mac->ops.reset_hw(hw)) - dev_err(&adapter->pdev->dev, "PF still resetting\n"); + dev_warn(&adapter->pdev->dev, "PF still resetting\n"); mac->ops.init_hw(hw);