Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp307949lqb; Tue, 28 May 2024 16:56:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCiLVu/JKDqSEGIYOZXR4L/Ukhxv/n5zIb9i3DILtep857DV2AjW3zSLq1uF8j187uJQD1UqlS1DOAFdwpDOcwPtfNlnvgtWzCI3cVLg== X-Google-Smtp-Source: AGHT+IFJjVHF0DTzW1gNIe/hfbbfHXhVlQUex3bgycLtv/uJmK3JNqVZ9dEL0bUk1C9WaHLLX+Kp X-Received: by 2002:a05:6358:a094:b0:198:fa27:9148 with SMTP id e5c5f4694b2df-198fa279215mr295199155d.18.1716940586079; Tue, 28 May 2024 16:56:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716940586; cv=pass; d=google.com; s=arc-20160816; b=QLpMFAzkHG3OO9cAB04TWRch+OI4Uo6MnEuVFbXDUGoF37XmECe9t2b+fflxHRYWv9 HyS4qPvrP/bA065Yn4XG4jllhJ7l/nr1SO0UOfyEpNyTumbVjNUpNpNg8GIZhcQZjIJ1 GRRjnfCQJb2RMuKgGD5+NEHFBL4WydvxHweS5azRdA+w6XNxIyqm8rwa8+R6v4HcM9EJ 7+pSNW5lkSxjPKr3GhQckHaHhiitWqXLDK/BqIk1lIO6UNDdjTiyKvmznWOFckugOHtB P+HOEoexeXTHAp5PDtbF4oOx+Xn/5wtIqwanU4utWdeEWRr65c5Ycj394rLmCNj6B/aT HCrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=rL7XhkaO3uMi0ihFE8dYh3tfhD6d93Hcy1HXX96sgBw=; fh=yPyBVueOlV0xh9WIpneyBjPV+wI+YQTxV6XUuh1OKK4=; b=fKqnyyRIsQ9ye7t/H0k2yeucHol5OM26wffOtB5nM46MxsJSshl0Q9SwpWz5AaiKn/ 94gFMzLx46z8Ql4oT29T6xt9GcVDSaYvddrgR8cLYdGb1kkdLkJERVHafZO8ib9gmF10 9ShiRXNfrbAIcOSe4jsuJTlNiytnUwhGTYC1HpGsAO1NAwcF1o0uSA96NVdKw2MxLz5r irExMh9+/iceuLmepP4li0xbK33Aj0wErSPt4iNRa38nGTqma33F091sBFFUy1FMndzY 1TfDVa0TPgOPbq32r+p7ncF379bG+a1+seGwFRTu3NAtiojtx+NjJczeFqNGXFiBCsTu TdKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=vmware.com); spf=pass (google.com: domain of linux-kernel+bounces-193248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6822779b944si9204926a12.415.2024.05.28.16.56.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 16:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=vmware.com); spf=pass (google.com: domain of linux-kernel+bounces-193248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8BDD2282F55 for ; Tue, 28 May 2024 23:55:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21FF114037F; Tue, 28 May 2024 23:54:49 +0000 (UTC) Received: from EX-PRD-EDGE02.vmware.com (ex-prd-edge02.vmware.com [208.91.3.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50258140368; Tue, 28 May 2024 23:54:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.91.3.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716940488; cv=none; b=iRhKYyPPySpgxVhSrnA+tX9j4n4XxUpLy99tDJqYy7QageTaqEBdikMofnj3KfgE1ckVe6KSSjtoCvfVRyQLMFkwrUxs+mHqSgr+s6qy328aoL5yrvrqcldPh+48Watfnenh4iiJFzQKqXthtdl7p9C8c/YkkzkDgjYEIrFkXSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716940488; c=relaxed/simple; bh=iScNUZYj9Hl1o8qjxZ4rUlNZplDHdR3KDhNBZxjSiWI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JEoO0sm9ZGAVFyTDGafPzsqU5/XzUdcbM+v3Zlq+PuaCN9NmtWxLlHaExcEhTD8Beu2IJJm12+iDQRA999IGhEdTJC+ViXe2lVc3sk1ZhC+MIon21EDC6fliEC1Xt/d3jM/0ifvV6LfIV3D+bksGjqG6efb+KNp2V9m+4D+UKwg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com; spf=pass smtp.mailfrom=vmware.com; arc=none smtp.client-ip=208.91.3.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vmware.com Received: from sc9-mailhost1.vmware.com (10.113.161.71) by EX-PRD-EDGE02.vmware.com (10.188.245.7) with Microsoft SMTP Server id 15.1.2375.34; Tue, 28 May 2024 16:38:58 -0700 Received: from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.172.6.252]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id BBACD201E4; Tue, 28 May 2024 16:39:17 -0700 (PDT) Received: by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0) id B54C6B04C9; Tue, 28 May 2024 16:39:17 -0700 (PDT) From: Ronak Doshi To: CC: Ronak Doshi , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , open list Subject: [PATCH v1 net-next 0/4] vmxnet3: upgrade to version 9 Date: Tue, 28 May 2024 16:39:02 -0700 Message-ID: <20240528233907.2674-1-ronak.doshi@broadcom.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: SoftFail (EX-PRD-EDGE02.vmware.com: domain of transitioning ronak.doshi@broadcom.com discourages use of 10.113.161.71 as permitted sender) vmxnet3 emulation has recently added timestamping feature which allows the hypervisor (ESXi) to calculate latency from guest virtual NIC driver to all the way up to the physical NIC. This patch series extends vmxnet3 driver to leverage these new feature. Compatibility is maintained using existing vmxnet3 versioning mechanism as follows: - new features added to vmxnet3 emulation are associated with new vmxnet3 version viz. vmxnet3 version 9. - emulation advertises all the versions it supports to the driver. - during initialization, vmxnet3 driver picks the highest version number supported by both the emulation and the driver and configures emulation to run at that version. In particular, following changes are introduced: Patch 1: This patch introduces utility macros for vmxnet3 version 9 comparison and updates Copyright information. Patch 2: This patch adds support to timestamp the packets so as to allow latency measurement in the ESXi. Patch 3: This patch adds support to disable certain offloads on the device based on the request specified by the user in the VM configuration. Patch 4: With all vmxnet3 version 9 changes incorporated in the vmxnet3 driver, with this patch, the driver can configure emulation to run at vmxnet3 version 9. Changes in v1: - make latency measurement and rdpmc read x86 specific in patch 2. - use BIT macro. Ronak Doshi (4): vmxnet3: prepare for version 9 changes vmxnet3: add latency measurement support in vmxnet3 vmxnet3: add command to allow disabling of offloads vmxnet3: update to version 9 drivers/net/vmxnet3/Makefile | 2 +- drivers/net/vmxnet3/vmxnet3_defs.h | 61 +++++++++- drivers/net/vmxnet3/vmxnet3_drv.c | 222 +++++++++++++++++++++++++++------- drivers/net/vmxnet3/vmxnet3_ethtool.c | 10 +- drivers/net/vmxnet3/vmxnet3_int.h | 33 ++++- 5 files changed, 279 insertions(+), 49 deletions(-) -- 2.11.0