Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp366402rdb; Tue, 5 Dec 2023 07:34:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHsKOIa5+t6+Ce96zOeE6xMCm6UsM6sT6xGlt6AjEYHeVMTfnr6dbWzFl4iLg4rUFbNrwJ X-Received: by 2002:a17:902:e890:b0:1d0:d18c:bc5a with SMTP id w16-20020a170902e89000b001d0d18cbc5amr338957plg.121.1701790483473; Tue, 05 Dec 2023 07:34:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701790483; cv=none; d=google.com; s=arc-20160816; b=HH6UmT7ejTTj7kSu1D80HpR+anAYwnF+v3o5LGwMtDz9eOmSUeAKPrcU5131A9dBsW c54/HF8ZUTn7jJ85ped0te2D4lTM0d5kpHH+L0tJQBwEMn8M63oiCBYeXbexSHRXBslt vMEpQzwKXFB6p7QQDAtzZ5CS4bMFdoVFVr0s3x+EE8EB2KnF6Ml/cU2EBb04NIPCwImL L7HY5M/xbKeN+iG4iMoX6RPaoC/ToT164O/tMEPO05CgIeCJLBfs/IR/jxMCjC5llawN Nqr4vz2/bHIwVNkxGnK/MHTCikO+hIVpBGDvD2GqgmC0RP+Dm+H2awXuxjMCv5PQl1e5 BN0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:mime-version :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=QLrrt7aQd3uFEGTkO/x97Sh3we90ObbwSexb6iVGv7A=; fh=GOtUny2oW8a+OwZiCofPVokLDKreR5RNYbuuI4KXBgQ=; b=tt6N/QXMoQtkckxHhyWybwwuTANw/yh+7IUFU0Wm2mI7mPa5MTpreUzvariq444tet u9XN/FxjcTkbE1YBDnVR3FGlZcjkXhzm+Un2He3fVCVJ8ICXqtDC3jwELT0c1SOGRX3a LPKYVM5q5R1MMI7R+hhVGSwFddnrJ10WRpVxOm7bhNids3eJaoeoTSY1vRkRejbOsMjy sDrIuhZ3WpHG/AtqFYo8+OP6iYGAbJo7/cYpFdoHeIbXnR1lFMChzO+j7NqP21Ihtcp+ AlFloaXyVLaz1us/8jUY9HH1EJZlOVe5iHLv7J1/Qx+0fflztdzzAuD0/YV0Zbcbe/7X /VQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=J+8+bbFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l10-20020a170903120a00b001d09ffdfe1fsi3824692plh.171.2023.12.05.07.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:34:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=J+8+bbFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7A1388031C58; Tue, 5 Dec 2023 07:34:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346275AbjLEPec (ORCPT + 99 others); Tue, 5 Dec 2023 10:34:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346242AbjLEPeb (ORCPT ); Tue, 5 Dec 2023 10:34:31 -0500 Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net [185.136.65.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5BB9197 for ; Tue, 5 Dec 2023 07:34:35 -0800 (PST) Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 20231205153432eb2591a6dbaf5b4b24 for ; Tue, 05 Dec 2023 16:34:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=florian.bezdeka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=QLrrt7aQd3uFEGTkO/x97Sh3we90ObbwSexb6iVGv7A=; b=J+8+bbFXw8iqevTZ/1LFxb77bPK9BAi2TmeskopxbHBkn5POqgmVNCOYGcqwEep7uOPJpl zj+FDvGwqPNeHsljWo0kiWzfDFu9PDhQN6eGhzaJB7XFPDStPDo9SmhEyvxSfz3Nw8ezFswW bfVo1XvFDjaGtWxsO3vjq4Ss0mo2w=; Message-ID: <5a0faf8cc9ec3ab0d5082c66b909c582c8f1eae6.camel@siemens.com> Subject: Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC From: Florian Bezdeka To: "Song, Yoong Siang" , Willem de Bruijn , Jesper Dangaard Brouer , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Bjorn Topel , "Karlsson, Magnus" , "Fijalkowski, Maciej" , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Stanislav Fomichev , Lorenzo Bianconi , Tariq Toukan , Willem de Bruijn , Maxime Coquelin , Andrii Nakryiko , Mykola Lysenko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Shuah Khan , Alexandre Torgue , Jose Abreu Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "bpf@vger.kernel.org" , "xdp-hints@xdp-project.net" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kselftest@vger.kernel.org" Date: Tue, 05 Dec 2023 16:34:29 +0100 In-Reply-To: References: <20231203165129.1740512-1-yoong.siang.song@intel.com> <20231203165129.1740512-3-yoong.siang.song@intel.com> <43b01013-e78b-417e-b169-91909c7309b1@kernel.org> <656de830e8d70_2e983e294ca@willemb.c.googlers.com.notmuch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-68982:519-21489:flowmailer X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 07:34:42 -0800 (PST) On Tue, 2023-12-05 at 15:25 +0000, Song, Yoong Siang wrote: > On Monday, December 4, 2023 10:55 PM, Willem de Bruijn wrote: > > Jesper Dangaard Brouer wrote: > > >=20 > > >=20 > > > On 12/3/23 17:51, Song Yoong Siang wrote: > > > > This patch enables Launch Time (Time-Based Scheduling) support to X= DP zero > > > > copy via XDP Tx metadata framework. > > > >=20 > > > > Signed-off-by: Song Yoong Siang > > > > --- > > > > drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ > > >=20 > > > As requested before, I think we need to see another driver implementi= ng > > > this. > > >=20 > > > I propose driver igc and chip i225. >=20 > Sure. I will include igc patches in next version. >=20 > > >=20 > > > The interesting thing for me is to see how the LaunchTime max 1 secon= d > > > into the future[1] is handled code wise. One suggestion is to add a > > > section to Documentation/networking/xsk-tx-metadata.rst per driver th= at > > > mentions/documents these different hardware limitations. It is natur= al > > > that different types of hardware have limitations. This is a close-t= o > > > hardware-level abstraction/API, and IMHO as long as we document the > > > limitations we can expose this API without too many limitations for m= ore > > > capable hardware. >=20 > Sure. I will try to add hardware limitations in documentation.=20 >=20 > >=20 > > I would assume that the kfunc will fail when a value is passed that > > cannot be programmed. > >=20 >=20 > In current design, the xsk_tx_metadata_request() dint got return value.= =20 > So user won't know if their request is fail.=20 > It is complex to inform user which request is failing.=20 > Therefore, IMHO, it is good that we let driver handle the error silently. >=20 If the programmed value is invalid, the packet will be "dropped" / will never make it to the wire, right? That is clearly a situation that the user should be informed about. For RT systems this normally means that something is really wrong regarding timing / cycle overflow. Such systems have to react on that situation. > =20 >=20 > > What is being implemented here already exists for qdiscs. The FQ > > qdisc takes a horizon attribute and > >=20 > > " > > when a packet is beyond the horizon > > at enqueue() time: > > - either drop the packet (default policy) > > - or cap its delivery time to the horizon. > > " > > commit 39d010504e6b ("net_sched: sch_fq: add horizon attribute") > >=20 > > Having the admin manually configure this on the qdisc based on > > off-line knowledge of the device is more fragile than if the device > > would somehow signal its limit to the stack. > >=20 > > But I don't think we should add enforcement of that as a requirement > > for this xdp extension of pacing.