From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mail.toke.dk (Postfix) with ESMTPS id C92C3A1C70B for ; Thu, 27 Jul 2023 16:11:15 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B80irAiG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690467074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=02H8x558hkZCT5QcK29c6OWGjNlpE3njHKaLGMgzpjQ=; b=B80irAiG0oj11GZPP2xYysMjHOe6fpdCC6WBVAAXVgZw0A2CL1a/sxop7bYQQkq4F6l0HA fyfegaMPT6PdDT2BcT9XU/ILNANWx5hBWL/Xbc9GDaP44370oaETiTf1UhIK73fCB4F59R HAPQBxYb8gqwXwkX3CaCHTNVD9g7b6k= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-Qq9CinefMU6h8-yW_ljjnA-1; Thu, 27 Jul 2023 10:11:12 -0400 X-MC-Unique: Qq9CinefMU6h8-yW_ljjnA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-99bcb13d8ddso61148566b.0 for ; Thu, 27 Jul 2023 07:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690467071; x=1691071871; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=02H8x558hkZCT5QcK29c6OWGjNlpE3njHKaLGMgzpjQ=; b=Upyv+BCijXj29bnBMc8XA2YW8L0GwSNiLideiW7naA1UiEFwzqkTgfU9YXC56wTtvL MCZZqKq5OPkGnpRIuTadqMM+5W/gunPSOMB19sqoIVn/X6rhICThKu0cGbOu0q0Y7qE7 ulZQr5Pwt5lucA0f/m0dDy0K2q0m0vnoaLGhkARftRIa1yaJ/KDyCFm0byR9jquqaYeF +LVca40XWTplZoTn9HO3nDe23NWwiq8ZmpjplD1qcWZvfCa3XEH2qEVFuH8f7fcOx/f4 XL1/q+FYCrSoXZmjmCHN3ISi6BS/5HjgphtIsMy4FiHDaorfvfv/Ujgffnp5eJ2/Ibxy KtlA== X-Gm-Message-State: ABy/qLYyzWYd+IEpxEn6JpK33VymuMXLdZXu80iEXsNkgXxaBau611B1 8JQXBpgZD8qhV8clBi3Sn6o4PgrLFf5C/hsWHCIO0bpYLl9hrhfYzrlbh6e0ZkqXhP1z6tuUI2I BN+y6euoLiN/miMKCIdPU X-Received: by 2002:a17:906:7a54:b0:99b:4668:865f with SMTP id i20-20020a1709067a5400b0099b4668865fmr2312448ejo.10.1690467071173; Thu, 27 Jul 2023 07:11:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlG7IjqGxmTTXNFgOyjXwTagVILgqatNGoMeAgn/XqtOcq6Hkn97NgBSsfxMxoZ+Mwp8fNZ7Dg== X-Received: by 2002:a17:906:7a54:b0:99b:4668:865f with SMTP id i20-20020a1709067a5400b0099b4668865fmr2312413ejo.10.1690467070894; Thu, 27 Jul 2023 07:11:10 -0700 (PDT) Received: from [192.168.42.222] (194-45-78-10.static.kviknet.net. [194.45.78.10]) by smtp.gmail.com with ESMTPSA id gq15-20020a170906e24f00b00982a92a849asm822836ejb.91.2023.07.27.07.11.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jul 2023 07:11:10 -0700 (PDT) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: <50fc375a-27a7-8b6a-3938-f9fcb4f85b06@redhat.com> Date: Thu, 27 Jul 2023 16:11:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Willem de Bruijn , Stanislav Fomichev 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> In-Reply-To: <64c056686b527_3a4d294e6@willemb.c.googlers.com.notmuch> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: BG43Z52HJYQDY7S6GWIGNYK2OYX3OO66 X-Message-ID-Hash: BG43Z52HJYQDY7S6GWIGNYK2OYX3OO66 X-MailFrom: jbrouer@redhat.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: 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 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 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? --Jesper