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 33B67A04A4; Sun, 24 May 2020 18:13:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 445CA1D502; Sun, 24 May 2020 18:13:27 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by dpdk.org (Postfix) with ESMTP id 5D7901D453 for ; Sun, 24 May 2020 18:13:26 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 3E58E580BB6; Sun, 24 May 2020 12:13:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 24 May 2020 12:13:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= FykhoAKN3SmSpOAcUmNVOFOiTLnoHSmcnTBlWWLGg3g=; b=Fg0osPm4nSQAuxQ/ ihVIVYhObNmk4Ko+BlLPHgdhzuYAlxOCeIkpujtc4sV0ab5+6xyNpxDWwun7CI0l YGs4Io1s4Fn27rseIE7NEGUbiX2zah/xTG8JFRlmnYn2fbpayzec2aD1ZCKYiaDC 29WREgVVyuzwTpyr/FguqekEt6vDFh062hG51nL5atSkjodkpCkvOQefr06VjXXJ PS2FkrOqZlaZOY06FBXXxcEuwOCahTNMJaMefemdjGYVn5qnMgrQw4WoBAi2RzNt m13+sAlgv8y8RYUrG6KnbWFBBGC4t5Tp18xSFlGj8Oxu+kJOAd2Tudb2//UvAh0/ KboMOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=FykhoAKN3SmSpOAcUmNVOFOiTLnoHSmcnTBlWWLGg 3g=; b=25FK3uByYCVIHemh3/NEACXFX0zHheGC9NdvxhMZkqY4pjMu/J9s0nny9 9uZTkMGX4IWdscBgLbTpzRqWkmKcvBH7bEC2HXw2Xl/vxHtcE1K3nu174o0NRguM 1BiUUuN7KsMb8OnzjbqR7rqVVh42/wDGMnrRqBASwqz4cLcffmBz0NmJ6i+s37oG MXSQYZ60CrWAqW0QJSwXZEM5B3OLKsdbeln7R/6djhmqAYzkerV15VGpANjP5xgo +1NYPOpYe8cpxab2TiwE7RKRPGWV04tOYsYY5uuAMGUrPoTa+lEpigh4OJ4e8fWo X7iHWQB3h+X5e+8UspVO7/kmNMlFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddukedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5BDB83280063; Sun, 24 May 2020 12:13:23 -0400 (EDT) From: Thomas Monjalon To: "Richardson, Bruce" 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]" , "dev@dpdk.org" , Vamsi Krishna Attunuru , Pavan Nikhilesh Bhagavatula Date: Sun, 24 May 2020 18:13:22 +0200 Message-ID: <10969041.qOdnLc68Dm@thomas> In-Reply-To: References: <20200427075944.1314-1-pbhagavatula@marvell.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB8CB@BGSMSX101.gar.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" Bruce, as maintainer of l2fwd example, any opinion about this change? 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