vmxnet3_int.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. /*
  2. * Linux driver for VMware's vmxnet3 ethernet NIC.
  3. *
  4. * Copyright (C) 2008-2024, VMware, Inc. All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; version 2 of the License and no later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  13. * NON INFRINGEMENT. See the GNU General Public License for more
  14. * details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * The full GNU General Public License is included in this distribution in
  21. * the file called "COPYING".
  22. *
  23. * Maintained by: pv-drivers@vmware.com
  24. *
  25. */
  26. #ifndef _VMXNET3_INT_H
  27. #define _VMXNET3_INT_H
  28. #include <linux/bitops.h>
  29. #include <linux/ethtool.h>
  30. #include <linux/delay.h>
  31. #include <linux/netdevice.h>
  32. #include <linux/pci.h>
  33. #include <linux/compiler.h>
  34. #include <linux/slab.h>
  35. #include <linux/spinlock.h>
  36. #include <linux/ioport.h>
  37. #include <linux/highmem.h>
  38. #include <linux/timer.h>
  39. #include <linux/skbuff.h>
  40. #include <linux/interrupt.h>
  41. #include <linux/workqueue.h>
  42. #include <linux/uaccess.h>
  43. #include <asm/dma.h>
  44. #include <asm/page.h>
  45. #include <linux/tcp.h>
  46. #include <linux/udp.h>
  47. #include <linux/ip.h>
  48. #include <linux/ipv6.h>
  49. #include <linux/in.h>
  50. #include <linux/etherdevice.h>
  51. #include <asm/checksum.h>
  52. #include <linux/if_vlan.h>
  53. #include <linux/if_arp.h>
  54. #include <linux/inetdevice.h>
  55. #include <linux/log2.h>
  56. #include <linux/bpf.h>
  57. #include <net/page_pool/helpers.h>
  58. #include <net/xdp.h>
  59. #include "vmxnet3_defs.h"
  60. #ifdef DEBUG
  61. # define VMXNET3_DRIVER_VERSION_REPORT VMXNET3_DRIVER_VERSION_STRING"-NAPI(debug)"
  62. #else
  63. # define VMXNET3_DRIVER_VERSION_REPORT VMXNET3_DRIVER_VERSION_STRING"-NAPI"
  64. #endif
  65. /*
  66. * Version numbers
  67. */
  68. #define VMXNET3_DRIVER_VERSION_STRING "1.9.0.0-k"
  69. /* Each byte of this 32-bit integer encodes a version number in
  70. * VMXNET3_DRIVER_VERSION_STRING.
  71. */
  72. #define VMXNET3_DRIVER_VERSION_NUM 0x01090000
  73. #if defined(CONFIG_PCI_MSI)
  74. /* RSS only makes sense if MSI-X is supported. */
  75. #define VMXNET3_RSS
  76. #endif
  77. #define VMXNET3_REV_9 8 /* Vmxnet3 Rev. 9 */
  78. #define VMXNET3_REV_8 7 /* Vmxnet3 Rev. 8 */
  79. #define VMXNET3_REV_7 6 /* Vmxnet3 Rev. 7 */
  80. #define VMXNET3_REV_6 5 /* Vmxnet3 Rev. 6 */
  81. #define VMXNET3_REV_5 4 /* Vmxnet3 Rev. 5 */
  82. #define VMXNET3_REV_4 3 /* Vmxnet3 Rev. 4 */
  83. #define VMXNET3_REV_3 2 /* Vmxnet3 Rev. 3 */
  84. #define VMXNET3_REV_2 1 /* Vmxnet3 Rev. 2 */
  85. #define VMXNET3_REV_1 0 /* Vmxnet3 Rev. 1 */
  86. /*
  87. * Capabilities
  88. */
  89. enum {
  90. VMNET_CAP_SG = 0x0001, /* Can do scatter-gather transmits. */
  91. VMNET_CAP_IP4_CSUM = 0x0002, /* Can checksum only TCP/UDP over
  92. * IPv4 */
  93. VMNET_CAP_HW_CSUM = 0x0004, /* Can checksum all packets. */
  94. VMNET_CAP_HIGH_DMA = 0x0008, /* Can DMA to high memory. */
  95. VMNET_CAP_TOE = 0x0010, /* Supports TCP/IP offload. */
  96. VMNET_CAP_TSO = 0x0020, /* Supports TCP Segmentation
  97. * offload */
  98. VMNET_CAP_SW_TSO = 0x0040, /* Supports SW TCP Segmentation */
  99. VMNET_CAP_VMXNET_APROM = 0x0080, /* Vmxnet APROM support */
  100. VMNET_CAP_HW_TX_VLAN = 0x0100, /* Can we do VLAN tagging in HW */
  101. VMNET_CAP_HW_RX_VLAN = 0x0200, /* Can we do VLAN untagging in HW */
  102. VMNET_CAP_SW_VLAN = 0x0400, /* VLAN tagging/untagging in SW */
  103. VMNET_CAP_WAKE_PCKT_RCV = 0x0800, /* Can wake on network packet recv? */
  104. VMNET_CAP_ENABLE_INT_INLINE = 0x1000, /* Enable Interrupt Inline */
  105. VMNET_CAP_ENABLE_HEADER_COPY = 0x2000, /* copy header for vmkernel */
  106. VMNET_CAP_TX_CHAIN = 0x4000, /* Guest can use multiple tx entries
  107. * for a pkt */
  108. VMNET_CAP_RX_CHAIN = 0x8000, /* pkt can span multiple rx entries */
  109. VMNET_CAP_LPD = 0x10000, /* large pkt delivery */
  110. VMNET_CAP_BPF = 0x20000, /* BPF Support in VMXNET Virtual HW*/
  111. VMNET_CAP_SG_SPAN_PAGES = 0x40000, /* Scatter-gather can span multiple*/
  112. /* pages transmits */
  113. VMNET_CAP_IP6_CSUM = 0x80000, /* Can do IPv6 csum offload. */
  114. VMNET_CAP_TSO6 = 0x100000, /* TSO seg. offload for IPv6 pkts. */
  115. VMNET_CAP_TSO256k = 0x200000, /* Can do TSO seg offload for */
  116. /* pkts up to 256kB. */
  117. VMNET_CAP_UPT = 0x400000 /* Support UPT */
  118. };
  119. /*
  120. * Maximum devices supported.
  121. */
  122. #define MAX_ETHERNET_CARDS 10
  123. #define MAX_PCI_PASSTHRU_DEVICE 6
  124. struct vmxnet3_cmd_ring {
  125. union Vmxnet3_GenericDesc *base;
  126. u32 size;
  127. u32 next2fill;
  128. u32 next2comp;
  129. u8 gen;
  130. u8 isOutOfOrder;
  131. dma_addr_t basePA;
  132. };
  133. static inline void
  134. vmxnet3_cmd_ring_adv_next2fill(struct vmxnet3_cmd_ring *ring)
  135. {
  136. ring->next2fill++;
  137. if (unlikely(ring->next2fill == ring->size)) {
  138. ring->next2fill = 0;
  139. VMXNET3_FLIP_RING_GEN(ring->gen);
  140. }
  141. }
  142. static inline void
  143. vmxnet3_cmd_ring_adv_next2comp(struct vmxnet3_cmd_ring *ring)
  144. {
  145. VMXNET3_INC_RING_IDX_ONLY(ring->next2comp, ring->size);
  146. }
  147. static inline int
  148. vmxnet3_cmd_ring_desc_avail(struct vmxnet3_cmd_ring *ring)
  149. {
  150. return (ring->next2comp > ring->next2fill ? 0 : ring->size) +
  151. ring->next2comp - ring->next2fill - 1;
  152. }
  153. struct vmxnet3_comp_ring {
  154. union Vmxnet3_GenericDesc *base;
  155. u32 size;
  156. u32 next2proc;
  157. u8 gen;
  158. u8 intr_idx;
  159. dma_addr_t basePA;
  160. };
  161. static inline void
  162. vmxnet3_comp_ring_adv_next2proc(struct vmxnet3_comp_ring *ring)
  163. {
  164. ring->next2proc++;
  165. if (unlikely(ring->next2proc == ring->size)) {
  166. ring->next2proc = 0;
  167. VMXNET3_FLIP_RING_GEN(ring->gen);
  168. }
  169. }
  170. struct vmxnet3_tx_data_ring {
  171. struct Vmxnet3_TxDataDesc *base;
  172. u32 size;
  173. dma_addr_t basePA;
  174. };
  175. struct vmxnet3_tx_ts_ring {
  176. struct Vmxnet3_TxTSDesc *base;
  177. dma_addr_t basePA;
  178. };
  179. #define VMXNET3_MAP_NONE 0
  180. #define VMXNET3_MAP_SINGLE BIT(0)
  181. #define VMXNET3_MAP_PAGE BIT(1)
  182. #define VMXNET3_MAP_XDP BIT(2)
  183. struct vmxnet3_tx_buf_info {
  184. u32 map_type;
  185. u16 len;
  186. u16 sop_idx;
  187. dma_addr_t dma_addr;
  188. union {
  189. struct sk_buff *skb;
  190. struct xdp_frame *xdpf;
  191. };
  192. };
  193. struct vmxnet3_tq_driver_stats {
  194. u64 drop_total; /* # of pkts dropped by the driver, the
  195. * counters below track droppings due to
  196. * different reasons
  197. */
  198. u64 drop_too_many_frags;
  199. u64 drop_oversized_hdr;
  200. u64 drop_hdr_inspect_err;
  201. u64 drop_tso;
  202. u64 tx_ring_full;
  203. u64 linearized; /* # of pkts linearized */
  204. u64 copy_skb_header; /* # of times we have to copy skb header */
  205. u64 oversized_hdr;
  206. u64 xdp_xmit;
  207. u64 xdp_xmit_err;
  208. };
  209. struct vmxnet3_tx_ctx {
  210. bool ipv4;
  211. bool ipv6;
  212. u16 mss;
  213. u32 l4_offset; /* only valid for pkts requesting tso or csum
  214. * offloading. For encap offload, it refers to
  215. * inner L4 offset i.e. it includes outer header
  216. * encap header and inner eth and ip header size
  217. */
  218. u32 l4_hdr_size; /* only valid if mss != 0
  219. * Refers to inner L4 hdr size for encap
  220. * offload
  221. */
  222. u32 copy_size; /* # of bytes copied into the data ring */
  223. union Vmxnet3_GenericDesc *sop_txd;
  224. union Vmxnet3_GenericDesc *eop_txd;
  225. struct Vmxnet3_TxTSDesc *ts_txd;
  226. };
  227. struct vmxnet3_tx_queue {
  228. char name[IFNAMSIZ+8]; /* To identify interrupt */
  229. struct vmxnet3_adapter *adapter;
  230. spinlock_t tx_lock;
  231. struct vmxnet3_cmd_ring tx_ring;
  232. struct vmxnet3_tx_buf_info *buf_info;
  233. struct vmxnet3_tx_data_ring data_ring;
  234. struct vmxnet3_tx_ts_ring ts_ring;
  235. struct vmxnet3_comp_ring comp_ring;
  236. struct Vmxnet3_TxQueueCtrl *shared;
  237. struct vmxnet3_tq_driver_stats stats;
  238. bool stopped;
  239. int num_stop; /* # of times the queue is
  240. * stopped */
  241. int qid;
  242. u16 txdata_desc_size;
  243. u16 tx_ts_desc_size;
  244. u16 tsPktCount;
  245. } ____cacheline_aligned;
  246. enum vmxnet3_rx_buf_type {
  247. VMXNET3_RX_BUF_NONE = 0,
  248. VMXNET3_RX_BUF_SKB = 1,
  249. VMXNET3_RX_BUF_PAGE = 2,
  250. VMXNET3_RX_BUF_XDP = 3,
  251. };
  252. #define VMXNET3_RXD_COMP_PENDING 0
  253. #define VMXNET3_RXD_COMP_DONE 1
  254. struct vmxnet3_rx_buf_info {
  255. enum vmxnet3_rx_buf_type buf_type;
  256. u16 len;
  257. u8 comp_state;
  258. union {
  259. struct sk_buff *skb;
  260. struct page *page;
  261. };
  262. dma_addr_t dma_addr;
  263. };
  264. struct vmxnet3_rx_ctx {
  265. struct sk_buff *skb;
  266. u32 sop_idx;
  267. };
  268. struct vmxnet3_rq_driver_stats {
  269. u64 drop_total;
  270. u64 drop_err;
  271. u64 drop_fcs;
  272. u64 rx_buf_alloc_failure;
  273. u64 xdp_packets; /* Total packets processed by XDP. */
  274. u64 xdp_tx;
  275. u64 xdp_redirects;
  276. u64 xdp_drops;
  277. u64 xdp_aborted;
  278. };
  279. struct vmxnet3_rx_data_ring {
  280. Vmxnet3_RxDataDesc *base;
  281. dma_addr_t basePA;
  282. u16 desc_size;
  283. };
  284. struct vmxnet3_rx_ts_ring {
  285. struct Vmxnet3_RxTSDesc *base;
  286. dma_addr_t basePA;
  287. };
  288. struct vmxnet3_rx_queue {
  289. char name[IFNAMSIZ + 8]; /* To identify interrupt */
  290. struct vmxnet3_adapter *adapter;
  291. struct napi_struct napi;
  292. struct vmxnet3_cmd_ring rx_ring[2];
  293. struct vmxnet3_rx_data_ring data_ring;
  294. struct vmxnet3_comp_ring comp_ring;
  295. struct vmxnet3_rx_ts_ring ts_ring;
  296. struct vmxnet3_rx_ctx rx_ctx;
  297. u32 qid; /* rqID in RCD for buffer from 1st ring */
  298. u32 qid2; /* rqID in RCD for buffer from 2nd ring */
  299. u32 dataRingQid; /* rqID in RCD for buffer from data ring */
  300. struct vmxnet3_rx_buf_info *buf_info[2];
  301. struct Vmxnet3_RxQueueCtrl *shared;
  302. struct vmxnet3_rq_driver_stats stats;
  303. struct page_pool *page_pool;
  304. struct xdp_rxq_info xdp_rxq;
  305. u16 rx_ts_desc_size;
  306. } ____cacheline_aligned;
  307. #define VMXNET3_DEVICE_MAX_TX_QUEUES 32
  308. #define VMXNET3_DEVICE_MAX_RX_QUEUES 32 /* Keep this value as a power of 2 */
  309. #define VMXNET3_DEVICE_DEFAULT_TX_QUEUES 8
  310. #define VMXNET3_DEVICE_DEFAULT_RX_QUEUES 8 /* Keep this value as a power of 2 */
  311. /* Should be less than UPT1_RSS_MAX_IND_TABLE_SIZE */
  312. #define VMXNET3_RSS_IND_TABLE_SIZE (VMXNET3_DEVICE_MAX_RX_QUEUES * 4)
  313. #define VMXNET3_LINUX_MAX_MSIX_VECT (VMXNET3_DEVICE_MAX_TX_QUEUES + \
  314. VMXNET3_DEVICE_MAX_RX_QUEUES + 1)
  315. #define VMXNET3_LINUX_MIN_MSIX_VECT 3 /* 1 for tx, 1 for rx pair and 1 for event */
  316. struct vmxnet3_intr {
  317. enum vmxnet3_intr_mask_mode mask_mode;
  318. enum vmxnet3_intr_type type; /* MSI-X, MSI, or INTx? */
  319. u8 num_intrs; /* # of intr vectors */
  320. u8 event_intr_idx; /* idx of the intr vector for event */
  321. u8 mod_levels[VMXNET3_LINUX_MAX_MSIX_VECT]; /* moderation level */
  322. char event_msi_vector_name[IFNAMSIZ+17];
  323. #ifdef CONFIG_PCI_MSI
  324. struct msix_entry msix_entries[VMXNET3_LINUX_MAX_MSIX_VECT];
  325. #endif
  326. };
  327. /* Interrupt sharing schemes, share_intr */
  328. #define VMXNET3_INTR_BUDDYSHARE 0 /* Corresponding tx,rx queues share irq */
  329. #define VMXNET3_INTR_TXSHARE 1 /* All tx queues share one irq */
  330. #define VMXNET3_INTR_DONTSHARE 2 /* each queue has its own irq */
  331. #define VMXNET3_STATE_BIT_RESETTING 0
  332. #define VMXNET3_STATE_BIT_QUIESCED 1
  333. struct vmxnet3_adapter {
  334. struct vmxnet3_tx_queue tx_queue[VMXNET3_DEVICE_MAX_TX_QUEUES];
  335. struct vmxnet3_rx_queue rx_queue[VMXNET3_DEVICE_MAX_RX_QUEUES];
  336. unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
  337. struct vmxnet3_intr intr;
  338. spinlock_t cmd_lock;
  339. struct Vmxnet3_DriverShared *shared;
  340. struct Vmxnet3_PMConf *pm_conf;
  341. struct Vmxnet3_TxQueueDesc *tqd_start; /* all tx queue desc */
  342. struct Vmxnet3_RxQueueDesc *rqd_start; /* all rx queue desc */
  343. struct net_device *netdev;
  344. struct pci_dev *pdev;
  345. u8 __iomem *hw_addr0; /* for BAR 0 */
  346. u8 __iomem *hw_addr1; /* for BAR 1 */
  347. u8 version;
  348. #ifdef VMXNET3_RSS
  349. struct UPT1_RSSConf *rss_conf;
  350. bool rss;
  351. #endif
  352. u32 num_rx_queues;
  353. u32 num_tx_queues;
  354. /* rx buffer related */
  355. unsigned skb_buf_size;
  356. int rx_buf_per_pkt; /* only apply to the 1st ring */
  357. dma_addr_t shared_pa;
  358. dma_addr_t queue_desc_pa;
  359. dma_addr_t coal_conf_pa;
  360. /* Wake-on-LAN */
  361. u32 wol;
  362. /* Link speed */
  363. u32 link_speed; /* in mbps */
  364. u64 tx_timeout_count;
  365. /* Ring sizes */
  366. u32 tx_ring_size;
  367. u32 rx_ring_size;
  368. u32 rx_ring2_size;
  369. /* Size of buffer in the data ring */
  370. u16 txdata_desc_size;
  371. u16 rxdata_desc_size;
  372. bool rxdataring_enabled;
  373. bool default_rss_fields;
  374. enum Vmxnet3_RSSField rss_fields;
  375. struct work_struct work;
  376. unsigned long state; /* VMXNET3_STATE_BIT_xxx */
  377. int share_intr;
  378. struct Vmxnet3_CoalesceScheme *coal_conf;
  379. bool default_coal_mode;
  380. dma_addr_t adapter_pa;
  381. dma_addr_t pm_conf_pa;
  382. dma_addr_t rss_conf_pa;
  383. bool queuesExtEnabled;
  384. struct Vmxnet3_RingBufferSize ringBufSize;
  385. u32 devcap_supported[8];
  386. u32 ptcap_supported[8];
  387. u32 dev_caps[8];
  388. u16 tx_prod_offset;
  389. u16 rx_prod_offset;
  390. u16 rx_prod2_offset;
  391. struct bpf_prog __rcu *xdp_bpf_prog;
  392. struct Vmxnet3_LatencyConf *latencyConf;
  393. /* Size of buffer in the ts ring */
  394. u16 tx_ts_desc_size;
  395. u16 rx_ts_desc_size;
  396. u32 disabledOffloads;
  397. };
  398. #define VMXNET3_WRITE_BAR0_REG(adapter, reg, val) \
  399. writel((val), (adapter)->hw_addr0 + (reg))
  400. #define VMXNET3_READ_BAR0_REG(adapter, reg) \
  401. readl((adapter)->hw_addr0 + (reg))
  402. #define VMXNET3_WRITE_BAR1_REG(adapter, reg, val) \
  403. writel((val), (adapter)->hw_addr1 + (reg))
  404. #define VMXNET3_READ_BAR1_REG(adapter, reg) \
  405. readl((adapter)->hw_addr1 + (reg))
  406. #define VMXNET3_WAKE_QUEUE_THRESHOLD(tq) (5)
  407. #define VMXNET3_RX_ALLOC_THRESHOLD(rq, ring_idx, adapter) \
  408. ((rq)->rx_ring[ring_idx].size >> 3)
  409. #define VMXNET3_GET_ADDR_LO(dma) ((u32)(dma))
  410. #define VMXNET3_GET_ADDR_HI(dma) ((u32)(((u64)(dma)) >> 32))
  411. #define VMXNET3_VERSION_GE_2(adapter) \
  412. (adapter->version >= VMXNET3_REV_2 + 1)
  413. #define VMXNET3_VERSION_GE_3(adapter) \
  414. (adapter->version >= VMXNET3_REV_3 + 1)
  415. #define VMXNET3_VERSION_GE_4(adapter) \
  416. (adapter->version >= VMXNET3_REV_4 + 1)
  417. #define VMXNET3_VERSION_GE_5(adapter) \
  418. (adapter->version >= VMXNET3_REV_5 + 1)
  419. #define VMXNET3_VERSION_GE_6(adapter) \
  420. (adapter->version >= VMXNET3_REV_6 + 1)
  421. #define VMXNET3_VERSION_GE_7(adapter) \
  422. (adapter->version >= VMXNET3_REV_7 + 1)
  423. #define VMXNET3_VERSION_GE_8(adapter) \
  424. (adapter->version >= VMXNET3_REV_8 + 1)
  425. #define VMXNET3_VERSION_GE_9(adapter) \
  426. (adapter->version >= VMXNET3_REV_9 + 1)
  427. /* must be a multiple of VMXNET3_RING_SIZE_ALIGN */
  428. #define VMXNET3_DEF_TX_RING_SIZE 512
  429. #define VMXNET3_DEF_RX_RING_SIZE 1024
  430. #define VMXNET3_DEF_RX_RING2_SIZE 512
  431. #define VMXNET3_DEF_RXDATA_DESC_SIZE 128
  432. #define VMXNET3_MAX_ETH_HDR_SIZE 22
  433. #define VMXNET3_MAX_SKB_BUF_SIZE (3*1024)
  434. #define VMXNET3_GET_RING_IDX(adapter, rqID) \
  435. ((rqID >= adapter->num_rx_queues && \
  436. rqID < 2 * adapter->num_rx_queues) ? 1 : 0) \
  437. #define VMXNET3_RX_DATA_RING(adapter, rqID) \
  438. (rqID >= 2 * adapter->num_rx_queues && \
  439. rqID < 3 * adapter->num_rx_queues) \
  440. #define VMXNET3_COAL_STATIC_DEFAULT_DEPTH 64
  441. #define VMXNET3_COAL_RBC_RATE(usecs) (1000000 / usecs)
  442. #define VMXNET3_COAL_RBC_USECS(rbc_rate) (1000000 / rbc_rate)
  443. #define VMXNET3_RSS_FIELDS_DEFAULT (VMXNET3_RSS_FIELDS_TCPIP4 | \
  444. VMXNET3_RSS_FIELDS_TCPIP6)
  445. int
  446. vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);
  447. int
  448. vmxnet3_activate_dev(struct vmxnet3_adapter *adapter);
  449. void
  450. vmxnet3_force_close(struct vmxnet3_adapter *adapter);
  451. void
  452. vmxnet3_reset_dev(struct vmxnet3_adapter *adapter);
  453. void
  454. vmxnet3_tq_destroy_all(struct vmxnet3_adapter *adapter);
  455. void
  456. vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter);
  457. int
  458. vmxnet3_rq_create_all(struct vmxnet3_adapter *adapter);
  459. void
  460. vmxnet3_adjust_rx_ring_size(struct vmxnet3_adapter *adapter);
  461. netdev_features_t
  462. vmxnet3_fix_features(struct net_device *netdev, netdev_features_t features);
  463. netdev_features_t
  464. vmxnet3_features_check(struct sk_buff *skb,
  465. struct net_device *netdev, netdev_features_t features);
  466. int
  467. vmxnet3_set_features(struct net_device *netdev, netdev_features_t features);
  468. int
  469. vmxnet3_create_queues(struct vmxnet3_adapter *adapter,
  470. u32 tx_ring_size, u32 rx_ring_size, u32 rx_ring2_size,
  471. u16 txdata_desc_size, u16 rxdata_desc_size);
  472. void vmxnet3_set_ethtool_ops(struct net_device *netdev);
  473. void vmxnet3_get_stats64(struct net_device *dev,
  474. struct rtnl_link_stats64 *stats);
  475. bool vmxnet3_check_ptcapability(u32 cap_supported, u32 cap);
  476. extern char vmxnet3_driver_name[];
  477. #endif