From patchwork Tue Feb 7 13:54:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 53896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2861939wrn; Tue, 7 Feb 2023 05:57:47 -0800 (PST) X-Google-Smtp-Source: AK7set/v1hH6fnfPribGht/kPUoDl9gbpYsUR5w+lkEIcDqVcK5B3yv9I8Y+9khRIcDNjazVa5nx X-Received: by 2002:a50:cd81:0:b0:4aa:b18e:24bc with SMTP id p1-20020a50cd81000000b004aab18e24bcmr3481042edi.39.1675778266957; Tue, 07 Feb 2023 05:57:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675778266; cv=pass; d=google.com; s=arc-20160816; b=A4L/qzRVI2GMinOwWadaAxaRAEfDATFZr9TNear9Vu+1MIdPdwUCrQHlwhegs56QAl XYMs0AJVBGsqVW74bol9A+d23puTlANe0NHsLQNqVJX1CSp7lwZS80Ptms9RPG1WtZqH hkuUNpgfwhjat+v24B+3sBTIOjAviaUqNilCp8iGXwCuC/4KSQg6TgMtmCJuO9VQtUVP ciGC6+2CdzLCrF1Q8L3RNpMDJzxs9EPhd9KX5ICkMdiw3JDlpaijNrAdX2qoYDBSismV X2wSSdAp9CjMkoGsfcDueYZcb6E9GWOsmJU4qWvX85J9vzNmMk3Njx+YW/xFdnxR/zTb MFBA== 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=hFYn1LUwHig6bqMdHhQTcZdRtANbkDTMUdKiVG+jejE=; b=NMeKSyKP2loI6jkQcWeLKbE6rUtIVaF4CclSzwVpwEfqE+tPogmOKOQCG9LvTBjljz tmN0u/m9ms8wvKTHW7n1EtbiEBaoNp9yJT8oCYvho1a13HVNPfebdz9WLlfOta6i8jvd 3JzvbWENkAs9fpbn67l6XEbMbMDb/D63vgJjsOQTp0dsdVOEblyF7ghThMym3BBtW5zQ mEVUYCfGUZRUJPCud3eGy6ubUAIn+l4AhTQN2NW/ZJS6vQRGlWd+ARM4Wt3rjOCLCFBL RI4USj3/j2HNwUcq6TXwi9STONYeXzTgVUEBBRvYVbuxjk3qqlh6f36wqRYf9A2Ve5Of JZzg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=QoOF426T; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd11-20020a056402388b00b0049e24a14a25si17090115edb.250.2023.02.07.05.57.23; Tue, 07 Feb 2023 05:57:46 -0800 (PST) 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=@nxp.com header.s=selector2 header.b=QoOF426T; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232137AbjBGNz2 (ORCPT + 99 others); Tue, 7 Feb 2023 08:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232218AbjBGNzX (ORCPT ); Tue, 7 Feb 2023 08:55:23 -0500 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2089.outbound.protection.outlook.com [40.107.15.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB58F38EAD; Tue, 7 Feb 2023 05:55:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fkvGjWMvsZWYDgI3tWl5ClxwmEJbnNOE7t6ncdIOvAfB5D5Yej18WuY05UfqJ6G339S9TE+Tw9fOHMNCz9+OlCownQLssm0bLXF6mQXW+/ScEyJANjy7huZetKMB5L456PQEad8UNbkJUkqPZqwQLcA79gBhTwfCO7QieIqT+DfloS92Lwzsv81b+HHB601SPyI+KJfsW3x0t0+Tq4NCZv0RI4AQsLFe4QPb7kdzBgoejnuJI7Uv5Erd2vcB8Pci9iWy/Qo9fGhSEkzXQXqVxQxeabzdiMvVnO6QL5G+UQbQpmHUfAsMfYb3vFI10sZfrPbwNB7GxI3c7H71Wg0GYw== 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=hFYn1LUwHig6bqMdHhQTcZdRtANbkDTMUdKiVG+jejE=; b=JAZtB3UYndaYCM74VnyooNLkBOOVcQHGkKEX72PK80Jt4SkEjfFS/CbcuK6+j3NVszppIY8u1LS8bph1eiTjkkM238JhVcboU4zFrNQZOwqE5MPO4XoY1wIzo3KUPZwHBlY+LA0/b2uccrkmZJIDsYfUzuPl+mFMUXPC1CzYxdMH2KSLaEHvH1Bt+X6uXjFFy3HQLTlZwiWO5R4cIoR1RORenV3U7gnW0bWhMYFis9VS9i4EF9mdHO4jSYtsBNtVtX1qyMvOso4PsPuxIQupMFancf/RjzSd8rTj1QsXhmB5EZ0426tXJI5Nzzz5g1SFQfM7vmCKG29EhQHOpDe5rw== 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=hFYn1LUwHig6bqMdHhQTcZdRtANbkDTMUdKiVG+jejE=; b=QoOF426T8rA3IVDmGxt4ErkmYafZOcpxYIMnAuWj57f0RJAB1QfU7WzzxTGEFd3OWv6J4cdgtx1vkGHrabvCcwStywE8dicpiTYFanY+ZTT2pCKlmThDCFEQfhfIe3+G8xj4N4QyoUazGeJL4FQWbFicsEr2marTvLD7sJNUbh4= 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 AM9PR04MB8115.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36; Tue, 7 Feb 2023 13:55:06 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%5]) with mapi id 15.20.6064.034; Tue, 7 Feb 2023 13:55:06 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , Kurt Kanzenbach , Jacob Keller , Gerhard Engleder , Jesse Brandeburg , Tony Nguyen , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next 02/15] net/sched: taprio: continue with other TXQs if one dequeue() failed Date: Tue, 7 Feb 2023 15:54:27 +0200 Message-Id: <20230207135440.1482856-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135440.1482856-1-vladimir.oltean@nxp.com> References: <20230207135440.1482856-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AS4PR10CA0023.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::15) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|AM9PR04MB8115:EE_ X-MS-Office365-Filtering-Correlation-Id: 865c8c28-d67c-419c-4d9e-08db0912eb3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1nVR8tYHFHve1f+7siCcuqVc3Uk5NpKF6RigXxdRmt4dW8xUXC4sH0rbdUwq4OB9y8acYXKhmtceSbWD1IYiRgWWvFFNz4nHBsxPHHTxuGXzovZ0mxOi8MR5srwj6FPIMP01j4Kfn2/4rmhWq0Kq0JseqV8qxB2HsFSRptr5NqV4rVQf+eTgIfKPeB1I7xCpc2HZ2gobofCjqIGPn7yCTYoUuQHVx/932dYwU/pBELoI3V3W0rHa7zfzsQ6TnpVroxMLNqRmagInPBMPnO2D4U6S5VWXlOh0l4TVeQcQvDDo+UWsXp6uSUX3QQL8+OYOi0Aq6HWbZ/YnTkec3MfdgaX1iew7eNC2pi0DjQlLAhC0NOH+4+oeDdMIzWmttlzO9nIo//gtgx+gEhTAAqzzkj033QPRik0+IfROGq6NCoxKe19KTbtB4myC6nU7bHQ/bcsqKNLjW1OFz9MAUoY0ZpbB8hUVINSnyou7R9Wo7yI+4k//VDUzWTya8CA+ZiKUjtSXnCRdBF2ZT7UOxUwUSIBSvrYgcpo1Wtzaqsyvbm1GYi7mZHCGH109drziXOIrarEaFpWQ54gdwoVROs2ddbbyWOhCe3N/TDZOlqgjsvHR4omUqy7tSuerEhqNv+onFw2g1pk/DhuU35baC8YEG+neVjcVcoWNTfFQKUDJFQiv9U6LvoP86oKHXl8XEKC6uB4N1En6pAzL0kzJ8o/vJQ== 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)(39860400002)(396003)(346002)(366004)(136003)(376002)(451199018)(2906002)(8676002)(38350700002)(38100700002)(316002)(83380400001)(6916009)(66556008)(66476007)(8936002)(4326008)(41300700001)(44832011)(5660300002)(7416002)(66946007)(2616005)(6666004)(1076003)(6506007)(478600001)(6486002)(186003)(26005)(6512007)(86362001)(54906003)(52116002)(36756003)(66899018);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4ysDQypWn5AaN0x1tXMq1nha2TuhqA1+pYkbbLAJFD8TycpgihJO8DVUE1ppErOmI2rPAHvyU5tLl5XG8qEbvJtboAeIW4W69QnpQ3azbtR9Y333PgYPojvFwR3Ny5ZuT07cYI+j4BjpIWNULJD/p3wFVlCtOckDpQg/sjBY8DbSreVE0j4CfLThcBXfnDGRXuuqe3lvr0Fd45sGyoNufUtKjSc53HR85iA1dM65MbyrhCNAZD43RS1B9G1zksgQ9vWbqc2Rp0f1Spxtrqb+YWExCuQPNMdFAB5VfFI8e1GciamFdwZPqobHOpe9XU7MjVfFpRpQ3AC6CcsEGcOy+A8v8qx8bbRpkW1VthTDwvnt1kg/T+BMcnMjWWYlW8Bm5owOIS6sO7dYQmlSVIuuuxmj89lcP4IInebfX5Hq7F/0kCZ0vMEebWJIOkHY1pbIFR5woGRsdhJDuF86ZIqvt5UKMwSxkH6QdZN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r1398b2kVLN37KVS46ywVjaHiWwks90dRnBGmWcgqNxxqgMy7ySRu1VSQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 865c8c28-d67c-419c-4d9e-08db0912eb3d X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 13:55:06.6906 (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: KVdRDMN1Y3EpGCtgavt4PwuSltua+1KH9DK4e3vbjfMgqENz6zgFRVlUNGeD7G3sGGOM4R+QMpVakFcYsVKO5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8115 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757180872022005128?= X-GMAIL-MSGID: =?utf-8?q?1757180872022005128?= This changes the handling of an unlikely condition to not stop dequeuing if taprio failed to dequeue the peeked skb in taprio_dequeue(). I've no idea when this can happen, but the only side effect seems to be that the atomic_sub_return() call right above will have consumed some budget. This isn't a big deal, since either that made us remain without any budget (and therefore, we'd exit on the next peeked skb anyway), or we could send some packets from other TXQs. I'm making this change because in a future patch I'll be refactoring the dequeue procedure to simplify it, and this corner case will have to go away. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach --- v1->v2: none net/sched/sch_taprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index d9e26ddaa7f2..0fde303978a5 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -587,7 +587,7 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch) skb = child->ops->dequeue(child); if (unlikely(!skb)) - goto done; + continue; skb_found: qdisc_bstats_update(sch, skb);