From patchwork Thu Sep 28 08:44:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Radu Pirea (NXP OSS)" X-Patchwork-Id: 13402276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23B9DCE7B0C for ; Thu, 28 Sep 2023 08:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbjI1IqY (ORCPT ); Thu, 28 Sep 2023 04:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjI1IqW (ORCPT ); Thu, 28 Sep 2023 04:46:22 -0400 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2073.outbound.protection.outlook.com [40.107.14.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF4D1A3; Thu, 28 Sep 2023 01:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OK3jRGoYb7nDSMzVelo77cgnfDD1ie2Cz4bhiZkMKUODoBYdKALgi5m4moPDek/wKaeKiZ6pDIh0xYVMledXiLiNl+2zHz+tQpy519ECYDdiuGGMeCBl7msaxhL3Mek3FZX8EMZXzmxKQQmYD2ry8pb9ILTO9xJdzlij/y3a16Dnk5IbvSWAU5X61ds5lMPfYq631nPVAfLRxnFnO5LWZ8eP0e+iMD/Jqabisy438bXj+12KY7leOMSkt/1RgR8gbipAiAprCR13ogVb1T+H76k54/YViLdvszHLIgVOnaKjX8XMztpP6wI0nF+OMNDEnTcU8Zk4Xd4GFRnI0Ap6OQ== 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=kqJOThX61V7em4Tl2L3PoPhdRutUFGXNAxIZvKCj+NU=; b=a6+9Usdvyz7MBpcvLP8XHNsEeDy3wDxOLgSSZ9bpMWsMONErO/jwe/C1v1DBWb0fzFQeLH7jLeAgiamI5xrDIDjrG/6n4BuBSCSjzDiGl2HOso2mf5EMRu5FawrkRtXi2l26NYiJXPFX4eG8+SFYOxKkzWRVx98jI34NQ4C9CJ4pDEU6fUro4xminQoxi9gDkEA+FcgWKL1+IM+1VgSA52aYiohLrgAsSDAi+yJtOAu7/D7FcyPhqItUA+RoXqb7+K3rJ40aOOFQ+mMD8bfLBt8f+rGQ5lClj990rAZvnaOoxWMF5toCwQxZpdbrZ5sA6VDq4RRAb1m2FpsqDuOfvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kqJOThX61V7em4Tl2L3PoPhdRutUFGXNAxIZvKCj+NU=; b=dOqS4s1BxRUj8gfeSpawkIB4oqe8a5q0VVfZwGTiFnPSwbIZIpSKvLz2mi1rruMonr9eA8rLlr+vFlMxWif5Y/wNhAlfrAAI7QfQZtQgq3j4ojYKgmiqLVYfEaXzcopNh6W1bXLnBvkNjOckW8Au6lg1WMxEue6kv0mE6ftRWaE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) by AS8PR04MB8514.eurprd04.prod.outlook.com (2603:10a6:20b:341::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Thu, 28 Sep 2023 08:46:18 +0000 Received: from AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::e109:7026:7d76:5617]) by AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::e109:7026:7d76:5617%7]) with mapi id 15.20.6813.027; Thu, 28 Sep 2023 08:46:18 +0000 From: "Radu Pirea (NXP OSS)" To: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com, hkelam@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, borisp@nvidia.com, saeedm@nvidia.com, leon@kernel.org, sd@queasysnail.net, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, richardcochran@gmail.com, sebastian.tobuschat@oss.nxp.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, "Radu Pirea (NXP OSS)" Subject: [PATCH net-next v6 01/10] net: macsec: move sci_to_cpu to macsec header Date: Thu, 28 Sep 2023 11:44:21 +0300 Message-Id: <20230928084430.1882670-2-radu-nicolae.pirea@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230928084430.1882670-1-radu-nicolae.pirea@oss.nxp.com> References: <20230928084430.1882670-1-radu-nicolae.pirea@oss.nxp.com> X-ClientProxiedBy: VI1P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::31) To AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8954:EE_|AS8PR04MB8514:EE_ X-MS-Office365-Filtering-Correlation-Id: 837957ae-4a9e-484e-3db6-08dbbfff5da5 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: elePA4PQlGikRBRK3I6mcXehtXLpseMza2FEbNfWIifVSTGot7Bkve+M93kG2l5ZLCBLLJA7ud4gsL5z+nynPcvHUq7akgHhWGy9wz+v1nrH2LMPNxt9fHXOVNoxHNJRvKcLpYdqEKq11zg5hwNr9pH6zADRWlfIOKvv7yAuJxh+DaS+5aAF65xnrmjH2bbg879BpnHEm47P02gJUiUkxzh0M4gLpcTTnzcregn7FCIcm77ULIEe7KcgprhPeqoTXctvjQkvSsFJxrMpAc2utfeEWmcQuop9X6ujYA1xACogOL6w6qENR8wL4AGEUEpxlamm48gXeoF2vWO46Us79NiAZQS6CFS2f2B0xT+qINZNTHJg+ml4fnTMzeRttzRO5S+3HKNc6VNh95F4kL/tii34kEVJELkXiUW2A6Bv/ej//DvgCj5mncJGeiv3UeOxc1QMPpm9tpl9jL7/tAz2uMwVYjStweguHK2ZUnHDhPfasykIql4o8HV/YJ43FayLlSFxqfhEk9h5Q8rHXIhR/1yCw4hrjWmBEL5YmX2iwfOe3YAhvztNJVoO9W7w0YYFztu+ndju9aYE3upGm5KdYQIPEYaIMvyrofCH3hQ4ikZPr0mFxV56gdGCNVdBhp+IKZAzTF9wZQFCEgUsikqf2g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8954.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(396003)(346002)(376002)(39860400002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(6506007)(26005)(66476007)(66556008)(6666004)(86362001)(52116002)(1076003)(6512007)(6486002)(478600001)(2906002)(38350700002)(38100700002)(83380400001)(7416002)(316002)(8936002)(5660300002)(4326008)(2616005)(66946007)(8676002)(921005)(6636002)(41300700001);DIR:O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2DWoAxj5U6k6HpssU/+5u4+JxvRNYMcJUR1HIWDPgDyRr2beHQeitaczdpD3g9konF2Yiy6/3zFeU+1nLiV/uyObAChxIZp6VQl1OsedcJHIK2CdiZYWJao2dkIVTYdbr20qFH2ajyYptLo6EEDrHJ49W8wtykF2Sx1ErdDFXE+L0HP0Prh/rnA4w33Wqn5M+XhqvZnv315xhsP68/MtjsE0Z14pRLMXoU9qucQAZaTnpfpT5OJJKUOivq85pTTd3ilpI8mCeuhpuUOKZFu/qGavAA9hes2NzZlQlJhpL2MehGbmIOksuO17U42Q5qkJy8xBIcTP1z8Y6PepE8Bpv/LhJdTlDSgsvxVui6xJpwVee6+w17T1pVGC8c18JNHjYR8s7zUAoALV9++F2xueg8VtUwOgYq710z8aiQFoKHGKJRCmOqrlYWl7l9I77I011k9xZzyxlkUfUvQPEP3OIXMPLaYV5hNXCEctMV6ar/vxcT52pHK4vcm+GvsTfgbRcfHpPwjhFLmoRvQ2IAjawDH+2ST7hPwYCobv5hiz+0HhAn1QOMIErkAq83TYXFeouU0FnENWMWFQsyD1MpFqmRiYxsxuXNG957eg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 837957ae-4a9e-484e-3db6-08dbbfff5da5 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8954.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 08:46:11.3569 (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: Jeo6J5C/HRW2MUV5pZoTBfi0uy7cItbSVHkLZom1cm5XCoULFoz9LIE6zWucqXR0TF4ThXPDAMxXFNc9+XqCVnNGLrENv89MrI0a5mWfrMI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8514 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Move sci_to_cpu to the MACsec header to use it in drivers. Signed-off-by: Radu Pirea (NXP OSS) --- Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - patch added in v3 drivers/net/netdevsim/macsec.c | 5 ----- include/net/macsec.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/netdevsim/macsec.c b/drivers/net/netdevsim/macsec.c index 0d5f50430dd3..aa007b1e4b78 100644 --- a/drivers/net/netdevsim/macsec.c +++ b/drivers/net/netdevsim/macsec.c @@ -3,11 +3,6 @@ #include #include "netdevsim.h" -static inline u64 sci_to_cpu(sci_t sci) -{ - return be64_to_cpu((__force __be64)sci); -} - static int nsim_macsec_find_secy(struct netdevsim *ns, sci_t sci) { int i; diff --git a/include/net/macsec.h b/include/net/macsec.h index 75a6f4863c83..75216efe4818 100644 --- a/include/net/macsec.h +++ b/include/net/macsec.h @@ -324,4 +324,9 @@ static inline void *macsec_netdev_priv(const struct net_device *dev) return netdev_priv(dev); } +static inline u64 sci_to_cpu(sci_t sci) +{ + return be64_to_cpu((__force __be64)sci); +} + #endif /* _NET_MACSEC_H_ */