Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2357256lqo; Mon, 20 May 2024 03:21:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgOKm4QrvKF0boXoJkT32mO/Fy8Aa9irBLt1WG7yoyTJNy1R5XY3Gkub4z4VZVakm2yItr5r02umdFL4QOELNl2TF6rb4YtGhMbGUwVg== X-Google-Smtp-Source: AGHT+IEmR15gOCRUbImvMrhIMuuBB64H0PaHF7ud9Aqgup2eIp/3A6MWPCvmmLfSu/lsX11lvVmY X-Received: by 2002:a25:5382:0:b0:de5:549b:dca1 with SMTP id 3f1490d57ef6-dee4f3149d4mr25133168276.49.1716200462503; Mon, 20 May 2024 03:21:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716200462; cv=pass; d=google.com; s=arc-20160816; b=QlCDUX/b7Q1bXTNqfC9HgxYwMZ5i9ZZHPEyHNNB/ROFYtalDaHBU8gQmNbCvn4+yQU NrM6WVelh1Asm222QTMrrmwjv8jUK4qJwELq4Eng3nhk6x67TChTf2xvoCutMSF5emib meX06AX/YXsnsPy+JxEeNHGlBRnf7l0B9jHoIbe67yF1U4pygI6oUoFi9k3vvWClg84g uu4m9QOiF/RrEqnMaT8QawOg5fTsmh3Hf6XERbmncaPBdoVe1+/aPljaIUHEIrvOldAE wX2iwfkyg3aXYZtqkUPCkjk9DAHLlVFLhTBxd5Sd1Zzv1Ufy5X4ZlFOsNBCXaGNEgJuT LOMw== 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=AAQLSghKJY4IZ/0q6PLJciOBFBZAIvtvgNLoe1np3LA=; fh=mwBeN2683HMQu9VAztk9NhMcsSClq8m68Z8mMTHSPlU=; b=a33hwHP1+bihVQTRhZ8Fwax9ouQNPhrxOC2/m2TXoJaKnouud8415YypIB9Iyta1Gu 6a1kl63yHceD9vckWnNUk2TQsp1o9QuFRs15UfKzepw9E+dOYJj9xvWD6Rxw5AdKgAMd e+HdGNAT2KmagMDtLvK66Mn22KC9JtbyY0zvWLQdBGihab87m+XPGg6iI3JgGuXEqBa9 zscESmKfeuHoxHfEna43GucbJihVN76e2oPzKoYe5BiseQAZx/krKavDCSQYy4O4mMJg TQrPTuSy9PSsamfRbcBeWZq3yluKjW5cWyXDzUdbI3h6Tzu3CXTVJ16bAQZqOnF4keyX IcWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dhB+KbbM; 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-183599-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183599-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ab6c8e2ac9si5206556d6.543.2024.05.20.03.21.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 03:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183599-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dhB+KbbM; 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-183599-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183599-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D3A21C203F6 for ; Mon, 20 May 2024 10:21:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D56A04E1D9; Mon, 20 May 2024 10:20:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dhB+KbbM" 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 8D40A1CD02 for ; Mon, 20 May 2024 10:20:54 +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=1716200456; cv=none; b=GoGJKWtgg1W2xQwy/B/B2U3GU1ogju7CVCnEdTRT/GGXmkcik5Ko4UeZZv92CcNAd2SWdF3dr6S+R3rCSLyM7DNUDN70zBVu2qEdlOk9iljhybtubKgwSz634yuIOnmdu62SjWGLkWUo1jlFbFKGZD/6q+HGA52+webhW+qBCTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716200456; c=relaxed/simple; bh=oMXk/qpTlpZ5s8mr7KLSCHfsfAAOFrl6IrT+dBIeh98=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=R5QnCytKMYvWYdKJ8nPm9n5nUoTNGgN2mu8497JdM33LS4MPavQOrphb6xBafIeKNKwhom6lBhugXXHkeClDyDJ7eVTb1PxlbLmWl/i0O56dRwA6l2N1EBzqUCIjbGEINw50aTub4IF/Nq8wGSMtOuL06TWI7UKHUyqYAc0ZR6U= 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=dhB+KbbM; 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=1716200453; 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=AAQLSghKJY4IZ/0q6PLJciOBFBZAIvtvgNLoe1np3LA=; b=dhB+KbbMNlGAJIs6Yx4CyH3b/kbvZ5mLiv4EtR4/uZUbeo9o8L9RdJHcbBFCGbQbvZIEe7 AHn8Q6TrG5FEtAkGZHLxtXFBJ12rmzQg88A2R+7ZlqVTt/PcsQC+30dW1TX/GxYzBnOGKR 7bqwjUsRiVkHrfvIsTmH+N8hNDMdxP0= 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-582-fVZCWuO9MtWh0K4gwBpdBg-1; Mon, 20 May 2024 06:20:52 -0400 X-MC-Unique: fVZCWuO9MtWh0K4gwBpdBg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 8366581227E; Mon, 20 May 2024 10:20:51 +0000 (UTC) Received: from ksundara-mac.redhat.com (unknown [10.74.17.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD0C72026D68; Mon, 20 May 2024 10:20:43 +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 v11] ice: Add get/set hw address for VFs using devlink commands Date: Mon, 20 May 2024 15:50:39 +0530 Message-Id: <20240520102040.54745-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.4 Dear Maintainers, Thanks for the review and suggestions for my patch. 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.