Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp433198rdb; Tue, 5 Dec 2023 09:14:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGX/ZUk+u7Yl7bU9zUTgIpee7DY3UgXRfavPlBAAm9bD0WzcPj3W2v3PH8ekPfq0G5dEhWS X-Received: by 2002:a9d:5e88:0:b0:6d8:50f8:493c with SMTP id f8-20020a9d5e88000000b006d850f8493cmr9526170otl.2.1701796456950; Tue, 05 Dec 2023 09:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701796456; cv=none; d=google.com; s=arc-20160816; b=yItlF0p4p97ppAajZ8x9uaM0zfX/5kp0D4swZ+io1YjuyAZv74/uk1nQGhgHEndUrE 1EgfQeQvn2xSx9C3rt3uonVk9hY9/yzNGvFVpmECx7U4I5RzOvwiDLPmGwh/uLnopq5R h9W6LKpP54woqOWDdutN4afc/lU9vr2qIYBQgUJdZd0ikoF/iIQcOrtx7gNDcNc3fPBe HsbEj0L1oaXqCganc+tN/daIS2lNhHBriZv0piBS4sR/W2Tl2U9aJK8Rj5Yd2PAt9z9E NIBOsH0jtHr4x6aIP1P0wkVcTGuAnzkO1VEcr6cIapPcF/v8esaDKpblUxr/arm30wSy Z6OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Jhl4VBonzlc3pWBsupBzGj3hbqoDxmUEBnI+4/Xqy5c=; fh=q83KdFBIEe7aAGYYs/pFD6Env1qoVui750pj4tVcCgU=; b=Qm8GdJLob9l24RrDtHl0bHS93V/3swiQ5SjFu3mCFLVyyi/hQujp9BwnIt5RfH6b8E mVUppBnDHiwyP1wL4pDGOLykgh4JO2a6sCtrEAEcerJS9OkweTxGgOpJxruQVDaBSlSZ mg5Qwt2uZIED6A+wuIHIZ47vwxq6P3FgsnLS7qgsvbq1QdAGxnOI1u0nytSLOllJnBf2 U5TL8SGIAt1PtJ5wigzRafCHRy4YmWspkXmkEDBwfm7TalyFWjRCo+Vj+ph9oq8E2E9w QoemVwhxobJu0VCJybW2axuQq56i3NgxZe4jmCCG9h4fgNchzyclYl8+rVqyZv/6HcKJ FGsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=INvWLb69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id e132-20020a63698a000000b005c621f7280csi9897405pgc.466.2023.12.05.09.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 09:14:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=INvWLb69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C4EFC8182383; Tue, 5 Dec 2023 09:14:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235113AbjLERNu (ORCPT + 99 others); Tue, 5 Dec 2023 12:13:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLERNt (ORCPT ); Tue, 5 Dec 2023 12:13:49 -0500 Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1961B6 for ; Tue, 5 Dec 2023 09:13:53 -0800 (PST) Received: by mail-ua1-x935.google.com with SMTP id a1e0cc1a2514c-7c587a7446bso637861241.3 for ; Tue, 05 Dec 2023 09:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701796432; x=1702401232; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Jhl4VBonzlc3pWBsupBzGj3hbqoDxmUEBnI+4/Xqy5c=; b=INvWLb69Nuq8+ZQA8vMqzrJ9w5J2kDoCjYvzeV4qYNUskJOa55C/hC0eZLdebuxs2K 1EeYJVf0yzVjGvKtPKaB9z/BJud3na5s0gNmiLDWwNz7YHXU3ZVL2LHGXooY+M98nSUA /TS4yt/YPBvNdHjFxDjZsWmLib14zmzwegjIZaZaEulggP9KhnPnQAHhW1pFWQ1bl8b9 k0jGi7E+XJatInlffVPWRX2796OLME6t1wGemRtJFe5gURqFJ5Br5SPwFMj4hBWtG0Na 3y716aBWmqch5ispGWqjMBd1V1jrdEGbVT1mr5b/c5kVSqh4sGk7mt+X53fcu1aVhbOe vWbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701796432; x=1702401232; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jhl4VBonzlc3pWBsupBzGj3hbqoDxmUEBnI+4/Xqy5c=; b=b2kmqBNz7LpJsoPD3DE3gvuXcZMvVOEYjPVq4APIiPQyDtEQzGeb+5Tu6ZHd1ROL3w SZ+sUm/fJ93HyYPQM6JQlQtqWd5YaAtImOLC3aP7JpVi2XDAg/OEYPJFRpRk3THSfOHt q2ZXxNeB7W3SxTTXF6S8oRYGpK1wApUgELjp5bktJYk6+7NsabR5wZUzOA1Qz7bBBC58 D+zSc7J9rrj8TEGtHUrXDsGO5EvH+cKbkzMWYZp6y88PjNtM4tTSPEwIxXD979WJ9o3p CyPjrm3scvdaXasE5QNET89fYS+6+wHWztOHgU9+fXlxxteNy/UGunzSPL1X+uYNQccV BITg== X-Gm-Message-State: AOJu0Yxf26AQUCnT15xjaw6vUGjHFY5m6k+IGUkTRzDLJy8A9+4l1mnY 2zjCK0qWGZ443Km6XdKm84gfQcycwC0KnGNFmi06Yg== X-Received: by 2002:a1f:fc83:0:b0:4b2:7fa3:a965 with SMTP id a125-20020a1ffc83000000b004b27fa3a965mr4904643vki.11.1701796432618; Tue, 05 Dec 2023 09:13:52 -0800 (PST) MIME-Version: 1.0 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> <5a0faf8cc9ec3ab0d5082c66b909c582c8f1eae6.camel@siemens.com> In-Reply-To: <5a0faf8cc9ec3ab0d5082c66b909c582c8f1eae6.camel@siemens.com> From: Stanislav Fomichev Date: Tue, 5 Dec 2023 09:13:39 -0800 Message-ID: Subject: Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC To: Florian Bezdeka Cc: "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 , 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 , "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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 09:14:08 -0800 (PST) On Tue, Dec 5, 2023 at 7:34=E2=80=AFAM Florian Bezdeka wrote: > > 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: > > > > > > > > > > > > On 12/3/23 17:51, Song Yoong Siang wrote: > > > > > This patch enables Launch Time (Time-Based Scheduling) support to= XDP zero > > > > > copy via XDP Tx metadata framework. > > > > > > > > > > Signed-off-by: Song Yoong Siang > > > > > --- > > > > > drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ > > > > > > > > As requested before, I think we need to see another driver implemen= ting > > > > this. > > > > > > > > I propose driver igc and chip i225. > > > > Sure. I will include igc patches in next version. > > > > > > > > > > The interesting thing for me is to see how the LaunchTime max 1 sec= ond > > > > into the future[1] is handled code wise. One suggestion is to add a > > > > section to Documentation/networking/xsk-tx-metadata.rst per driver = that > > > > mentions/documents these different hardware limitations. It is nat= ural > > > > that different types of hardware have limitations. This is a close= -to > > > > hardware-level abstraction/API, and IMHO as long as we document the > > > > limitations we can expose this API without too many limitations for= more > > > > capable hardware. > > > > Sure. I will try to add hardware limitations in documentation. > > > > > > > > I would assume that the kfunc will fail when a value is passed that > > > cannot be programmed. > > > > > > > In current design, the xsk_tx_metadata_request() dint got return value. > > So user won't know if their request is fail. > > It is complex to inform user which request is failing. > > Therefore, IMHO, it is good that we let driver handle the error silentl= y. > > > > 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. In general, af_xdp is a bit lacking in this 'notify the user that they somehow messed up' area :-( For example, pushing a tx descriptor with a wrong addr/len in zc mode will not give any visible signal back (besides driver potentially spilling something into dmesg as it was in the mlx case). We can probably start with having some counters for these events?