Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp30326lqb; Tue, 28 May 2024 08:05:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGL/RsVZpG2ucdkc+0Vwmh1XrwjARhWgwNBy/KAlEwU5uO5RNyCDFpbgU6WERmbjoXC1P3GCbQM1ypxkHybcWA0Le5/FOL4HoFleDLtQ== X-Google-Smtp-Source: AGHT+IHPBvYGwIj2flzjzyeb+YlRP+mbhlyWHEHvJI934JsEa/XxtWZgt76ibDh+Mj43ghl3roD1 X-Received: by 2002:a05:6a21:628:b0:1ae:3f36:28d3 with SMTP id adf61e73a8af0-1b212dedca6mr15584932637.49.1716908728585; Tue, 28 May 2024 08:05:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716908728; cv=pass; d=google.com; s=arc-20160816; b=f9JZeEBa3tjjwaYsg0/I5yDBSIkuUWH0gDJGb4lLZcKza5c+dQPQZDWGP1zoveRZHN V8gRLZ5tSDsW7MIR8ept+JtophZUozby0Cj6lNKDtLSrU80UDPEnfSnIJk28I2ppKBC7 0sa6BfO5CyrVFDKJ1XuRwv8U7bgYID/YJWpDONBRMqiUbTq5zbQeYWqPNADet70LwEuX J2FMcG/5TC9ijHUmuTUzg/FiquTODfIqs5qSUOyKzk6O2WKmkoFTbrHtjtgt7PyYvoYp Mg7UUbROeBPbt3J+5zOOlg6/q1aWOg3bavSnU0gHngSTP+KZVK6KCNIIYzkKwDvT0yxn Bniw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=C3+ZIRNnT7WCQphjrDbOHHUSbOz2wS7xfoUOS89MF08=; fh=mwBeN2683HMQu9VAztk9NhMcsSClq8m68Z8mMTHSPlU=; b=I3dJC5bD+oQRQRNH7Howr07V6q5WvyH4ksG0OSTGN+zr25lfQ6gA3TPwNauNTEICZY Ovi0X/OxKwINYk9El2xfnuJKUingx6tH/Vh5eTLH9R9vy3gyZza6qlwR1ISru0ssgAW+ SRjVDeSMmt0nHDpe3K6LhKqrv73vUb+T7pWrylnMAb1HNarw6pIzLXYqFIwDbguSqS/x Sfa4xQxSGcIbSA6nJNkeJpKMRkyA6A0rkbS1SIJx42pKhcsN0wYSSCikYhiNQ5R2IiQD g16WoGaRiFl6/rckK36WDK9RYjT+Qn1utCDYofkkS0MID45q3TRfu8w3ViZbsz0A9VQk gEVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hu4hsQNM; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-192601-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-701e2d0fca2si683240b3a.92.2024.05.28.08.05.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 08:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192601-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=@redhat.com header.s=mimecast20190719 header.b=hu4hsQNM; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-192601-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 37BB0284ED5 for ; Tue, 28 May 2024 15:05:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC134171E70; Tue, 28 May 2024 15:02:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hu4hsQNM" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 B143D17167A for ; Tue, 28 May 2024 15:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716908554; cv=none; b=iO1qyjo2j6+bdLJ9z6Z34BfSyQL7x1Bv+66kR55ia6OyXNdU43CB+FqfX5ifvaF0dcvYigFBv3gwjqfGezJtKAWvOxFSAMU/wG8dug9CHk2vdRTDIxq0lgx2tMma7KbWhp9YHC3BmMVsUmX01Jfdeo+FGvH1n+nHSWcxygDvPjs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716908554; c=relaxed/simple; bh=2UNAaQ/30oJpeCNFCKdqMqQ017Ee3JxN1z//WtgKcuo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VZh6+4j0fgJHBrdT/imB0y6aKYCwLy8RzBuj8scuZfK+m3JbtZ4NM+rExoKVH76Ie1qub6mUAroTrGhmaELAH07l3F8nslgYWLjtA1UBKi6Yi8jX6qkwooNh7dXW/LbOZORdSIyrgsl445ZA8xS50z4YKoedd2Q/U3tRbEx9WbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hu4hsQNM; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716908551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=C3+ZIRNnT7WCQphjrDbOHHUSbOz2wS7xfoUOS89MF08=; b=hu4hsQNMjXIoZZGDLrHPwNXVO/kEiCnfcum+Asa1llEo7HHjOboESCA25agG6GRQky20ov WGRn1c66qS2Hlbh5h7/c1RDfxFzqA1TF7eAm7pPKbXO0UUaDgySMntdtNHnVuMA3yE+5OB YVUE2kxS7F12moQu5lpD5PuY1a2riWY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-DjOuceJ6PYu8wpVAvTKG1g-1; Tue, 28 May 2024 11:02:28 -0400 X-MC-Unique: DjOuceJ6PYu8wpVAvTKG1g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D2010812296; Tue, 28 May 2024 15:02:26 +0000 (UTC) Received: from ksundara-mac.redhat.com (unknown [10.74.17.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 297AE2873; Tue, 28 May 2024 15:02:18 +0000 (UTC) From: Karthik Sundaravel To: jesse.brandeburg@intel.com, wojciech.drewek@intel.com, sumang@marvell.com, jacob.e.keller@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, horms@kernel.org Cc: pmenzel@molgen.mpg.de, jiri@resnulli.us, michal.swiatkowski@linux.intel.com, bcreeley@amd.com, rjarry@redhat.com, aharivel@redhat.com, vchundur@redhat.com, ksundara@redhat.com, cfontain@redhat.com Subject: [PATCH iwl-next v12] ice: Add get/set hw address for VFs using devlink commands Date: Tue, 28 May 2024 20:32:12 +0530 Message-Id: <20240528150213.16771-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-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 Dear Maintainers, Thanks for the review and suggestions for my patch. v11 -> v12 ---------- - Fix kernel-doc warnings v10 -> v11 ---------- - rename the function ice_set_vf_mac_fn() to __ice_set_vf_mac() v9 -> v10 -------- - Refactor ice_set_vf_mac() to use reuse the common code blocks for setting the MAC addresses in both netdev and devlink flow. v8 -> v9 -------- - Rebasing against dev-queue branch of next-queue tree v7 -> v8 -------- - Added const keyword for the parameter ``mac`` in ice_set_vf_fn_mac() v6 -> v7 -------- - Addressed Smatch and checkpatch issues v5 -> v6 -------- - Changed data type of vf_id to u16 - Used container_of(port, struct ice_vf, devlink_port) to get the vf instead of ice_get_vf_by_id()/ice_put_vf() v4 -> v5 -------- - Cloned ice_set_vf_mac() to ice_set_vf_fn_mac() so that the parameter ice_pf is used instead of net_device of vf - removed redundant error handling v3 -> v4 -------- - Released the vf device by calling ice_put_vf() v2 -> v3 -------- - Fill the extack message instead of dev_err() v1 -> v2 -------- - called ice_set_vf_mac() directly from the devlink port function handlers. RFC -> v1 --------- - Add the function handlers to set and get the HW address for the VF representor ports.