From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by dpdk.org (Postfix) with ESMTP id 7A78B7D0A for ; Thu, 26 Apr 2018 15:54:08 +0200 (CEST) Received: by mail-oi0-f54.google.com with SMTP id n65-v6so24170011oig.6 for ; Thu, 26 Apr 2018 06:54:08 -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=iJB2do499j9AB53fkh5pxdzDZpiX8jGYYaVNzovWAMM=; b=C83NLi8HMfAyq7uGkx6f1UDDrqYOOqY4GSG1MunIXedF/5ClbwL6IB5KHIv0CaI7Kg uJVmzOtJmsHWNiLwIBnio4qun2OrjDbEDTpRTlI8h6MaofR//cbyAeEZX/SK8RphdiEO JkN+Y37V6VEGPQN+uCaqg0QGE2rX1EZvZ9qnT1rlSmZ9ojhOf/OYda4Xrg6MWfDbFSZ0 QZqIFAxSKDTOujtPBJ2Ypx3yQZ2TnkHF3QPhZn0yp/8TNy+ca6vQdjHN13CKqqXKvy+P kmXR5JRdGGA+Uh5xoqUZWBKW1ROBV5pGilZjwww8lDic/vXlh9VayuSuhDQgi9U1levq yLaw== 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=iJB2do499j9AB53fkh5pxdzDZpiX8jGYYaVNzovWAMM=; b=D8KsUPE5q2UzB9J/CpsaaewjBleVfZH4RS5DI1M6ooMjqdMevHYukk8RlTktq/l41u 6nabC/dKZ6UqOx2DgJn6F6MFGapk5z6bLTNSSGJ5e02mphOPWKdzxWdiOzx8/R1MrImJ itpkv+rB0zqL9u4kQqL7dfnK3haeHI9aQf7DQa42cLMdYRPcrFM5Yv5+Nt6XMrvJujSI qr3ifMUDBYTfJLptOqzTaexDp2+YuQ1LNXNl0/QOeGKhJ9A3fS9Jc7FFYQYh3uIe25qP DM9xZpH16g2XprvofPh7UsgKIjGgI8YstYLKp2WAp6C34BGRPi7nOPEnOXjDpjr8gtqd 5Rzw== X-Gm-Message-State: ALQs6tAAXAUp82RSK4p3HAk2GbUnWwl8ndsWD9nQui8+KTcCdoMA65nb Hn/v9yEkTj1kV6JJe0eXrbva3DxzLAe5lkPHvAJVKA== X-Google-Smtp-Source: AB8JxZpODhfDwhgjutsjnrZgsP0u4b3H54n6CRLKwD1JynNIBiJIb6IpXyqcWGTAVvU+Rt0v6Q+bwaOPblU7cGw3Fw4= X-Received: by 2002:aca:538b:: with SMTP id h133-v6mr6212690oib.252.1524750847513; Thu, 26 Apr 2018 06:54:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.146.137 with HTTP; Thu, 26 Apr 2018 06:54:07 -0700 (PDT) In-Reply-To: <039ED4275CED7440929022BC67E70611531A8EBD@SHSMSX103.ccr.corp.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> <4261b067-f381-8857-f4ca-648c3f715c24@intel.com> <039ED4275CED7440929022BC67E70611531A8EBD@SHSMSX103.ccr.corp.intel.com> From: Tonghao Zhang Date: Thu, 26 Apr 2018 21:54:07 +0800 Message-ID: To: "Zhang, Qi Z" Cc: "dev@dpdk.org" , "Zhang, Helin" , "Yigit, Ferruh" 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: Thu, 26 Apr 2018 13:54:08 -0000 On Thu, Apr 26, 2018 at 9:14 PM, Zhang, Qi Z wrote: > Hi Tonghao: > Would you submit v4 with Ferruh' s fix and also do a rebase on next-net? Yes > Thanks > Qi > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit >> Sent: Thursday, April 19, 2018 12:10 AM >> To: Tonghao Zhang >> Cc: Lu, Wenzhuo ; Ananyev, Konstantin >> ; Xing, Beilei ; Dai, >> Wei ; dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/ixgbevf: set the inter-interrupt >> interval for EITR. >> >> On 4/18/2018 2:01 AM, Tonghao Zhang wrote: >> > 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 ? >> >> Patches are still in Helin's tree, so this up to him how manage. >> Since patches are not in main repo yet I would suggest making new version if >> fits to Helin. >> >> > >> >>> >> >>> # >> >>> # 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. */ >> >>> >> >> >