From 31400b280a91d39b701707f8b2660069b4b2360f Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Fri, 27 Apr 2018 20:03:37 -0700 Subject: [PATCH] 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 Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ drivers/net/ixgbe/ixgbe_ethdev.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 72fc02dfd4..7ba05c4964 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 cc512d6023..e42ec30d32 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 */ -- 2.20.1