Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp50287rdb; Mon, 18 Dec 2023 08:38:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3DO1nfD0Eh2KR7kQeZ43MilyA4KG087Dp+mgKxvpO4Zv+D43DBNzazU0K53r2EUW6B2pi X-Received: by 2002:a05:6808:1442:b0:3b9:eb71:ee6f with SMTP id x2-20020a056808144200b003b9eb71ee6fmr18796592oiv.61.1702917481073; Mon, 18 Dec 2023 08:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702917481; cv=none; d=google.com; s=arc-20160816; b=TJGHYYZq2gsFja6WgYcDtfbcOhLHn+nHmoxCv6F3PGM3NiciTdodQfQKW2w76z1PCf iV+kiBAMMs0/qXrvKSgVbQUcHn4WSUnhpM5qq4rkGiBau0bQRiQ7pPRThKTl1VHaIRXe CWaHkPtTV7xzDgNtEzNcn6ObbnaCcykYzbEGXmukJjGa5aiR08ZONIxx+elKIvEJKzmU Isb5zLoDycKxrkTqON6h1c5vzDkWfp6kTUL6e3qRHUUWxxZ+JWmcsrbCtUy6fbZh3KyB mIwppNzL2+ovejbZupXjlnFBUofNJUi0dtx2m402AHGxbAkVPfcBt382JMou4/gxQIJB JIog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=lQV19gsqAR0o53Ir8ZJ+QKmKnVhQISOohb4gzU/oY50=; fh=CMfOW48Z862F1dQ/w2g/kAZG8UjejRd1JMOg3C/v1pA=; b=Rakt1Q5P9NBmEMQE5v7MKXdNQ5H6iZS0DBsgetsIDqL+aa9DDKe/id2mfC2C+s1LI1 shGTwFuk1w0tIZWvok8j3Ykef9pK6KrgVe5QFwjiwBPqhK/mln9910G58V+CChhTwSfH vsTLgZK0NyYTXPxoistQ3XAYFjPm6O1l3Wv46rpeT4kIfzS6wqjS4ezQBG4Iw06C1Ctn fCbmNI8lAuBkgShR7cTGMLLXfzoSCURUPsM3va5mwJVRFpwkM/+Xm7tgrQhOcaU2Bz/k 7nftIlI+Ah+c2jqOd3aiiAdYRvnx9q5TwTAsfWhB15aX1+cy7tcdXTj1DwT9jClCWsi5 I2yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PPa0h1G+; spf=pass (google.com: domain of linux-kernel+bounces-4076-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4076-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c13-20020a05620a11ad00b00780deea6328si3921279qkk.148.2023.12.18.08.38.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4076-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PPa0h1G+; spf=pass (google.com: domain of linux-kernel+bounces-4076-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4076-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BC48A1C240CB for ; Mon, 18 Dec 2023 16:38:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BA644FF9D; Mon, 18 Dec 2023 16:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PPa0h1G+" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 711824FF84; Mon, 18 Dec 2023 16:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-3b9f111c114so2181995b6e.1; Mon, 18 Dec 2023 08:36:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702917395; x=1703522195; 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=lQV19gsqAR0o53Ir8ZJ+QKmKnVhQISOohb4gzU/oY50=; b=PPa0h1G+yOpX7fieVTz1c1RZRdBCbN+F1AnY/WVAjnW1vBPZk7snG2W9hnwIR3MtK/ LqcAmsQH6SpLhE1wKW8MFB94u/rboNoKxwyafTW9QSj69IqRHpoiXh21WlUkZH0Hf2ai JrMvo+0MHb1ZsHYMgPubZQXi/MjB1M2XXjWMpSbC78T0vOQVmfTdf3WpZZ7yn3SeCwvN LxLSx6t2OrBz6lTfSuW9PxlnH5RUHxEjEG50y0KyhjIKsoEuTgplmXhL+mLTkmZzxFbc uYkxG4pMAatqUlbkzpDMlwC2Yrd8293tok1NpEveN5P4RToqhrztb2KOi5evUCWMa5rf 6jnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702917395; x=1703522195; 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=lQV19gsqAR0o53Ir8ZJ+QKmKnVhQISOohb4gzU/oY50=; b=atFNVGaNflx9Ncx0FDWO4I/3U+7vVyw9hGhq1hvDtIWuF9HJ/+/VDo4yj8IVhUlWpR XHVrs8Ttl1VUB/lcuLldkPKQa14/GRlFY31jBhusOwhQOGDthV3x2g79M+ytwZrj2hKY STTz1t6h0SduExmG6K2Riq+SxVWCGMG6I0LdTGzLXBN3hAD7tX07g80zYEAdTiogiqim +xdEQVt/y6g0urjao0NEyztsGNmoXvyTN93FSu1vIvQj9DMcnYfen02fCbUr1dJ/D9YB 6qs2k8dF3n33i/NJ1S1Nw1X8OngpImlGH27h5YdapHapZ3EUVsrNHYgaohQo0WC017lL BZiA== X-Gm-Message-State: AOJu0YzXiSGs5fnqs00RbWYMj2VU3VmvkqgIbKQzQFMSi89TuTGnulWP aQZr8NAk5LeXstAWMJZX7W0= X-Received: by 2002:a05:6870:a40b:b0:203:936b:70d with SMTP id m11-20020a056870a40b00b00203936b070dmr3344641oal.62.1702917395435; Mon, 18 Dec 2023 08:36:35 -0800 (PST) Received: from localhost (114.66.194.35.bc.googleusercontent.com. [35.194.66.114]) by smtp.gmail.com with ESMTPSA id bm27-20020a05620a199b00b0077d62e78db9sm8408821qkb.128.2023.12.18.08.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:36:34 -0800 (PST) Date: Mon, 18 Dec 2023 11:36:34 -0500 From: Willem de Bruijn To: Steffen Trumtrar , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Willem de Bruijn Message-ID: <65807512bc20b_805482941e@willemb.c.googlers.com.notmuch> In-Reply-To: <20231218-v6-7-topic-virtio-net-ptp-v1-0-cac92b2d8532@pengutronix.de> References: <20231218-v6-7-topic-virtio-net-ptp-v1-0-cac92b2d8532@pengutronix.de> Subject: Re: [PATCH RFC 0/4] virtio-net: add tx-hash, rx-tstamp, tx-tstamp and tx-time Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Steffen Trumtrar wrote: > This series tries to pick up the work on the virtio-net timestamping > feature from Willem de Bruijn. > > Original series > Message-Id: 20210208185558.995292-1-willemdebruijn.kernel@gmail.com > Subject: [PATCH RFC v2 0/4] virtio-net: add tx-hash, rx-tstamp, > tx-tstamp and tx-time > From: Willem de Bruijn > > RFC for four new features to the virtio network device: > > 1. pass tx flow state to host, for routing + telemetry > 2. pass rx tstamp to guest, for better RTT estimation > 3. pass tx tstamp to guest, idem > 3. pass tx delivery time to host, for accurate pacing > > All would introduce an extension to the virtio spec. > > The original series consisted of a hack around the DMA API, which should > be fixed in this series. > > The changes in this series are to the driver side. For the changes to qemu see: > https://github.com/strumtrar/qemu/tree/v8.1.1/virtio-net-ptp > > Currently only virtio-net is supported. The original series used > vhost-net as backend. However, the path through tun via sendmsg doesn't > allow us to write data back to the driver side without any hacks. > Therefore use the way via plain virtio-net without vhost albeit better > performance. > > Signed-off-by: Steffen Trumtrar Thanks for picking this back up, Steffen. Nice to see that the code still applies mostly cleanly. For context: I dropped the work only because I had no real device implementation. The referenced patch series to qemu changes that. I suppose the main issue is the virtio API changes that this introduces, which will have to be accepted to the spec. One small comment to patch 4: there I just assumed the virtual device time is CLOCK_TAI. There is a concurrent feature under review for HW pacing offload with AF_XDP sockets. The clock issue comes up a bit. In general, for hardware we cannot assume a clock. For virtio, perhaps assuming the same monotonic hardware clock in guest and host can be assumed. But this clock alignment needs some thought.