From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D146DA04EF; Mon, 25 May 2020 11:29:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C4A11D714; Mon, 25 May 2020 11:29:47 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1EBF71D70A for ; Mon, 25 May 2020 11:29:44 +0200 (CEST) IronPort-SDR: 4ZOCTI7LMhJyOMN6hRdnymv1Uk8sj9V/EJkUVTatmWJlp7R3vsNvwwF0ZI7cSviO8/7ahZ0P4f xjpMiHmEcntg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2020 02:29:43 -0700 IronPort-SDR: bP7WXJKZ39KAgqaJ2pr6/BpbETMBNVQAZr317fcYD35lyTURpprCxYM/ptRydBI9vVxWgx6R10 534fBcFNwbRg== X-IronPort-AV: E=Sophos;i="5.73,433,1583222400"; d="scan'208";a="441676769" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.22.226]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 25 May 2020 02:29:40 -0700 Date: Mon, 25 May 2020 10:29:37 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: "Varghese, Vipin" , Jerin Jacob Kollanukkaran , "Mcnamara, John" , "Kovacevic, Marko" , Ori Kam , "Nicolau, Radu" , Akhil Goyal , "Kantecki, Tomasz" , Sunil Kumar Kori , dev@dpdk.org, "Andrzej Ostruszka [C]" , Vamsi Krishna Attunuru , Pavan Nikhilesh Bhagavatula Message-ID: <20200525092937.GA891@bricha3-MOBL.ger.corp.intel.com> References: <20200427075944.1314-1-pbhagavatula@marvell.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB8CB@BGSMSX101.gar.corp.intel.com> <10969041.qOdnLc68Dm@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10969041.qOdnLc68Dm@thomas> Subject: Re: [dpdk-dev] [PATCH v4] examples/l2fwd: add cmdline option for forwarding port info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, May 24, 2020 at 06:13:22PM +0200, Thomas Monjalon wrote: > Bruce, as maintainer of l2fwd example, any opinion about this change? > Assuming all previous discussion on it is resolved, I'm fine with this patch, though I suspect it will only make 20.08 now. Acked-by: Bruce Richardson > > 11/05/2020 02:23, Pavan Nikhilesh Bhagavatula: > > Hi Vipin, > > > > >Hi Pavan, > > > > > >snipped > > >> > > > >> >Should we check & warn the user if > > >> >1. port speed mismatch > > >> >2. on different NUMA > > >> >3. port pairs are physical and vdev like tap, and KNI (performance). > > >> > > > >> > > >> Sure, it can be a separate patch as it will be applicable for multiple > > >examples. > > >I believe this patch is for example `l2fwd`. But you would like to have to > > >updated for all `example`. I am ok for this. > > > > > >snipped > > >> > > > >> >Should not the check_port_pair be after this? If the port is not > > >> >enabled in port_mask will you skip that pair? or skip RX-TX from that > > >port? > > >> > > >> We check every port pair against l2fwd_enabled_port_mask in > > >> check_port_pair_config() > > > > > > > > >> > > >snipped > > >> > > > >> >As mentioned above there can ports in mask which might be > > >disabled for > > >> >port pair. Should not that be skipped rather than setting last port rx- > > >> >tx loopback? > > >> > > >> There could be scenarios where user might want to test 2x10G and > > >1x40G Why > > >> force the user to explicitly mention 1x40G as port pair of itself in the > > >portpair > > >> config? > > >I am not sure if I follow your thought, as your current port map only > > >allows `1:1` mapping by `struct port_pair_params`. This can be to self > > >like `(port0:port0),(port1:port1)` or `(port-0:port-1)`. > > > > > >1. But current `l2fwd_parse_port_pair_config` does not consider the > > >same port mapping as we have hard check for `if (nb_port_pair_params > > >>= RTE_MAX_ETHPORTS/2)`. > > > > > >2. `l2fwd_enabled_port_mask` is global variable of user port mask. This > > >can contain both valid and invalid mask. Hence we check > > >`l2fwd_enabled_port_mask & ~((1 << nb_ports) - 1)`. > > > > > >3. can these scenarios are true if we invoke `check_port_pair_config` > > >before actual port_mask check. > > > a. there are only 4 ports, hence possible mask is `0xf`. > > > b. user passes port argument as `0xe` > > > c. `check_port_pair_config` gets masks for `(1,3)` as input and > > >populates `port_pair_config_mask`. > > > d. As per the code, port 2 which is valid port and part of user port mask > > >will have lastport (which is port 3)? May be I did understand the logic > > >correct. Can you help me? > > > > Here user needs to explicitly mention (2,2) for port 2 to be setup else it > > will be skipped. > > If you see `check_port_pair_config` below we disable the ports that are not > > Mentioned in portmap. > > > > " > > check_port_pair_config(void) > > { > > > > > > port_pair_config_mask |= port_pair_mask; > > } > > > > l2fwd_enabled_port_mask &= port_pair_config_mask; > > > > return 0; > > } > > " > > > > > > > > > >So my concerns are 1) there is no same port mapping, 2) my > > >understanding on lastport logic is not clear and 3) as per the code there > > >is 1:N but 1:1. > > > > > >Hence there should be sufficient warning to user if port are of wrong > > >speed and NUMA. > > > > Unless the user disables stats using -T 0 option all the prints will be skipped. > > > > > > > >Note: current speed can be fetched only if the port are started too (in > > >Fortville). > > > > > >snipped > > > >