Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp667579lqh; Fri, 31 May 2024 12:31:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAO7WToVhadACDBNvMn1Ru6fyGGEx+Lmfx8DGRZDHtOytZRXYZnTMrsk63WAADLA013lGtBL94WnEgiTFfXumPuqKI4SKnPTQR2zUwHg== X-Google-Smtp-Source: AGHT+IHQdr5Oq4rRAtMKunJaiblDo6jg07MJOEYxXt/ztDjJipxgkAzQYiR+0hMcqgNs3T6ud1cl X-Received: by 2002:a5d:6112:0:b0:351:c6bd:ee1d with SMTP id ffacd0b85a97d-35e0f286c17mr2093924f8f.32.1717183906388; Fri, 31 May 2024 12:31:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717183906; cv=pass; d=google.com; s=arc-20160816; b=jikbz6MDmA6DPyPRfTsFY0aEFb5n34KbupI1cFxGy9NDNFpELuHoLKkTiLilQlps0o r+0G9u2NISBRo7uZMd8PMPg/6lkpra+dhD/u+4OsSj89FTIi7LB7jHn4Q/LsAyj4YQrp EgIBTBis2yVmqpXSluPzQwnt00xCkSuyNCWJLKRbfROoS7+y0c+iJqpZQbvICaKIEle1 6U/XX79/rnUXIVvZIswMliJK6y9VGVgDHkIPbxa8L8vtL+jzyqQ6Pl0/MkvPzEFECDeQ z70yBJYr4F+14CCS4Om60qV/HGeGP2iS5GSfIGo9ZWkF3kUFhSZv5kIyabaDVh+b5LAL BvzQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KGR0qoE6/B566fiHFuoLO3b0MHDAlQGy80yIvwnTZjg=; fh=yPyBVueOlV0xh9WIpneyBjPV+wI+YQTxV6XUuh1OKK4=; b=YxD/+ycwMDGayaZCbhymzgBVhfk7xh4069H8Yt9nPNzYn6Xjco1DAzeiTW9ZgVxQWP a4siYXE7pX4NeMhCVOC4LoABsRRqNypTSEJr05GAZMke7szHCORFynfeVZfFfBirQheJ 1hSiVVSDPWffn3bmYZhcE8hbCCH92F92pa+3cwOwrjkWPPrBXStMHKMcB+GbsHkDDS/W XYWbCATw+NjizrnAkzBJNaVP+4NAcSEnRAkhrz+XlvmdkmtzxD+Cla2zO34caBkgUrS2 vT6zZBqhYYNejXTsoG5c0Bw5+J8sPqBamrLfyIgNLkkfhEmkUgYc1bR4vSWiPzk04X7Q VMYA==; 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-197365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a67e6f02e50si123990266b.39.2024.05.31.12.31.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 12:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=vmware.com); spf=pass (google.com: domain of linux-kernel+bounces-197365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197365-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2024E1F2885C for ; Fri, 31 May 2024 19:31:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8E3417F4F0; Fri, 31 May 2024 19:31:09 +0000 (UTC) Received: from EX-PRD-EDGE01.vmware.com (EX-PRD-EDGE01.vmware.com [208.91.3.33]) (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 3917D16D304; Fri, 31 May 2024 19:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.91.3.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717183869; cv=none; b=BDITTtEm8/HZC9Su8GqVgDvvU74lFSvv9U5ogdsdSNqOIqQAT929P1eAsgZxYEiLl0bGsK7S+yFc5YdTJ6bf0EOQ2VEItIKVdbxjaB28ld2uojyJWAwLwaRG2uZ+lBlPfxqXrPgGIdUHPG18CSaUp3tMGtbM8ghPK3KXL0KwZcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717183869; c=relaxed/simple; bh=fmNaQn/IwvJ2IsbnYJ+Za6oMl7krDzxwJu+FvRk4K3E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lb2xDF+5M63t8+tPUjJroFuHXIpOOzECl4LPiXYhPU/57wI/yUpTreip2BeJBmHXE2lef9VQgJ8Q/5NPHpFJ5FtzkgDP9OlKj3T+OCdxkVRBN+uNja6TeHAisMRBpG4bwUN92s3U8WevhhcEZQBqMqRfaDFz7qy8gZ1D0lIfhV4= 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.33 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-mailhost2.vmware.com (10.113.161.72) by EX-PRD-EDGE01.vmware.com (10.188.245.6) with Microsoft SMTP Server id 15.1.2375.34; Fri, 31 May 2024 12:30:32 -0700 Received: from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.172.6.252]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 12C0B2018B; Fri, 31 May 2024 12:30:54 -0700 (PDT) Received: by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0) id 0F04CB04D3; Fri, 31 May 2024 12:30:54 -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 v2 net-next 1/4] vmxnet3: prepare for version 9 changes Date: Fri, 31 May 2024 12:30:46 -0700 Message-ID: <20240531193050.4132-2-ronak.doshi@broadcom.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240531193050.4132-1-ronak.doshi@broadcom.com> References: <20240531193050.4132-1-ronak.doshi@broadcom.com> 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-EDGE01.vmware.com: domain of transitioning ronak.doshi@broadcom.com discourages use of 10.113.161.72 as permitted sender) vmxnet3 is currently at version 7 and this patch initiates the preparation to accommodate changes for up to version 9. Introduced utility macros for vmxnet3 version 9 comparison and update Copyright information. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang --- drivers/net/vmxnet3/Makefile | 2 +- drivers/net/vmxnet3/vmxnet3_defs.h | 2 +- drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethtool.c | 2 +- drivers/net/vmxnet3/vmxnet3_int.h | 8 +++++++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/vmxnet3/Makefile b/drivers/net/vmxnet3/Makefile index f82870c10205..59ef494ce2e0 100644 --- a/drivers/net/vmxnet3/Makefile +++ b/drivers/net/vmxnet3/Makefile @@ -2,7 +2,7 @@ # # Linux driver for VMware's vmxnet3 ethernet NIC. # -# Copyright (C) 2007-2022, VMware, Inc. All Rights Reserved. +# Copyright (C) 2007-2024, VMware, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h b/drivers/net/vmxnet3/vmxnet3_defs.h index 41d6767283a6..67387bb7aa24 100644 --- a/drivers/net/vmxnet3/vmxnet3_defs.h +++ b/drivers/net/vmxnet3/vmxnet3_defs.h @@ -1,7 +1,7 @@ /* * Linux driver for VMware's vmxnet3 ethernet NIC. * - * Copyright (C) 2008-2022, VMware, Inc. All Rights Reserved. + * Copyright (C) 2008-2024, VMware, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 89ca6e75fcc6..b3f3136cc8be 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -1,7 +1,7 @@ /* * Linux driver for VMware's vmxnet3 ethernet NIC. * - * Copyright (C) 2008-2022, VMware, Inc. All Rights Reserved. + * Copyright (C) 2008-2024, VMware, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 7e8008d5378a..471f91c4204a 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c @@ -1,7 +1,7 @@ /* * Linux driver for VMware's vmxnet3 ethernet NIC. * - * Copyright (C) 2008-2022, VMware, Inc. All Rights Reserved. + * Copyright (C) 2008-2024, VMware, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 915aaf18c409..2926dfe8514f 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h @@ -1,7 +1,7 @@ /* * Linux driver for VMware's vmxnet3 ethernet NIC. * - * Copyright (C) 2008-2022, VMware, Inc. All Rights Reserved. + * Copyright (C) 2008-2024, VMware, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -84,6 +84,8 @@ #define VMXNET3_RSS #endif +#define VMXNET3_REV_9 8 /* Vmxnet3 Rev. 9 */ +#define VMXNET3_REV_8 7 /* Vmxnet3 Rev. 8 */ #define VMXNET3_REV_7 6 /* Vmxnet3 Rev. 7 */ #define VMXNET3_REV_6 5 /* Vmxnet3 Rev. 6 */ #define VMXNET3_REV_5 4 /* Vmxnet3 Rev. 5 */ @@ -463,6 +465,10 @@ struct vmxnet3_adapter { (adapter->version >= VMXNET3_REV_6 + 1) #define VMXNET3_VERSION_GE_7(adapter) \ (adapter->version >= VMXNET3_REV_7 + 1) +#define VMXNET3_VERSION_GE_8(adapter) \ + (adapter->version >= VMXNET3_REV_8 + 1) +#define VMXNET3_VERSION_GE_9(adapter) \ + (adapter->version >= VMXNET3_REV_9 + 1) /* must be a multiple of VMXNET3_RING_SIZE_ALIGN */ #define VMXNET3_DEF_TX_RING_SIZE 512 -- 2.11.0