From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D98E5C47DB3 for ; Wed, 31 Jan 2024 12:00:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6AFEF611E3; Wed, 31 Jan 2024 12:00:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6AFEF611E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1706702415; bh=HRIlhUmLDjTPjpQJWhot1CNU7PKVSI6pop1UZB6zBPk=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=YQHU4IXBahi2DjPvmhHebonPBcl8xlKh7teRa55v8z+LU/M705lrFvtzWGZ1+IPfB /zdD8szOhcH5tgS37DxytXPcH4EzOKumjjd09ct9+fMDVPzTH/2If3HrpyIkuEBrYr PM7Dh7pA8/8APArvBtmhdTTWyguDmoU6dZwkUm8C7Y78AW9QeBKVS9xU4s2I1ccixN HzWJL1muUB4A4Nv3ea5fTpvvQdbHsRlnbP4nEdGZLI33iSjlGeH4rXeQbOEA2OhoIM hwdiyXn9X+1Ay/2iQdfnv0iaX+kbxVOykfIS/r9u26x3RL2JbzVZYWDYjTcxczPfBi ePZ9L/FRgjnEg== 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 kM05Hnx480iO; Wed, 31 Jan 2024 12:00:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id A29E461470; Wed, 31 Jan 2024 12:00:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A29E461470 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C86D81BF5E6 for ; Wed, 31 Jan 2024 12:00:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9FEB541E85 for ; Wed, 31 Jan 2024 12:00:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9FEB541E85 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yL6r1ueUhCrt for ; Wed, 31 Jan 2024 12:00:11 +0000 (UTC) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by smtp4.osuosl.org (Postfix) with ESMTPS id E888E41C59 for ; Wed, 31 Jan 2024 12:00:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E888E41C59 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3394bec856fso500564f8f.0 for ; Wed, 31 Jan 2024 04:00:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706702408; x=1707307208; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HRIlhUmLDjTPjpQJWhot1CNU7PKVSI6pop1UZB6zBPk=; b=ftSSZ8oIJ4JE3SwSSLNl0GzgKuHS0x8qRYpPoFMqIDkz4Oyg8cFcMK5Qg5W6Hie0J5 vTuCr1C81oZaPRVanQyEENXr3mqURaV6Y+XAh+NGvTAXVT5T5jkg/qb5R9Sehj/7B6jK juZU5JTR6BSk7uM/cSUcHYK/qtRCfpIlvM2tn8NWBlkvCL/Buua7e/wdK6nzBd+EaUlU WrMU4AoUugsPvsEGFhKebGBYM0tp/ds/HebyTHK4VQmCfnBvfcxMauxgrWdfwj//nEaF 81Y3MoueofPa2x2v2Z7zfLrzPwoxuBlrfJ04DmsOjVs5F24m0U/qrStrBikwtAGeYgMy mJrg== X-Gm-Message-State: AOJu0YycXchxzqOYK0URkn2Vl6JhNuUpJq0r9nBk2RJIZc0keOsdiafE lq7nCcSSC4ivrJgMLSkwMXJLfocQX0pDWHYgUEro7nOMcASZNxHoimXL4A7f4GQ= X-Google-Smtp-Source: AGHT+IE/gZETgx51O7pzrCc3cEr494HTU9XfJV8azb9nJPzczdS5zJhegdsdVTGJc1Cb3wC4htdFyQ== X-Received: by 2002:adf:dd8b:0:b0:33a:ded0:c309 with SMTP id x11-20020adfdd8b000000b0033aded0c309mr1288727wrl.13.1706702408470; Wed, 31 Jan 2024 04:00:08 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU/uzCB3VwH+x4UZ0/JI+iYwp4TEf7h9P3oHFQu4kmLs2PpqfRUeMAuxSO2exbX8NFFnywp9GbXo9B0FY00u6gCHLamjEQFCckgF5FkQjjJtzeQxXC2AJxKfNm78BC6gqliQ9xHevRjGoOQ33Z5xahTB0cofWFeJ42FqQQFHCd2w8Kl2roAuskO5t/99Y49u1DiRdjrujfdB61Wo1J+QrPFK6s/SbDz86ixx+uyLMrCWo6z195T4OBXWsW5q2RYnQI5OODIvHQIn7Leh3JBndKSfm9r1xSISWUbihBsp3Pno0GQuIAxX8+9z1ip5PFJvmp9gGjnE0RUCIWuxPyCL9/CLzVg1Zqgjx92LA5FCZgDZFh2y1LYIV8ZVQStOu4/oEqFX8+K7Nrg9+fFdNiX7xmDig3ttLbaGZbIw74ofQJNPxU27aQhNdKNNY4N0QienQ9zXSHD6h3qhbZEY9IDheZpmCOjymOsAUtknS/q8nbmWA== Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id ch19-20020a5d5d13000000b00337b47ae539sm13337744wrb.42.2024.01.31.04.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 04:00:07 -0800 (PST) Date: Wed, 31 Jan 2024 13:00:04 +0100 From: Jiri Pirko To: Michal Swiatkowski Message-ID: References: <20240131080847.30614-1-ksundara@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1706702408; x=1707307208; darn=lists.osuosl.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HRIlhUmLDjTPjpQJWhot1CNU7PKVSI6pop1UZB6zBPk=; b=eFrm37PjPKyOQtPOkqE3T3pjdNTlZ37ZhIdIODiPm8Y5jIXMUJNVgrehu0RfEPkxT5 gS24lzXLQ0VzCXfXs8eH4CBeeYd0vND9T4LnugvPDtdjIJYLeo3kMGOTzzilMCo+qSEU freU9b5jQmw5wZbCfK0bDrSS+0klLr8xerw5cBATlaznrTLBzUZzGKF6zb1xOOl0yXbg PUabM465YRshWLmPZvGVTwvmqTZaj7Knz1uuvKS1HfUrKjjtz62e8/cEmGrx8ZHtZhi1 2N67S1EgdqyJ2a1n5V3hgsfwDMhp4sRpxPkvvFvpWXCESKnoVMizn38UUhDMhOhezAxQ F4rw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=eFrm37Pj Subject: Re: [Intel-wired-lan] [PATCH] ice: Add get/set hw address for VF representor ports 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: , Cc: vchundur@redhat.com, aharivel@redhat.com, cfontain@redhat.com, intel-wired-lan@lists.osuosl.org, jesse.brandeburg@intel.com, linux-kernel@vger.kernel.org, edumazet@google.com, netdev@vger.kernel.org, anthony.l.nguyen@intel.com, kuba@kernel.org, karthiksundaravel , rjarry@redhat.com, pabeni@redhat.com, davem@davemloft.net Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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? > >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. > >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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F179768FA for ; Wed, 31 Jan 2024 12:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706702412; cv=none; b=B/9hh37J8MxmP+UuqZcCRHFLVSW/6g/XwJqBJeb7p7cjqqNfS9VrhwzrbaCQa9Qb7fqz8qB9VsURYJgKq+Sg0P215zcxj8E71kPrdO1+mlgpFNDd1rW6hXmv1dbegBi1HFEekVfU4F2x0RNhfd6CZVgX+aX03cn8pqlq1yiTUOA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706702412; c=relaxed/simple; bh=mbaGmg6mYMDAv6U0bRENMo1BCyzpuN1OGZkDhvhXR0E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CeNBgmvKSfAr4rzRoXbQYPiUxW8AjJhZsqYRMBsifsHiPvD0TrVmi80Lny+wo13fL2vxNwL9J61Nb8F982h1Q1VTs4qK8MGgkHa3uc75NRQy4UY9K5aJB13V/dz2qQgJITKxmQCwK4GjiqXuF9kv0NNw1KQYMgKwBg7Mdcl37Ck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=uPz8u/DH; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="uPz8u/DH" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-33ae3be1c37so494003f8f.0 for ; Wed, 31 Jan 2024 04:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1706702408; x=1707307208; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HRIlhUmLDjTPjpQJWhot1CNU7PKVSI6pop1UZB6zBPk=; b=uPz8u/DHZEW7QjqmfmPZUKoTFrDZJRlQYAfRuxN4zsvBBZc5t3d+y8z9mYhMNE+TCA 28tP7hYJ4hBpANJsjAhVjSfC0ghdnC33MduTWnylpBJ0wgRA8lTFIttN8ABd+hUf+Eul o1XUXwa9xxdJEsKfSwyoF1ICmPjw9Mf29y335BT3HlMp9K2KVnXRkgFThV0Q79Jeh73I +N0WCzmGjgPWmbMQIqAsIwZtRUAXUUfSckx8wtyTmS7Ia2n5mKJSj72M9thSdEWdwBQ5 sUS4qsWraTr7Ep4ZwKg8q5fVFi1ztPG8iKtmlxFVIUxJMdt0vHkt4YTAciD9i5nbyRor I2fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706702408; x=1707307208; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HRIlhUmLDjTPjpQJWhot1CNU7PKVSI6pop1UZB6zBPk=; b=tHYmZRFW811hY+j3T/wr+0dNJmURTaG+l7JUHXDOz44+V/J8b2r9BMfWinIxlepINv MVujkidgik/vmzZKf4MnGdBaR0NuWHhfrn7XIYvdw0XEPhwGzdL5lBvQk+78VVw4Sz7L 4k+h6Y6hhOEfNnvkEZmMzzrwGzhlu8q5m1bEMme4Qd+vpwHkKKCjYS6+vJ/1vRkOqwUM GRKkswtnXQ68yVDVRHq65cS3jjtuJDIhs19J6S9zWMmCkoo84GcCcuxPk27XQM+YtFux M8gBFqG+TXpRRdvqAY6cr6kIyjei22AJy9YkMV1+VDlYrzuWwag0encZIzwcIZplhf9c Zeog== X-Gm-Message-State: AOJu0Yxicz1qGgbUfWDKUmPWfDq/l0yaL1XAputyWF/qP5sxFGiQVh/c PrksGgmvzgJJlm6FGRf6BwkQh/vNoF2merb9NCOclDThCnUR8B2TbubragZhyDs= X-Google-Smtp-Source: AGHT+IE/gZETgx51O7pzrCc3cEr494HTU9XfJV8azb9nJPzczdS5zJhegdsdVTGJc1Cb3wC4htdFyQ== X-Received: by 2002:adf:dd8b:0:b0:33a:ded0:c309 with SMTP id x11-20020adfdd8b000000b0033aded0c309mr1288727wrl.13.1706702408470; Wed, 31 Jan 2024 04:00:08 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU/uzCB3VwH+x4UZ0/JI+iYwp4TEf7h9P3oHFQu4kmLs2PpqfRUeMAuxSO2exbX8NFFnywp9GbXo9B0FY00u6gCHLamjEQFCckgF5FkQjjJtzeQxXC2AJxKfNm78BC6gqliQ9xHevRjGoOQ33Z5xahTB0cofWFeJ42FqQQFHCd2w8Kl2roAuskO5t/99Y49u1DiRdjrujfdB61Wo1J+QrPFK6s/SbDz86ixx+uyLMrCWo6z195T4OBXWsW5q2RYnQI5OODIvHQIn7Leh3JBndKSfm9r1xSISWUbihBsp3Pno0GQuIAxX8+9z1ip5PFJvmp9gGjnE0RUCIWuxPyCL9/CLzVg1Zqgjx92LA5FCZgDZFh2y1LYIV8ZVQStOu4/oEqFX8+K7Nrg9+fFdNiX7xmDig3ttLbaGZbIw74ofQJNPxU27aQhNdKNNY4N0QienQ9zXSHD6h3qhbZEY9IDheZpmCOjymOsAUtknS/q8nbmWA== Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id ch19-20020a5d5d13000000b00337b47ae539sm13337744wrb.42.2024.01.31.04.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 04:00:07 -0800 (PST) Date: Wed, 31 Jan 2024 13:00:04 +0100 From: Jiri Pirko To: Michal Swiatkowski 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: 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? > >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. > >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 >