From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7AACB458F4; Tue, 3 Sep 2024 18:21:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BACF4042C; Tue, 3 Sep 2024 18:21:43 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 73F30402D0 for ; Tue, 3 Sep 2024 18:21:41 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-714186ce2f2so4570479b3a.0 for ; Tue, 03 Sep 2024 09:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1725380500; x=1725985300; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=xib0AHHssuZne6kzzmI14i8h1WPU4ZAwP32eChGxKQI=; b=PX//YXR/s+2sfM+xra/01ZTa1aA7QkH8RN61ZKw0QMplXS+OsDGVpr7/vELUl5U1KB k9jEd9ohpcSU6vC5N+C0FOdaoKUZPEiklLm5wr2OwNSB5QU4fbEpF4lb57ktkLATudxB IN8zigr2Aq9jlK+6UwFbo2zsQQ/H1kiUhxJVSnq3KKjC6VkLtz5WoWFmN5d+5V2IiyUW znFXDKgSOz+pNTJJi2xlsLKrj1rUDIjsNM5s9M//QaofIMqdHcPeopuZ9Kk67ktlN3mI IvymrmDprIUjdkMeSyhKtRdTZNei2uimZmbygMLqSIzV21fIE9Jw3GCWmLd1DAMfEDD2 mnMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725380500; x=1725985300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xib0AHHssuZne6kzzmI14i8h1WPU4ZAwP32eChGxKQI=; b=bwnDf7owxwIufsD7Wvlmjjf+WnDtLcB+Ohdz+n3I08mK2BVWlYsa7dNAiE/IiatdOB 5ROcpOunHDLzz11KFSErtOt4r7ifyIM1buWc+X+3ICrzgFgWWzdUXPthzBp1mWQ/D35Y XHyThQQGAENRGsUJmzU2hh6D+vhJW3kwZzTmm+9Y7l6dpgJ5ee4Ye50TxDG7MlJTlng7 KeUYOTki1C3vrG6YeNYOw9lhwrUjeQepOTernQE5xjWvKRUJd4sseGy9QtbAXUhBUn/N p2yLsZin6NWNQW+fY8Qo7lsuaWzybgFXHR9fN6HE7o/k7F0rZTXzxcqjmmj2/kU97QM6 GyIw== X-Forwarded-Encrypted: i=1; AJvYcCVKxSeDl/omyDavdIOme+BsGjYq2860xmrnTaEoo1sn1xDTVrl49d17F+CWT3ALD/ZfY6E=@dpdk.org X-Gm-Message-State: AOJu0YzOEFMYFOQX/U//qGAcME8XtwQJCFftyGAEPR9hn1DNYtqINiKo HHSma/D8blDLphyb2UJQ8aJyLVLYeDZxYRwa3HkLwfzAmAQ9oPNmC4ML7lDX/kLIXiniszBdxld 4 X-Google-Smtp-Source: AGHT+IHiNdhuxXZ+NiLbdntvixw4fYw1WzlR1DGezY+wteGtZkQHMx/QDZv1jAAMGif1r8uegaDO2Q== X-Received: by 2002:a05:6a00:3c8d:b0:714:2cea:1473 with SMTP id d2e1a72fcca58-71745885710mr8969365b3a.23.1725380500253; Tue, 03 Sep 2024 09:21:40 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7177859880dsm51561b3a.154.2024.09.03.09.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 09:21:39 -0700 (PDT) Date: Tue, 3 Sep 2024 09:21:38 -0700 From: Stephen Hemminger To: Stefan Laesser Cc: Thomas Monjalon , "John W. Linville" , Subject: Re: [PATCH] net/af_packet: add timestamp offloading support Message-ID: <20240903092138.0e071924@hermes.local> In-Reply-To: <20240903114306.2336633-1-stefan.laesser@omicronenergy.com> References: <20240903114306.2336633-1-stefan.laesser@omicronenergy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 3 Sep 2024 13:43:06 +0200 Stefan Laesser wrote: > Add the packet timestamp from TPACKET_V2 to the mbuf > dynamic rx timestamp register if offload RTE_ETH_RX_OFFLOAD_TIMESTAMP > is enabled. > > TPACKET_V2 provides the timestamp with nanosecond resolution. > > Signed-off-by: Stefan Laesser > --- > .mailmap | 1 + > doc/guides/nics/af_packet.rst | 8 ++++-- > drivers/net/af_packet/rte_eth_af_packet.c | 34 +++++++++++++++++++++-- > 3 files changed, 38 insertions(+), 5 deletions(-) Adding timestamp is good, but it would be better if the timestamp field was generic. The pcap PMD also has a timestamp, and pdump API could/should use timestamp as well. What makes sense is for there to be a standard dynamic field for nanosecond resolution timestamp, and add a make sure that all drivers use the same base 1/1/1970 same as Linux/Unix. Also, having standard helpers in ethdev for the conversion from TSC to NS would help.