Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7369717rwd; Tue, 6 Jun 2023 09:44:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LUMGXLf8xLcSY05hR7X/kVegcf0hRWWnQSizHdG764Ka6cXwl6Sjsmpg+PmOKpjg4JjzU X-Received: by 2002:a05:6214:2343:b0:628:c4c8:4afb with SMTP id hu3-20020a056214234300b00628c4c84afbmr2996578qvb.60.1686069868898; Tue, 06 Jun 2023 09:44:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686069868; cv=pass; d=google.com; s=arc-20160816; b=EdLE5r7Y/dFcMNkbgAtf1knEmq1HyzDR2vuRdqEyauqSzzabF6SC6knotbOpS25RaR LVO6iocru7ZOJhucJ5aekzsLKlBVrVLC0dCDcPebhdnv3fwO9CAjGqBPF366Cp8VVqNM KytvRar0NEHnuzp6CLBI1DPWJ6e5X4aK9PFt1vNYHKl+QNYHsKNAZaHz93iNdmD3czFO kJtRUlpieH1QCtGFrs6yxfrvkam8r+gs6gmyAEQaao9xT8e3exX6Hdl/k5b/wk6cFCk4 9y7ARfnkW2slm0SpMBwYgysGxkbaK6FZ3BdQ7bsAp6YvEM65zHf3ix1VaHFp9fLcmT/E G0kg== 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=IkrO8WfsNhZ4IswYnR1h6pUZ38ipcXRalu5M2GFFSvg=; b=HYJjSvxsWC4ejywiycte61vk24BcftD277GO/JP8/ZwENnZGrHRVQmegtbckftDKmK HQFTBKAXlzGdReCCN+KMOJ4Ir79UoJ6NQHyhwMPDv5s4YfTfqOcM5nj5pcHf2b/KK2/U kN18dvz3TCm8Kzg1z9O/egBGCse/e5nSO+yBGaQZn2Aa9jdHVTuaZN4G98ysfDehhhik nxZZLZQqk9VUtKSIGX9el/daxk8N/Xa1xZPyF70n/sWmp06rv/4A5uKEA65GejXgJ7T/ DBZ3YAM0xc3+rWo5+FpwQj45aeLIJsSOUj22AZq6SjUxEy5Xj1pjczV0+MfPdmE+A0RB KCDg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=e+fE3LGs; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a05622a050800b003f5619a8921si6644600qtx.242.2023.06.06.09.44.13; Tue, 06 Jun 2023 09:44:28 -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=@nxp.com header.s=selector2 header.b=e+fE3LGs; 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 S233582AbjFFQcO (ORCPT + 99 others); Tue, 6 Jun 2023 12:32:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233429AbjFFQcM (ORCPT ); Tue, 6 Jun 2023 12:32:12 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1b::60c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A0C4126; Tue, 6 Jun 2023 09:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WdzhoGdnhB3zjoFeMajo37aLQ59yBoE1h59LYrFrLS4fSYJolmaeFzdPPAS8ZFfXSpnLgXGB9rVwnkx27pXajeM28Efhdyxmp5NxaWcG94gtVsiV/4KMT/RwrJ5Q/fMWBzCKJfg4m6AhQMZo1X39IVooLYsf06D2aP+vtyOCWyHVR7BOzg0J9Lp9jr46o71LuZaAGMGo8GQX6lZErLKn/sH4Cx6q9GJbHATkEBx4zdzJmP+nahivPdiSNFDn60YZDrRwXGoHftyuZjqaESE178NB3zlcm/6Tehjzd/wGwwbmRX5y82MALKFgdrTlKb9wzHNKVn6nCn1s+Pzx6ShxLw== 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=IkrO8WfsNhZ4IswYnR1h6pUZ38ipcXRalu5M2GFFSvg=; b=fA2gN2cgxxQZsTPydYBl/6T4UcSNN2uynUAvi5gmWOvW8LTiZE4bg4A8BPPzNqYwy9M6pTwtzLU0U4UsQ88ozBDXY0MAfiifwD+Eq1E1hG6BPh4LhsqcPzqioPG5HySrRkTx/MLYihopdMkPR6ue9XNdjzSpjymRcVKztW3nU0QMZfRBDdK3stOBMx9sAjGmJb+tLi6YRfQOPb5YY+sXWToYgQ4ZnqJa+yXmrVpXi4aXisxCAhl8k1+1su+maFSpU+0h+LAwy0kR17k9nwekbtWxuErMyVCOI0WpKn9rZKjzucMnrKLOhhN6EAYxlYjjGGPsnfGO8jGTiDF1s0lTIg== 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=IkrO8WfsNhZ4IswYnR1h6pUZ38ipcXRalu5M2GFFSvg=; b=e+fE3LGsI90mSI77ETFxY7lxuFsVvygNupge1mmoOTRv8A5zOk5Glw0FeGJaQi94AC83k1jXGi8Ub4Jx4Dwed7JIJ0tOxcUpJxxfvkFNYvSrgDFjdWbFonpBqrXsqdbXxhHDWhF6EELvJWw4r7SIENWsYhxPicrOd5PIL1HuCys= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AS8PR04MB9046.eurprd04.prod.outlook.com (2603:10a6:20b:441::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 16:32:06 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 16:32:00 +0000 Date: Tue, 6 Jun 2023 19:31:56 +0300 From: Vladimir Oltean To: Jamal Hadi Salim Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Muhammad Husaini Zulkifli , Peilin Ye , Pedro Tammela Subject: Re: [PATCH RESEND net-next 0/5] Improve the taprio qdisc's relationship with its children Message-ID: <20230606163156.7ee6uk7jevggmaba@skbuf> References: <20230602103750.2290132-1-vladimir.oltean@nxp.com> <20230605165353.tnjrwa7gbcp4qhim@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: FR0P281CA0052.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::20) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AS8PR04MB9046:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a49a222-fc56-485e-e61c-08db66ab8d66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uZ1eT9sY22GbJS9Baxd1SMmNHj2Bl8BS/XjONhGfPaiNq4V4J0Cvubn3fqlWA0pyizXNSjsGiUw690nRslJT0jFpI4+jvhyDPC3KgZyalb7BfXo4FA4xBUg+f4dU71w0lKH6wyVvUoxYuoUlS9fVxSAc3HeBIjKoIrBbOvIy2OSDnK/X6pjIIOrt2k3jJztVxjDWUTVzAO0aqPIYKtkPmvrxm58fuIpX7dZCRzVfG5EY6DVfeb/2XsCbuJBGHmvrlSp4AOwr1EJFdg8k4340Zxg25Yy6J4qnP4Aj+z9bW3mBetcCkGU7Vbgss7KK9yXW/qkEok+ZKbqmvh6i1fbuw3KGQTF5yp8qaX9WRlJXi07r9n0pgd1j+AXi4JciBN3vI8uwD4kVku6ARxTb5R5MR0JmDoOWVNKsB1iXk0PifqdbiCWXy8a+nh2STA37YfuTDKFxc5p1qyRbycvd18WJ+S49F5wtIDu8mmupPT+dVSTE8pCGEUdJSjjA4Ju+NN0+TSmuPMxNNkikQb6f//ySmV4XdWp5KAkgAOSLQ6uotLmGy3AO9UNRP2wcw+4kDCYE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(4636009)(376002)(366004)(39860400002)(396003)(136003)(346002)(451199021)(6512007)(26005)(9686003)(1076003)(6506007)(44832011)(316002)(83380400001)(66556008)(6916009)(4326008)(66476007)(66946007)(6486002)(6666004)(186003)(33716001)(478600001)(54906003)(2906002)(5660300002)(8936002)(8676002)(86362001)(7416002)(41300700001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Q5TyWCX1vwV+9VAlj8qNAH/6aOVFjmkIKSmycUjXx0G6KzDPwDu5Ni0XPxZC?= =?us-ascii?Q?3U7XvpIkswF34IhjEw9poAtuKRD1tFkm4isYZ4grej3MUWa5DKh7HQHdUprS?= =?us-ascii?Q?QAyq9o7S8jxoL5bskI1+jUAjBk9TeHBWIYBOZM9ehMc7EsM7AYN4p3Q04LE+?= =?us-ascii?Q?kIK91ROPD8zTXrHaRawzpyynYJzkQXFpzmSx7X1oHYTvpDsI9flky6IDb/Fe?= =?us-ascii?Q?V+h+8CsMb3FDiQhGEObkkDvnT3K65vadzk8I7whZQdfgwnOpqCi92waNyXrY?= =?us-ascii?Q?Dq0xC2G796Hk6M1MjRPQRwuWgI/7YL/cEB6upNj2Svz8CvJGPgSgynHJPt7C?= =?us-ascii?Q?h37sDnllN3Y9mi8GSrcqbkzijQ8Bv/z3uQdeeONczZRfxY/Zt8mQEkJcfpIG?= =?us-ascii?Q?Kt4a40KaYL6MTjc+JDfbIGyPL2FJiFO2xLwZwNlQyVtV+FQlhF9+xUnCA+dR?= =?us-ascii?Q?f4RG4jOCpcLibMU3javwSazh9I/b33VZgH2YoezmXcBTgcpxcOnd8UijOxCw?= =?us-ascii?Q?mJHuy6hNSI6rWG/GKbJi3a1UiRFqKML8MtRd68r/JWiWfFeBoy6VeoIg+MZD?= =?us-ascii?Q?qNLw+OJqLPic33sq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ffO5?= =?us-ascii?Q?0In3K0EcxJ3wy3s8pYzO71EeT2IGs4iM1BqqTSJz6AeqFCYrpOGA5hc0+UBo?= =?us-ascii?Q?CNwm9x+QKKr7C7o4Jb0YEko3UzxrAHTF4Rw+FtxrhXCBEDFbnXbHRxgwe5z4?= =?us-ascii?Q?mQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a49a222-fc56-485e-e61c-08db66ab8d66 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 16:32:00.2641 (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: 1DUlQ956gPjsQwk/hAXTEPnrOg/eiqi+P5BcBgi3PICtYcojXBsbCix7NL4dWAQhpzULOe3F0bToEzEICSZ1jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9046 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR,URIBL_BLOCKED autolearn=no 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 Tue, Jun 06, 2023 at 11:39:32AM -0400, Jamal Hadi Salim wrote: > 1)Just some details become confusing in regards to offload vs not; F.e > class grafting (taprio_graft()) is de/activating the device but that > seems only needed for offload. Would it not be better to have those > separate and call graft_offload vs graft_software, etc? We really need > to create a generic document on how someone would write code for > qdiscs for consistency (I started working on one but never completed > it - if there is a volunteer i would be happy to work with one to > complete it). I would be a happy reader of that document. I haven't studied whether dev_deactivate() and dev_activate() are necessary for the pure software data path, where the root taprio is also directly attached to the netdev TXQs and that fact doesn't change across its lifetime. > 2) It seems like in mqprio this qdisc can only be root qdisc (like > mqprio) so far so good > and you dont want to replace the children with other types of > qdiscs i.e the children are always pfifo? i.e is it possible or > intended for example to replace 8001:x with bfifo etc? or even change > the pfifo queue size, etc? no, this is not true, why do you say this? > 3) Offload intention seems really to be bypassing enqueue() and going > straigth to the driver xmit() for a specific DMA ring that the skb is > mapped to. Except for the case where the driver says it's busy and > refuses to stash the skb in ring in which case you have to requeue to > the appropriate child qdisc/class. I am not sure how that would work > here - mqprio gets away with it by not defining any of the > en/de/requeue() callbacks wait, there is a requeue() callback? where? > - but likely it will be the lack of requeue that makes it work. Looking at dev_requeue_skb(), isn't it always going to be requeued to the same qdisc it was originally dequeued from? I don't see what is the problem. My understanding of the offload intention is not really to bypass dequeue() in general and as a matter of principle, but rather to bypass the root's taprio_dequeue() specifically, as that could do unrelated work, and jump right to the specific child's dequeue(). The child could have its own complex enqueue() and dequeue() and that is perfectly fine - for example cbs_dequeue_soft() is a valid child dequeue procedure - as long as the process isn't blocked in the sendmsg() call by __qdisc_run() processing packets belonging to unrelated traffic classes.