From patchwork Thu Feb 2 00:36:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13125121 X-Patchwork-Delegate: kuba@kernel.org 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 97326C636CD for ; Thu, 2 Feb 2023 00:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbjBBAhR (ORCPT ); Wed, 1 Feb 2023 19:37:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbjBBAg7 (ORCPT ); Wed, 1 Feb 2023 19:36:59 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2071.outbound.protection.outlook.com [40.107.22.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2345728FB for ; Wed, 1 Feb 2023 16:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UssMj6n0jYvs2aBa/Xtacvya53Uax0ZzwoZb6tvJJ8bm0pX877BoE+fUB85VsxQVtlv8+zMshxR2bmKrfcrO9QnlPkd+VQT9+Qve8rHX4OH7SmyjduV7wpcz7jD8L0HlIQvGbNJVxTSARIlTbmAo79OxbtotPC4rckI1JEh5B2/dGNExLnWcJywDGPi1qhjYknWIOMGNPevXwyko+mRrsKoJGNrfE9bSMyEY/6i3rz7aw2+QGC7c0KHWL+R7jXPKojjGGzK1JmVxTh8JqFzFye7GI03Zw/cdFhUAqC2u+gM3CKqE6lPG9gBgNvka58OJ7FBe6Yk26RaX98R7H5ze6Q== 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=jiVDKvg8Ribmwtk80xku02iHmEjFPvv0A1ckS7YcwCs=; b=AmxtlUgM5q2+fIEv7nxPnJEH4lHiXx7dfrAkiYq/UIB3RtUVdr1xXhdjVd5DcPmZ7hEL9vUuf4g89Wwhr14HY6BD6A2Uph0j8z0MWO81ov2WTjrrhrgVk83u8JzT8MchxCck7He9dqGMBVd4p6yRY80nRl/lWFUPmruMLSmOXyEgzUZMEs1gwIkYuPBJmyBiV+JCblNueDFRY9pmhNb2TC8oeyxT1ukLS6GjEVSi125t8T4652X+ZVPf0j5D/wgWFygIh66EqqVPRtVol4yqOFHaJKFzV1J8eL2829vfq/wGr5cYcHZcHe8tuOo6R4/AwbYSZxgtc/vfDiWf4EErtQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jiVDKvg8Ribmwtk80xku02iHmEjFPvv0A1ckS7YcwCs=; b=dedH4IqbksjrdL2SUygg2LkCCE9yQHbHIvo6IAOa0hE28Pkr9qaF+vPOLevz5MpgnBgEWksStAnNrAt5NTr+B1yVJMuDHmWwEv7kmg9x/vYstPHgT4ZLSfXygWQKxeCuCuWPckQ0Jsu3cG3naap6EPb1qBHRl2A9Jv1EK+b7xdQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by DU2PR04MB8789.eurprd04.prod.outlook.com (2603:10a6:10:2e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Thu, 2 Feb 2023 00:36:54 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%3]) with mapi id 15.20.6043.038; Thu, 2 Feb 2023 00:36:54 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Vinicius Costa Gomes , Kurt Kanzenbach , Jacob Keller , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Simon Horman , Igor Russkikh , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Thomas Petazzoni , Saeed Mahameed , Leon Romanovsky , Horatiu Vultur , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com Subject: [PATCH v5 net-next 07/17] net/sched: move struct tc_mqprio_qopt_offload from pkt_cls.h to pkt_sched.h Date: Thu, 2 Feb 2023 02:36:11 +0200 Message-Id: <20230202003621.2679603-8-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202003621.2679603-1-vladimir.oltean@nxp.com> References: <20230202003621.2679603-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0032.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:22::20) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|DU2PR04MB8789:EE_ X-MS-Office365-Filtering-Correlation-Id: a0a9ca9f-5500-49ca-f7a9-08db04b594e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cfM1mKLGvpFOsJ0WaZeDzW3hFsxm8RaWeijEmjvJ4U+zVY1IDTUVAlP4mH6gIip5LFoUT06zKeyrWlGM4B36SiIziBrcGvs9Zw8kZn6W0K3QqZh5tl5SDlgp6Fo481kFGsMtsqq7om4lw73x9G8yvMk+PO7qBEPg1fqa9DHvq87rZujr9EnfxVwuW88tqRdki9Xi4dpvY9LQCba+spbz3M+j73upCp8c1BqyfSWDr9V378XEyCtOov9d5gIjnhJuH5elSFFVhFPz1xkaL39IULWP95eIgcXXLFXDLE8d1cY6ki/5QtN/G06SF5320TS/owuldAC6NhsturUJYi/y2joN3bREhuVEmARFN406vZDfz+JukT/lwjOGUJZMJGpO/pTvjfkHpNca1L8xOU7O6nsOrdXkqV4ubuAKxX6u2GOSz6k1fH4cnIrQ7l2G2fFUR7OHyKdzLpqYFWqr5Wz/U7dxI82dd+DYK6L8/XCK64T+2MASuA3S5nj5c0CGfdHq9cHEC4CmLLiowvXfUjgzST2lY6szlGEtZz4xn3A8cybCtFaz1iVJK2fDJX9BSokYMzkQWglwB1RqccipJnZx1qFpuPFbF4IdzMm2hJCUSq+TZ4pJUEI3VR+iHYBgVjq5aD+6jl4eGnEtbnUtVZHwiztX4pg46t00oO8LagDc9Xaj5R1mIq64c2/8ndZXsxLw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(376002)(136003)(366004)(396003)(39860400002)(346002)(451199018)(36756003)(2616005)(7416002)(6666004)(52116002)(478600001)(2906002)(6486002)(38350700002)(86362001)(38100700002)(8936002)(54906003)(1076003)(6506007)(66556008)(8676002)(5660300002)(316002)(6916009)(41300700001)(44832011)(66476007)(66946007)(4326008)(6512007)(26005)(83380400001)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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9wPqM/Djtr7U1Dm5GYZtGynmU4p3MBxF9uAil6TZrSriRdpIDcUljg2rSv8BZUKxH2+nmHVGnR5zC+MhRlxxHBR2GLCgEzCpc1gE0o51nGYRAytZg55CYiYZnc5JbFP5a0lEIlvM+SaPJAk03li2zT98iZfU0X/H6NYLkWWEYjVT3wOwfUPD6gPju+7oCtjE3eZzjf7yarv4Vp/UJzO+1DgITtBiPDDK/NWDtbV0nNQdMz+DPMnYWVYqSRJ6elUjTtU+HoEsMbSQyMCtdPrAtNJTMQIs4Sjcb9XUfCGq9H7Vv0j02pBf86OCJOYihdR8sZGD3HngaQy72s/jOgdBZTxzoYOHs6IlG04H/q9zKWGQlnlHd6elY8A/ZWHCpoP2mKrDY8CIkCoAB3FV3vBAp4FJXI/j4M/a3fJU2qoLFvvj5NNxhXqz9/MrM3usef6pROOdD6goazYJ1JYOXO5txM9utgmx5eFuwL4aQR/0Zejjm2Jl7YwpYe5SpE5mQsXaE3ZFk6oBeIu0Oaba9u7Peg6HEUnqDyC+A9jI9YrekCj/luy30Kt19x8kcctWBzQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0a9ca9f-5500-49ca-f7a9-08db04b594e9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2023 00:36:53.9197 (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: fZraIYmpIkGqwvt6MsgFUGipXZxHDpnxt+5SKLKkytdnsF5n7zHNYpIesdCErZOA8eruv3j0sBtSwh9xxALI2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8789 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since mqprio is a scheduler and not a classifier, move its offload structure to pkt_sched.h, where struct tc_taprio_qopt_offload also lies. Also update some header inclusions in drivers that access this structure, to the best of my abilities. Cc: Igor Russkikh Cc: Yisen Zhuang Cc: Salil Mehta Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: Thomas Petazzoni Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Horatiu Vultur Cc: Lars Povlsen Cc: Steen Hegelund Cc: Daniel Machon Cc: UNGLinuxDriver@microchip.com Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman --- v4->v5: none v3->v4: shouldn't have removed "#include " from ti cpsw v2->v3: none v1->v2: - update some header inclusions in drivers - fix typo (said "taprio" instead of "mqprio") drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 + drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + drivers/net/ethernet/microchip/lan966x/lan966x_tc.c | 1 + drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 1 + drivers/net/ethernet/ti/cpsw_priv.c | 1 + include/net/pkt_cls.h | 10 ---------- include/net/pkt_sched.h | 10 ++++++++++ 14 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c index 77609dc0a08d..0b2a52199914 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c @@ -21,6 +21,7 @@ #include #include #include +#include #include MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h index be96f1dc0372..d4a862a9fd7d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h @@ -4,7 +4,7 @@ #ifndef __CXGB4_TC_MQPRIO_H__ #define __CXGB4_TC_MQPRIO_H__ -#include +#include #define CXGB4_EOSW_TXQ_DEFAULT_DESC_NUM 128 diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 17137de9338c..40f4306449eb 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -32,6 +32,7 @@ #include #include #include +#include #define HNAE3_MOD_VERSION "1.0" diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index b4c4fb873568..25be7f8ac7cd 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 60e351665c70..38c341b9f368 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h index 23bc000e77b8..232bc61d9eee 100644 --- a/drivers/net/ethernet/intel/iavf/iavf.h +++ b/drivers/net/ethernet/intel/iavf/iavf.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h index ae93ae488bc2..ef6b91abce70 100644 --- a/drivers/net/ethernet/intel/ice/ice.h +++ b/drivers/net/ethernet/intel/ice/ice.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index f8925cac61e4..a48588c80317 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include /* Registers */ diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 0e87432ec6f1..7de21a1ef009 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "eswitch.h" #include "en.h" diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc.c index 80625ba0b354..cf0cc7562d04 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_tc.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_tc.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include "lan966x_main.h" diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c index 205246b5af82..e80f3166db7d 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c @@ -5,6 +5,7 @@ */ #include +#include #include "sparx5_tc.h" #include "sparx5_main.h" diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c index 758295c898ac..e966dd47e2db 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.c +++ b/drivers/net/ethernet/ti/cpsw_priv.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "cpsw.h" #include "cpts.h" diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 4cabb32a2ad9..cd410a87517b 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -788,16 +788,6 @@ struct tc_cls_bpf_offload { bool exts_integrated; }; -struct tc_mqprio_qopt_offload { - /* struct tc_mqprio_qopt must always be the first element */ - struct tc_mqprio_qopt qopt; - u16 mode; - u16 shaper; - u32 flags; - u64 min_rate[TC_QOPT_MAX_QUEUE]; - u64 max_rate[TC_QOPT_MAX_QUEUE]; -}; - /* This structure holds cookie structure that is passed from user * to the kernel for actions and classifiers */ diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 38207873eda6..6c5e64e0a0bb 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -160,6 +160,16 @@ struct tc_etf_qopt_offload { s32 queue; }; +struct tc_mqprio_qopt_offload { + /* struct tc_mqprio_qopt must always be the first element */ + struct tc_mqprio_qopt qopt; + u16 mode; + u16 shaper; + u32 flags; + u64 min_rate[TC_QOPT_MAX_QUEUE]; + u64 max_rate[TC_QOPT_MAX_QUEUE]; +}; + struct tc_taprio_caps { bool supports_queue_max_sdu:1; };