From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 3376C1C00 for ; Mon, 4 Dec 2017 21:04:06 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 12:04:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,361,1508828400"; d="scan'208";a="8991040" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.178]) ([10.241.225.178]) by FMSMGA003.fm.intel.com with ESMTP; 04 Dec 2017 12:04:04 -0800 To: Jingjing Wu , dev@dpdk.org Cc: wenzhuo.lu@intel.com References: <1508488012-82704-1-git-send-email-jingjing.wu@intel.com> <1511505206-97333-1-git-send-email-jingjing.wu@intel.com> <1511505206-97333-12-git-send-email-jingjing.wu@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 4 Dec 2017 12:04:04 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1511505206-97333-12-git-send-email-jingjing.wu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 11/14] net/i40e: support AVF basic interface 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: Mon, 04 Dec 2017 20:04:07 -0000 On 11/23/2017 10:33 PM, Jingjing Wu wrote: > Enable Virtchnl offload Caps negotiation and RSS_PF offload > to support AVF basic interface. > > Signed-off-by: Jingjing Wu > --- > config/common_base | 2 +- > drivers/net/i40e/i40e_ethdev.c | 64 +++++++++++++++---- > drivers/net/i40e/i40e_ethdev.h | 4 ++ > drivers/net/i40e/i40e_pf.c | 137 +++++++++++++++++++++++++++++++++++++---- > drivers/net/i40e/i40e_pf.h | 6 ++ This is a i40e patch that enables AVF support, right? I believe it would be better to separate the config change that enables the AVF PMD by default from i40e changes patches. <...> > @@ -3694,14 +3695,21 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) > uint32_t *lut_dw = (uint32_t *)lut; > uint16_t i, lut_size_dw = lut_size / 4; > > - for (i = 0; i < lut_size_dw; i++) > - lut_dw[i] = I40E_READ_REG(hw, I40E_PFQF_HLUT(i)); > + if (vsi->type == I40E_VSI_SRIOV) { > + for (i = 0; i <= lut_size_dw; i++) > + reg = I40E_VFQF_HLUT1(i, vsi->user_param); > + lut_dw[i] = i40e_read_rx_ctl(hw, reg); this assignment is out of "for" loop. > + } else { > + for (i = 0; i < lut_size_dw; i++) > + lut_dw[i] = I40E_READ_REG(hw, > + I40E_PFQF_HLUT(i)); > + } > } > > return 0; > } > <...> > @@ -6754,8 +6784,20 @@ i40e_get_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t *key_len) > uint32_t *key_dw = (uint32_t *)key; > uint16_t i; > > - for (i = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) > - key_dw[i] = i40e_read_rx_ctl(hw, I40E_PFQF_HKEY(i)); > + if (vsi->type == I40E_VSI_SRIOV) { > + for (i = 0; i <= I40E_VFQF_HKEY_MAX_INDEX; i++) > + reg = I40E_VFQF_HKEY1(i, vsi->user_param); > + key_dw[i] = i40e_read_rx_ctl(hw, reg); This line is not part of the for loop, seems which is the intention, and all credits goes to compiler to figuring this out. > + *key_len = (I40E_VFQF_HKEY_MAX_INDEX + 1) * > + sizeof(uint32_t); > + > + } else { > + for (i = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) > + reg = I40E_PFQF_HKEY(i); > + key_dw[i] = i40e_read_rx_ctl(hw, reg); Same problem here, "for" scope is wrong. <...>