Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1115407rdb; Fri, 1 Dec 2023 07:27:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzntBgd0IbXNzM8EQVv236DE7EdHkCJNsjFwINZMF+x1K/XAq/Z+pNFNqXiIr4dR0A4bBa X-Received: by 2002:a17:902:e852:b0:1cf:fa41:ae66 with SMTP id t18-20020a170902e85200b001cffa41ae66mr13638713plg.7.1701444434468; Fri, 01 Dec 2023 07:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701444434; cv=none; d=google.com; s=arc-20160816; b=ck+uV9KTKyNZo96h0pvjgmdW8+vELAZbTkMnfUTSeUTDND9IVkXst5Tzn2WfeyBbDL QsL0me6oB4BKNL3XiGEld+jBVB5nOxhCPUbxQgfJxBUwHTn1RLOtjNJxbYIlSscdqzNp hPey6t2I86pJ2Q7ejfZ45ZBZ+gQCTvUcePhalMGTPpHaN4GYjt37t/Db5nv0geB8mPUZ MLPdK1CNvG7Dfwq7f1nAAMJ1iCn96hrCEMpaRU5ipntHGbunmcmBG+YMT5c47qqJbxl+ eS1X/m3vfgaxIgu8Xal+PsvSz5+AvADoeAiTPHLWNBvHyBA0nKz+qPIcDFScIAl145c8 Rx2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=+Y5uUpKThH5AlPxwZK/+8ce/JS/o6enGufFaGhxrFrA=; fh=/PZppwOx3dmkYzjSTqPU5Mol6ET1n0YaxlNXKqQehPI=; b=bdm9MsEVViijAbgUyoDKDDPBCZ+YLC3KwyQniHQYPv1H/DoHWQdpjWpqE4Mnk4YdVo 4H00loBZko+dzvoqZmXeSIGn37YSE7lQSXTAxKCO4mL0NsebkwWqganZ6rfWCjJAQR5/ BFii61JOptTod2p3obg7gxLL916Owm4WePNH7FSFZnGrVfbmZFC5eb9WhelAZmiyZCJl TfiCY3Pj3EVQDO9jOibttBvvVneOv22t+lkjQK5JqIUa4BNi01F4gVbRdUUdgwQQ9jES zOKgpqVQy9UXBW3JM/39k5Hndy6PwNnTnEXqbSfc+Sk5BuDtVQQPNK/rv8VVZ/Iu1C5g a8zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LlkAVm0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id e11-20020a170902b78b00b001cfcd31f2cdsi3301385pls.168.2023.12.01.07.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:27:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LlkAVm0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 93787825F11E; Fri, 1 Dec 2023 07:27:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379433AbjLAP0t (ORCPT + 99 others); Fri, 1 Dec 2023 10:26:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379432AbjLAP0r (ORCPT ); Fri, 1 Dec 2023 10:26:47 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F76F103; Fri, 1 Dec 2023 07:26:53 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-423f2d0c8baso13722541cf.2; Fri, 01 Dec 2023 07:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701444412; x=1702049212; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=+Y5uUpKThH5AlPxwZK/+8ce/JS/o6enGufFaGhxrFrA=; b=LlkAVm0E4GDkDf9KHlwLtfA44S2vZn7n7tu7k0Syq3g8Vy7TobnUZOEMLm+C4RRy5w mFd5f2BdgT3QF0mYiEuaOH/AbRTq2kRppiB6v6aPkzRYSYjMlz3c2fKVjbhLtLcawuDG qCafr0+1phPmkEYQt17zrgradddvlb5Zrg2LKgCmihhXFXJ3L2rtbtlRBjFEgpDFzINg iRvfhULsQ4GW4+2ptSo2Jt3k1yuo2X6PFUin3PfbQZ4rQHAxT7AD8Y7eLAfGApwuoSl+ RMc+0TboXHMBzA9O2MmKiAXm0IBO3vRqUccFrZyekvQaZG1RIpGXmvcUWKAUHDVtYb61 qI8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701444412; x=1702049212; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+Y5uUpKThH5AlPxwZK/+8ce/JS/o6enGufFaGhxrFrA=; b=HcPi8dnQXOmRsVhxlXHKJHskiCTfmvgJV22pBv4v2n5Bt/mbJuzaJes8/chvDpypVG KeqVR1gVjmUZuEDuo237m9s0sQ9HujJlzSH3dVYdg/ZfwHPLp09J7X2HT7Q/O64Em4by H6JQUAkFoSRWDeC4zQnaxGxM0NTGZFo1XVl3bHXbOH8I9xkQ4hOL/u17V4eV/NQuTQqn 2l9F1m8BnphgYaSme3ZSV4wkav/Ib5dMfiiQHdL0EXGu5PM3/zi+R9HUdIQl1lWxMpGU mXGR3Yu8Lb2YqdqPnfJiEtTSnGmFkaRO4mT6/3F7HWkxHFs6ftkbKrlIO7d7U0TNoQTh vVyg== X-Gm-Message-State: AOJu0YwcAhuwBdJQHhh0nab/5S9BUd54E+dNPmXYVWHpesvCj5uX2p27 PoPpKwBkEGx4gSdgafvMD6s= X-Received: by 2002:a05:622a:1a89:b0:423:6e29:c149 with SMTP id s9-20020a05622a1a8900b004236e29c149mr30091182qtc.1.1701444412484; Fri, 01 Dec 2023 07:26:52 -0800 (PST) Received: from localhost (114.66.194.35.bc.googleusercontent.com. [35.194.66.114]) by smtp.gmail.com with ESMTPSA id w2-20020ac87182000000b00423de58d3d8sm1567519qto.40.2023.12.01.07.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:26:51 -0800 (PST) Date: Fri, 01 Dec 2023 10:26:51 -0500 From: Willem de Bruijn To: Jesper Dangaard Brouer , Song Yoong Siang , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Bjorn Topel , Magnus Karlsson , Maciej Fijalkowski , 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 Message-ID: <6569fb3b31fb6_1396ec2948@willemb.c.googlers.com.notmuch> In-Reply-To: <5a660c0f-d3ed-47a2-b9be-098a224b8a12@kernel.org> References: <20231201062421.1074768-1-yoong.siang.song@intel.com> <20231201062421.1074768-3-yoong.siang.song@intel.com> <5a660c0f-d3ed-47a2-b9be-098a224b8a12@kernel.org> Subject: Re: [PATCH bpf-next v2 2/3] net: stmmac: Add txtime support to XDP ZC Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 01 Dec 2023 07:27:05 -0800 (PST) Jesper Dangaard Brouer wrote: > > > On 12/1/23 07:24, Song Yoong Siang wrote: > > This patch enables txtime support to XDP zero copy via XDP Tx > > metadata framework. > > > > Signed-off-by: Song Yoong Siang > > --- > > drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 +++++++++++++ > > 2 files changed, 15 insertions(+) > > I think we need to see other drivers using this new feature to evaluate > if API is sane. > > I suggest implementing this for igc driver (chip i225) and also for igb > (i210 chip) that both support this kind of LaunchTime feature in HW. > > The API and stmmac driver takes a u64 as time. > I'm wondering how this applies to i210 that[1] have 25-bit for > LaunchTime (with 32 nanosec granularity) limiting LaunchTime max 0.5 > second into the future. > And i225 that [1] have 30-bit max 1 second into the future. > > > [1] > https://github.com/xdp-project/xdp-project/blob/master/areas/tsn/code01_follow_qdisc_TSN_offload.org Good point Jesper. Can we also explicitly document what the type of the field is? Nanoseconds against the NIC hardware clock, it sounds like. We have some experience with this, too. Something needs to do the conversion from host clock to NIC clock. It is not sufficent to just assume that the host clock is synced against the NIC clock by PTP.