From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 110685917 for ; Mon, 3 Nov 2014 09:50:19 +0100 (CET) Received: by mail-wg0-f41.google.com with SMTP id k14so10535452wgh.14 for ; Mon, 03 Nov 2014 00:59:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ybSJypLKXd38neVZE//xonaKRS4IHP3n4A2XyE9qSTs=; b=Q2X6Ch0BzTol9q3fSVXtxBkbAjsP2Bq8+zMwAV0GgRKZZXLsuN8TIpqsGoJgQyWepN pHSBw/czfAyWiEmPat0gAtFpWQgNbgzSSpsPFj6qn9Hgnv77wvpbVu3YK///LHodtJhZ vamQ4NR5SLu/TJOf0fM+yiLrPlA9fvihqWyrQloE7VT+cyk/FsrvwKdGgL3pJBkLpLDv zmp8bx3sIAKO2dlMfClykcGUvTg3Lw+jOsO53VCV7paJE8MF3NXGhtD+OnPlhnLH2yRb NI0/zdOtjyf1dcYfHlh0d93B+TCvCRmrZx/rCYaMfeZlud/ZfdowrI3shM6oDYB6bnzT Thzg== X-Gm-Message-State: ALoCoQmaY5lsvDxzwgt3Z5y0zF9X8KfyQNIDndIZ1ao/VCt9GDAHVU29phE582MRZFtL4+/JjQCF X-Received: by 10.180.80.39 with SMTP id o7mr14223490wix.37.1415005172256; Mon, 03 Nov 2014 00:59:32 -0800 (PST) Received: from xps13.localnet (110.26.90.92.rev.sfr.net. [92.90.26.110]) by mx.google.com with ESMTPSA id f6sm7978401wix.5.2014.11.03.00.59.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 00:59:31 -0800 (PST) From: Thomas Monjalon To: "Zhang, Helin" Date: Mon, 03 Nov 2014 09:59:10 +0100 Message-ID: <1526321.WRfZaPjy3u@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1493143.C52zTo8RWN@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 1/5] i40e: Use constant random hash keys 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: Mon, 03 Nov 2014 08:50:19 -0000 2014-11-03 08:18, Zhang, Helin: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > The title is a bit surprising: > > - it should be about RSS > > RSS makes use of hash function to route received packets, though > hash function can be used for other cases, e.g. Flow director. Yes but this patch is only changing rss_key_default so I guess it's only related to RSS, right? > > - a constant cannot be really random ;) > > The hash keys are generated by libc random function. > It is preparatory to avoid calling random function for each port. Here, you remove the call to rte_rand by a constant value. > > 2014-10-21 11:14, Helin Zhang: > > > To be simpler, and remove the race condition, it uses prepared > > > constant random hash keys to replace runtime generating the hash keys. > > > > Could you explain what is the role of rss_key_default? > > Hash function needs to be configured with keys, before end users configured > them with specific keys, we need to provide a default keys which is > generated by libc random function. > The random keys can get the hash function to route the received packets to > all the queues well-proportioned.