Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1340257imw; Tue, 5 Jul 2022 07:50:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjoMC5UcvZMOKQnZ9f59mZLmtfaRfIV63dWhjtN2Y+n/Zq/9JYZEaVVEQ+fpoLGYHyslUO X-Received: by 2002:a17:906:5a67:b0:72a:f293:5b3e with SMTP id my39-20020a1709065a6700b0072af2935b3emr33044ejc.290.1657032646638; Tue, 05 Jul 2022 07:50:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657032646; cv=pass; d=google.com; s=arc-20160816; b=HL4eHuBXvfMle7CLsdz4ECASnP6guvxapTPmiaxOi5Vw39LHXnlbNwx8RqvVFo3VaD bXpWmseOE6N7fvb92806qjTNKH0wVq0IainnmtsY2RdNYytolCXenjfZcYGONXDCJk5Y 7iaG97ENllGj+NlyAtcjuyviDPHJyQehnYJ8b++5NQWG/E3dOKoY09PVKurP3cYNJ/E5 UD0GhwIgf6I8kULIy86id3wsrhv6qGSA+O8trdfbAyt9bXfgQ15bPOELoxNzgPO6ZtKL H0Ne6a4IG6/vL2AeB2uEyYGWcI2QMfQ8Gj1gm//x4o8UrrJRDiGint6FydacEnpwc5/3 5C1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=63CJL3SiiF6aAydC7CKqvc1CDvIlsHFD39d06LNhmDo=; b=x5NWDw2HVhH1edB5z2SiITs9Hb2fC9mo7+rMtaqPs0GQqb7SsiNJHccLoa8VCuv8ow aIhYCBROnASI12VB+UEo3VyVZ5GjCrClKubkqxyRxvVUtUKFHW32s4JxEXwn2w4N16tJ 68wQFSjHUQLZbEY5I45yf08tUNdUnofqrFbIxUV5u2LSItRMQpnVzb/SFK6RowUF4ppK 5DyVSZtBqZ3PYUoa8kpel0pok7KjQRXIjguDobgja5wN3OK3zFep8JrT+FTxmxiXZw+g zDzPJMMneQXf+Sl0gM1hWhs83IU0bwmBpb1qVE/hkj9xp28TWrsTLmm/E2mdM/UMfjZq d7Nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=ZgqPHQ5Y; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hj1-20020a1709069fc100b0072846e4d504si550536ejc.447.2022.07.05.07.50.20; Tue, 05 Jul 2022 07:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=ZgqPHQ5Y; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229520AbiGEOr7 (ORCPT + 99 others); Tue, 5 Jul 2022 10:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbiGEOr5 (ORCPT ); Tue, 5 Jul 2022 10:47:57 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2094.outbound.protection.outlook.com [40.107.92.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5101E02B; Tue, 5 Jul 2022 07:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FocwQaDeylJNxEeeloEy8mB8Bl66pIERVrzUPJoR1BLEQjMsYO3AXDWKjbT3OJrwW0DbRhScOIY1BEBYgIp8+fF1B8y1Gres7XIBEXEA7mdA3bGkS1QYHO54WPEF1edqbAQ654bVYFBw3DLTo48Z/F8erN8hrwrtYdNV36KIn19SDpWznkQc+JZSQxE5IZt89jxOQYh1oWHka6HIevEa4tvjzugYI8qnDvF/d6fvcEPzGzXtczalXdQXGuK0Rpb9JTU+1j0YRnUa5Xq37LdK5a8Qw7DdDeILtxTR57HrNJMsAjVNMKCKlVdfr5iUW8ib28lGVOi2ItT7A+w89px4Eg== 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=63CJL3SiiF6aAydC7CKqvc1CDvIlsHFD39d06LNhmDo=; b=hBDzqf+nkC0Z898lI5+CE9d91FtHXdaaDvTPTfU0a9UxQ2oaL3E5SxObA23ElEJkCLGOpIQ20yL4T3u/sKS90XJ7pePmeUiE9XNoMJUNGPdbE+HDMsLEII7eOmez/eM+8laTArTvg7ul92WxTiNlezjUTAmsps84Uixw9bop/A5HNFk8Hng3Nv/DW0V8gn9cNrashGRGU+OiFp8mkd2yhC8pSMNZL9/O0UDxxKxrOL6Db2TPxVVfjXzWB45dgWIL/qUvh51DZLsacbtS3iZTgXDYUZRm13XVvXW9pc5spGKGDm8kj2ykZDXxiuqv3VWMyRDsT6wUp/YZBtz8MIAdxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=63CJL3SiiF6aAydC7CKqvc1CDvIlsHFD39d06LNhmDo=; b=ZgqPHQ5Yw7bieuZO1C7aC6g99KalxzxDy2CGFOeJRnE1/mpZLdP8GD3pzeN1PCJVXxGkV6jL/ydP4NTzK+ty10EtYlyNtf0mp1chICPzU6XlQZ3VXyIL1JdHwXgFumbZ6ad7cr9FTovyWJxaoY6tIJIvOGRl10kZnQGb2Xupj0s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by BLAPR10MB4850.namprd10.prod.outlook.com (2603:10b6:208:324::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Tue, 5 Jul 2022 14:47:54 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e%6]) with mapi id 15.20.5395.020; Tue, 5 Jul 2022 14:47:54 +0000 Date: Tue, 5 Jul 2022 07:47:47 -0700 From: Colin Foster To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xiaoliang Yang , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vinicius Costa Gomes , Maxim Kochetkov , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 1/2] net: sched: provide shim definitions for taprio_offload_{get,free} Message-ID: <20220705144747.GA1522144@euler> References: <20220704190241.1288847-1-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220704190241.1288847-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: CO1PR15CA0084.namprd15.prod.outlook.com (2603:10b6:101:20::28) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f69054a-3b56-4a71-8297-08da5e95579f X-MS-TrafficTypeDiagnostic: BLAPR10MB4850:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QYvE1ZncRqyn9kvFbVun9b6RXSuLpXWwLMeWNdG80LFA7BCr1uUTQtInFqUBgjSiKjxUnvLJ+AJO3BrJFG6NutHB0509jLSfd6FSLJZxwKyYE8GaLzlRskGBYfMOSeuCbu99QjkwhYSHKjHy5Al3ZZ5RU4R18m85HOY4naTIVSBbeSbs823Ymw8ENz6q9hKwte1vTwIPm0hflNjWehZ/e3v//kBfYf5u5pxxsEYt41/npkhovnEyl7UaJdpmy7pu5XRTZzB09NfTUQVzDsMUwLLMhLQ8GPze/ANvVtgtAjVav0szs9vu6uLi9zi+mURRg2nVX3ROUnMphCrSOKYCV8NwuFLWNRipVqP01hzirtcHHXDc6JYXUnxr/l8RraedNg0DVEa9GN+Q+YHx7wBm8EERgmT7//FpYuqYFIOr/Md/s1u/Qi6IxzFhmcW56BS0rRt1xSv+cPpA9oz/nrpFyFiAGBaBNoiwc4BkVS3sFiF2dX5lAlIVxRJBMyFP2gPFjYnDXSzTfxJi7itd4fmXygye5JJEKcGd930uCpQOYTO7st9LQtcRWV3yQB8PdxnTDhbfZJszh4wqIeOIXj/Cvngw16Mt4LwR98BrkOf5gngKXN9vHqRvBJvD4YH+kPJMLt96VATNRe4Sbu2G3vsXXF9iuTgJbW+iwVGoF56RFyWrxBXm8NpkEYhaEKP48xgN68wEMKMm7DiekSuYwalR29qzjoRm8WLPRF0qdgAPZlka5XuCzAjzaBF+ahDP4mDD9+XE4c5sovv1+s0exV/3YPy8K7/6zHPcq5qgDTBerFfncr821QdtFhi0pjc2j0KC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(7916004)(396003)(136003)(39830400003)(376002)(366004)(346002)(66476007)(4326008)(8676002)(66556008)(66946007)(186003)(1076003)(33656002)(2906002)(6506007)(38100700002)(33716001)(38350700002)(7416002)(26005)(44832011)(6512007)(9686003)(6486002)(54906003)(478600001)(6666004)(41300700001)(5660300002)(52116002)(86362001)(316002)(6916009)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?T4dluZP2WnG2XTmEvNtNoGs8TYT1GH/ahCGV8i7QCll8FoOQKvqVqpaA+1e+?= =?us-ascii?Q?FkFrE/PBQP3YnbY6C8MEFbuRsa5n+NHMRvm+5ZBFml/4yKSR7xkrZSZRiO6r?= =?us-ascii?Q?dkvF3aaJ4qSiJroVqEN4psUUFSnVqNmqL87QEiln/UIwq6T6S6NnSNXUTRj0?= =?us-ascii?Q?sjKYs9TMKFxJBNJNlLkB+XL4pl/f8+G3AgsGgdzb7NKGiTXk6sfYLhoplnJK?= =?us-ascii?Q?ASXuA4JTOpxRJW1cvHRbUCswvZTcoiz3nj7DVjvdLQNd/fhCuqknTQP2hGob?= =?us-ascii?Q?KaZWWLAKFi6s1hmxjg/pZFyvs+9HVC/HFsTBkES9A+CT3RtZzbleAc1A92G6?= =?us-ascii?Q?MWB3xINeqI/ao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ZUAzEyf?= =?us-ascii?Q?RU0QaXE2AKYY1vTJxK3evqIn3QoKVY6oHSlP2ieZDR8dPdOwNRa7RVihaDxh?= =?us-ascii?Q?VfWQBCdKUrTSAmN+Rt2pDyhdnGV/WvoGyw5ilbiD1P/hQgdG9OJ+DJ7Nz0Pz?= =?us-ascii?Q?Ynv3LkRmq3xQ5IUrnfh0WZtNhPZs99+e6kyLLmQ+WnniTGydA7HK5TYDwB4Y?= =?us-ascii?Q?eBFXeIsMp7Qmi2ZCR2P4OJUDPTbi+nsdXPopVqppr+UA1hV4fvPlFeh+cT4k?= =?us-ascii?Q?K4v/EaYs9/GM9w4kUtm3Bj0XsuVoH5THq3JkMJEbF9ZEsQYQlbHU0Z7ckKf5?= =?us-ascii?Q?W4X8WWEbcO5ri2jeSwb67/ve+6hPZTG6jftWHCuDK13PLHhi6IQp4sXo7JpW?= =?us-ascii?Q?rg=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f69054a-3b56-4a71-8297-08da5e95579f X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 14:47:54.2993 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IXeZC+hIPha7FGdJf4Uxo01+1lq6tOAtHhc+sx6kps1oygH+jCwuHGr2KnIF/dV4XuusP1jOFuuunzjVFYvOWikSWcCX0ExfEh1URQX+hWA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4850 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Mon, Jul 04, 2022 at 10:02:40PM +0300, Vladimir Oltean wrote: > All callers of taprio_offload_get() and taprio_offload_free() prior to > the blamed commit are conditionally compiled based on CONFIG_NET_SCH_TAPRIO. > > felix_vsc9959.c is different; it provides vsc9959_qos_port_tas_set() > even when taprio is compiled out. > > Provide shim definitions for the functions exported by taprio so that > felix_vsc9959.c is able to compile. vsc9959_qos_port_tas_set() in that > case is dead code anyway, and ocelot_port->taprio remains NULL, which is > fine for the rest of the logic. > > Fixes: 1c9017e44af2 ("net: dsa: felix: keep reference on entire tc-taprio config") > Reported-by: Colin Foster > Signed-off-by: Vladimir Oltean > --- > include/net/pkt_sched.h | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h > index 44a35531952e..3372a1f67cf4 100644 > --- a/include/net/pkt_sched.h > +++ b/include/net/pkt_sched.h > @@ -173,11 +173,28 @@ struct tc_taprio_qopt_offload { > struct tc_taprio_sched_entry entries[]; > }; > > +#if IS_ENABLED(CONFIG_NET_SCH_TAPRIO) > + > /* Reference counting */ > struct tc_taprio_qopt_offload *taprio_offload_get(struct tc_taprio_qopt_offload > *offload); > void taprio_offload_free(struct tc_taprio_qopt_offload *offload); > > +#else > + > +/* Reference counting */ > +static inline struct tc_taprio_qopt_offload * > +taprio_offload_get(struct tc_taprio_qopt_offload *offload) > +{ > + return NULL; > +} > + > +static inline void taprio_offload_free(struct tc_taprio_qopt_offload *offload) > +{ > +} > + > +#endif > + > /* Ensure skb_mstamp_ns, which might have been populated with the txtime, is > * not mistaken for a software timestamp, because this will otherwise prevent > * the dispatch of hardware timestamps to the socket. > -- > 2.25.1 > Fixes my build! Tested-by: Colin Foster