summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2018-04-27 20:03:37 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-14 22:31:49 +0100
commit31400b280a91d39b701707f8b2660069b4b2360f (patch)
tree872a94c6c2f894fe5337ee4c3953cafcb2195391
parenta9e0e6747d8ac908a262b57c3a23ff7549c9fbe9 (diff)
downloaddpdk-31400b280a91d39b701707f8b2660069b4b2360f.zip
dpdk-31400b280a91d39b701707f8b2660069b4b2360f.tar.gz
dpdk-31400b280a91d39b701707f8b2660069b4b2360f.tar.xz
net/ixgbevf: set the interrupt interval for EITR
Set EITR interval as default. This patch can improve the performance when we enable the rx-interrupt to process the packets because we hope rx-interrupt reduce CPU. For example, the 200us value of EITR makes the performance better with the low CPU. The default value of ITR is 500us, compatible with RSC of ixgbe PF, and next patch will use the default value. Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
-rw-r--r--drivers/net/ixgbe/ixgbe_ethdev.c7
-rw-r--r--drivers/net/ixgbe/ixgbe_ethdev.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 72fc02d..7ba05c4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5797,6 +5797,13 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)
if (vector_idx < base + intr_handle->nb_efd - 1)
vector_idx++;
}
+
+ /* As RX queue setting above show, all queues use the vector 0.
+ * Set only the ITR value of IXGBE_MISC_VEC_ID.
+ */
+ IXGBE_WRITE_REG(hw, IXGBE_VTEITR(IXGBE_MISC_VEC_ID),
+ IXGBE_EITR_INTERVAL_US(IXGBE_QUEUE_ITR_INTERVAL_DEFAULT)
+ | IXGBE_EITR_CNT_WDIS);
}
/**
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index cc512d6..e42ec30 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -62,6 +62,7 @@
(((us) * 1000 / IXGBE_EITR_INTERVAL_UNIT_NS << IXGBE_EITR_ITR_INT_SHIFT) & \
IXGBE_EITR_ITR_INT_MASK)
+#define IXGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */
/* Loopback operation modes */
/* 82599 specific loopback operation types */