From patchwork Sat Feb 4 13:52:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13128695 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 CE43EC636CC for ; Sat, 4 Feb 2023 13:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233863AbjBDNxj (ORCPT ); Sat, 4 Feb 2023 08:53:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233777AbjBDNxe (ORCPT ); Sat, 4 Feb 2023 08:53:34 -0500 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2077.outbound.protection.outlook.com [40.107.20.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3162C1A4BE for ; Sat, 4 Feb 2023 05:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eowhFb3sRCJ7nYgaAgOsg+1PzufpaMEfMvL3qh9vaF6q4em3ddMUGhTkICNRAiKBjROjZmV+F1EUYu/FhIxloOnZleT96NQz1eCIGXWXStf3OqdKSSVq7XHvmOxMFNnD50C5PTCtGmn0agXaZtssujI81IUYa6aZrdB95axF3Hrq3F2nmLjliysRcNsx0YCVBekVjMlPoEnUa6mGRiTKCtOZlUHGzfpPT8HRc8bgZhLmk9nrv/zp1U/ou0svMcemBGR+j8xaToiHPS+/Tq0OrYluBw3HzT6sPDchYyRbKIhrDdCSnIw+hPqaSKav8SRj8tz91udHcc0yscmcigrkmA== 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=1K/OcOJj0xS+OemUsGdbff6O7KyYYXNi2+x1OFms8Kc=; b=I2NUAm8lOQCBD4pLdND89tvhJ1LIa0pAvnHaxSQMlZGsjq3NSF4qWTRRjlmbxeW/QOLwGkfgSF8PJzrs+S13xyoueKxQbQTCVcQmrn3FKhk15YTUuBPBz8AZL77e07mAu+g6tnd4szOKlbjwaMxJTEFcZ3xDOQf4uEf6uaooNVc4z3i40YT79JS6vgNO/MJh3GbZIrwkNk81sdJwHh0bA0gi0eq1lv4OigGdfImNbFfCA0bfthMGSA9stytrLO42YRQiO/kQ0z/Ydi4bQhUhvdLiDBZ8G5bxo7/L2oG7MHcmkOnG/Uy6GpvYuWxRq6YOXpbK0ugJHYLRB3L5TyXHLg== 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=1K/OcOJj0xS+OemUsGdbff6O7KyYYXNi2+x1OFms8Kc=; b=pxBAfuEZNLgyYKqPREaispQXSBvJdtxbZvimRe5e9NSXL4a1dk0Q+36u5JLoKtccntypW5tQymnz8WAHtj1j1L6GH7kuVjsHw6Qz8eaLZ0iQ2ETvCpvYLiSSE7G/KOL1PGlk8BHQBpW8Ehgr5lYRTEiU+Fn45XSZACd+FVqESwI= 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 PAXPR04MB8783.eurprd04.prod.outlook.com (2603:10a6:102:20e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.32; Sat, 4 Feb 2023 13:53:29 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%7]) with mapi id 15.20.6064.032; Sat, 4 Feb 2023 13:53:29 +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 v6 net-next 03/13] net/sched: move struct tc_mqprio_qopt_offload from pkt_cls.h to pkt_sched.h Date: Sat, 4 Feb 2023 15:52:57 +0200 Message-Id: <20230204135307.1036988-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230204135307.1036988-1-vladimir.oltean@nxp.com> References: <20230204135307.1036988-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0141.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7c::13) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PAXPR04MB8783:EE_ X-MS-Office365-Filtering-Correlation-Id: 0af186ef-21da-4435-c1bf-08db06b73237 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ud67RPKI8rk6WBAbzh8xiYMQidGmLQiKL4jR9VJAyEgdfwgpy8K8xBvuS0tY1QTB7MvaKNL+2O+VMJefVoB19HlFEKiQzNPLChS24lxwWFiu62Q/LHHijBZs5cpN0MH5GxLUSpQtvqlveJxJHGJ5mkn9IYAQ24pyjFVjsaV6DXWObeCsSbGAhpeckE3TqSuMBSyaXpX4Yo3ifjuWiy3bqJZqhGZ+cabw/eEtwafC0ZOFPMAKDFqWZAlF5VbvTuD30cOYOvRCVxN2MS0zto3sKQRT0CvReWXu8ZHn2rY4fweVyVdiRQq//RIHwZWtl198Uf8SRda1G0Ch49Gy2CI0jhoxn9x5pQyx0Na7665NUd6xQMTxRjrssdwCtWd+5ICqWtXz0llv7teL5ywkUkWDEcTodKWcrSMlQcw0ioZSxaQo/5/fGQ9uwmy4VO4nXyaTWqKpd5CZ6myLTUEaGQbokM64dBuKQyFm13JIJkqYnhLyShkmHO8vtWw6VVDgI4+3MMTL5BRchblVg4CbX87IAb9tPlX2RoRsXM0fy5nOgg8upp9SGfdN+KG/WFf6xAk8KlttfO4Dy/0UImXsbpqxuXZNUuFsYAVzV8/pbnne5njA3DVmaHkMgDKqn20xhB586xN5ivM+r09zaOxHFBcCoyS22oCNbiVuHEtaSn7bECVyndMVjr2SdNKD0aIqemyI 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)(346002)(39860400002)(136003)(396003)(376002)(366004)(451199018)(478600001)(6486002)(2906002)(52116002)(26005)(6512007)(186003)(66476007)(66946007)(6666004)(6506007)(1076003)(41300700001)(8676002)(8936002)(6916009)(66556008)(4326008)(44832011)(7416002)(316002)(5660300002)(54906003)(38100700002)(38350700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-Ch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R/VlopMaPgoocZDLPCXNPty5pzwtbbiVHj+2PVUZJcfr6md7ZJl0YvpZJuEzfXZg66os+3w3nX5aUlFZl7a1jt4Anh+Ll03cfSYB+zfyGXEfHHKgTiAM6C4Au3sorveo55cjvls7qTzkHt6g+rg7wp/K3RAMwy31iSH8SifvPmj/QXIs8svbWlNBi8ZXmvD/6KXtMx08+hQSvk4f0pLZOl1C4Xkk5TQtx7E6CGCAv0C/XaVaLQbrb7XLwQ/MuF9/a/2U5HnMiePrS5rXEx/7qrgVn7jpMn7jXxQ9JFtl44VRLY2z11GD69EnZiHJVtCqh16w9V2Z0nknWvMZ5nE7+wCRFx/UvlRFktqLF56MxIl6ai0+v6CyoqbEApoFdhPZ8r00i5j14XFpJlgHRX6CH/tCluJoI5xEHRlmCWX3P3ghtA/i+0nPCA0PI+vlQSgFKZD3HsUr3mesjL2rHcNxqLSVB3CFW536CY9hwrMoEvWYg82T/87nGicpHW85ISGXrSNY+caI83fucJ+D3UaODiW8ABONtMx9okXvyE6KPz3FE5pWwp7M5YPcQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0af186ef-21da-4435-c1bf-08db06b73237 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2023 13:53:29.7009 (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: wyWRsmoukipMDoUv0JjD6COqlaGdB+t+itO8wcmMc3u99hxHi/g7MuB0TU4609YBoIXtLsFExdW6SjUzl4m4iA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8783 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->v6: 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 3d26ff4122e0..d684f2a8626d 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; };