Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1295303rdb; Wed, 20 Sep 2023 05:32:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjznkkAuru4rax9TW6NASIhieo6b7ycGMETPoxFdQZohObgcRd/rPZB6zcrNZ0St3YKlHK X-Received: by 2002:a05:6871:1cc:b0:1d4:d016:7cee with SMTP id q12-20020a05687101cc00b001d4d0167ceemr2265090oad.31.1695213126094; Wed, 20 Sep 2023 05:32:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695213126; cv=pass; d=google.com; s=arc-20160816; b=Zmc1xdv2L3k8TM8H2sNq1mPK14qY9lQLF8ZLMgl+llmgkozUoiFxWHWUIOJD6cwiRM wvzqAJJZXqkfSMLu5cZ9ko7lGfBkujU2CssXJcIrs9LpiEKBzOj8Iv/AgLsJDKF60AUZ RmFsqJ294OQyrSEkQsloRqSrvUgkrm/BWcHss139ldDLTiJZiVENQ6KJudc+TpvNo+8K ER2raTN8Ktgo3XbNqKg6ieTr2EVD7oM5ANmz5IgglP8eRRS6YdXBDIYSMyZCz7znNnXJ LPRJdcAcP4GgAngH0fs23gjXbsGB8U3EG0Wfv36PN32pRzuIxV0j7iy2xYvcEkJppucb 84tQ== 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=zhxkpvnpI7gkLbSIp8OD60+67rs9p1MZtQ9BCPBLsr4=; fh=NHRRo6huwoujaubKF99pfZhRLAgifT70TQY5FYo2edY=; b=LoVEcggNuhl+Xc+KZUF58FYX65Tba6Wy/4NknFiL6QxolVTKCtyDwVSVtNPxG1hzVh xDH0Y+3AAgSYgmRmWv/IlfFG7suWBzTzumHYz3Zyt7KFpMBUpQxy+IWPqDjVUSvmG8bO 0t/u4KoHbBr2/puTnlHCSsHC0c2TXJjjFHozFvhNPIbLLLzD7y+ct85Opeo8O1HbBxyl dMBqUWMSsXH/gGAbO0lJ+sfXW3RwvDma1AuwH2dpbITiHEqsMG6Y+EMR4zUvKxM1mP+b 1uOUgB8RiJ/sQcYsxdy+Oe9rYdJeWEcbsVvaGGjVeGwqg4xe+SvIzgRJz56qL08oYhcd amag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=KVO5qqzo; 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.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d15-20020a056a0024cf00b0068c0300a3f7si11837239pfv.279.2023.09.20.05.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 05:32:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=KVO5qqzo; 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.33 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 lipwig.vger.email (Postfix) with ESMTP id 6CFE9829534B; Wed, 20 Sep 2023 02:23:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234022AbjITJXP (ORCPT + 99 others); Wed, 20 Sep 2023 05:23:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233914AbjITJXI (ORCPT ); Wed, 20 Sep 2023 05:23:08 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2060.outbound.protection.outlook.com [40.107.105.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68B4AB; Wed, 20 Sep 2023 02:23:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LbGzVS7i8uUx0yQA/zPP8Me6bmtXVJVgLcGEaODa3ecppY33OsADKEzZT/S+A0XIi1loaxJzQDMRaeJUHo5WetS1+cxgJu1dqH+wdQzQPjID3DH+CJnadtBACF1P5Gt7GvAZGOazGv1xphtxvoYVhZmWkXoWsx3eRvzuLQTfwXGKejAJOdwZzL7i1+1xgrqCMBG2qXtFNcKEdCRCJcqQwwFTqWuV1MtYWkBNk+QamV/y+1IlakrH7gBQQcEnxT8d25/9vjiYy0Gbvw1F6FfXR77zRgpQBlCIYWNjp8rHTUahHerbrlGsr51bG0Wu1sgcccVgXG7c6zn5ZqFPYTPWzQ== 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=zhxkpvnpI7gkLbSIp8OD60+67rs9p1MZtQ9BCPBLsr4=; b=As8DryXszdcodpOaqPzgi2Nd19cUgr1Ut39aaFZu0ZlNlfkOi54SwnUTC2O/L2R5RWuUDAj4KH8+iN1aPKqUrVqPfKCp/TaRIkHeX/a1VDKO/gRg33B82GnPLrz6AeDdzAuIuS7AiuoDbv9gbTA/oYdjrMIuZfb/f/Np+uDfM/qooATfoB1YkCLvr3GaTajJLCG0SUNqduAgp+H74xrB7SqXKFrYrKavQoiyo64iUXZwYo20LxqtepunVSaqBeLIwaPvoC0BSIMhC3LeB00eClk91ax6dOLtmlUsnRKjBXhqh/O1eW2uZLcPZke3AuA4NQkBmBeaSceI6F7Nzhcmgw== 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=zhxkpvnpI7gkLbSIp8OD60+67rs9p1MZtQ9BCPBLsr4=; b=KVO5qqzoc7HTViOpRIze8QLxz7LopjYXVWHw2MfC60CYFPSjlVBrtx+Z8fVpOZgy2zjroXkqrTg5D1BDgNTZhXXFbmLNV6iykJbxAtF2cPCVrvXZ+/u00fn8qT5UTJCUnRwDF41d24cnhbU9Kd5tuR02IpDiYqhFlhF3HiXnm24= 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 VE1PR04MB7407.eurprd04.prod.outlook.com (2603:10a6:800:1ab::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.19; Wed, 20 Sep 2023 09:22:58 +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.6792.026; Wed, 20 Sep 2023 09:22:58 +0000 From: "Radu Pirea (NXP OSS)" To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, sd@queasysnail.net, sebastian.tobuschat@oss.nxp.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Radu Pirea (NXP OSS)" Subject: [PATCH net-next v5 1/7] net: macsec: move sci_to_cpu to macsec header Date: Wed, 20 Sep 2023 12:22:31 +0300 Message-Id: <20230920092237.121033-2-radu-nicolae.pirea@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920092237.121033-1-radu-nicolae.pirea@oss.nxp.com> References: <20230920092237.121033-1-radu-nicolae.pirea@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM9P193CA0019.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::24) 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_|VE1PR04MB7407:EE_ X-MS-Office365-Filtering-Correlation-Id: de8d4ba0-0507-48e2-6d8a-08dbb9bb2ddf 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: 9/7YpCgSoS8pOioLXdAdJqKRyfvnhZfAYWjlKD8az75zbamQTuwJseLH8k9RcHmJfjbXK++TKAgz1uwDy09VC9xoLjTk0AXwSztqw40tkGXLjF/g0kRTFrXtOQNo2LGpcqsLKIjDb7daxCv5Kd+pWh808xqy+jC7tUnrYgaSpEj97S90UjegvMhXEpJMsVzz+RagpiCaSphKxviBo0rf5x4qSJDgwD6879VTS9cLEP+fetreQaeJGykOhV6dDO4QJ8RTI12a/SW5hf8XrTgPxom64a7t628DZiQMJmt++PEDgpGL4i9Z8eWaegm5DyI3QNaRXw3urwPfARbmvAzOKc3zZ6FzuP6LbgrHiCKxJzFEjJLFLP34lby1q0WfFuT1nOwFs/qB7JmjGAiqbEhTqbVIlBAofq3j8MuX2AiFJIkHjuqvsZ0XcH9pWYrBfLT1RnCzpG0b/YWIX5lP2gAA4GLI2tRaPfBN/aPc1A4K04LSTOFwIk7MiZR/vqwkegv1xEFDn1Vu0yoDDz6GClwd474cYStzZjJwdHd0b+23RzI0LhH7H2n7I5RVTZNPNnsPWvYO9GjwLK/B4zWDa842MuOUhL0o7aUO0zTdhfa13S/G8yN5D8Kmr0ubd1K4By+KLofjY5YMfFwDWfhVuWoZlA== 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)(366004)(396003)(39860400002)(346002)(136003)(376002)(1800799009)(186009)(451199024)(6666004)(6512007)(6506007)(6486002)(52116002)(478600001)(8936002)(8676002)(83380400001)(66946007)(66556008)(66476007)(6636002)(316002)(5660300002)(2616005)(38350700002)(86362001)(38100700002)(4326008)(2906002)(7416002)(26005)(1076003)(41300700001)(921005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Qjt5k1TNrXW0sVO+yIMT9rdzjgiulzf/VNqFUx5iTAzzC+X1OhyfA2Tjo1QG?= =?us-ascii?Q?zrSkbDmwB+WqIcgGVavYY9qLHKPFKTkiDTmHNUwUuGxgTVtVdpw+uvxU3I20?= =?us-ascii?Q?3eM+6RFqf3Ig0xTLLqDm0yjSB3Qr/noIxGCss/vFYSa1lE3Lshh40g+NxtTm?= =?us-ascii?Q?+EIScxueGffXFbYau3UObII/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iaSVx?= =?us-ascii?Q?RQhOyOuqY9H8inGTUlOHwBCNcFBY0AX7LXCqOfhwJcN3aluKRhRwog1Mpdo0?= =?us-ascii?Q?n5XznJdj5rEoVEwO51OYanOj+YB/CBKgJNWOpDuHv81SjpZJH1wf/MMdSZgh?= =?us-ascii?Q?Ps0YCrMECs7sms4YQKReBByfrP1PfMG3r/pLO7MOTpnx77X5kjB24fn47m0o?= =?us-ascii?Q?ovilDCfqAu7wIPfn+O6SQlvkewqTnNEnIWyC1FbzBJ+ZGjJsU2K83vbEIxDq?= =?us-ascii?Q?Vcyhl/l3a+5aLe1LVuKy6cQ7kB/baBX2TD0BzAKjjLh2jpPmmFUEkkg0Vuti?= =?us-ascii?Q?8lZt+FgFJLG+mcfPUw8HluRBBJFNH+uyC7JuPTtF9yIAvlJMUBfgjtiest0W?= =?us-ascii?Q?rqAoaWQcHEoN4G7ikZDgw205Azs+n5qPEe+Sny2NwZvOQSeIzbn0ta2TX7Kd?= =?us-ascii?Q?3RtNfV6vo+43t54WgHBinZeHreaaG9Jy23wS35ssA3bApArVAwXM44skQ39I?= =?us-ascii?Q?sldutZD4syv1NUwoAyidwkO4T4Z1BNA3FbsXjHsYVYLEp+/mCu4d22au5/pJ?= =?us-ascii?Q?/w=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: de8d4ba0-0507-48e2-6d8a-08dbb9bb2ddf X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8954.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 09:22:58.4177 (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: +x864j+NIcdZ3hC/maqlQJIkt3PBSCvab3lmPH2522WNu8G+Zf/QT4Mk95jrctNd1AsNXPav8rVeKyoy2DhHRRiw2UIZSiUpfMgPIK8pAeE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7407 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:23:19 -0700 (PDT) Move sci_to_cpu to the MACsec header to use it in drivers. Signed-off-by: Radu Pirea (NXP OSS) --- 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_ */ -- 2.34.1