[next,1/7] vmxnet3: prepare for version 7 changes

Message ID 20230412162636.30843-2-doshir@vmware.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series vmxnet3: upgrade to version 7 |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Ronak Doshi April 12, 2023, 4:26 p.m. UTC
  vmxnet3 is currently at version 6 and this patch initiates the
preparation to accommodate changes for upto version 7. Introduced
utility macros for vmxnet3 version 7 comparison.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit April 26, 2023, 4:58 p.m. UTC | #1
On 4/12/2023 5:26 PM, Ronak Doshi wrote:
> vmxnet3 is currently at version 6 and this patch initiates the
> preparation to accommodate changes for upto version 7. Introduced

s/upto/up to/

(this is highlighted by checkpatch, please address all checkpatch warnings)

> utility macros for vmxnet3 version 7 comparison.
> 
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
> Acked-by: Jochen Behrens <jbehrens@vmware.com>

<...>
  

Patch

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 5a303717b1..fc976707fd 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -124,6 +124,7 @@  struct vmxnet3_hw {
 	UPT1_RxStats          snapshot_rx_stats[VMXNET3_MAX_RX_QUEUES];
 };
 
+#define VMXNET3_REV_7		6		/* Vmxnet3 Rev. 7 */
 #define VMXNET3_REV_6		5		/* Vmxnet3 Rev. 6 */
 #define VMXNET3_REV_5		4		/* Vmxnet3 Rev. 5 */
 #define VMXNET3_REV_4		3		/* Vmxnet3 Rev. 4 */
@@ -131,6 +132,7 @@  struct vmxnet3_hw {
 #define VMXNET3_REV_2		1		/* Vmxnet3 Rev. 2 */
 #define VMXNET3_REV_1		0		/* Vmxnet3 Rev. 1 */
 
+#define VMXNET3_VERSION_GE_7(hw) ((hw)->version >= VMXNET3_REV_7 + 1)
 #define VMXNET3_VERSION_GE_6(hw) ((hw)->version >= VMXNET3_REV_6 + 1)
 #define VMXNET3_VERSION_GE_5(hw) ((hw)->version >= VMXNET3_REV_5 + 1)
 #define VMXNET3_VERSION_GE_4(hw) ((hw)->version >= VMXNET3_REV_4 + 1)