From patchwork Mon Jan 13 08:22:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13936903 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2063.outbound.protection.outlook.com [40.107.22.63]) (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 096D223ED50 for ; Mon, 13 Jan 2025 08:40:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736757634; cv=fail; b=EnxU3J8RyobuO4+4QYu21gCxJDBD9aiLR/WarSthYxBNXWrFfZ8eDswQQ/6rEhFOTEBpE024oIgRQuJnQog7IJIAPJuldJkANn36ipD6WPCuFfajmwc9kKhSTwKRn6k79sm+wnYQrwn/tTLJvsTHZv1WGe+351cFtxoBQzqcJqY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736757634; c=relaxed/simple; bh=Bnou1bbhVRNe+Bh8EnXhERm+89rQi68IDBnMUQdUVB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=j69n5HKPhTUvImsugc5X6xGHJ4449GQtoXz2VpahwIKbqpt1K/q8Qgbv8xn8b7/52pdKImrdpNM29oojsgRJMyFduBYrFXGZ8uCyq5LL4FH3+a8QprMhJkjIgIr17LIUy98sWjsB4T6lDsZIHnuHflOmqGKAnw/XV95ZceleJk8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=KKfWa/OT; arc=fail smtp.client-ip=40.107.22.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="KKfWa/OT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MKqPprbcedSh3F5tJgG5KbcXcnfkUIlnH/DbhvqEet9N5ttLpD21iNeLVq5TQiPK8t4aFeXf8X1Z3Yk8mwVS3s/hJgdkMnQSHahUDJebriDhXMZypkFU+N1t+ZLdbZ/HW3UVCmrwzANReikygCBb0rL0vrGjLuly1nEreW64v/9ozu2VASfsiCTkDRU4UmKBX7HWHarq86rK4mM9rUgtaMZm0y/iL/sVZ8m8dEz1dU7QeoR59Xt2acWHZ5yaNYMNQ4cZ/JknpEGtHhafZblaSoBLIv5JBzw25iVXktSLxKV63fw83Z9HxWwsAtKpxyN+zKnCz54AoMptzCHF3aP2rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IvI+Qtevc4/gpebHs+HCKRERnuaKPkBcj1HPAJ3Rn4A=; b=T58mI5fGuJ71egY7DadebAYb3py3jobqUCUSiPyfFabAS+0NsPLEADbN5/WUDDW7Pa4Fm8TifznS/THzWncsnVaNXUS6c/v4ngiHfOqFgj6LZBwD9Hva5COFgeub37f0uVSoH00JNTlWuL0W9xYBFqxCLcbC4dUYJ05OPpRXyeoa7KyGTz+Z90d6qU313PxAobULMylleRX17dZXvqdbox7Zp07voD44qfdZxOk7Z40TDETTQIr9MWZIPvVcOfLrmifKglHHnyNvZzyWnrM0uqYJMRo0ki3rRmfk3wVcQtNnWBowAp+nLWOOWht/cKjFNbycPniaYRE0+/4sRYbqiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IvI+Qtevc4/gpebHs+HCKRERnuaKPkBcj1HPAJ3Rn4A=; b=KKfWa/OT7PdRlBnMDRawqa6pNgZDrzvyJGAfM/aDXurvWPab5/ecAFcLi9ZKsfjqC63kYqvbqJ5v/jv9konOd9Y5fVRIHM826+CTGQ1lRNl0bXLulKbjU2R9g/fycnf4ikojdrWb/hCqkb+D5hrD4i0Ulfnv1ZSXrG1wX9jYKwiwxfdCOoA5YnMQiPaEaS/mYt9g2jee9Rt7kAfdobejuRwMrIy2hVOOPKLHGQHSHZbwXVcyHNI6rMNqac+p/tQUMn60n7ZPoBe1TIsXsOE4wZqKnWIzaSrc87J0UPMfL/bSux0FmuQFZZykFyz47xAW3Gtb2d7GJnoZPLaRAhBCrg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by VI1PR04MB9882.eurprd04.prod.outlook.com (2603:10a6:800:1da::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 08:40:30 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%6]) with mapi id 15.20.8335.017; Mon, 13 Jan 2025 08:40:30 +0000 From: Wei Fang To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, xiaoning.wang@nxp.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, christophe.leroy@csgroup.eu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev Subject: [PATCH v2 net-next 10/13] net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c Date: Mon, 13 Jan 2025 16:22:42 +0800 Message-Id: <20250113082245.2332775-11-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250113082245.2332775-1-wei.fang@nxp.com> References: <20250113082245.2332775-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|VI1PR04MB9882:EE_ X-MS-Office365-Filtering-Correlation-Id: fd2b7ecb-8c06-4215-e7e4-08dd33adefb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: PcoAgewiCkF5V2gmC1hrtPpxPyZkqmFqaP3/MrpU7GPIIrSxdo55BuUse0c/33DsnjrMuwyT7WyvYnXMgCcrdpzM3AFM9lRex1chnoqtQDFU4uDiP07+LaKXXh1SvC95LE2MbQQuovHaBq588KDGehJgXan2vJWXu2LgAY15KHuJA+HhuAfrmgGAm5gfnUvuMhixGdRKBtagFkzwNa82xn3FIx9BClDWS0Zi4VO12xIaqEzsMeaoWcD4OHaSSy/xV6AxdGF8WNBx1ZqvJAsbVxuBqcGyW86wc0nzZ3lhFhSSCxk+On7irsgbDV/tnIjrbdb6yQnViupG9PPx7wugb77dF1icXvv6xjhSaw15/J4leU0wk/mCcU+5R9Vj8tTQ0A5BYZrKJNEgftjHCBbXsVXnAlwqZrNtXNpImZLZHNRcFU+gXbrn2lT6ckoqigpJLp2DTVF3vCZaDKmuhE2T3TTx2PCiTojRXq66RKxkvvJImrE081mSniJSTds5Ne8nwRF/xi4KKMJKOvBrTjySxGQnbzP3QG+s23hOEqlDMbaudQZFxZufD5wDuJ9pIRGds5ux2TtV5Tvob+YDQ/wLATc4eS4fiIXj2/VVrDF9BIE/KgURgk2QBgdZc8SZsfIKPzXd7PJmQmK4X7BpRPOE03EjM8JGM3dOrxCufXdeHd04jI0FAoex7rETzj9bZDlNSjQAkfWnD1JCtT2AeGbddIYlblhftyAV+u1bdNT0cLurUf1cPk7GYo3JaMdGEWo1Ss0wJbGP7dKSx8jeMzGH7NYRt2WKDxC7mpD09EMlDXOBCIIdbuHX8rsxrsGhZ1zoBFzmIcIeE22Z+d/JYLttU/5H/Sr8QCMYU62mMMJKvlfG6DWKdX35WC+ZfaR3BD4QE3IuzPqEri1S4I2E0m4Lp3s91ydqj/h8l2UAcQdDWynVV7NkpgdK4hRytJsuAHUP9Y/gvNHfPINRtvFamq1XPO9D/rvUt4bYHUrOpBYfYccE8uF/JcsaNqWD0OwYLp2BKs+cjKPTfq39UVyxnXK6qlw5FbnxgX6hDCK0IFQDhGt/IT70fzDHlsWchPijrrqGaTwE4PG0RQah5AjXApTKnFGGoEtqdgCv6kv1Ze7OJM3E3eGd/C+7SN61fXolbxuaBpBcoXgysYdzDf0PpdT9niIedr+cQMS/f9wwvcEY71lvJri+KA4dPqmuD1P7P+LzV20AfApdUARMwHP2DAyvzAvGHoMlcMoOYwXN9VL/Rw005PD87UJJ4R2W7kREY5Yw8p8P3458y2r41LkXBh+psIoOzpeUs3g5J+b/4hZr2V1WzS0ohehCxLeao/3oOjSuaV/8XwX6xnj5yos3CAmvzfswj4Uxc1t0MP0kUCXAjNN4tniyYdEMt2+IRAW+DIaWvTr8fQvpDPMnD17z+Og71H0+2GY+V9pxzJsJlRzJEzAp0O+TUGmg3Se8QosRrKGx X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A0yp+A0yHeSyeX3gq98zy8Ol03o44xPNUV4K57frIheO4mmaL2NjUrEkt5t4leSlfiI4K43npPzwLjCDfWWj/aMxaGS9DDivL4SkGLY64xxuXTrx6Ly+icTgHLxnh5PokPU97ll15NWFNQq7qYfmzHy+BUjlW9emDAU2/aaSZ7/++CNe7u5rwtWSb3Bo1R9B/c/iHJHdSxe8bHrghl1EnzG3HIDyLxZJAbNQCP73F9shyOorvns/d4lmN3/AgVkzhKQHcaJ7E0vBhDKquEqSfiBqeKJQzCkrh38DSbO6za3MmxkDqzOI7w0k92edqHv6XxnPicSO5cTPsvVjKBZUhKfdK/D5FKEcTzFnEZMDt841qCnyJI3pzLm/XHvY1y7Iq+I62JnQ7VmquQTWj02TyIoXP+rwYoDAAsd59NMRU95BEgnuWkfsdOyHVVNGhZYpn1s0wXAdF3aXRlwKtKfYtlan6hfAXX9F8Gg4bK0EQDSS1J13otrXL/cJRT0Npi7+DY+o4fY5sD0Up0R7kqAXh69T4a25Hv+/P2JblLzUaFu8d9lFX1o7KOzyjmKBMHG9pvFNSfk/ooq8n6yhO/rwKXKR/OnQZEKc9jbKAqcq2xnvvwcSCuxut9TBi4Ca4ag+d1GQ/+46wf0k5CRg4YyOShxenxIsk7yWgttl29dac8rxDtve/lLIZQNdATnjOckTsS15N8LHlLp+E9IdH97oeYFHoYl6OVJLg94yeOOPwKYYLjwGlXNifizL6yPdi7J+tFpQpvImhvrB/q7tk49XHDLERlgqyECW/QnCnPnhNWR+1f9hVntdRrhqt3nNO1+HSQ0BpjrYhv2kPuS+/5WXzKHxvd2wHAP9R2oo7f/UDEfdf5LHYNNXgPzXuKjvcvhEDCu0x0FOQTVQL0s5f8q59HuHCQCOIQtqXKqBEvCk34nj/UoNdjh6WJ3/y2GrRgwcX0mjyFSKGFmhGKO7960Nq02D8pm0d/dLUYnIrJYBnLDWRkq8uWgNby2f64VHkc4hZtiqTY+UgKvH+E5x6mPlzYaj5Gvhcuz89+NLRwfZZ3q/z1j2g9DAQfuf1Hn5Zu7l+FEIU9tO9xvcmJH64QHt7lEQxySU5A7wRE6hFaGFxvt/euLD58Ty2YJW5RdJ11nFfieTo20iemmrGzfzrlaCZ6MNSAJuDxPPF8SgTd8YdWy1aIf8epPeooXGFX5jXsfjC9TWMpdAqUMhF2vJBo2qX5RTMElOEjDNVKgupu5HeOgYKYX3McURlKnf1Ht6gNc1ACmanZ1CiwervZ6ylId0AL3vnMLd4Sc76dMFS7oalch5ggzRdVU9AgeTC2xF+Dj8jliYwY9s1w5vGwKsg9X9MV/JgPaEL1++MQcxBRuCzTtVd9+hiJqnaa5b/Vpg6kNF0gWupnCpzUTbvoFOO4Sdb+nbHosd3Xt0Dy0VA7ispJtP0zoONRFIhTSefeVKCEQ+1BjQps6raw4UVlMFUZS6A9Zn0vKmMKdjHMtwN2+hPbc1fkLDJuYxxw2yInfKlxolT+TBCpOrvpWbyYmstIASea/Bmz5H66ODk82/G/Ye6B4UhIP2lnPcMJJSIwD+o7Jq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd2b7ecb-8c06-4215-e7e4-08dd33adefb8 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 08:40:30.3349 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IbPwafuhMWoLf7pI3wf3ucrKh1C1I8R1bQAB198nYfcyRZmhZlm5dnzvlUQlSrbriPsHdEFJVYm0dwruIvoJyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9882 Since the VLAN hash filter of ENETC v1 and v4 is the basically same, the only difference is the offset of the VLAN hash filter registers. So, the .set_si_vlan_hash_filter() hook is added to struct enetc_pf_ops to set the registers of the corresponding platform. In addition, the common VLAN hash filter functions enetc_vlan_rx_add_vid() and enetc_vlan_rx_del_vid() are moved to enetc_pf_common.c. Signed-off-by: Wei Fang --- .../net/ethernet/freescale/enetc/enetc_pf.c | 34 ++----------------- .../net/ethernet/freescale/enetc/enetc_pf.h | 1 + .../freescale/enetc/enetc_pf_common.c | 34 +++++++++++++++++++ .../freescale/enetc/enetc_pf_common.h | 2 ++ 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index c0aaf6349b0b..d9c1ebd180db 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -215,43 +215,12 @@ static void enetc_pf_set_rx_mode(struct net_device *ndev) enetc_port_wr(hw, ENETC_PSIPMR, psipmr); } -static void enetc_set_vlan_ht_filter(struct enetc_hw *hw, int si_idx, - unsigned long hash) +static void enetc_set_vlan_ht_filter(struct enetc_hw *hw, int si_idx, u64 hash) { enetc_port_wr(hw, ENETC_PSIVHFR0(si_idx), lower_32_bits(hash)); enetc_port_wr(hw, ENETC_PSIVHFR1(si_idx), upper_32_bits(hash)); } -static int enetc_vlan_rx_add_vid(struct net_device *ndev, __be16 prot, u16 vid) -{ - struct enetc_ndev_priv *priv = netdev_priv(ndev); - struct enetc_si *si = priv->si; - struct enetc_hw *hw = &si->hw; - int idx; - - __set_bit(vid, si->active_vlans); - - idx = enetc_vid_hash_idx(vid); - if (!__test_and_set_bit(idx, si->vlan_ht_filter)) - enetc_set_vlan_ht_filter(hw, 0, *si->vlan_ht_filter); - - return 0; -} - -static int enetc_vlan_rx_del_vid(struct net_device *ndev, __be16 prot, u16 vid) -{ - struct enetc_ndev_priv *priv = netdev_priv(ndev); - struct enetc_si *si = priv->si; - struct enetc_hw *hw = &si->hw; - - if (__test_and_clear_bit(vid, si->active_vlans)) { - enetc_refresh_vlan_ht_filter(si); - enetc_set_vlan_ht_filter(hw, 0, *si->vlan_ht_filter); - } - - return 0; -} - static void enetc_set_loopback(struct net_device *ndev, bool en) { struct enetc_ndev_priv *priv = netdev_priv(ndev); @@ -971,6 +940,7 @@ static const struct enetc_pf_ops enetc_pf_ops = { .enable_psfp = enetc_psfp_enable, .set_rss_key = enetc_set_rss_key, .get_rss_key = enetc_get_rss_key, + .set_si_vlan_hash_filter = enetc_set_vlan_ht_filter, }; static int enetc_pf_probe(struct pci_dev *pdev, diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.h b/drivers/net/ethernet/freescale/enetc/enetc_pf.h index d56b381b9da9..7a0fa5fba8bf 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.h +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.h @@ -39,6 +39,7 @@ struct enetc_pf_ops { int (*enable_psfp)(struct enetc_ndev_priv *priv); void (*set_rss_key)(struct enetc_hw *hw, const u8 *key); void (*get_rss_key)(struct enetc_hw *hw, u8 *key); + void (*set_si_vlan_hash_filter)(struct enetc_hw *hw, int si, u64 hash); }; struct enetc_pf { diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c index a737a7f8c79e..9f812c1af7a3 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c @@ -343,5 +343,39 @@ void enetc_phylink_destroy(struct enetc_ndev_priv *priv) } EXPORT_SYMBOL_GPL(enetc_phylink_destroy); +int enetc_vlan_rx_add_vid(struct net_device *ndev, __be16 prot, u16 vid) +{ + struct enetc_ndev_priv *priv = netdev_priv(ndev); + struct enetc_pf *pf = enetc_si_priv(priv->si); + struct enetc_si *si = priv->si; + struct enetc_hw *hw = &si->hw; + int idx; + + __set_bit(vid, si->active_vlans); + + idx = enetc_vid_hash_idx(vid); + if (!__test_and_set_bit(idx, si->vlan_ht_filter)) + pf->ops->set_si_vlan_hash_filter(hw, 0, *si->vlan_ht_filter); + + return 0; +} +EXPORT_SYMBOL_GPL(enetc_vlan_rx_add_vid); + +int enetc_vlan_rx_del_vid(struct net_device *ndev, __be16 prot, u16 vid) +{ + struct enetc_ndev_priv *priv = netdev_priv(ndev); + struct enetc_pf *pf = enetc_si_priv(priv->si); + struct enetc_si *si = priv->si; + struct enetc_hw *hw = &si->hw; + + if (__test_and_clear_bit(vid, si->active_vlans)) { + enetc_refresh_vlan_ht_filter(si); + pf->ops->set_si_vlan_hash_filter(hw, 0, *si->vlan_ht_filter); + } + + return 0; +} +EXPORT_SYMBOL_GPL(enetc_vlan_rx_del_vid); + MODULE_DESCRIPTION("NXP ENETC PF common functionality driver"); MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.h b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.h index 48f55ee743ad..253310859ca1 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.h +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.h @@ -12,6 +12,8 @@ void enetc_mdiobus_destroy(struct enetc_pf *pf); int enetc_phylink_create(struct enetc_ndev_priv *priv, struct device_node *node, const struct phylink_mac_ops *ops); void enetc_phylink_destroy(struct enetc_ndev_priv *priv); +int enetc_vlan_rx_add_vid(struct net_device *ndev, __be16 prot, u16 vid); +int enetc_vlan_rx_del_vid(struct net_device *ndev, __be16 prot, u16 vid); static inline u16 enetc_get_ip_revision(struct enetc_hw *hw) {