From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by mail.toke.dk (Postfix) with ESMTPS id 874B3A1C76F for ; Thu, 27 Jul 2023 18:37:40 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20221208 header.b=e6/UbFsH Received: by mail-pg1-x54a.google.com with SMTP id 41be03b00d2f7-563db371f05so726209a12.3 for ; Thu, 27 Jul 2023 09:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690475858; x=1691080658; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=1cgG0ZaR8t8OuiGWgd5910cYe86YjYguqpgeUn39fOY=; b=e6/UbFsHk5eizjT5n+2u8ZniNz1vcRcOL144F87T9aq3Xb3S+Z770M2JeO7GzCIij0 pqt0Wu3hRJseTkyyBuazhmeXI3y6WYYizS11JMDJZFtFkjpufxWz2sJzo+cZfMfYFTRM 8HtfvmebTNEpFtpn9BrICx6SmJtjhpjuQHsfHkCwRCth9jCPA+npLIO8dp7x1WF1olO3 rYNT0Du5FAc5QN5M85aJQhFeusKWL6sU2j3CGcoNVg6/e0i0blFkQHrVMYCeWGVPkEdv xIom1v918Lmm26QazAiYonVcqDMIr5gPE35k0H+AbTNwvUoIpPbzQAHB2QLomrcOJyFx ccpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690475858; x=1691080658; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1cgG0ZaR8t8OuiGWgd5910cYe86YjYguqpgeUn39fOY=; b=gTD/CTmqvbUVPofkoQD6ZMk9mCWpkLQp1aCsf+gHd+2kWKnSGCIDBnwZ065gP0KFSZ KOH+92eG6nEms0TTzMLAyKEDUSk0LLhJhyOcTfChU7sF6OYUz705bN9dyRgqDOhiDH2N aCtF2CZtMbITX3924P1oczzkwFD5hJANNh/CHS2HYYdHpGKQ62GSvvDNALnFufLfbE8U Y9fieMHPKe7nEz4mI6+zFJa/5Vy3xjwo1ZzxCxkAfU6v35yzHcAba79LtVeu6wt1whYI 6i1fPC3ZOUojyTHBrIOttNWzre59ocaGrjjy+YACRfCGvhTBorxmQG/S7poShPo+sA2g 8wiA== X-Gm-Message-State: ABy/qLagvPxRmo6k6VcgixvUViGEc8jZhqper/Jw4GydBHlu5tTwAMwC NkL70yvNzsnRSqiSMvAq/r5eCzc= X-Google-Smtp-Source: APBJJlFNxoH43LyPCKEvWiRj/irsFrJ1yuIR2ttQ29BMDgQJitWqrego1USHOLVdcIkP8/t602c14Y4= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a63:6f86:0:b0:55a:12cf:3660 with SMTP id k128-20020a636f86000000b0055a12cf3660mr25756pgc.1.1690475858489; Thu, 27 Jul 2023 09:37:38 -0700 (PDT) Date: Thu, 27 Jul 2023 09:37:37 -0700 In-Reply-To: <50fc375a-27a7-8b6a-3938-f9fcb4f85b06@redhat.com> Mime-Version: 1.0 References: <20230724235957.1953861-1-sdf@google.com> <20230724235957.1953861-3-sdf@google.com> <64c0369eadbd5_3fe1bc2940@willemb.c.googlers.com.notmuch> <64c056686b527_3a4d294e6@willemb.c.googlers.com.notmuch> <50fc375a-27a7-8b6a-3938-f9fcb4f85b06@redhat.com> Message-ID: From: Stanislav Fomichev To: Jesper Dangaard Brouer Content-Type: text/plain; charset="utf-8" Message-ID-Hash: 322GVXBDPV24YHPILRX6R3P4JQGQZCB2 X-Message-ID-Hash: 322GVXBDPV24YHPILRX6R3P4JQGQZCB2 X-MailFrom: 3Up3CZAMKCcM1mopxxpun.lxv6my-qrw216my-y0xsnl2.wn2@flex--sdf.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Willem de Bruijn , brouer@redhat.com, bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, kuba@kernel.org, toke@kernel.org, willemb@google.com, dsahern@kernel.org, magnus.karlsson@intel.com, bjorn@kernel.org, maciej.fijalkowski@intel.com, hawk@kernel.org, netdev@vger.kernel.org, xdp-hints@xdp-project.net X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [RFC net-next v4 2/8] xsk: add TX timestamp and TX checksum offload support List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 07/27, Jesper Dangaard Brouer wrote: > > On 26/07/2023 01.10, Willem de Bruijn wrote: > > Stanislav Fomichev wrote: > > > On 07/25, Willem de Bruijn wrote: > > > > Stanislav Fomichev wrote: > [...] > > > > > +struct xsk_tx_metadata { > > > > > + __u32 flags; > > > > > + > > > > > + /* XDP_TX_METADATA_CHECKSUM */ > > > > > + > > > > > + /* Offset from desc->addr where checksumming should start. */ > > > > > + __u16 csum_start; > > > > > + /* Offset from csum_start where checksum should be stored. */ > > > > > + __u16 csum_offset; > > > > > + > > > > > + /* XDP_TX_METADATA_TIMESTAMP */ > > > > > + > > > > > + __u64 tx_timestamp; > > > > > +}; > >>> > > > > Is this structure easily extensible for future offloads, > [...] > > > > Pacing offload is the other feature that comes to mind. That could > > conceivably use the tx_timestamp field. > > I would really like to see hardware offload "pacing" or LaunchTime as > hardware chips i210 and i225 calls it. I looked at the TX descriptor > details for drivers igc (i225) and igb (i210), and documented my finding > here[1], which should help with the code details if someone is motivated > for implementing this (I know of people on xdp-hints list that wanted > this LaunchTime feature). > > [1] https://github.com/xdp-project/xdp-project/blob/master/areas/tsn/code01_follow_qdisc_TSN_offload.org#tx-time-to-hardware-driver-igc Nice! > AFAIK this patchset uses struct xsk_tx_metadata as both TX and > TX-Completion, right?. It would be "conceivable" to reuse tx_timestamp > field, but it might be confusing for uAPI end-users. Maybe a union? Sure, but do we add it later when we add launch time? For now, let's figure out whether 'tx_timestamp' is the right name for the 'tx completion timestamp' :-D Later on, we can union it with launch_time?