aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_int.h
diff options
context:
space:
mode:
authorShrikrishna Khare <skhare@vmware.com>2016-06-16 10:51:57 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-16 22:37:04 -0700
commit4edef40ef5f8d09a0b1ded4d1d9b0e988cd98e97 (patch)
tree5b2ebb62c8e7c7ec7fcf8ce514ed340d9365ef74 /drivers/net/vmxnet3/vmxnet3_int.h
parentvmxnet3: add receive data ring support (diff)
downloadlinux-dev-4edef40ef5f8d09a0b1ded4d1d9b0e988cd98e97.tar.xz
linux-dev-4edef40ef5f8d09a0b1ded4d1d9b0e988cd98e97.zip
vmxnet3: add support for get_coalesce, set_coalesce ethtool operations
The emulation supports a variety of coalescing modes viz. disabled (no coalescing), adaptive, static (number of packets to batch before raising an interrupt), rate based (number of interrupts per second). This patch implements get_coalesce and set_coalesce methods to allow querying and configuring different coalescing modes. Signed-off-by: Keyong Sun <sunk@vmware.com> Signed-off-by: Manoj Tammali <tammalim@vmware.com> Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_int.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index c46bf09ade5a..63df4f2a743d 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -358,6 +358,7 @@ struct vmxnet3_adapter {
int rx_buf_per_pkt; /* only apply to the 1st ring */
dma_addr_t shared_pa;
dma_addr_t queue_desc_pa;
+ dma_addr_t coal_conf_pa;
/* Wake-on-LAN */
u32 wol;
@@ -384,6 +385,9 @@ struct vmxnet3_adapter {
int share_intr;
+ struct Vmxnet3_CoalesceScheme *coal_conf;
+ bool default_coal_mode;
+
dma_addr_t adapter_pa;
dma_addr_t pm_conf_pa;
dma_addr_t rss_conf_pa;
@@ -429,6 +433,11 @@ struct vmxnet3_adapter {
(rqID >= 2 * adapter->num_rx_queues && \
rqID < 3 * adapter->num_rx_queues) \
+#define VMXNET3_COAL_STATIC_DEFAULT_DEPTH 64
+
+#define VMXNET3_COAL_RBC_RATE(usecs) (1000000 / usecs)
+#define VMXNET3_COAL_RBC_USECS(rbc_rate) (1000000 / rbc_rate)
+
int
vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);