Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1106239rda; Mon, 23 Oct 2023 02:44:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbDNJ7YJSORQOiFww6tD6wpXHGxhE0KY1boJPaqqRIJX6XOhDzG0+FMRiB4pFkQiAb4u1W X-Received: by 2002:a17:90a:9d85:b0:27d:839:52ae with SMTP id k5-20020a17090a9d8500b0027d083952aemr5842979pjp.32.1698054262123; Mon, 23 Oct 2023 02:44:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698054262; cv=pass; d=google.com; s=arc-20160816; b=RHfGcpXEDN+ADXyYq5MhbhTGgArP7fgbxdc6xs5O0RqHItnZhg3/C1BgezAkK35lYH 74oKnrdJDZZyF1AAwnw4UgxGyIAkDJspksQJX3A5ES57h3UnNWJPH1JWMqZOsp1ulqfv 4E861ZTKb0vi3I+mQ930cgioT/Ay3Wdclw3UY6DrDjlsAUU8sAZkiyR36PvEaP0deAB5 GWrK5QVXMhdAOeB76rN8mk70hGeJAhn8x7COdGXvjEihcQ5oFXNUzzKo4IeKtR+sSOgP JSdvY8uLJaH3J+t3iWPvnIwip3XL+k/XyleQ0t46YxYAk4ZwiCTRQsNelDLvnkKZeLlU KnNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RFD45cDyi+lBWwuZRkCDFsNSqaPmZHrof+J+MgWP3kI=; fh=s+N9zLYkhYW6x0tN5kM/nSX5iVt7LcJWvFt8Uz0wx+Y=; b=ZKxaP8O6GxLLy4NGxqjcoe6N1t0WyLnx8PJgnuZoIJM3aSfllapAS1OhSuJ1EwfyqW keB7FtJp1hUi8uqu5vPbmtpjcX9fVpTnFT7K12m1hogF/Quod875yRqB1oZMAW12AuVa Lr3R/ZuwskKcLfxJ/EkfxglTAyjOZQqtEVDyfOkDCJcM3gSieIW+Pe9bcs3OGNsJwjvy JaYLXzfef6bGJKvyWU1Dibx8s3dT8PtydRoNul9fifEMTkFIaLFbFwtDJcVzz1lzXjJm Q5idbHzGD8+qzQtiGrpNa6Mqr1R3bxASzp3vJBYCEfvULpy2oNV/7N3bzQpwYhW0sVAc H+5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Zg4kTayI; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id d8-20020a17090ab30800b00263860e1f4csi8284653pjr.16.2023.10.23.02.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Zg4kTayI; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 244E28045942; Mon, 23 Oct 2023 02:44:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbjJWJoR (ORCPT + 99 others); Mon, 23 Oct 2023 05:44:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233073AbjJWJnx (ORCPT ); Mon, 23 Oct 2023 05:43:53 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2040.outbound.protection.outlook.com [40.107.15.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA8610C6; Mon, 23 Oct 2023 02:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfuVR9HHR/ryDTGw79atrV6ojo/eVSu5wxkg2S8kDwlvBX2o9psunqW+WmDDv4eDAFuqq8UEQ136s/Y6whRuooU0qIce6tcLE25vL4PybK9bE4rj0LCNE1ry0aFtw189LCkDFP32CF5b5L9yH8enKZJvG3uwsvOddNe9nVPDQfUXmXrBgk8Al8fUwKH7juA4tA81EyFayQDFsPX3KSeL89fhXQM0ByEujwHJG30Iuyqrg4xmANRbH6yYUBVWu1InfV+3vvkrmc5c4nFWgVkJ1q0TrqrwcDOZZHL0rN+VZ+qUHPx8lQJ0D+dcDThpfbKtzK3Zsezcf48tYzgC+sASUQ== 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=RFD45cDyi+lBWwuZRkCDFsNSqaPmZHrof+J+MgWP3kI=; b=Z1Qa8eU7/UQzUL/dWOQ4eTNt4DQKGssOXNMy3o1ZMR6nmCD44mYw6rzcIA5ArSvbsslYnE13GXswnXpCtnAuWpvyMVGvJQtbNV+CQvN8thaCNIKlLAcxGcrTbagPR56Qj/RAoh5fceyCRHgtET6f6326CrrJrn1q36HPk5+Sm3fc4mrMBcb9tWw48572/mmd8HPrJS27xHHHeM5t7DyzBGGrUbWmWeptLNtPYI2UsXN+mn1KYfTkox2RF0q57hHAT7Csob2ZyVAwRGCdfcPt5a5EVezXEK5XnHhVJsHvixD5H94KmTIahcTwuXt5OCDSEQqXtbto8G2wsGDSvX43aw== 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=RFD45cDyi+lBWwuZRkCDFsNSqaPmZHrof+J+MgWP3kI=; b=Zg4kTayIETJTin+ot/YK1ApaUzRCXkcdfuGlBSYmfUDGD2xdqR7iu99k2holIvpWmKMmfcddy1torXL/CSwvmyMN68JoWQAq93inPlPDUgW4EXZW0kL94F5AtaXTEJ7zPoZi4jC29H+mbJlf8iwRYOThEqJszQA+sYOdPx5JSNE= 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 DB9PR04MB10011.eurprd04.prod.outlook.com (2603:10a6:10:4c4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.22; Mon, 23 Oct 2023 09:43:48 +0000 Received: from AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::b1fa:fd23:8cc2:f5ee]) by AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::b1fa:fd23:8cc2:f5ee%6]) with mapi id 15.20.6933.011; Mon, 23 Oct 2023 09:43:48 +0000 From: "Radu Pirea (NXP OSS)" To: sd@queasysnail.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, richardcochran@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, sebastian.tobuschat@oss.nxp.com, "Radu Pirea (NXP OSS)" Subject: [PATCH net-next v8 1/7] net: macsec: move sci_to_cpu to macsec header Date: Mon, 23 Oct 2023 12:43:21 +0300 Message-Id: <20231023094327.565297-2-radu-nicolae.pirea@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023094327.565297-1-radu-nicolae.pirea@oss.nxp.com> References: <20231023094327.565297-1-radu-nicolae.pirea@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR10CA0079.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::32) 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_|DB9PR04MB10011:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f174cad-4be1-4c81-3664-08dbd3ac8e8f 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: TAsl8vsudygDdyJvRpg1wfB2OlChvC1mHO/DLs6pxR4G0VBvLCe9JTbRTQnX92+NuoVhoDw1YergiJNRMulyY4FsQX+wesQQvPbqwszbPTT6d7Tg4mPfisaSPksVsmUJaCoKGqIkTXbgQH1yslqtKEB9vQPz3Zk0VjuyLiGp4+Lol5c4vGx4R3tiJ7cFQmNS/o7Gl+aL1vn+0U75Cxlu/lK/SXfgSyn61B3F5vss9qf71NKTwQqxitF5wZwvrbAP5fzCOlzoPGaZ/KzLfMt6DDpwNGmCMl1RAJOno4puH6cR1tuNTyA2MBHex+HOhNs8abyer70VVljOCMT1L8DM7cmnHCZVOKABjFdp44mQGx5flvD4rySxakGgz48M2is3dHP3tTDOE0gwaeg/43mpduoXliZYU9sPpiDN6t8Ax1R6Ddmlop098Kc84w+zewEO1Udmo+jHdoVxhuzJVksTuV4D3gdgRFd/S/UfZC2lfDmXiTrf8tJmtHRVmowlG5BEMbDhbDrHSMLsiR8ShJiAk6pygM8mlNhKUJb34b4e8heOMy+xuFda+2451HMxSgEWtkBOnhPu3SuJxNH5h6TQ/OgZw5JaRLizPqQK9X8AF95zRUBFYE0EZ8OWlbTadpKD 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)(39860400002)(346002)(136003)(396003)(376002)(366004)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(38350700005)(6512007)(1076003)(2616005)(52116002)(26005)(83380400001)(6506007)(8936002)(6666004)(6486002)(478600001)(41300700001)(38100700002)(5660300002)(86362001)(8676002)(4326008)(2906002)(66556008)(316002)(66476007)(7416002)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hJ9vjEln5M1BCPILu7J08ickjXlG+EEBTKQPxWykC0FeyjbGVnmDXHNWCsAA?= =?us-ascii?Q?kTqE61fCegIYeH6TlcrdyjBTpw2/T4A+VqUKHywwQ+VZUGmRz8wOU0QRZkvD?= =?us-ascii?Q?k5qtLQ1D2t2uIIPG9U6SiYFcvxLVe6v6igvHsfQlPrhp+ELi78vAFSYCv9Cy?= =?us-ascii?Q?eUbjpfXcYH3rrLZte3Y/aytkvK+cQ6QsmDk7Fu5gsQtJJhK3h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OWHsQMGZkhhmcG0NzEPCnhldCkCrYCEdSa6RofFleclaN?= =?us-ascii?Q?T+u6AotOd/gsYH4Xf3+29kBtLrRkmFI+wiHyZz3sBUQCCj/mWN1ATw1rfeTA?= =?us-ascii?Q?7i7PBTWsB9aqLn5hGObcBitODAkZJcR0e/kZ83L5tEP8szKV9cvICCHFmyik?= =?us-ascii?Q?SEw0xCfVImkXW/41qXxzWO7WRCeH86O5A4EanKT11f0Tt3xFnB+bwe3IkqOR?= =?us-ascii?Q?7A8DKkAMfNwKVrO+XhzJ/nnnRPQebH7prQPvxG/94WbCT9u5dZaKE8rhlIIv?= =?us-ascii?Q?NlL2H5cPTf04elIEVlHCU2SrFzf3V/uIGHipv5ToUAJSdqM2cLKb1S71IiHa?= =?us-ascii?Q?8O9t0rd52F3aRNUcX29jXky4kCm8/5PyWj1gPr8t5VWZufestqrWVyGPB26B?= =?us-ascii?Q?hYs8bgM9PLJ8RM873fbQmyqCOFdWKAQBDtINrLOoB2Q2WfAI5DU1yAfJeN1l?= =?us-ascii?Q?DoS845q2NFl6BQ5q1YkFVdqVcm5Kt3NkQRVRfG77XFJ8P5Q+yKMkKyohwkmB?= =?us-ascii?Q?lw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f174cad-4be1-4c81-3664-08dbd3ac8e8f X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8954.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 09:43:48.3987 (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: RAJzqyV2GzYn/GgrkdKCNATMijB+pzqgY4w+U2HdE6O7wfDVAKMb4wux5P3dj1jrsFC8KaJRnZiRXiBYw9/EhjqQcrigA4dALXBlRCgyczk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB10011 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 02:44:21 -0700 (PDT) Move sci_to_cpu to the MACsec header to use it in drivers. Signed-off-by: Radu Pirea (NXP OSS) --- Changes in v4-v8: - 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 ebf9bc54036a..a5665e9623f2 100644 --- a/include/net/macsec.h +++ b/include/net/macsec.h @@ -325,4 +325,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_ */ -- 2.34.1