From patchwork Mon Jul 12 05:07:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Swiatkowski X-Patchwork-Id: 1503955 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GNk1M0PY9z9sWq for ; Mon, 12 Jul 2021 22:42:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0A19A605A9; Mon, 12 Jul 2021 12:42:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o9ma6U_lzR8U; Mon, 12 Jul 2021 12:42:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 095A0605D7; Mon, 12 Jul 2021 12:42:11 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B66991BF32C for ; Mon, 12 Jul 2021 12:42:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id AA3DD40179 for ; Mon, 12 Jul 2021 12:42:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nvbA2yrNPcpe for ; Mon, 12 Jul 2021 12:42:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9027940150 for ; Mon, 12 Jul 2021 12:42:08 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10042"; a="209946768" X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="209946768" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 05:42:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="486449604" Received: from wasp.igk.intel.com ([10.102.20.192]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2021 05:42:06 -0700 From: Michal Swiatkowski To: intel-wired-lan@lists.osuosl.org Date: Mon, 12 Jul 2021 01:07:51 -0400 Message-Id: <20210712050751.20035-1-michal.swiatkowski@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH net-next] ice: change devlink port number for pf X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Using lport from VSI structure as physical port number for PF devlink port introduces inconsistency with netdevice naming scheme and PF attribute in VF devlink port. Change this value to be the same for VF and PF devlink port. Before this change: - devlink phys_port_name for first netdevice (ending name "f0"): p1 - devlink phys_port_name for VF created on first netdevice: pf0vf0 After this change: - devlink phys_port_name for first netdevice (ending name "f0"): p0 - devlink phys_port_name for VF created on first netdevice: pf0vf0 Signed-off-by: Michal Swiatkowski --- This commit should be squashed with "ice: Move devlink port to PF/VF struct" drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c index 59ae94266fcf..792a3972dec3 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.c +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c @@ -624,7 +624,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf) vsi = ice_get_main_vsi(pf); attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; - attrs.phys.port_number = vsi->port_info->lport; + attrs.phys.port_number = pf->hw.bus.func; devlink_port_attrs_set(devlink_port, &attrs); devlink = priv_to_devlink(pf);