From patchwork Wed Apr 6 05:18:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elo, Matias \(Nokia - FI/Espoo\)" X-Patchwork-Id: 65150 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp844785lbc; Tue, 5 Apr 2016 22:24:12 -0700 (PDT) X-Received: by 10.55.75.144 with SMTP id y138mr45228285qka.96.1459920252416; Tue, 05 Apr 2016 22:24:12 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 66si862106qhq.85.2016.04.05.22.24.11; Tue, 05 Apr 2016 22:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE dis=NONE) header.from=nokia.com Received: by lists.linaro.org (Postfix, from userid 109) id B81476198B; Wed, 6 Apr 2016 05:24:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3010F6162A; Wed, 6 Apr 2016 05:23:58 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 01653610E1; Wed, 6 Apr 2016 05:23:22 +0000 (UTC) Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by lists.linaro.org (Postfix) with ESMTPS id 380C96162A for ; Wed, 6 Apr 2016 05:18:51 +0000 (UTC) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd002.nsn-inter.net (8.15.2/8.15.2) with ESMTPS id u365IneT021949 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Apr 2016 05:18:49 GMT Received: from DEMUHTC003.nsn-intra.net ([10.159.42.34]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id u365Imug017792 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 6 Apr 2016 07:18:48 +0200 Received: from DEMUMBX011.nsn-intra.net ([169.254.11.224]) by DEMUHTC003.nsn-intra.net ([10.159.42.34]) with mapi id 14.03.0279.002; Wed, 6 Apr 2016 07:18:48 +0200 From: "Elo, Matias (Nokia - FI/Espoo)" To: EXT Bill Fischofer Thread-Topic: [lng-odp] [PATCH] linux-generic: dpdk: always set input hash functions Thread-Index: AQHRj5phq1vI0T2kZk+HkRyAeqj34Z98aFMg Date: Wed, 6 Apr 2016 05:18:48 +0000 Message-ID: References: <1457601168-6486-1-git-send-email-matias.elo@nokia.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.159.42.124] MIME-Version: 1.0 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 11360 X-purgate-ID: 151667::1459919929-00002418-C61B570B/0/0 X-Topics: patch Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [PATCH] linux-generic: dpdk: always set input hash functions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Thanks, -Matias From: EXT Bill Fischofer [mailto:bill.fischofer@linaro.org] Sent: Wednesday, April 06, 2016 3:22 AM To: Elo, Matias (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [PATCH] linux-generic: dpdk: always set input hash functions On Thu, Mar 10, 2016 at 3:12 AM, Matias Elo > wrote: Always set at least the default input hash functions to enable DPDK RSS hash calculation. Signed-off-by: Matias Elo > Reviewed-by: Bill Fischofer > --- platform/linux-generic/pktio/dpdk.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index a39e7dc..10daa29 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -185,7 +185,13 @@ static int dpdk_setup_port(pktio_entry_t *pktio_entry) pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk; struct rte_eth_rss_conf rss_conf; - rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash); + /* Always set some hash functions to enable DPDK RSS hash calculation */ + if (pkt_dpdk->hash.all_bits == 0) { + memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf)); + rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP; + } else { + rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash); + } struct rte_eth_conf port_conf = { .rxmode = {