Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp138244lqo; Thu, 16 May 2024 01:28:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdw+VMHLBlAfqw8bfHjw/2Pg7sGvratlpLnvSwXe5rqQuu0gtMG3KlaAo5MPYpI7JotxIYZMCaiFni4wPdmKJPr0n05kKoCbohriX8/g== X-Google-Smtp-Source: AGHT+IGlJtSu8lpF/iaTinMQlgbFf564nvQxC3J8ELE7d94OC6UiIRVU+oZUCvYjolB3ZFdBGyQO X-Received: by 2002:a05:6214:5b85:b0:6a0:b0e3:3571 with SMTP id 6a1803df08f44-6a16814f7f5mr216420466d6.19.1715848098049; Thu, 16 May 2024 01:28:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715848098; cv=pass; d=google.com; s=arc-20160816; b=gmCBIzAkaTJcluTTjsukBWxwlrwdve2l8rbaSJhd7jSvAU67wuF8e/a1EDpHpmVw7w sr3VTI4rgD7Z0ZYJha3vOz7yKwK6WCuJ5ZVYmroVBJZzpJMzMNaZNmH87Unje8uv2x59 n7CC8fupyHtQtlGP7xA0fV8BZvFYn5uQ1uXV9TU6kdKB/sc62D90eIX7yBdbCdjMaU2d pi6+CqSjKphtsUUn9w0bpvGnYYo4+mwrrFeeIqTYSqw8B7uW0t3OCOugBsbvOoyfRy9q 4V3BYOOvZOErGxyYyohSBeZn1crHV5f0uN6vkvbGqm/PFpV6Cb6yKNpPW6R3B/pl+iw3 E9vg== 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=Wp3xz/jEXktsfVHXaP1pl4p7Vr0VDUO5oIkhNKKtxrw=; fh=mwBeN2683HMQu9VAztk9NhMcsSClq8m68Z8mMTHSPlU=; b=XWiNIsX1TQA3zhmDEoqy6s4YSKGOpTYydX3wDnnMjt113zCiIL2TBSqMraLyBs17fd XJIwxDqG3mb7gK5VU/Sk6FKFOuNR84FGFKgNBDiSByUUIvJQkg0VAeYgFHYsxQIJ26jR 7f32+lPjUQ4JExMD8fjv2bum/FDyZb6Nac/nG6f3/rLwxHtMrdZOLXVsQk5qMOeFBzBO cXkOsv/QZFU3tqhl/A3UDCKqm1PCWhu5kkpCmNhU7RstjC89Y/WXU+o6f762O+5vDku0 Y6LJXJvRL3p0PZP6Kn7OptA5n8t9PHlZW5IZ3LzG23rFPZxEUU/WQNp47cLydpx+leCR YFRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YXbJsieC; 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-180763-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180763-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. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f1feacbsi157776416d6.142.2024.05.16.01.28.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 01:28:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180763-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YXbJsieC; 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-180763-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180763-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 8AF421C209B0 for ; Thu, 16 May 2024 08:28:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98A4212FB33; Thu, 16 May 2024 08:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YXbJsieC" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 44B3176C76 for ; Thu, 16 May 2024 08:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715848072; cv=none; b=cB1t9wesetOeJVSYpM/yb5HXgldCns0Rfq05cDKaaDOehDE9mWBTqF+7Ma7OW37oQ8kD13Ty6IQfyNK8QedYpb6izbLw6W2bfwlnOVp3oH8uP44m6SwUy2xwzEu1l7WmsZZ5LXvfUkUk4WkC5jyGfbfpb2dghuY1jswnUgDck0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715848072; c=relaxed/simple; bh=rvAPyJkeR+TboZ8lV4SzobDUy8jvlE9fbDs25cQI/TM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Rh+53qEaW8KEIVGPMmw3WHZSB2r22ioqMaCYyaDd0CY5MgaPPXtvR77c026DdalUcPykDO/8C+fNsLBBXb7sqgdVH4R2wCUzFvYGHYjWK8uVZ1kU8nQVtyTZSKRc4hTzrSptWR28ZcDSXU20GNslXhb7TLjTAyILLjPyoy+eRwA= 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=YXbJsieC; arc=none smtp.client-ip=170.10.129.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=1715848069; 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=Wp3xz/jEXktsfVHXaP1pl4p7Vr0VDUO5oIkhNKKtxrw=; b=YXbJsieCrKCPNKqqICsw+fkE4McgxQrktXbOiFjeVP0bSohjnOMuj4aXYkqNc6O9J3TIjR C1fyiODOPhd+LQvuwzexLvtswynye0MpOcigojdoW0lVFiTv1ak28Wqt4h2S3t1JfygMTs F/Qu2CRPFnAsF4rh8JMZZbsglKPaQqc= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-yw0N3rezPtq1pnTrowYLiQ-1; Thu, 16 May 2024 04:27:46 -0400 X-MC-Unique: yw0N3rezPtq1pnTrowYLiQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 974C83C025B8; Thu, 16 May 2024 08:27:45 +0000 (UTC) Received: from ksundara-mac.redhat.com (unknown [10.74.17.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4CF85ADC45; Thu, 16 May 2024 08:27:37 +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 v10] ice: Add get/set hw address for VFs using devlink commands Date: Thu, 16 May 2024 13:57:32 +0530 Message-Id: <20240516082733.35783-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.9 Dear Maintainers, Thanks for the review and suggestions for my patch. 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.