From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 0B3B95A81 for ; Sun, 1 Feb 2015 01:38:41 +0100 (CET) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YHiYb-0007wT-DI; Sat, 31 Jan 2015 19:38:38 -0500 Date: Sat, 31 Jan 2015 19:38:29 -0500 From: Neil Horman To: "Chen Jing D(Mark)" Message-ID: <20150201003829.GA31443@localhost.localdomain> References: <1422594454-11045-1-git-send-email-jing.d.chen@intel.com> <1422594454-11045-13-git-send-email-jing.d.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422594454-11045-13-git-send-email-jing.d.chen@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 12/18] fm10k: add PF RSS support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 00:38:41 -0000 On Fri, Jan 30, 2015 at 01:07:28PM +0800, Chen Jing D(Mark) wrote: > From: Jeff Shaw > > 1. Configure RSS in fm10k_dev_rx_init function. > 2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get > and inquery RSS configuration. > > Signed-off-by: Jeff Shaw > Signed-off-by: Chen Jing D(Mark) > --- > lib/librte_pmd_fm10k/fm10k_ethdev.c | 156 +++++++++++++++++++++++++++++++++++ > 1 files changed, 156 insertions(+), 0 deletions(-) > > diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c > index 9907906..4711047 100644 > --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c > +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c > @@ -269,6 +269,78 @@ fm10k_dev_configure(struct rte_eth_dev *dev) > return 0; > } > > +static void > +fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev) > +{ > + struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct rte_eth_conf *dev_conf = &dev->data->dev_conf; > + uint32_t mrqc, *key, i, reta, j; > + uint64_t hf; > + > +#define RSS_KEY_SIZE 40 > + static uint8_t rss_intel_key[RSS_KEY_SIZE] = { > + 0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2, > + 0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0, > + 0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4, > + 0x77, 0xCB, 0x2D, 0xA3, 0x80, 0x30, 0xF2, 0x0C, > + 0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA, > + }; > + > + if (dev->data->nb_rx_queues == 1 || > + dev_conf->rxmode.mq_mode != ETH_MQ_RX_RSS || > + dev_conf->rx_adv_conf.rss_conf.rss_hf == 0) > + return; > + > + /* random key is rss_intel_key (default) or user provided (rss_key) */ > + if (dev_conf->rx_adv_conf.rss_conf.rss_key == NULL) > + key = (uint32_t *)rss_intel_key; Its not really random if its statically allocated and assigned. The kernel has started randomizing these default keys, it seems like a sensible thing to do here as well, as this is the init path and not performance sensitive Neil