From patchwork Thu Sep 15 10:50:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12977237 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 6EE24ECAAA1 for ; Thu, 15 Sep 2022 10:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbiIOKvL (ORCPT ); Thu, 15 Sep 2022 06:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbiIOKvG (ORCPT ); Thu, 15 Sep 2022 06:51:06 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2086.outbound.protection.outlook.com [40.107.22.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E045184EF4; Thu, 15 Sep 2022 03:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UPgQCL2kkh2jlR4AYjPYEGnlvHL/foUUsPw40Y/pp4iiUpi/i4aoE/vyfJIjdX2hDVaFZOTSwEAQVSZW7xIFvgfd2xSEkRo7xzAGySwWC28O31Fc//5dkIhUR4Z24QMrgk0ztxUtorHzWVbNTr8P1pQfWx6Ny8Qcfmo0ZdGZN7BlVZYNOmrC+E/4Aj3Eg/VX11XJrBHxpO8Hdda37qvhIU8LdkUA4ZCgVOW4XHBDeUh3/NQRURUq0HOOBQFV/6LU5Y9x2rPmmY8Z2Nr+8/0teHns68rJvls0O5v3UhddDbnmhNr++9lfbTJsWnu3zyPrrrpRytnkFxIBy6gkR48rKA== 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=P7vWmqTyuHABdbHofeJRh9DDAJ9waMiZ4sTIJZGOujo=; b=L0xekYPo5N3+ZJ7EwtE3pon2tvcUaZ9rCrwb6ZaaMY0BmKIK8b0OumTS3Bz6UEKog9E6u7sNLrBdDw5lCcyBxH6/SV+PLVI8S7oEZDkgqtcQcXKFFItt3+dzz2AlSYLW3OA7A5jt0SVQWKZDPxg7iub4g9gScGfNnHtvp6l3iLIcueHdxE50WONdoBqeG3DBiBNY31+vSS2yE4L4iwqH56cDg0M+CcssCSCz6ID57KxFfF/v23tfCAGsBEtnIrerTGj6vYjaW+Lz1t3RcegF+Al6eBKIHvsoSwyukSJm7JoROoYRVSCqewOjLT2rcbnP69tXmjSOWXZpCpIeI6X5uA== 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=P7vWmqTyuHABdbHofeJRh9DDAJ9waMiZ4sTIJZGOujo=; b=a2XEisNE5cKqRcd/jY21dRQROAIXvyqWigRTFeBxqLTrYRVZYy5YpLa3NYtbEp+aAEcNNWC9Rj146yigrMjGYCh6MxSABd8oH29pQKv28wKsI29wfh6VnNWCv2cLJt8E3lzB6hnEw35T6Ds5nTDOzDd5o8YNCJFIYElFlcov3Dw= 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 DB8PR04MB7163.eurprd04.prod.outlook.com (2603:10a6:10:fe::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Thu, 15 Sep 2022 10:51:00 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1%7]) with mapi id 15.20.5612.022; Thu, 15 Sep 2022 10:51:00 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Vinicius Costa Gomes , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Voon Weifeng , Vladimir Oltean , Kurt Kanzenbach , linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next 4/7] net/sched: taprio: remove redundant FULL_OFFLOAD_IS_ENABLED check in taprio_enqueue Date: Thu, 15 Sep 2022 13:50:43 +0300 Message-Id: <20220915105046.2404072-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220915105046.2404072-1-vladimir.oltean@nxp.com> References: <20220915105046.2404072-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR09CA0052.eurprd09.prod.outlook.com (2603:10a6:802:28::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_|DB8PR04MB7163:EE_ X-MS-Office365-Filtering-Correlation-Id: e5c8a6c8-95b1-4c40-d837-08da97082d07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MTA5ZiqueW6LtFN7mA8gpVvMbo9itloyMon6bN7GxhVTKS7cEP0IyEbDc/VP+oyDRnbz95wsgBCcluoPQXXQCRR/fNmPs1DZ64IqztKlmov5ey325anf6Vovs/TM6/W3eYIqHmAOmaleJaB9mWwIkYAJC3WEXTE8HAjDP4zDx77KUqu6T2M6iZIHwluVPy8M7jCEEYaXFahSzUU0SBM+oSz3cqY9ebwNxY0luivDQmJ5keh6NXBrzGRgnsG+J05yXirUV1DzOc6w9rB/iccLnlPJelV9R6rhCLTtBOIRZUgje+ZIUpiJrLa75jGjxrPhKR7hWv4xuoGUKRbxI0C+W0TXSl8a0sjoPN5tW/LS/BOC47pf/b1k83Ku1QG5PJOZfSxRM9wIxV13e625WgNKLkIlhxShHaw5gdCB7LMz0769Sp5YMqEHmlMb+gBtUbwoBv9G7mSNEddrPXVewdLEyBnvOMtir0/WfJlOI7qGpDuSdpligG0LZ0pz7iBkivmS7VZr2A4zP5zKsr1JnKGSJOLBmSzBVjZh8SxC9y6plIGRjydAWOwjB2+60tf4+yvNVUvNPPslR5cQY0ZUt19mkAgtWVxMLpEWQlF7U1IWxig60TAQts1qfL09vFdM7PF8A7hK0eLP4U9QdNDm7S6jzqVgHOGRUrwLlIicEwRdRwTNieaXjudlwGuvy+xt3+d6ko9exXHsPt+oVnOPWv7/Elgi6Zfe6Vu1EUQSAQQD0HfVvx7LyBvQu9DTsD+90jiGgu/zTNOl0BVSt+o1Eu41zQ== 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:(13230022)(4636009)(376002)(346002)(396003)(39860400002)(366004)(136003)(451199015)(6916009)(5660300002)(6486002)(7416002)(2906002)(478600001)(66476007)(36756003)(54906003)(44832011)(38350700002)(8676002)(38100700002)(6666004)(316002)(2616005)(83380400001)(1076003)(186003)(66946007)(41300700001)(6512007)(86362001)(4326008)(6506007)(8936002)(66556008)(52116002)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j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JTOY22mhLc4tEipIETNxobxnYFF1CyO8YVQbftgHcyhjNBHW1uAVvMWZ0D+Bj35pBIyEIWzkfGnxrs5kpVxZ7vNWMBdUOFOXzZJOSdvMtUZxbk8Sh6dyrm8NGPym64Clp5zL/bHNJ5u7t8IRY+MB7XCYovnZgFHzBmG/iuKG1qCVCsjZpMJb1WQrbH/tWS/0+Jtunvt2kX5M0K+VQ5n1pNbJzewlO+1E3DQaEFZ3xKWVTliF8P/Zlp5TSF4RxyrHs8RHIaH64fQBcBSzi8Jkxt4I6Wm3R/BRhIvrk3k/8azFLeDNjNplxykKuSrLC0nO+XHW6moMUTx/J2PDUpBt6UeENTWk8cDUFc0fw+/8o5QG2L/SEinbU+F79Jb0Zg7sx93dLydhchpWoMSgJc292dlsTtYjA5bmNCTdMdByoNoaKuaUA3NZEOb++WkX1QHFiKyMLacR3BAa9j+ocu1H03p95wfYH9qA8BoWGfP9czU8GPH7DgRnmrd97A7UwOI6YIlKE60qiF+BYpPwT+ew== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5c8a6c8-95b1-4c40-d837-08da97082d07 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2022 10:50:59.9086 (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: zFoROgOm6UjXggnW8ZWgUkWkfzZ4fVjFAUHayHDJPX4/fpIRv/e03oySmd8k7VYV1tEGVbb4xYrN4o44d9s6ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7163 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit 13511704f8d7 ("net: taprio offload: enforce qdisc to netdev queue mapping"), __dev_queue_xmit() will select a txq->qdisc for the full offload case of taprio which isn't the root taprio qdisc, so qdisc enqueues will never pass through taprio_enqueue(). That commit already introduced one safety precaution check for FULL_OFFLOAD_IS_ENABLED(); a second one is really not needed, so simplify the conditional for entering into the GSO segmentation logic. Also reword the comment a little, to appear more natural after the code change. Signed-off-by: Vladimir Oltean --- v1->v2: none net/sched/sch_taprio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 6113c6646559..0781fc4a2789 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -455,10 +455,10 @@ static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, /* Large packets might not be transmitted when the transmission duration * exceeds any configured interval. Therefore, segment the skb into - * smaller chunks. Skip it for the full offload case, as the driver - * and/or the hardware is expected to handle this. + * smaller chunks. Drivers with full offload are expected to handle + * this in hardware. */ - if (skb_is_gso(skb) && !FULL_OFFLOAD_IS_ENABLED(q->flags)) { + if (skb_is_gso(skb)) { unsigned int slen = 0, numsegs = 0, len = qdisc_pkt_len(skb); netdev_features_t features = netif_skb_features(skb); struct sk_buff *segs, *nskb;