2 * Linux driver for VMware's vmxnet3 ethernet NIC.
4 * Copyright (C) 2008-2009, VMware, Inc. All Rights Reserved.
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.
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
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.
20 * The full GNU General Public License is included in this distribution in
21 * the file called "COPYING".
23 * Maintained by: Shreyas Bhatewara <pv-drivers@vmware.com>
28 #include "vmxnet3_int.h"
30 struct vmxnet3_stat_desc
{
31 char desc
[ETH_GSTRING_LEN
];
37 vmxnet3_get_rx_csum(struct net_device
*netdev
)
39 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
40 return adapter
->rxcsum
;
45 vmxnet3_set_rx_csum(struct net_device
*netdev
, u32 val
)
47 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
49 if (adapter
->rxcsum
!= val
) {
50 adapter
->rxcsum
= val
;
51 if (netif_running(netdev
)) {
53 adapter
->shared
->devRead
.misc
.uptFeatures
|=
56 adapter
->shared
->devRead
.misc
.uptFeatures
&=
59 VMXNET3_WRITE_BAR1_REG(adapter
, VMXNET3_REG_CMD
,
60 VMXNET3_CMD_UPDATE_FEATURE
);
67 /* per tq stats maintained by the device */
68 static const struct vmxnet3_stat_desc
69 vmxnet3_tq_dev_stats
[] = {
70 /* description, offset */
71 { "TSO pkts tx", offsetof(struct UPT1_TxStats
, TSOPktsTxOK
) },
72 { "TSO bytes tx", offsetof(struct UPT1_TxStats
, TSOBytesTxOK
) },
73 { "ucast pkts tx", offsetof(struct UPT1_TxStats
, ucastPktsTxOK
) },
74 { "ucast bytes tx", offsetof(struct UPT1_TxStats
, ucastBytesTxOK
) },
75 { "mcast pkts tx", offsetof(struct UPT1_TxStats
, mcastPktsTxOK
) },
76 { "mcast bytes tx", offsetof(struct UPT1_TxStats
, mcastBytesTxOK
) },
77 { "bcast pkts tx", offsetof(struct UPT1_TxStats
, bcastPktsTxOK
) },
78 { "bcast bytes tx", offsetof(struct UPT1_TxStats
, bcastBytesTxOK
) },
79 { "pkts tx err", offsetof(struct UPT1_TxStats
, pktsTxError
) },
80 { "pkts tx discard", offsetof(struct UPT1_TxStats
, pktsTxDiscard
) },
83 /* per tq stats maintained by the driver */
84 static const struct vmxnet3_stat_desc
85 vmxnet3_tq_driver_stats
[] = {
86 /* description, offset */
87 {"drv dropped tx total", offsetof(struct vmxnet3_tq_driver_stats
,
89 { " too many frags", offsetof(struct vmxnet3_tq_driver_stats
,
90 drop_too_many_frags
) },
91 { " giant hdr", offsetof(struct vmxnet3_tq_driver_stats
,
92 drop_oversized_hdr
) },
93 { " hdr err", offsetof(struct vmxnet3_tq_driver_stats
,
94 drop_hdr_inspect_err
) },
95 { " tso", offsetof(struct vmxnet3_tq_driver_stats
,
97 { "ring full", offsetof(struct vmxnet3_tq_driver_stats
,
99 { "pkts linearized", offsetof(struct vmxnet3_tq_driver_stats
,
101 { "hdr cloned", offsetof(struct vmxnet3_tq_driver_stats
,
103 { "giant hdr", offsetof(struct vmxnet3_tq_driver_stats
,
107 /* per rq stats maintained by the device */
108 static const struct vmxnet3_stat_desc
109 vmxnet3_rq_dev_stats
[] = {
110 { "LRO pkts rx", offsetof(struct UPT1_RxStats
, LROPktsRxOK
) },
111 { "LRO byte rx", offsetof(struct UPT1_RxStats
, LROBytesRxOK
) },
112 { "ucast pkts rx", offsetof(struct UPT1_RxStats
, ucastPktsRxOK
) },
113 { "ucast bytes rx", offsetof(struct UPT1_RxStats
, ucastBytesRxOK
) },
114 { "mcast pkts rx", offsetof(struct UPT1_RxStats
, mcastPktsRxOK
) },
115 { "mcast bytes rx", offsetof(struct UPT1_RxStats
, mcastBytesRxOK
) },
116 { "bcast pkts rx", offsetof(struct UPT1_RxStats
, bcastPktsRxOK
) },
117 { "bcast bytes rx", offsetof(struct UPT1_RxStats
, bcastBytesRxOK
) },
118 { "pkts rx out of buf", offsetof(struct UPT1_RxStats
, pktsRxOutOfBuf
) },
119 { "pkts rx err", offsetof(struct UPT1_RxStats
, pktsRxError
) },
122 /* per rq stats maintained by the driver */
123 static const struct vmxnet3_stat_desc
124 vmxnet3_rq_driver_stats
[] = {
125 /* description, offset */
126 { "drv dropped rx total", offsetof(struct vmxnet3_rq_driver_stats
,
128 { " err", offsetof(struct vmxnet3_rq_driver_stats
,
130 { " fcs", offsetof(struct vmxnet3_rq_driver_stats
,
132 { "rx buf alloc fail", offsetof(struct vmxnet3_rq_driver_stats
,
133 rx_buf_alloc_failure
) },
136 /* gloabl stats maintained by the driver */
137 static const struct vmxnet3_stat_desc
138 vmxnet3_global_stats
[] = {
139 /* description, offset */
140 { "tx timeout count", offsetof(struct vmxnet3_adapter
,
145 struct net_device_stats
*
146 vmxnet3_get_stats(struct net_device
*netdev
)
148 struct vmxnet3_adapter
*adapter
;
149 struct vmxnet3_tq_driver_stats
*drvTxStats
;
150 struct vmxnet3_rq_driver_stats
*drvRxStats
;
151 struct UPT1_TxStats
*devTxStats
;
152 struct UPT1_RxStats
*devRxStats
;
153 struct net_device_stats
*net_stats
= &netdev
->stats
;
156 adapter
= netdev_priv(netdev
);
158 /* Collect the dev stats into the shared area */
159 VMXNET3_WRITE_BAR1_REG(adapter
, VMXNET3_REG_CMD
, VMXNET3_CMD_GET_STATS
);
161 memset(net_stats
, 0, sizeof(*net_stats
));
162 for (i
= 0; i
< adapter
->num_tx_queues
; i
++) {
163 devTxStats
= &adapter
->tqd_start
[i
].stats
;
164 drvTxStats
= &adapter
->tx_queue
[i
].stats
;
165 net_stats
->tx_packets
+= devTxStats
->ucastPktsTxOK
+
166 devTxStats
->mcastPktsTxOK
+
167 devTxStats
->bcastPktsTxOK
;
168 net_stats
->tx_bytes
+= devTxStats
->ucastBytesTxOK
+
169 devTxStats
->mcastBytesTxOK
+
170 devTxStats
->bcastBytesTxOK
;
171 net_stats
->tx_errors
+= devTxStats
->pktsTxError
;
172 net_stats
->tx_dropped
+= drvTxStats
->drop_total
;
175 for (i
= 0; i
< adapter
->num_rx_queues
; i
++) {
176 devRxStats
= &adapter
->rqd_start
[i
].stats
;
177 drvRxStats
= &adapter
->rx_queue
[i
].stats
;
178 net_stats
->rx_packets
+= devRxStats
->ucastPktsRxOK
+
179 devRxStats
->mcastPktsRxOK
+
180 devRxStats
->bcastPktsRxOK
;
182 net_stats
->rx_bytes
+= devRxStats
->ucastBytesRxOK
+
183 devRxStats
->mcastBytesRxOK
+
184 devRxStats
->bcastBytesRxOK
;
186 net_stats
->rx_errors
+= devRxStats
->pktsRxError
;
187 net_stats
->rx_dropped
+= drvRxStats
->drop_total
;
188 net_stats
->multicast
+= devRxStats
->mcastPktsRxOK
;
194 vmxnet3_get_sset_count(struct net_device
*netdev
, int sset
)
198 return ARRAY_SIZE(vmxnet3_tq_dev_stats
) +
199 ARRAY_SIZE(vmxnet3_tq_driver_stats
) +
200 ARRAY_SIZE(vmxnet3_rq_dev_stats
) +
201 ARRAY_SIZE(vmxnet3_rq_driver_stats
) +
202 ARRAY_SIZE(vmxnet3_global_stats
);
210 vmxnet3_get_regs_len(struct net_device
*netdev
)
212 return 20 * sizeof(u32
);
217 vmxnet3_get_drvinfo(struct net_device
*netdev
, struct ethtool_drvinfo
*drvinfo
)
219 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
221 strlcpy(drvinfo
->driver
, vmxnet3_driver_name
, sizeof(drvinfo
->driver
));
222 drvinfo
->driver
[sizeof(drvinfo
->driver
) - 1] = '\0';
224 strlcpy(drvinfo
->version
, VMXNET3_DRIVER_VERSION_REPORT
,
225 sizeof(drvinfo
->version
));
226 drvinfo
->driver
[sizeof(drvinfo
->version
) - 1] = '\0';
228 strlcpy(drvinfo
->fw_version
, "N/A", sizeof(drvinfo
->fw_version
));
229 drvinfo
->fw_version
[sizeof(drvinfo
->fw_version
) - 1] = '\0';
231 strlcpy(drvinfo
->bus_info
, pci_name(adapter
->pdev
),
232 ETHTOOL_BUSINFO_LEN
);
233 drvinfo
->n_stats
= vmxnet3_get_sset_count(netdev
, ETH_SS_STATS
);
234 drvinfo
->testinfo_len
= 0;
235 drvinfo
->eedump_len
= 0;
236 drvinfo
->regdump_len
= vmxnet3_get_regs_len(netdev
);
241 vmxnet3_get_strings(struct net_device
*netdev
, u32 stringset
, u8
*buf
)
243 if (stringset
== ETH_SS_STATS
) {
246 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_tq_dev_stats
); i
++) {
247 memcpy(buf
, vmxnet3_tq_dev_stats
[i
].desc
,
249 buf
+= ETH_GSTRING_LEN
;
251 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_tq_driver_stats
); i
++) {
252 memcpy(buf
, vmxnet3_tq_driver_stats
[i
].desc
,
254 buf
+= ETH_GSTRING_LEN
;
256 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_rq_dev_stats
); i
++) {
257 memcpy(buf
, vmxnet3_rq_dev_stats
[i
].desc
,
259 buf
+= ETH_GSTRING_LEN
;
261 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_rq_driver_stats
); i
++) {
262 memcpy(buf
, vmxnet3_rq_driver_stats
[i
].desc
,
264 buf
+= ETH_GSTRING_LEN
;
266 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_global_stats
); i
++) {
267 memcpy(buf
, vmxnet3_global_stats
[i
].desc
,
269 buf
+= ETH_GSTRING_LEN
;
275 vmxnet3_set_flags(struct net_device
*netdev
, u32 data
)
277 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
278 u8 lro_requested
= (data
& ETH_FLAG_LRO
) == 0 ? 0 : 1;
279 u8 lro_present
= (netdev
->features
& NETIF_F_LRO
) == 0 ? 0 : 1;
281 if (data
& ~ETH_FLAG_LRO
)
284 if (lro_requested
^ lro_present
) {
285 /* toggle the LRO feature*/
286 netdev
->features
^= NETIF_F_LRO
;
288 /* update harware LRO capability accordingly */
290 adapter
->shared
->devRead
.misc
.uptFeatures
|=
293 adapter
->shared
->devRead
.misc
.uptFeatures
&=
295 VMXNET3_WRITE_BAR1_REG(adapter
, VMXNET3_REG_CMD
,
296 VMXNET3_CMD_UPDATE_FEATURE
);
302 vmxnet3_get_ethtool_stats(struct net_device
*netdev
,
303 struct ethtool_stats
*stats
, u64
*buf
)
305 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
310 VMXNET3_WRITE_BAR1_REG(adapter
, VMXNET3_REG_CMD
, VMXNET3_CMD_GET_STATS
);
312 /* this does assume each counter is 64-bit wide */
313 /* TODO change this for multiple queues */
315 base
= (u8
*)&adapter
->tqd_start
[j
].stats
;
316 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_tq_dev_stats
); i
++)
317 *buf
++ = *(u64
*)(base
+ vmxnet3_tq_dev_stats
[i
].offset
);
319 base
= (u8
*)&adapter
->tx_queue
[j
].stats
;
320 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_tq_driver_stats
); i
++)
321 *buf
++ = *(u64
*)(base
+ vmxnet3_tq_driver_stats
[i
].offset
);
323 base
= (u8
*)&adapter
->rqd_start
[j
].stats
;
324 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_rq_dev_stats
); i
++)
325 *buf
++ = *(u64
*)(base
+ vmxnet3_rq_dev_stats
[i
].offset
);
327 base
= (u8
*)&adapter
->rx_queue
[j
].stats
;
328 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_rq_driver_stats
); i
++)
329 *buf
++ = *(u64
*)(base
+ vmxnet3_rq_driver_stats
[i
].offset
);
331 base
= (u8
*)adapter
;
332 for (i
= 0; i
< ARRAY_SIZE(vmxnet3_global_stats
); i
++)
333 *buf
++ = *(u64
*)(base
+ vmxnet3_global_stats
[i
].offset
);
338 vmxnet3_get_regs(struct net_device
*netdev
, struct ethtool_regs
*regs
, void *p
)
340 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
344 memset(p
, 0, vmxnet3_get_regs_len(netdev
));
348 /* Update vmxnet3_get_regs_len if we want to dump more registers */
350 /* make each ring use multiple of 16 bytes */
351 /* TODO change this for multiple queues */
352 buf
[0] = adapter
->tx_queue
[i
].tx_ring
.next2fill
;
353 buf
[1] = adapter
->tx_queue
[i
].tx_ring
.next2comp
;
354 buf
[2] = adapter
->tx_queue
[i
].tx_ring
.gen
;
357 buf
[4] = adapter
->tx_queue
[i
].comp_ring
.next2proc
;
358 buf
[5] = adapter
->tx_queue
[i
].comp_ring
.gen
;
359 buf
[6] = adapter
->tx_queue
[i
].stopped
;
362 buf
[8] = adapter
->rx_queue
[i
].rx_ring
[0].next2fill
;
363 buf
[9] = adapter
->rx_queue
[i
].rx_ring
[0].next2comp
;
364 buf
[10] = adapter
->rx_queue
[i
].rx_ring
[0].gen
;
367 buf
[12] = adapter
->rx_queue
[i
].rx_ring
[1].next2fill
;
368 buf
[13] = adapter
->rx_queue
[i
].rx_ring
[1].next2comp
;
369 buf
[14] = adapter
->rx_queue
[i
].rx_ring
[1].gen
;
372 buf
[16] = adapter
->rx_queue
[i
].comp_ring
.next2proc
;
373 buf
[17] = adapter
->rx_queue
[i
].comp_ring
.gen
;
380 vmxnet3_get_wol(struct net_device
*netdev
, struct ethtool_wolinfo
*wol
)
382 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
384 wol
->supported
= WAKE_UCAST
| WAKE_ARP
| WAKE_MAGIC
;
385 wol
->wolopts
= adapter
->wol
;
390 vmxnet3_set_wol(struct net_device
*netdev
, struct ethtool_wolinfo
*wol
)
392 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
394 if (wol
->wolopts
& (WAKE_PHY
| WAKE_MCAST
| WAKE_BCAST
|
399 adapter
->wol
= wol
->wolopts
;
401 device_set_wakeup_enable(&adapter
->pdev
->dev
, adapter
->wol
);
408 vmxnet3_get_settings(struct net_device
*netdev
, struct ethtool_cmd
*ecmd
)
410 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
412 ecmd
->supported
= SUPPORTED_10000baseT_Full
| SUPPORTED_1000baseT_Full
|
414 ecmd
->advertising
= ADVERTISED_TP
;
415 ecmd
->port
= PORT_TP
;
416 ecmd
->transceiver
= XCVR_INTERNAL
;
418 if (adapter
->link_speed
) {
419 ecmd
->speed
= adapter
->link_speed
;
420 ecmd
->duplex
= DUPLEX_FULL
;
430 vmxnet3_get_ringparam(struct net_device
*netdev
,
431 struct ethtool_ringparam
*param
)
433 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
435 param
->rx_max_pending
= VMXNET3_RX_RING_MAX_SIZE
;
436 param
->tx_max_pending
= VMXNET3_TX_RING_MAX_SIZE
;
437 param
->rx_mini_max_pending
= 0;
438 param
->rx_jumbo_max_pending
= 0;
440 param
->rx_pending
= adapter
->rx_queue
[0].rx_ring
[0].size
*
441 adapter
->num_rx_queues
;
442 param
->tx_pending
= adapter
->tx_queue
[0].tx_ring
.size
*
443 adapter
->num_tx_queues
;
444 param
->rx_mini_pending
= 0;
445 param
->rx_jumbo_pending
= 0;
450 vmxnet3_set_ringparam(struct net_device
*netdev
,
451 struct ethtool_ringparam
*param
)
453 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
454 u32 new_tx_ring_size
, new_rx_ring_size
;
458 if (param
->tx_pending
== 0 || param
->tx_pending
>
459 VMXNET3_TX_RING_MAX_SIZE
)
462 if (param
->rx_pending
== 0 || param
->rx_pending
>
463 VMXNET3_RX_RING_MAX_SIZE
)
467 /* round it up to a multiple of VMXNET3_RING_SIZE_ALIGN */
468 new_tx_ring_size
= (param
->tx_pending
+ VMXNET3_RING_SIZE_MASK
) &
469 ~VMXNET3_RING_SIZE_MASK
;
470 new_tx_ring_size
= min_t(u32
, new_tx_ring_size
,
471 VMXNET3_TX_RING_MAX_SIZE
);
472 if (new_tx_ring_size
> VMXNET3_TX_RING_MAX_SIZE
|| (new_tx_ring_size
%
473 VMXNET3_RING_SIZE_ALIGN
) != 0)
476 /* ring0 has to be a multiple of
477 * rx_buf_per_pkt * VMXNET3_RING_SIZE_ALIGN
479 sz
= adapter
->rx_buf_per_pkt
* VMXNET3_RING_SIZE_ALIGN
;
480 new_rx_ring_size
= (param
->rx_pending
+ sz
- 1) / sz
* sz
;
481 new_rx_ring_size
= min_t(u32
, new_rx_ring_size
,
482 VMXNET3_RX_RING_MAX_SIZE
/ sz
* sz
);
483 if (new_rx_ring_size
> VMXNET3_RX_RING_MAX_SIZE
|| (new_rx_ring_size
%
487 if (new_tx_ring_size
== adapter
->tx_queue
[0].tx_ring
.size
&&
488 new_rx_ring_size
== adapter
->rx_queue
[0].rx_ring
[0].size
) {
493 * Reset_work may be in the middle of resetting the device, wait for its
496 while (test_and_set_bit(VMXNET3_STATE_BIT_RESETTING
, &adapter
->state
))
499 if (netif_running(netdev
)) {
500 vmxnet3_quiesce_dev(adapter
);
501 vmxnet3_reset_dev(adapter
);
503 /* recreate the rx queue and the tx queue based on the
505 vmxnet3_tq_destroy_all(adapter
);
506 vmxnet3_rq_destroy_all(adapter
);
508 err
= vmxnet3_create_queues(adapter
, new_tx_ring_size
,
509 new_rx_ring_size
, VMXNET3_DEF_RX_RING_SIZE
);
512 /* failed, most likely because of OOM, try default
514 printk(KERN_ERR
"%s: failed to apply new sizes, try the"
515 " default ones\n", netdev
->name
);
516 err
= vmxnet3_create_queues(adapter
,
517 VMXNET3_DEF_TX_RING_SIZE
,
518 VMXNET3_DEF_RX_RING_SIZE
,
519 VMXNET3_DEF_RX_RING_SIZE
);
521 printk(KERN_ERR
"%s: failed to create queues "
522 "with default sizes. Closing it\n",
528 err
= vmxnet3_activate_dev(adapter
);
530 printk(KERN_ERR
"%s: failed to re-activate, error %d."
531 " Closing it\n", netdev
->name
, err
);
535 clear_bit(VMXNET3_STATE_BIT_RESETTING
, &adapter
->state
);
537 vmxnet3_force_close(adapter
);
544 vmxnet3_get_rxnfc(struct net_device
*netdev
, struct ethtool_rxnfc
*info
,
547 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
549 case ETHTOOL_GRXRINGS
:
550 info
->data
= adapter
->num_rx_queues
;
558 vmxnet3_get_rss_indir(struct net_device
*netdev
,
559 struct ethtool_rxfh_indir
*p
)
561 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
562 struct UPT1_RSSConf
*rssConf
= adapter
->rss_conf
;
563 unsigned int n
= min_t(unsigned int, p
->size
, rssConf
->indTableSize
);
565 p
->size
= rssConf
->indTableSize
;
567 p
->ring_index
[n
] = rssConf
->indTable
[n
];
573 vmxnet3_set_rss_indir(struct net_device
*netdev
,
574 const struct ethtool_rxfh_indir
*p
)
577 struct vmxnet3_adapter
*adapter
= netdev_priv(netdev
);
578 struct UPT1_RSSConf
*rssConf
= adapter
->rss_conf
;
580 if (p
->size
!= rssConf
->indTableSize
)
582 for (i
= 0; i
< rssConf
->indTableSize
; i
++) {
584 * Return with error code if any of the queue indices
587 if (p
->ring_index
[i
] < 0 ||
588 p
->ring_index
[i
] >= adapter
->num_rx_queues
)
592 for (i
= 0; i
< rssConf
->indTableSize
; i
++)
593 rssConf
->indTable
[i
] = p
->ring_index
[i
];
595 VMXNET3_WRITE_BAR1_REG(adapter
, VMXNET3_REG_CMD
,
596 VMXNET3_CMD_UPDATE_RSSIDT
);
603 static struct ethtool_ops vmxnet3_ethtool_ops
= {
604 .get_settings
= vmxnet3_get_settings
,
605 .get_drvinfo
= vmxnet3_get_drvinfo
,
606 .get_regs_len
= vmxnet3_get_regs_len
,
607 .get_regs
= vmxnet3_get_regs
,
608 .get_wol
= vmxnet3_get_wol
,
609 .set_wol
= vmxnet3_set_wol
,
610 .get_link
= ethtool_op_get_link
,
611 .get_rx_csum
= vmxnet3_get_rx_csum
,
612 .set_rx_csum
= vmxnet3_set_rx_csum
,
613 .get_tx_csum
= ethtool_op_get_tx_csum
,
614 .set_tx_csum
= ethtool_op_set_tx_hw_csum
,
615 .get_sg
= ethtool_op_get_sg
,
616 .set_sg
= ethtool_op_set_sg
,
617 .get_tso
= ethtool_op_get_tso
,
618 .set_tso
= ethtool_op_set_tso
,
619 .get_strings
= vmxnet3_get_strings
,
620 .get_flags
= ethtool_op_get_flags
,
621 .set_flags
= vmxnet3_set_flags
,
622 .get_sset_count
= vmxnet3_get_sset_count
,
623 .get_ethtool_stats
= vmxnet3_get_ethtool_stats
,
624 .get_ringparam
= vmxnet3_get_ringparam
,
625 .set_ringparam
= vmxnet3_set_ringparam
,
626 .get_rxnfc
= vmxnet3_get_rxnfc
,
628 .get_rxfh_indir
= vmxnet3_get_rss_indir
,
629 .set_rxfh_indir
= vmxnet3_set_rss_indir
,
633 void vmxnet3_set_ethtool_ops(struct net_device
*netdev
)
635 SET_ETHTOOL_OPS(netdev
, &vmxnet3_ethtool_ops
);