From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2] ethdev: document RSS default key and types Date: Tue, 13 Nov 2018 18:15:19 +0100 Message-ID: <20181113171519.GF17131@6wind.com> References: <1541582611-1609-1-git-send-email-ophirmu@mellanox.com> <20181107093109.GG4638@6wind.com> <20181107140604.GL4638@6wind.com> <20181107164118.GM4638@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ophir Munk , Yongseok Koh , Andrew Rybchenko , Ferruh Yigit , "dev@dpdk.org" , Thomas Monjalon , Asaf Penso , Shahaf Shuler , Olga Shern To: Ori Kam Return-path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 821D6378B for ; Tue, 13 Nov 2018 18:15:39 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id v18-v6so14201599wrt.8 for ; Tue, 13 Nov 2018 09:15:39 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Again a bit late to the party, please see below. On Sun, Nov 11, 2018 at 09:35:22AM +0000, Ori Kam wrote: > > -----Original Message----- > > From: dev On Behalf Of Ophir Munk > > Sent: Friday, November 9, 2018 10:14 AM > > To: Yongseok Koh ; Adrien Mazarguil > > ; Andrew Rybchenko > > > > Cc: Ferruh Yigit ; dev@dpdk.org; Thomas Monjalon > > ; Asaf Penso ; Shahaf Shuler > > ; Olga Shern > > Subject: Re: [dpdk-dev] [PATCH v2] ethdev: document RSS default key and types > > > > > -----Original Message----- > > > From: Yongseok Koh > > > Sent: Friday, November 09, 2018 1:07 AM > > > To: Ophir Munk ; Adrien Mazarguil > > > ; Andrew Rybchenko > > > > > > Cc: Ferruh Yigit ; dev@dpdk.org; Thomas Monjalon > > > ; Asaf Penso ; Shahaf > > > Shuler ; Olga Shern > > > Subject: Re: [dpdk-dev] [PATCH v2] ethdev: document RSS default key and > > > types > > > > > > > > > - if (src.rss->key_len) { > > > + if (src.rss->key && src.rss->key_len) { > > > > > > but looks like we should conclude this thread first? > > > Or, does the fix make any sense regardless of having key_len=0 or key=null > > > for default key? > > > Having more sanity check is no harm usually... > > > > > > > > > Thanks, > > > Yongseok > > > > > > > The setfault is the result of commit a4391f8bae ("app/testpmd: set default RSS > > key as null"). > > Reverting this commit should fix the segfault but it also means there is no way > > to set default key (key=NULL) with testpmd. > > Need to check if this is only a testpmd limitation and not all applications > > limitation. > > > > We should decide how an application can set default RSS without knowing > > anything about keys. > > > > I agree with Adrian that the main criteria should be the length. > Maybe the set default RSS in testpmd should get new parameter. Since [1] was reverted and we seem to agree that a zero key_len should trigger a PMD-specific default key, this can already be requested with testpmd by overriding key_len, e.g.: flow create 1 pattern eth / end actions rss key_len 0 / end Using an empty string as the key would yield the same result but cannot be expressed on the command line yet. Note that specifying a key automatically overrides key_len, so key_len must be forced to 0 last to get PMD defaults: flow create 1 pattern eth / end actions rss key foo key_len 0 / end Here key_len is set to testpmd's default size when parsing "rss", updated to 3 when parsing "key foo" and updated once again when parsing "key_len 0". Lastly, while it would make sense for testpmd to use 0 as the default value, doing so yields inconsistent balancing results between vendors/devices as they all come with a different key. Same reason as initializing the RSS types field to the global rss_hf instead of 0. [1] "app/testpmd: revert setting default RSS" https://mails.dpdk.org/archives/dev/2018-November/118786.html -- Adrien Mazarguil 6WIND