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 DB1F7A04B4; Sat, 2 May 2020 06:34:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DE861D974; Sat, 2 May 2020 06:34:17 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 55D591D972 for ; Sat, 2 May 2020 06:34:15 +0200 (CEST) IronPort-SDR: 0mAGAo509OOq+T9nRbpnDg1k8SIwEfYnZc2f4ngvE6NMkzfHcxyRG0Ru4UvHuKQd9VlVFxDm/q PRfbdM0pbGuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2020 21:34:14 -0700 IronPort-SDR: 5QHbJc/+4DW/iY+wzApmtmDbS5LTS1HE6Fwyh/iZyDqKRfoxc7fuXhomLFJEs0oGLW0Q69dqgT Apx3sV1wMjjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,342,1583222400"; d="scan'208";a="262273262" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 01 May 2020 21:34:13 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 1 May 2020 21:34:13 -0700 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 1 May 2020 21:34:13 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.75]) by BGSMSX152.gar.corp.intel.com ([169.254.6.164]) with mapi id 14.03.0439.000; Sat, 2 May 2020 10:04:09 +0530 From: "Varghese, Vipin" To: Pavan Nikhilesh Bhagavatula , "Jerin Jacob Kollanukkaran" , "thomas@monjalon.net" , "Mcnamara, John" , "Kovacevic, Marko" , Ori Kam , "Richardson, Bruce" , "Nicolau, Radu" , Akhil Goyal , "Kantecki, Tomasz" , Sunil Kumar Kori CC: "Andrzej Ostruszka [C]" , "dev@dpdk.org" , Vamsi Krishna Attunuru Thread-Topic: [dpdk-dev] [PATCH v4] examples/l2fwd: add cmdline option for forwarding port info Thread-Index: AQHWHMIrtjuhS3dMC0Ocl5Sv97Y/xaiTRbQg//+68ICAASVd4A== Date: Sat, 2 May 2020 04:34:09 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB8CB@BGSMSX101.gar.corp.intel.com> References: <20200427075944.1314-1-pbhagavatula@marvell.com> <20200427183118.3315-1-pbhagavatula@marvell.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB66C@BGSMSX101.gar.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" 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). > > >=20 > Sure, it can be a separate patch as it will be applicable for multiple ex= amples. 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 po= rt? >=20 > We check every port pair against l2fwd_enabled_port_mask in > check_port_pair_config() >=20 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? >=20 > There could be scenarios where user might want to test 2x10G and 1x40G Wh= y > 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 allow= s `1:1` mapping by `struct port_pair_params`. This can be to self like `(po= rt0:port0),(port1:port1)` or `(port-0:port-1)`. 1. But current `l2fwd_parse_port_pair_config` does not consider the same po= rt mapping as we have hard check for `if (nb_port_pair_params >=3D RTE_MAX_= ETHPORTS/2)`.=20 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_ma= sk & ~((1 << nb_ports) - 1)`. 3. can these scenarios are true if we invoke `check_port_pair_config` befor= e 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 co= rrect. Can you help me? 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. Note: current speed can be fetched only if the port are started too (in For= tville).=20 snipped