Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2548479lqo; Mon, 20 May 2024 09:02:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRsE2m2runH+ZhINk2IV1J/nEKoJdWE/PmuMqjfFpxYlNSzOH8UFsF39U4jva+q6wvWtAPLq++tP3GsbnaL/T75vmzXh61PdVxj9Q8yA== X-Google-Smtp-Source: AGHT+IELY25dcXth0D+n30sJl4uNhh9OOq2vdMoTzkh+MHAsz0hlkBAzHj0xjX+xXj0kCsLPGtYn X-Received: by 2002:a05:6a21:1aa:b0:1a7:9b0e:ded3 with SMTP id adf61e73a8af0-1b1ca3c3e70mr8741050637.11.1716220971301; Mon, 20 May 2024 09:02:51 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6592d3fc245si2390179a12.768.2024.05.20.09.02.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 09:02:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183947-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=@amd.com header.s=selector1 header.b="jx/zhco1"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-183947-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 E5605281261 for ; Mon, 20 May 2024 16:02:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0566137927; Mon, 20 May 2024 16:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="jx/zhco1" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2071.outbound.protection.outlook.com [40.107.93.71]) (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 B39C728E7; Mon, 20 May 2024 16:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.71 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716220959; cv=fail; b=jyuknntT+XVLQZnjv5fxxVjYrlexbg5E0Mur+GihzOz8PDUBoeHOGWHOVn1T9Kz9176Z6llqfKuHY+kbFHmJtGPqU6kfBrhvBJHACS5u2RN1oVILktH6T6PEqW0WUq6Q72HVGia41x0sgPQVSpCoooZ5J2VLy6hEeMuO/a4luJg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716220959; c=relaxed/simple; bh=xBnjAxBN+j29u/AZfQxB4yXD3tJj+liVb3GCd7pC/3k=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=dLUO3yXMEzz8ZqEsDMhYHsl3bhkC1Z/7o2kuFPO5muyVIg08gAqbcvxRyo3Qe+5ETn7av7XYGGhO6xgofbcE4pQbImtpPL2F0FbB7pf3dhz2OS2Wzv2EAEyI5f+bP228nvgiBRtRpYy0zDMaRwquC60Xi7fWPXenoNQpdFm2+Is= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=jx/zhco1; arc=fail smtp.client-ip=40.107.93.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5a/L/RAIL6mWa9drwMoXjL3qAo8HxeKMVosLSzpvDIBd5vpZcPTneIzaBJ5S1CM68soYcg2OX9o0kJqfkd2ChlR4diTPg3jGDhBIqNKUA5R5o6cgKmDGXdFMGC+GncdOMI/DxybNHnNj8w7kiHg04PDlPz+w6fb2fARCZSCYM0ZIC44j4eNbWCDLNz37y9qI8JKtTr21ehbG+4zYTg0H6hy0bcw6X7N0NEjEe3TUjKptMIxkeePLxY7hhi14+Sgs/t107Udt3Lhao1fsY0aGKbOWQaaaq3s5XfKXLtrBQ8CFACfOJR9XW4HQlBmzvlBuJ7Eq0xJvto48a0UYE/u6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KEhqzk4fvIOIFau4A6F0EYDUw3t1fQwjiMAAJ5/tdLw=; b=PSi8j0X9irbL4eRsWTOHQAg7OwshOGLRX2KdUm86vIBO7qHOm2gU1l9iYsYZMer0/Aw+SYzqQ6Cyz7WJudD/Zr+gLhQwRqSSPFJJPQjSuxBqbr8oCQcu1bggUwI/Ljs+Y7cYHf2I7fad3BB2vsUMY+UeRSOlly9ubZ7HhnGoXEaTerPMwKPisXOwP98yzRxHZdFk8fwNKHXsKlaV9Oc1L27gudDr+t9Dl7+M/1RXNCfaqm5RzlBcWvF/rvi8ZgGh0x6mu8Qld6P7pd4xAnjlY57u9leFNNqCRR5TDP1R2fjcg2UsUFa/pWznEoZZzdD6LxK1YABWjEsz3uPC7Vcg6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KEhqzk4fvIOIFau4A6F0EYDUw3t1fQwjiMAAJ5/tdLw=; b=jx/zhco1QSVD31C1D66EihqiuwzYKmYTMmzjnswRw8FDTVaKLAIc17o8TZy8JDKff0lQAmgUxaHzLHUQY13HRtf40GPOFGa7YPyBU0c2CM+xEVQBuVi+Kmeb6EzEmh/YrHpu67tPhixs+ldzvQVhW8DoVZd1GFDiDb0prcWrfD8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH0PR12MB7982.namprd12.prod.outlook.com (2603:10b6:510:28d::5) by MW4PR12MB7311.namprd12.prod.outlook.com (2603:10b6:303:227::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Mon, 20 May 2024 16:02:34 +0000 Received: from PH0PR12MB7982.namprd12.prod.outlook.com ([fe80::bfd5:ffcf:f153:636a]) by PH0PR12MB7982.namprd12.prod.outlook.com ([fe80::bfd5:ffcf:f153:636a%5]) with mapi id 15.20.7587.030; Mon, 20 May 2024 16:02:34 +0000 Message-ID: <8e1b9ae3-b533-4a13-aff7-9d62bd1f8f98@amd.com> Date: Mon, 20 May 2024 09:02:31 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH iwl-next v11] ice: Add get/set hw address for VFs using devlink commands To: Karthik Sundaravel , 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, rjarry@redhat.com, aharivel@redhat.com, vchundur@redhat.com, cfontain@redhat.com References: <20240520102040.54745-1-ksundara@redhat.com> <20240520102040.54745-2-ksundara@redhat.com> Content-Language: en-US From: Brett Creeley In-Reply-To: <20240520102040.54745-2-ksundara@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR10CA0025.namprd10.prod.outlook.com (2603:10b6:a03:255::30) To PH0PR12MB7982.namprd12.prod.outlook.com (2603:10b6:510:28d::5) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR12MB7982:EE_|MW4PR12MB7311:EE_ X-MS-Office365-Filtering-Correlation-Id: dc1051c0-a4b8-4e7f-72c1-08dc78e642dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|7416005|366007|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eDQrUTFUd1FPWG80dk9IVHZxdWlscVJ3OUVnZDBMQkhMWkVZdGVkd25ZblpR?= =?utf-8?B?ZEk2RkdJekI1WkNrV3RhdlFBeGpXSEI5YTJvd0pURjIwZDliajl2UjVodUtL?= =?utf-8?B?Nnl4TGQ0S2E3UG9iakNtTEV2MHZacVcxV1BmYVA2a2ZicGdZaXQrWFQxcmkv?= =?utf-8?B?bzRlVWpkRFBQODNvbTlyUUZsaVhJejFuUVl6WkhlczRJY2lnbGpob0NGb3dM?= =?utf-8?B?emV6czFXMXo4dFkyaDhPdFdjSVZqR1lsQ21nMU0rWjFSbWY5ejBDZ09ubnVp?= =?utf-8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ERPTkdndUdzMkJa?= =?utf-8?B?R1JvRWZoK3RCTFBGdjlPSXVyYjZ3NXZQV1I5Ulc2N0JlZk9obHM2Si9KODFF?= =?utf-8?B?WFl5VGNtdGg1U0EzY3JnZVFuUTdzUUFVcFNWTXRSa3BLbXVCckp2ZFdIR1Q3?= =?utf-8?B?S2hFc01pTU1MV2FJZlF3YW03NGhJeEpIZmpVdzN4K3RtbnYvV3pMOWNheGlL?= =?utf-8?B?ejlKRVZNS1l4QlJOK1hhelA4bE5qNlpmYVBLK2x4aGNhaFVITytFQTBVaTBn?= =?utf-8?B?aGpHRUNYK2JTSWd0Tm5YRnprRlpkT0JxTmErWXQwS2ZiVURobnpucVRFNUN0?= =?utf-8?B?OGpZYmpXRXh0ejdBclNQdDErL3FtdUQrSWVhSWI5dlFtZmlKOUlDTnBBVXlo?= =?utf-8?B?Ym4zaXJxeFdyUGF0TjV4TUtYVGlud0h6U2FvdEx4SmhRd3k3cG9XLzYwdXZo?= =?utf-8?B?MXo0bUd4MzhnK3ptMTNpR1dieVVyQ09FS1IwbnQ2bGdLUUZHY09DQ2JlMXdN?= =?utf-8?B?T09iNXc4UkdqcWhlV2duQzFPMmpENEYvb0dDTXpsTnI0MjR3a3k0T0ZuY3l6?= =?utf-8?Q?UDadkEl6ZBRf1W8TcY1O1Qh28BcYxC3kd/wOvZc?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR12MB7982.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(7416005)(366007)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZFVGamxNWWxtRFFxOWF4N1N0YlRPY1ZxZ0dpQU4xWTFwQ1Z1QXg0UlNiT2VV?= =?utf-8?B?aStxNUVHekZvaWd2Q1Fzd0NuekZFSnIyQkhlYV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WNiRnVIR2R6WWt1VlNGeDJOSTh1a3hhcW41L3N6SXdRdjNJMmVo?= =?utf-8?B?OVlEOTRkRDlvblY3dE1uUUV1S0lVbGhOQ0ticWlrcncySWJnZXFqeGFNbGZG?= =?utf-8?B?YURrNnRiOUwydzVSNllaMjRsYnlzR0pUSG1RQUtmQWdMai9UOFYrYnRPSENF?= =?utf-8?B?R3F2d1U0YThFalcyZmt0cnRyV3Znajc3aWdRd2kvUDFjdHBVNkRzRCs5dFhW?= =?utf-8?Q?dkau6tTLeuajsTgsN3KD0x8Yk?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc1051c0-a4b8-4e7f-72c1-08dc78e642dc X-MS-Exchange-CrossTenant-AuthSource: PH0PR12MB7982.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 16:02:34.0988 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k+P+Roz9rhccvcaVk8hvtweW0HzSIuoUyT6IemKhNvAEtnrCTOysPREdR8ZK7Csx2J+cAQf0qj7gRpTqMOWupg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7311 On 5/20/2024 3:20 AM, Karthik Sundaravel wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > Changing the MAC address of the VFs is currently unsupported via devlink. > Add the function handlers to set and get the HW address for the VFs. > > Signed-off-by: Karthik Sundaravel > --- > .../ethernet/intel/ice/devlink/devlink_port.c | 59 ++++++++++++++++++- > drivers/net/ethernet/intel/ice/ice_sriov.c | 32 +++++++--- > drivers/net/ethernet/intel/ice/ice_sriov.h | 8 +++ > 3 files changed, 89 insertions(+), 10 deletions(-) LGTM. Reviewed-by: Brett Creeley > > diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c > index c9fbeebf7fb9..00fed5a61d62 100644 > --- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c > +++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c > @@ -372,6 +372,62 @@ void ice_devlink_destroy_pf_port(struct ice_pf *pf) > devl_port_unregister(&pf->devlink_port); > } > > +/** > + * ice_devlink_port_get_vf_fn_mac - .port_fn_hw_addr_get devlink handler > + * @port: devlink port structure > + * @hw_addr: MAC address of the port > + * @hw_addr_len: length of MAC address > + * @extack: extended netdev ack structure > + * > + * Callback for the devlink .port_fn_hw_addr_get operation > + * Return: zero on success or an error code on failure. > + */ > +static int ice_devlink_port_get_vf_fn_mac(struct devlink_port *port, > + u8 *hw_addr, int *hw_addr_len, > + struct netlink_ext_ack *extack) > +{ > + struct ice_vf *vf = container_of(port, struct ice_vf, devlink_port); > + > + ether_addr_copy(hw_addr, vf->dev_lan_addr); > + *hw_addr_len = ETH_ALEN; > + > + return 0; > +} > + > +/** > + * ice_devlink_port_set_vf_fn_mac - .port_fn_hw_addr_set devlink handler > + * @port: devlink port structure > + * @hw_addr: MAC address of the port > + * @hw_addr_len: length of MAC address > + * @extack: extended netdev ack structure > + * > + * Callback for the devlink .port_fn_hw_addr_set operation > + * Return: zero on success or an error code on failure. > + */ > +static int ice_devlink_port_set_vf_fn_mac(struct devlink_port *port, > + const u8 *hw_addr, > + int hw_addr_len, > + struct netlink_ext_ack *extack) > + > +{ > + struct devlink_port_attrs *attrs = &port->attrs; > + struct devlink_port_pci_vf_attrs *pci_vf; > + struct devlink *devlink = port->devlink; > + struct ice_pf *pf; > + u16 vf_id; > + > + pf = devlink_priv(devlink); > + pci_vf = &attrs->pci_vf; > + vf_id = pci_vf->vf; > + > + return __ice_set_vf_mac(pf, vf_id, hw_addr); > +} > + > +static const struct devlink_port_ops ice_devlink_vf_port_ops = { > + .port_fn_hw_addr_get = ice_devlink_port_get_vf_fn_mac, > + .port_fn_hw_addr_set = ice_devlink_port_set_vf_fn_mac, > +}; > + > /** > * ice_devlink_create_vf_port - Create a devlink port for this VF > * @vf: the VF to create a port for > @@ -407,7 +463,8 @@ int ice_devlink_create_vf_port(struct ice_vf *vf) > devlink_port_attrs_set(devlink_port, &attrs); > devlink = priv_to_devlink(pf); > > - err = devl_port_register(devlink, devlink_port, vsi->idx); > + err = devl_port_register_with_ops(devlink, devlink_port, vsi->idx, > + &ice_devlink_vf_port_ops); > if (err) { > dev_err(dev, "Failed to create devlink port for VF %d, error %d\n", > vf->vf_id, err); > diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c > index 067712f4923f..dd1583b0fd90 100644 > --- a/drivers/net/ethernet/intel/ice/ice_sriov.c > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c > @@ -1416,21 +1416,22 @@ ice_get_vf_cfg(struct net_device *netdev, int vf_id, struct ifla_vf_info *ivi) > } > > /** > - * ice_set_vf_mac > - * @netdev: network interface device structure > + * __ice_set_vf_mac > + * @pf: PF to be configure > * @vf_id: VF identifier > * @mac: MAC address > * > * program VF MAC address > */ > -int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) > +int __ice_set_vf_mac(struct ice_pf *pf, u16 vf_id, const u8 *mac) > { > - struct ice_pf *pf = ice_netdev_to_pf(netdev); > + struct device *dev; > struct ice_vf *vf; > int ret; > > + dev = ice_pf_to_dev(pf); > if (is_multicast_ether_addr(mac)) { > - netdev_err(netdev, "%pM not a valid unicast address\n", mac); > + dev_err(dev, "%pM not a valid unicast address\n", mac); > return -EINVAL; > } > > @@ -1459,13 +1460,13 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) > if (is_zero_ether_addr(mac)) { > /* VF will send VIRTCHNL_OP_ADD_ETH_ADDR message with its MAC */ > vf->pf_set_mac = false; > - netdev_info(netdev, "Removing MAC on VF %d. VF driver will be reinitialized\n", > - vf->vf_id); > + dev_info(dev, "Removing MAC on VF %d. VF driver will be reinitialized\n", > + vf->vf_id); > } else { > /* PF will add MAC rule for the VF */ > vf->pf_set_mac = true; > - netdev_info(netdev, "Setting MAC %pM on VF %d. VF driver will be reinitialized\n", > - mac, vf_id); > + dev_info(dev, "Setting MAC %pM on VF %d. VF driver will be reinitialized\n", > + mac, vf_id); > } > > ice_reset_vf(vf, ICE_VF_RESET_NOTIFY); > @@ -1476,6 +1477,19 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) > return ret; > } > > +/** > + * ice_set_vf_mac > + * @netdev: network interface device structure > + * @vf_id: VF identifier > + * @mac: MAC address > + * > + * program VF MAC address > + */ > +int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) > +{ > + return __ice_set_vf_mac(ice_netdev_to_pf(netdev), vf_id, mac); > +} > + > /** > * ice_set_vf_trust > * @netdev: network interface device structure > diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.h b/drivers/net/ethernet/intel/ice/ice_sriov.h > index 8f22313474d6..96549ca5c52c 100644 > --- a/drivers/net/ethernet/intel/ice/ice_sriov.h > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.h > @@ -28,6 +28,7 @@ > #ifdef CONFIG_PCI_IOV > void ice_process_vflr_event(struct ice_pf *pf); > int ice_sriov_configure(struct pci_dev *pdev, int num_vfs); > +int __ice_set_vf_mac(struct ice_pf *pf, u16 vf_id, const u8 *mac); > int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac); > int > ice_get_vf_cfg(struct net_device *netdev, int vf_id, struct ifla_vf_info *ivi); > @@ -80,6 +81,13 @@ ice_sriov_configure(struct pci_dev __always_unused *pdev, > return -EOPNOTSUPP; > } > > +static inline int > +__ice_set_vf_mac(struct ice_pf __always_unused *pf, > + u16 __always_unused vf_id, const u8 __always_unused *mac) > +{ > + return -EOPNOTSUPP; > +} > + > static inline int > ice_set_vf_mac(struct net_device __always_unused *netdev, > int __always_unused vf_id, u8 __always_unused *mac) > -- > 2.39.3 (Apple Git-146) >