Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp36003rdb; Wed, 31 Jan 2024 22:55:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH5MEnR7MpXmI7RO+qLIFyiNX+TcrvUtF37p3YhMxLm7lDuxGHVFiKAaZDXOYFwCBZj2KO X-Received: by 2002:a05:6808:16a1:b0:3bd:7211:f572 with SMTP id bb33-20020a05680816a100b003bd7211f572mr4321649oib.38.1706770547854; Wed, 31 Jan 2024 22:55:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706770547; cv=pass; d=google.com; s=arc-20160816; b=CD5FkJIq6zN+1xzgEp3Ag20Xbz32lM9qiSCJGCRvA3SW8YyPLmB+CWxXuJ0Kw8Gkte +6bRiII0gmxuUEsVBl0yEe3RlfEs85LkWkwo91WAMYsbW7iO5HsWHv6aaGTFjUda9Uze t+mskgQpvmRzR7obdV2lIMFUbXnZBLFUW7c4vJTWaBOq13pU4czr7Eim2tc2/2QFi+OI /o0MwlCg1neEEcmjO+Q+riruc8s/xaAW+3Kcdfoz/TBQx5jTYfj1jzQ99VQuxq/kWPO1 Mo+WX0V0AgdzoKLsKctvgvQWuGApkpcbe8gP9L/Pt2dV/CNYqPjo9B/Mmi9CImE1Vbx1 MQtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DziQ/jctKQsDReMgUTTM/W/Jsz8lRZG1CEtsbMXiqMM=; fh=Jx7xgl+/HiTBjEHR0rQ7XjTUymsd431z0oduj5QaY/0=; b=myspvVSsNolgZ5drGb5DwFVnWoRil2C6en52l7BL0U5wH82u+8cC+yfI+LcBKDE2vF Ese9Adqtzh5zjbA58g/BSJGR4RN9fkDXlediw/fouEr4KbPMDpvMQ+pp8G6D01eF1TFJ QyEcze13iLT+2mqPsFywMhfdU6RHMiz0DtnSQQoX1v4TuYV++oG0QAGpcN1dYKZ3AHXe co4t9QT/PcdH9g4VAuBeXqr6wsvnUd1TtGWRkuQLcBA8d7VkYSDrJzB0f0V6BKmayAb5 Qq5fbWeDngOlNZOXCl3NQEFbtRQ08dxma6aGlzYwoKiK8H/xRt08ZU223xFjZ/5CVhEV yInw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VpXfMLag; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-47716-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47716-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCWzHlTliAwCdnrsfwl+T3SnEKgAYr7FoYfZLCpLFNg13NvsktyOytUSxBbkWcnfPa8sTT7q56JUwf2n/CO7Q0cPpvn4S5i7RnorEAmrpw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jc33-20020a056a006ca100b006dba57e6a1asi82270pfb.313.2024.01.31.22.55.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 22:55:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47716-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VpXfMLag; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-47716-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47716-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 811F628B660 for ; Thu, 1 Feb 2024 06:55:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E81EB1586C2; Thu, 1 Feb 2024 06:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VpXfMLag" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60DC72B9D1; Thu, 1 Feb 2024 06:55:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706770536; cv=none; b=diDomLMEuM8w12Xh5WGaQmW41Pz0uZbWu5ABzdS4YgvpFUn3ZR/KNte8nnHvqe9K7pOirxeYp4ADf0614NWDhJ/cWGtqYgF17Y9ojLPkRNHgmR6N0/p0ZcrkFTPg5K/G7MwVT40//66KEKRMRoyujXNxtkI4hAYhVWSBSlk402o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706770536; c=relaxed/simple; bh=k85R9HmB4RP7ktbABdRSoIpDMqKQO80Ei14Lpu87/+Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ja1FNDzJ+2IaPEIoosedmgG93pMaBJWzFDJUm9Lm7cmspRUX8/Sbudx11ldw/ki6WjBOHtnGx5rYfm6wnRoQ0AixEXaUfk2XVUpJ1pEe1GvlQ69JWzNEuvRTz+6+XMA5gdRqUOGxHB81qG+NdwVFGBg78PPuP8N4NKikgnnUjiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VpXfMLag; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706770535; x=1738306535; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=k85R9HmB4RP7ktbABdRSoIpDMqKQO80Ei14Lpu87/+Q=; b=VpXfMLagTGnxQ8Dx0UuejXIrHIeA8JnXy4XaOXD9a59uWSSwiHaP5z7C XXMf3lOUVU/93mNt2UUoyQ32jrc9r1DcTA5Mo6ZRQtIZCL+kVerLgUJNm 9BkWfEXZQYt0Mtr7ohp03PAKw8z/o+77gNXbQRt9PjlUlE9YSmBDc8Jte C1WX5sbGhk10rrDe84hb498gK/3Zl/FdCC/KFNd0r/Uw4ImtvPbeqZkIL B32M1TED4evIxHfurmt1k9wYFjOaX8e1ZZRYP2jG8ZXaxDhRX3pfIgsGJ S8+YV9rxYAZxyarS+pKzRqnu1UXjjbB4oIVxrNzVh2vQH3eXfuUFe7PVd w==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="10928131" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="10928131" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 22:55:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="4330273" Received: from unknown (HELO mev-dev) ([10.237.112.144]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 22:55:29 -0800 Date: Thu, 1 Feb 2024 07:55:26 +0100 From: Michal Swiatkowski To: Jiri Pirko Cc: karthiksundaravel , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rjarry@redhat.com, aharivel@redhat.com, vchundur@redhat.com, cfontain@redhat.com Subject: Re: [PATCH] ice: Add get/set hw address for VF representor ports Message-ID: References: <20240131080847.30614-1-ksundara@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jan 31, 2024 at 01:00:04PM +0100, Jiri Pirko wrote: > Wed, Jan 31, 2024 at 11:43:44AM CET, michal.swiatkowski@linux.intel.com wrote: > >On Wed, Jan 31, 2024 at 01:38:47PM +0530, karthiksundaravel wrote: > >> Changing the mac address of the VF representor ports are not > >> available via devlink. Add the function handlers to set and get > >> the HW address for the VF representor ports. > >> > >> Signed-off-by: karthiksundaravel > >> --- > >> drivers/net/ethernet/intel/ice/ice_devlink.c | 134 ++++++++++++++++++- > >> 1 file changed, 132 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c > >> index 80dc5445b50d..56d81836c469 100644 > >> --- a/drivers/net/ethernet/intel/ice/ice_devlink.c > >> +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c > >> @@ -9,6 +9,8 @@ > > > >As Jiri already wrote, you are not changing MAC of VF in your code. Try > >to look at ice_set_vf_mac in ice_sriov.c. In current implementation you > >nedd to set new MAC value for VF and reset it. You shouldn't use PF VSI. > > > >Pointer to VF you can get from representor struct (through parent VSI). > > What if it is in a different host? Would you still be able to change the > mac? > In current VF MAC changing implementation yes, because it is done by resetting the VF. After the reset new MAC will be sent via virtchnl. But I think resetting VF may be incorrect here, as it leads to reset also port representor. > > > > >You shouldn't manage the rules during MAC changing, as in switchdev > >slow-path there shouldn't be VF MAC rules. It can be problematic as user > >already can have MAC + sth rule (which also needs to be change). I will > >leave it to user (most probably the MAC change happens before adding any > >rules). > > Rules are on the representor, not the VF, correct? Seems unrelated to > me. > I pointed it out because it was in the code. Rules added on representor points to corresponding VF. My point was that there shouldn't be any changes to rules after changing MAC. > > > > >In few days we will send patchset for subfunction support where the > >subfunction MAC chaning is implementing from devlink API. I will add you > >to the CC. > > > >Thanks for working on it, it is a gap in our solution. > > > >Thanks, > >Michal > >