Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1941423lqz; Tue, 2 Apr 2024 02:23:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1sx+uQvML9o093JRtGY46qm5U8rFsI4qdo1pwQVw03M/x7wfnX+4QMvZ9destb9fKAT9/jthbYIKPXh1PzAi/W8FtwS7zt2qHvgg7HA== X-Google-Smtp-Source: AGHT+IEgRCUiruL8AaMwWRbveGm8B6RLcwpDD+AKqhcbat+7b8RWtB8ipEJs9bKqDdhpnOVgzJSt X-Received: by 2002:a17:90a:2e17:b0:2a1:f3f2:3a2b with SMTP id q23-20020a17090a2e1700b002a1f3f23a2bmr10433771pjd.36.1712049800495; Tue, 02 Apr 2024 02:23:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712049800; cv=pass; d=google.com; s=arc-20160816; b=p+G9ARW7KEvfCW5N/FJ5bG+j/RtOWg4GYA0kb8HFMH2VnZ8FfpRy5AC2nEFiaO1RzG CFQ90zJYWKsf4zG9D0jpQjycBXdyWJSRvNAmUhhQmG2C8hqcjwzABWIL2Qangni1LhIJ zbTSKz5Q1kf6slSi8PAVtQeT/EixqE0NkWE3J42VZiIU2IQw/XSPbq+AVtGZUs1z03EY uC4IhCo6py5XZxYjlJxrUoMpt0Lns6GArYvLqrX8qyl8QlpsVmCda1C/k5/XYFX1UJR6 ZfcFXoUDbK6/ETwjTyiP+5zvpmi16xmHJJ2GzLfCkG+5AkFP/FMoZiCSTj6KBnMUPf9A zqxw== 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=mPRN7R9lh26MvPps2r6V6QRCUDsWvQ9Nt6UYtfHL0SM=; fh=6Ns0gvaPPCgoRB6k7/2LetHz7jbLGPUv+w7VUsr8kbg=; b=cV6OSGWP9JLH/BnhNGOjHiemcKNR/Lsu2g+t0xmQifG/5fxe0I+kmGwwe2xXMm1NFx VyoxHKrfos1HQHdCxjyZB+0YdD0L9NZ/ehGPckLxMKGQM8VkUFFf+dB0AArv1SM2GWIj GXro8mzU2uIrP0RMmHdSwPSjTEUwOB4Xuz1l0Nko0ew8TeR9cbZGBmV6cbnHr/JBuKN4 Y+EGjjHEwx4P84ogNxzpBYXmPa8cpQ2UrsPNKSJJ0VqazITHEJQTUE+DBHRaLsab1xql hP1NqBtSt5G1gus0iF4KevkoXE7wWRPyi8Lp4FoTc9tHoexYaFksVbdCbhv8QZ4P5NDD pciA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fDBLF8YA; 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-127626-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127626-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 e4-20020a17090a9a8400b0029fe9ae39a0si11002091pjp.31.2024.04.02.02.23.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 02:23:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127626-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=fDBLF8YA; 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-127626-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127626-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 3238328339E for ; Tue, 2 Apr 2024 09:23:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E0A558113; Tue, 2 Apr 2024 09:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fDBLF8YA" 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 4B5295732B for ; Tue, 2 Apr 2024 09:23:09 +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=1712049790; cv=none; b=ZMVZspr8P1hT4RlyRuzhRwmDWBbG3jYuN5Bp4GXHhE2fawvVGPOW3IQbJgt1Ums6cweorqCfHy0/1qLYKA6T3pLu9RMEdn6PaVpad6gwTsWvoTzCTAm7NimqWCfYoYOt63Eal8TK4zGTcmYxsqDEXCvLMa2lY8d1zl7rVEf0/IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712049790; c=relaxed/simple; bh=2pzoB0R1l4BvIwrmQanEGaLv93obYpgqMFHKKona2lE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pTbMwzBxx/PW1rTy/GxHnzEtt+oroGKYkVxhxN3RxnoeYtQzv/96XlpylSDShu/gAsHi6dBOxE3/iFsdGeqliIojOqSio+z/4Opz+TpNzn+WAyXT6veDqOJSg5ZK0CqH9tKV3qf3VtqS1sihbTmZgkVDd6Jib3so2hmuY/jkd04= 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=fDBLF8YA; 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=1712049788; 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=mPRN7R9lh26MvPps2r6V6QRCUDsWvQ9Nt6UYtfHL0SM=; b=fDBLF8YANVi3Qq1YJ7mnhtuGKVs6PZmUhtQpnYLgBtSz1PZPFsWTc9FlACXpIekON7FJYq 7BmzW4dBlwRvDWjLY/whqj4gmWvG7S1DtoAoaUYfWaSQU4OM/9YcST5G83Jw2DDzMBfjZp dcP7dXnshflerxHYhM9a2u1lRCQ0p1Y= 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-516-06wZo3tqMmKfKGCFN73DQw-1; Tue, 02 Apr 2024 05:23:04 -0400 X-MC-Unique: 06wZo3tqMmKfKGCFN73DQw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 2192E85A58E; Tue, 2 Apr 2024 09:23:04 +0000 (UTC) Received: from ksundara-mac.redhat.com (unknown [10.74.16.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 347E32166B31; Tue, 2 Apr 2024 09:22:56 +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 Cc: pmenzel@molgen.mpg.de, jiri@resnulli.us, michal.swiatkowski@linux.intel.com, rjarry@redhat.com, aharivel@redhat.com, vchundur@redhat.com, ksundara@redhat.com, cfontain@redhat.com Subject: [PATCH v7] ice: Add get/set hw address for VFs using devlink commands Date: Tue, 2 Apr 2024 14:52:53 +0530 Message-Id: <20240402092254.3891-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.6 Dear Maintainers, Thanks for the review and suggestions for my patch. 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.