| .. | .. |
|---|
| 1 | 1 | /* |
|---|
| 2 | 2 | * Linux driver for VMware's vmxnet3 ethernet NIC. |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * Copyright (C) 2008-2016, VMware, Inc. All Rights Reserved. |
|---|
| 4 | + * Copyright (C) 2008-2020, VMware, Inc. All Rights Reserved. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | 7 | * under the terms of the GNU General Public License as published by the |
|---|
| .. | .. |
|---|
| 69 | 69 | /* |
|---|
| 70 | 70 | * Version numbers |
|---|
| 71 | 71 | */ |
|---|
| 72 | | -#define VMXNET3_DRIVER_VERSION_STRING "1.4.16.0-k" |
|---|
| 72 | +#define VMXNET3_DRIVER_VERSION_STRING "1.5.0.0-k" |
|---|
| 73 | 73 | |
|---|
| 74 | 74 | /* Each byte of this 32-bit integer encodes a version number in |
|---|
| 75 | 75 | * VMXNET3_DRIVER_VERSION_STRING. |
|---|
| 76 | 76 | */ |
|---|
| 77 | | -#define VMXNET3_DRIVER_VERSION_NUM 0x01041000 |
|---|
| 77 | +#define VMXNET3_DRIVER_VERSION_NUM 0x01050000 |
|---|
| 78 | 78 | |
|---|
| 79 | 79 | #if defined(CONFIG_PCI_MSI) |
|---|
| 80 | 80 | /* RSS only makes sense if MSI-X is supported. */ |
|---|
| 81 | 81 | #define VMXNET3_RSS |
|---|
| 82 | 82 | #endif |
|---|
| 83 | 83 | |
|---|
| 84 | +#define VMXNET3_REV_4 3 /* Vmxnet3 Rev. 4 */ |
|---|
| 84 | 85 | #define VMXNET3_REV_3 2 /* Vmxnet3 Rev. 3 */ |
|---|
| 85 | 86 | #define VMXNET3_REV_2 1 /* Vmxnet3 Rev. 2 */ |
|---|
| 86 | 87 | #define VMXNET3_REV_1 0 /* Vmxnet3 Rev. 1 */ |
|---|
| .. | .. |
|---|
| 218 | 219 | bool ipv4; |
|---|
| 219 | 220 | bool ipv6; |
|---|
| 220 | 221 | u16 mss; |
|---|
| 221 | | - u32 eth_ip_hdr_size; /* only valid for pkts requesting tso or csum |
|---|
| 222 | | - * offloading |
|---|
| 222 | + u32 l4_offset; /* only valid for pkts requesting tso or csum |
|---|
| 223 | + * offloading. For encap offload, it refers to |
|---|
| 224 | + * inner L4 offset i.e. it includes outer header |
|---|
| 225 | + * encap header and inner eth and ip header size |
|---|
| 223 | 226 | */ |
|---|
| 224 | | - u32 l4_hdr_size; /* only valid if mss != 0 */ |
|---|
| 227 | + |
|---|
| 228 | + u32 l4_hdr_size; /* only valid if mss != 0 |
|---|
| 229 | + * Refers to inner L4 hdr size for encap |
|---|
| 230 | + * offload |
|---|
| 231 | + */ |
|---|
| 225 | 232 | u32 copy_size; /* # of bytes copied into the data ring */ |
|---|
| 226 | 233 | union Vmxnet3_GenericDesc *sop_txd; |
|---|
| 227 | 234 | union Vmxnet3_GenericDesc *eop_txd; |
|---|
| .. | .. |
|---|
| 376 | 383 | u16 rxdata_desc_size; |
|---|
| 377 | 384 | |
|---|
| 378 | 385 | bool rxdataring_enabled; |
|---|
| 386 | + bool default_rss_fields; |
|---|
| 387 | + enum Vmxnet3_RSSField rss_fields; |
|---|
| 379 | 388 | |
|---|
| 380 | 389 | struct work_struct work; |
|---|
| 381 | 390 | |
|---|
| .. | .. |
|---|
| 412 | 421 | (adapter->version >= VMXNET3_REV_2 + 1) |
|---|
| 413 | 422 | #define VMXNET3_VERSION_GE_3(adapter) \ |
|---|
| 414 | 423 | (adapter->version >= VMXNET3_REV_3 + 1) |
|---|
| 424 | +#define VMXNET3_VERSION_GE_4(adapter) \ |
|---|
| 425 | + (adapter->version >= VMXNET3_REV_4 + 1) |
|---|
| 415 | 426 | |
|---|
| 416 | 427 | /* must be a multiple of VMXNET3_RING_SIZE_ALIGN */ |
|---|
| 417 | 428 | #define VMXNET3_DEF_TX_RING_SIZE 512 |
|---|
| .. | .. |
|---|
| 435 | 446 | |
|---|
| 436 | 447 | #define VMXNET3_COAL_RBC_RATE(usecs) (1000000 / usecs) |
|---|
| 437 | 448 | #define VMXNET3_COAL_RBC_USECS(rbc_rate) (1000000 / rbc_rate) |
|---|
| 449 | +#define VMXNET3_RSS_FIELDS_DEFAULT (VMXNET3_RSS_FIELDS_TCPIP4 | \ |
|---|
| 450 | + VMXNET3_RSS_FIELDS_TCPIP6) |
|---|
| 438 | 451 | |
|---|
| 439 | 452 | int |
|---|
| 440 | 453 | vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter); |
|---|
| .. | .. |
|---|
| 454 | 467 | void |
|---|
| 455 | 468 | vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter); |
|---|
| 456 | 469 | |
|---|
| 470 | +netdev_features_t |
|---|
| 471 | +vmxnet3_fix_features(struct net_device *netdev, netdev_features_t features); |
|---|
| 472 | + |
|---|
| 473 | +netdev_features_t |
|---|
| 474 | +vmxnet3_features_check(struct sk_buff *skb, |
|---|
| 475 | + struct net_device *netdev, netdev_features_t features); |
|---|
| 476 | + |
|---|
| 457 | 477 | int |
|---|
| 458 | 478 | vmxnet3_set_features(struct net_device *netdev, netdev_features_t features); |
|---|
| 459 | 479 | |
|---|