From patchwork Wed Apr 12 16:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronak Doshi X-Patchwork-Id: 126164 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 384694296B; Mon, 17 Apr 2023 10:15:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2260542D29; Mon, 17 Apr 2023 10:15:10 +0200 (CEST) Received: from EX-PRD-EDGE01.vmware.com (EX-PRD-EDGE01.vmware.com [208.91.3.33]) by mails.dpdk.org (Postfix) with ESMTP id 8B57B410F3 for ; Wed, 12 Apr 2023 18:26:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=s1024; d=vmware.com; h=from:to:cc:subject:date:message-id:in-reply-to:mime-version: content-type; bh=LmzqFTCXmOBIerGA4Ry4D1olB0mg/7F7cGw9q0eE+u8=; b=uzohFOLsDra3BjoGkQxRTVlCbSW1aIzzXOL5S0hOcx5UY5UBsIHPVYL4qa0K64 qJVcq166gH6yWuC1dSRYUjr0fs8OUNxvUIpck6EpsbkE0wW4G8jh+3zluxHTEN UitbsbfVTu9QccMmpoYrwThAhubdbfRRAXffXaTeOPBW0ac= Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX-PRD-EDGE01.vmware.com (10.188.245.6) with Microsoft SMTP Server id 15.1.2375.34; Wed, 12 Apr 2023 09:26:33 -0700 Received: from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.20.114.216]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 6963F2025D; Wed, 12 Apr 2023 09:26:39 -0700 (PDT) Received: by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0) id 64CD7A8385; Wed, 12 Apr 2023 09:26:39 -0700 (PDT) From: Ronak Doshi To: Jochen Behrens CC: , Ronak Doshi Subject: [PATCH next 7/7] vmxnet3: update to version 7 Date: Wed, 12 Apr 2023 09:26:36 -0700 Message-ID: <20230412162636.30843-8-doshir@vmware.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20230412162636.30843-1-doshir@vmware.com> References: <20230412162636.30843-1-doshir@vmware.com> MIME-Version: 1.0 Received-SPF: None (EX-PRD-EDGE01.vmware.com: doshir@vmware.com does not designate permitted sender hosts) X-Mailman-Approved-At: Mon, 17 Apr 2023 10:15:01 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 7, provided the emulation advertises support for version 7. Signed-off-by: Ronak Doshi Acked-by: Jochen Behrens --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++++- drivers/net/vmxnet3/vmxnet3_ring.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 72ccd0f7fc..a9250f8206 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -410,7 +410,11 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev) /* Check h/w version compatibility with driver. */ ver = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_VRRS); - if (ver & (1 << VMXNET3_REV_6)) { + if (ver & (1 << VMXNET3_REV_7)) { + VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS, + 1 << VMXNET3_REV_7); + hw->version = VMXNET3_REV_7 + 1; + } else if (ver & (1 << VMXNET3_REV_6)) { VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS, 1 << VMXNET3_REV_6); hw->version = VMXNET3_REV_6 + 1; diff --git a/drivers/net/vmxnet3/vmxnet3_ring.h b/drivers/net/vmxnet3/vmxnet3_ring.h index 50992349d8..948762db90 100644 --- a/drivers/net/vmxnet3/vmxnet3_ring.h +++ b/drivers/net/vmxnet3/vmxnet3_ring.h @@ -7,7 +7,7 @@ #define VMXNET3_RX_CMDRING_SIZE 2 -#define VMXNET3_DRIVER_VERSION_NUM 0x01012000 +#define VMXNET3_DRIVER_VERSION_NUM 0x01013000 /* Default ring size */ #define VMXNET3_DEF_TX_RING_SIZE 512