From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f67.google.com (mail-oi0-f67.google.com [209.85.218.67]) by dpdk.org (Postfix) with ESMTP id 6D75E8D39 for ; Wed, 18 Apr 2018 03:01:19 +0200 (CEST) Received: by mail-oi0-f67.google.com with SMTP id e11-v6so64065oii.11 for ; Tue, 17 Apr 2018 18:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yv0LFXrUN9RJ1WBLNlC1UAriIyxY4lJ5q+TYoxaJLJo=; b=JFDIvg8dYvgFTgT0sMGDLqv1VoNGISLPvo/OYGEdYHl+0bY1QO40KLQZS1ymWCJ7Ox BkDE/M+arr4xpoMiiMdIjb2A3gCWu1rh11y4yTqtBldLSrDbsIFgVATqp6R+wOKvlCpN cqWC7aA12UCvieRXvN/XVO8yBrSZrUkknSsnb0s+WUswzcmXHCwE+MaeF/ZiWsAGpVyX zeXVFL28VEv1ttv3dN7XYmNSWw0Fr9177opra4ngk5CO1scNXSiGUXmUd9pXxLEmzjFV QyDp7mSG0/EGWdjxIE0QBrmd3T15+k7/46rramG2aYfZKuC9jngcz1BhRlfytmC5nV2y rkbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yv0LFXrUN9RJ1WBLNlC1UAriIyxY4lJ5q+TYoxaJLJo=; b=ilFaau7nu8a19Cs2Sbu9vy7DcExWh4eRV6o8RTxjA9OWoJ9TYtqTLGXpLRVDZFL1M9 KWNYfaz3wKi7vEOpOwLeP6WcobOUrk0sHIwByGB7whMMC3E83Lub4UGn65BGaQuUuDIs ab+4p+pjvpTC78bB8Nub1pen/GPLkeu2D+IrRO8Ty+21bfQ1EE/3n983Gu4moqVqeLL0 W4uTr7tnoLxSPNZx2uCyW6qUvi693I/HrLqEPPI6TfRQMVewyHznqytLjlcM0ZazY+Ra CANIE4foqkpLooLMJaZ/TxSzsZ1GhhAVN46PDZ07NPcDHFM0sqgpy9jSDZk0Zn3WoxF0 Chvw== X-Gm-Message-State: ALQs6tCD0+CBflFvtLTsr6f6bFt77CWQakZwojAcDmKnql+5mDCYEF2b xhlWf+JvqRl0W9fi9ltNgAXmL/tP9vLKhcNwmok= X-Google-Smtp-Source: AIpwx48RaawuclWyWf0eoS9JacPzzJEoi2jRVOajKsxEwberdQjQjlIvhaxa48rYMbboVJlktmS29AjKM28v+IuWxnA= X-Received: by 2002:aca:1016:: with SMTP id 22-v6mr25216oiq.128.1524013278765; Tue, 17 Apr 2018 18:01:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.146.137 with HTTP; Tue, 17 Apr 2018 18:01:18 -0700 (PDT) In-Reply-To: <3b7d6b8b-270b-18e4-13a0-3676d02ef686@intel.com> References: <1521723718-93761-1-git-send-email-xiangxia.m.yue@gmail.com> <1521723718-93761-2-git-send-email-xiangxia.m.yue@gmail.com> <3b7d6b8b-270b-18e4-13a0-3676d02ef686@intel.com> From: Tonghao Zhang Date: Wed, 18 Apr 2018 09:01:18 +0800 Message-ID: To: Ferruh Yigit Cc: "Lu, Wenzhuo" , konstantin.ananyev@intel.com, "Xing, Beilei" , "Dai, Wei" , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/ixgbevf: set the inter-interrupt interval for EITR. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2018 01:01:19 -0000 On Tue, Apr 17, 2018 at 7:00 PM, Ferruh Yigit wrote: > On 3/22/2018 1:01 PM, xiangxia.m.yue@gmail.com wrote: >> From: Tonghao Zhang >> >> Set EITR interval as default. This patch can improve the >> performance when we enable the rx-intrrupt to process the >> packets because we hope rx-intrrupt reduce CPU. For example, >> the 200us value of EITR makes the performance better with >> the low CPU. >> >> Users can configure the value of ITR via DPDK configuration. >> >> 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 >> --- >> v1 --> v2: >> use the configure file, for different user. >> suggested by Beilei Xing, http://dpdk.org/dev/patchwork/patch/32989 >> --- >> config/common_base | 2 ++ >> drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ >> drivers/net/ixgbe/ixgbe_ethdev.h | 12 ++++++++++++ >> 3 files changed, 21 insertions(+) >> >> diff --git a/config/common_base b/config/common_base >> index e74febe..2e9fded 100644 >> --- a/config/common_base >> +++ b/config/common_base >> @@ -196,6 +196,8 @@ CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n >> CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n >> CONFIG_RTE_IXGBE_INC_VECTOR=y >> CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n >> +# interval up to 1024 us >> +CONFIG_RTE_LIBRTE_IXGBE_ITR_INTERVAL=-1 > > I can understand this is to let user to ability to fine tune this value, the > down side is when number of these kind of tune parameters increased, it become > confusing and config options because less useful or perhaps useless. > > And overall we are trying to reduce config options we have. > > I can see there is already some default values in the header file, what do you > think removing the config option and go with default values defined in header? v2 used the default value in header, but for configuring it like as i40e option (CONFIG_RTE_LIBRTE_IXGBE_ITR_INTERVAL). so v3 makes some changes. These patches may have been applied. For reducing config option, should we do it in individual patches to fix the ixgbe/i40e option ? >> >> # >> # Compile burst-oriented I40E PMD driver >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >> index e67389f..495e72c 100644 >> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >> @@ -5780,6 +5780,13 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on) >> 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_calc_itr_interval(RTE_LIBRTE_IXGBE_ITR_INTERVAL) >> + | IXGBE_EITR_CNT_WDIS); >> } >> >> /** >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h >> index 1db29bd..c779001 100644 >> --- a/drivers/net/ixgbe/ixgbe_ethdev.h >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h >> @@ -58,6 +58,18 @@ >> IXGBE_EITR_ITR_INT_MASK) >> >> >> +#define IXGBE_QUEUE_ITR_INTERVAL_MAX 1024 /* 1024us */ >> +#define IXGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */ >> + >> +static inline uint16_t >> +ixgbe_calc_itr_interval(int16_t interval) >> +{ >> + if (interval < 0 || interval > IXGBE_QUEUE_ITR_INTERVAL_MAX) >> + interval = IXGBE_QUEUE_ITR_INTERVAL_DEFAULT; >> + >> + return IXGBE_EITR_INTERVAL_US(interval); >> +} >> + >> /* Loopback operation modes */ >> /* 82599 specific loopback operation types */ >> #define IXGBE_LPBK_82599_NONE 0x0 /* Default value. Loopback is disabled. */ >> >