Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp178919rdg; Tue, 10 Oct 2023 07:27:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeF3Sg22P22jmjnXhZxiLge30MRp2rMMzmBiQDZmI+0Pp7DOuJL1GYRJkFRMJkUx5mEQeK X-Received: by 2002:a05:6358:33a5:b0:143:5180:1700 with SMTP id i37-20020a05635833a500b0014351801700mr18291317rwd.27.1696948024800; Tue, 10 Oct 2023 07:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696948024; cv=none; d=google.com; s=arc-20160816; b=K7YR5gJYUKQ6TZNZ4JpCTZIqXqLxzxzgS9aX57cpJImRCj870iKivhcqgrzDJ0yK4H pr82pXov80MYFD+reslITNqZdetJZVmw6i4xNeQj4VwElpdmGZqM2v/DshFT90T09Jjr HXs1dAokrjslCW22f9U3vKHx9Qmgunmy9XtaEKp8dgt0KTA+m7OITziqTyf026MIx+sz UfbzlYd10DO2IAGSiyMQ4hHHf1RhZiEFgakPRlPCH/fAbI5HTPjsMThJ+Str7Y6AC5I5 poCIciCM6YD+fIUPfnhfGdmoQty46zjiA9nOviOX4WunEMQK1hUgkZrjfrgpHpBNNgtt 8ZSw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aUNoXNX1znh/d/Ukm3r5K//LSYdcYh74Gi3FYjHXj5Y=; fh=m0XRA96nwREcZqJH3qmPYEYQFSQf+5asql0DALsO0Yo=; b=0lM3C8ic0YN72WqUYQBe73r61LfezKkC11AtFRX7n30gOknBhT5VPKki4TD5nl74Qq I3TpUhJQus+qJZNnhqlpzypWkAExD16zyMtQlJWbDjU5ans56lGbzC5gEGrc4XN1LiUH G691dlvjmGw35VU/nyYdQPGBMeaEglOyCtVPYqnz/+mgqLj0Zvr5T8TS4Wv6XNIl6J5z +2TBYIZKqYpC65qKyBRTIYmkniUaRq3f0EMmJKLF7sfuFHana1Uiqbmr4SygdCnRmqYl UqMjRmFF43nN5ZENkoHTBDcVMSVIdoc1MloDxI8SKxqRwwmVzfw12UZvJLP17w6uUhiC yIiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y193-20020a638aca000000b0057851fc2b4asi9505611pgd.55.2023.10.10.07.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:27:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 87FF0804AD0C; Tue, 10 Oct 2023 07:27:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233080AbjJJO0q (ORCPT + 99 others); Tue, 10 Oct 2023 10:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233060AbjJJO0n (ORCPT ); Tue, 10 Oct 2023 10:26:43 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DECE5AF; Tue, 10 Oct 2023 07:26:40 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 614DBC15; Tue, 10 Oct 2023 07:27:21 -0700 (PDT) Received: from e125770.cambridge.arm.com (e125770.arm.com [10.1.199.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C85E93F762; Tue, 10 Oct 2023 07:26:39 -0700 (PDT) From: Luca Fancellu To: linux-kernel@vger.kernel.org Cc: Wei Liu , Paul Durrant , xen-devel@lists.xenproject.org, netdev@vger.kernel.org, Rahul Singh Subject: [PATCH 1/1] xen-netback: add software timestamp capabilities Date: Tue, 10 Oct 2023 15:26:30 +0100 Message-Id: <20231010142630.984585-2-luca.fancellu@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010142630.984585-1-luca.fancellu@arm.com> References: <20231010142630.984585-1-luca.fancellu@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 07:27:02 -0700 (PDT) X-Spam-Level: ** Add software timestamp capabilities to the xen-netback driver by advertising it on the struct ethtool_ops and calling skb_tx_timestamp before passing the buffer to the queue. Signed-off-by: Luca Fancellu --- drivers/net/xen-netback/interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index f3f2c07423a6..b71158967123 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -254,6 +254,9 @@ xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) skb_clear_hash(skb); + /* timestamp packet in software */ + skb_tx_timestamp(skb); + if (!xenvif_rx_queue_tail(queue, skb)) goto drop; @@ -460,7 +463,7 @@ static void xenvif_get_strings(struct net_device *dev, u32 stringset, u8 * data) static const struct ethtool_ops xenvif_ethtool_ops = { .get_link = ethtool_op_get_link, - + .get_ts_info = ethtool_op_get_ts_info, .get_sset_count = xenvif_get_sset_count, .get_ethtool_stats = xenvif_get_ethtool_stats, .get_strings = xenvif_get_strings, -- 2.34.1