Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1536197lqe; Mon, 8 Apr 2024 11:42:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWl/02hShlQ+JY+gkHSoF/2YgQSdurxO5QN+bdfNbM6R1q7E3mn+UYqkPRCcTzPT87NDDmSFIS62TJJXHPDy/gExJz3Inhd/3lTXaElUA== X-Google-Smtp-Source: AGHT+IFZd/sbGnQRIzExeiGsKAX8N3uJ7lM+iih3d9Y04sQc5ppezLkR7b0G+tRh9UtdV17ynM9p X-Received: by 2002:a17:903:41c9:b0:1e3:e563:57ed with SMTP id u9-20020a17090341c900b001e3e56357edmr7569802ple.36.1712601764768; Mon, 08 Apr 2024 11:42:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712601764; cv=pass; d=google.com; s=arc-20160816; b=RSHa4sT8FP78qOUdLG8hP9eVGuzv+K3grajNUoKYxeZSGR28nLcgesq498aUL9rz2h qG0sPT+6+4dHv6o4/sXteQcNYDWSoJiL7RW18qoDOXv5yKPoVkY9hJl5xOADWb5lOigT AaZpQMf8jjIL/4++dRTUXENy5znG+E1bV/j126nIzPjlFMqIRByzwWcMNMX2Uy+Qsx8U LBUq0X/hV8R59C+a3rVOP10d4dKxjaemrhNz9XSa4CqO3u5feYP8L0418LGTRXWZUDeY kaqb4zEv42MNd0RgBqGs/6CqYD6KH7e3ZdftzjgJmBo6gX1D380OUJzv6UWZ4olKHPQ0 DCxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=dgbG1Kt8OxqM+KCQPgmquqh3ShladChtxEoh6/p4jxE=; fh=wOdxMoUeoN0xA91QqvbwO5xyUpg2YSSv3kKeYuP0OEE=; b=XuKHAxt+aeYLQSKXstNC1szngkvO70eR5yHqIOmCQAz7SuQtJnRPItXtj0wfbyXaMY jQ4TuXfnatEjsaNZmmEPsnvC4b1W1SilXXRT6MGkxunYKZ2pSHyShEVQDSu9Sh1IpqZD 6sL6bnivVKGog4l/qDtNrk3EYnfNfSbec9Dt071+4mCRo/bLHP916BVDF3rGDsZOEzF1 5LWFc8J/C4HnSwcTAQiKuKNdfrOnV/DVVOm7SskBNhvTWV8/Z1DKkGOMsacSGH1yzcJB qjqgq9omMQ9TH4qYEhs30oiOpz8Fc+kpfG0rMFdlma+Fsv02Z1jhPAkuNjxS3p3ysLAN 1vVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Oa/maYBr"; arc=pass (i=1 spf=pass spfdomain=flex--jfraker.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-135801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n6-20020a170903110600b001dc879b3b04si7102876plh.237.2024.04.08.11.42.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 11:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Oa/maYBr"; arc=pass (i=1 spf=pass spfdomain=flex--jfraker.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-135801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 54915B24A23 for ; Mon, 8 Apr 2024 18:10:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9602144D0F; Mon, 8 Apr 2024 18:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Oa/maYBr" Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (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 6A3C41442F3 for ; Mon, 8 Apr 2024 18:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712599799; cv=none; b=UnZ2ovbo3I5m1JeAz2XSei6a5K+8A/pZ96gPpy3Vd4A7NmDxTnjny3ATvgB25zmcKds1L7/fWitoU0RnoAJYHyxp92aBxWhW1/uLtOBJ2LjOX2jNtFLiBBG4WF12FKWxb0bpJjrHvFcwKK63BFuY2eIYGf6e6FM1M8nN8E2PCLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712599799; c=relaxed/simple; bh=WP8hAFXeEVd5tHoNZiaf7s8D8tEPRQgQjUGi1E9MqKs=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=q8EKqi5ZTLwrmcITnF3nnXpWDam3Eu76Yqqz8LI6Oa8/wCP/8H9NQwbSFrxfVA2qEil5LkR9Cw2JTTOurw20lGTcHXa/Vy455EqDA8STQXQ87NtxY2iFC/BskX9DLzNDlCmMlcMi9jJvCo1NRWeNLiGuuw9CGAN8S+dkzYMbFPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jfraker.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Oa/maYBr; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jfraker.bounces.google.com Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-6e6bab4b84dso4668210b3a.0 for ; Mon, 08 Apr 2024 11:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712599798; x=1713204598; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=dgbG1Kt8OxqM+KCQPgmquqh3ShladChtxEoh6/p4jxE=; b=Oa/maYBrXDZ8MWW7hDNFr9Qm4xuJxoHOgHIZmDo5S7LH4MO3peb0+4wDE7Buvql20V 7K9q6fD9BXm7XpoQmi5cgJqGq5uMoBjPYjANen4IxaOaG2DCQRHKdIhih7cLbr2r2XkU JcfQwjXb6uYQhNhYeH5B+MkHaXOOYH7Gy8UPO+JCa/NknnWqilc75osLvX2MB8HZOBI9 ZOQ+vGjkXQdNVaApaA0PxJeJjwgCaTUMvTVm0wtzueNvpeX/IaswS69/FwmbHK083U1i 0fz9FvQEtUUIvBQwdvCyekd0tXiIJIMSIABpGjLR6OkeIiudxYipl5Yl/VVjyBngIkKi Answ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712599798; x=1713204598; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dgbG1Kt8OxqM+KCQPgmquqh3ShladChtxEoh6/p4jxE=; b=TONIEpGWj7YZn+iBgOsBkJnc6HmdsJxFMXf9cqqiF+HwcC8LmEVysFPfgUHn2JGeJF owrHcex8njN/mzdVX08n1641bk2KSIor82BN8RW29FGWbrZrz3gleUr4urEip0t6e3Z6 3cLVhk8gHIznRzl+JoNSq4k27Uxfbwx7h/b3566aWnvXfYaHVAZ9FfKVdYM2v+w+7AR8 bTKIGbD8hlrY3KxxO3lZ4j+ECkrzDOyWuOG8GCkYB7+vhJrDph9rRQK4zlY9BPcPaRYB aPEPynsZv5OYJSLzN/jMtNgPqxqOU18NKS2xOrBELMio0AM/xEHjxrIoe92LlXoxCmKf iuug== X-Forwarded-Encrypted: i=1; AJvYcCXUDzgo5k/tug8cNnJUrwRfnhaa9kXmXLTqJcV6APOHi76M9Am6ulvBmJCK9tn/PU2nCnipVGYb62eKzvgRdlnSzKr+Z1o/YR9hDqV7 X-Gm-Message-State: AOJu0YxcnfWSdsaIy2LFyRVFJC+3Qv9ABVfxsH252NomV8TwE0ioe/yH jrkwB6Nam56+9dxb7Bxpesr5iF/J39SW2HERvYjgVEVkHi+lWuyBUGO2nI9UqkMV0J2JjpUMsmi fLyRJ5A== X-Received: from jfraker202.plv.corp.google.com ([2620:15c:11c:202:81fa:e559:a246:3147]) (user=jfraker job=sendgmr) by 2002:a05:6a00:2d8f:b0:6ea:c7a2:b4c5 with SMTP id fb15-20020a056a002d8f00b006eac7a2b4c5mr866601pfb.3.1712599797626; Mon, 08 Apr 2024 11:09:57 -0700 (PDT) Date: Mon, 8 Apr 2024 11:09:01 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240408180918.2773238-1-jfraker@google.com> Subject: [PATCH net-next] gve: Correctly report software timestamping capabilities From: John Fraker To: netdev@vger.kernel.org Cc: John Fraker , Praveen Kaligineedi , Harshitha Ramamurthy , Shailend Chand , Willem de Bruijn , "David S. Miller" , Jakub Kicinski , Junfeng Guo , Ziwei Xiao , Jeroen de Borst , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" gve has supported software timestamp generation since its inception, but has not advertised that support via ethtool. This patch correctly advertises that support. Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Signed-off-by: John Fraker --- drivers/net/ethernet/google/gve/gve_ethtool.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c index 815dead..99f5aeb 100644 --- a/drivers/net/ethernet/google/gve/gve_ethtool.c +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c @@ -4,6 +4,8 @@ * Copyright (C) 2015-2021 Google, Inc. */ +#include +#include #include #include "gve.h" #include "gve_adminq.h" @@ -763,6 +765,15 @@ static int gve_set_coalesce(struct net_device *netdev, return 0; } +static int gve_get_ts_info(struct net_device *netdev, struct ethtool_ts_info *info) +{ + info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE | + SOF_TIMESTAMPING_TX_SOFTWARE | + SOF_TIMESTAMPING_SOFTWARE; + + return 0; +} + const struct ethtool_ops gve_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_USECS, .supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT, @@ -784,5 +795,6 @@ const struct ethtool_ops gve_ethtool_ops = { .set_tunable = gve_set_tunable, .get_priv_flags = gve_get_priv_flags, .set_priv_flags = gve_set_priv_flags, - .get_link_ksettings = gve_get_link_ksettings + .get_link_ksettings = gve_get_link_ksettings, + .get_ts_info = gve_get_ts_info }; -- 2.44.0.478.gd926399ef9-goog