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 4C88DA0350; Mon, 11 May 2020 02:23:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79C081D156; Mon, 11 May 2020 02:23:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C8AA71C1C8 for ; Mon, 11 May 2020 02:23:41 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04B0HnBK013465; Sun, 10 May 2020 17:23:40 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=3beA5liusm9C0DPOQhOftHPgxPVaMrrOQ3ADcNnBytQ=; b=qiGjxNTQzEsReYtAZsfs5ejDxlrcqZpaOI/8XoAD2Y14kzXORl1g81QSewL9/arj7tgU Ij1LC2lTvOaxDckAEKNFow9rQ9tgiJNeYOpWUo9zx4G8fKXZUPMOlkP2ARr+fz0YOoqs bn+fb90D0hnVT/WlZqJZV9kwEtDfyYZxOe4pccqapB43SMyPDp27MiathSvwQQuwpV7u 1PHvBhktVgMVBymUX2qpfL/dUCUxGGaIrR+2nSVkaplODSl81+5xZ0tzfssgFB2cTn3b QEBTMYdYIdB0KYQ2jmmyec/RmN/24BqHWhaoufCrMPR1VuBKnqpOTJ9PqXdBCJ0uwBSi WQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 30wsvqd1fj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 10 May 2020 17:23:40 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 10 May 2020 17:23:39 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 10 May 2020 17:23:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=joHsYX74yAAOGZvpy0iIggPF+5XPznQZEYAst9/60eiBp08zCMtjbH0ChvO9O8eVCsj2MRWFstbNU6FvzTqDdy/sdsozSDrBfyDYX2URe5MEp/gB+jLxU8SSDkQyDVynRV2p+9LPxBbtTNyLqeFDbb6f3SZApQEYC0IEpuDLBguKjWqQ4CloG+uDbmLcuJLuEFq/ZKaVq0FhnkZXN8ArNOOp/vqSZphTEoaS1AY9gbYtuwGDOqsQeuLxhtV9TDhFki7XOQMgmLiEysFm1xaDEdFff6p0tXUiaMybQCkzPytGsMoNeAp85vE/sDVcVpZ9X1otyKkh8f939Qzd1et4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3beA5liusm9C0DPOQhOftHPgxPVaMrrOQ3ADcNnBytQ=; b=HUO0DGQa0fFWzw2htc+Po59hDfGcu3c+5uIcO+NX9eBq/MbOxaoSCOHDHPNTeX3tM+s+2seOY8GQG5rTpD2Tz6Jd163+YOy3GalAbf6y9PvSB+RmzptssmZBcQu0Ti/+xe5IkVKLWQdaKHgq0Q6ZhADBc8LMWKfzRKSXZ3O5f9oDoFt7fEn+te8WjTcWqzxxkbVtylMT+TAxaf78CQDBY/6lo3NFOoKafWjT8v/6vpjGmAg61w3IW1fLmzuWmF7GkEHDDKMtjRmacIjCGtNmY7Dz/v23CcmvWKPFJVe2IpN5h3QqcmXK0lhAdsFGZlNPo0OMJHfRK+iviffPXeFing== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3beA5liusm9C0DPOQhOftHPgxPVaMrrOQ3ADcNnBytQ=; b=caORkBJD65fdiF7qvTOUDwfCjegpY6mZbS8NSrcx4xhyNzqzmXoxI5dR9Kfz65BFVXX+9y5CvwUVUBQDT+mvo8dNwbVBBha5YRaTdo2PNEddSDNUBL7C1xQSAlzwJOBW8lisN0kC2ZYnugAPP4WH/Auv0VD5OAZqQw81huyZmHg= Received: from BYAPR18MB2518.namprd18.prod.outlook.com (2603:10b6:a03:13b::18) by BYAPR18MB2952.namprd18.prod.outlook.com (2603:10b6:a03:112::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 00:23:38 +0000 Received: from BYAPR18MB2518.namprd18.prod.outlook.com ([fe80::fca4:5e00:46d9:a289]) by BYAPR18MB2518.namprd18.prod.outlook.com ([fe80::fca4:5e00:46d9:a289%3]) with mapi id 15.20.2979.033; Mon, 11 May 2020 00:23:37 +0000 From: Pavan Nikhilesh Bhagavatula To: "Varghese, Vipin" , 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: AQHWH8Dm5XDIObU5EUKG5ieBor95p6iTUxpQgADjO4CADcaD8A== Date: Mon, 11 May 2020 00:23:37 +0000 Message-ID: References: <20200427075944.1314-1-pbhagavatula@marvell.com> <20200427183118.3315-1-pbhagavatula@marvell.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB66C@BGSMSX101.gar.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB8CB@BGSMSX101.gar.corp.intel.com> In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4BB8CB@BGSMSX101.gar.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [223.226.86.58] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c71aca48-cf9b-4933-3cfc-08d7f5418cb5 x-ms-traffictypediagnostic: BYAPR18MB2952: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 04004D94E2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 15321bnE9e1Wx4ZfEHlUIDMJF1EgVaoMyk9ZJM5G9ThnbqHpVUowuNaLhQVi8rUF/vQpbnKotuxQXteJG1/38tCsxAkfoOnek675JE7E4fNMi5+uIfpGLQiDSw7aAxmqEE+9ob8muYJIaakEpN4lykcrFl/tT/XH/8RPojJqcD6EJT7AxgKxexJBW9d0ltFh9ODEPeoFREuF8ZDpjHjMAhDPTefBAzv+Xttxy1EKoaVamt2bUihUlvZnvN1l+HFaX3geDuN3VYxQRctnbyLvJr7zlE0wWFP+f2ukO2jZWwi0B+MODCmfvWeeFpCz1gSRGNT4xWgbCHA1wCNLeYlvs2eZmPAgBZtqOxOvJbT4dIBjWyk7NYgxL0e0GG63KOhbscgRrEo80a/zb7bUO62jGkwCS1N0yrEVzoyhvGDAhe5I7YrX+dAeNVioodn7pPLln28BYHxLKIomBatZSjrYoA45ZeQzpa5CE6cH/K2sjfMjbPw9lLY9qibWbBDLSUPxivP5cOgyinoakf4q7vQZJF9nRJ7A/zS6LGjDeVcHtZ8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2518.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39850400004)(366004)(346002)(376002)(136003)(33430700001)(186003)(26005)(9686003)(52536014)(478600001)(4326008)(2906002)(55016002)(316002)(110136005)(54906003)(8936002)(6636002)(6506007)(107886003)(7416002)(86362001)(7696005)(66946007)(55236004)(66556008)(66476007)(76116006)(66446008)(64756008)(33656002)(71200400001)(5660300002)(33440700001)(921003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: VoBm0U1QPtpROJKRYX0+CkJpSiO6eieSVMoUumc9dI72MYLftmE4rHCqZfwCgjYt0UV4Pd26bMq+zVfY4fmzG8VrawGVkDZNyLCGeidU6lXgKlz6dh4gjglsc6rk8ehZ8BiyNtIRe6rQfue1QZnkGtLz3w9v7Y84JIpP7ifPU22py9ZJ9ux4KJmcQv9HJ28GyNLqX3Ba2EQoe5qkkq1vxaaB5NI4SaPvFStcYoQNEbMzQA46GB11JZTUEKp9MrLF0fVKO8LdTR07v/Uk/+c9KuapZFZ7bLi+IlQJ2xYQ+ZHpbaWYcoS8Rkl500j3g68kCddH1KgOKZAXZ4Cj3agkXZGkX0gTh0dSas7tYyMwGJycFDjhgWtPqqz6U+jRwSeQT293EgbAfDGijntZITad7JV9cElcduIVpntcDyAUdVygrKG5DAxzRN881gW0aLY7mDlX8B6a1LrT/1yx1sbN3D1nRQXLq3noAko0w+lewSQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c71aca48-cf9b-4933-3cfc-08d7f5418cb5 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2020 00:23:37.6772 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UECQkAoduLc5k3ZQ9KeVafLmJDqPSMwH7vPuYDbURNOR2H3coEe7Or8pd8ic85++B846CA6om5wCXSS2hBwT2vV3+6QkGihFiPHja/wkqIU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2952 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-10_11:2020-05-08, 2020-05-10 signatures=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 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 >>=3D 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 mas= k >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= =20 will be skipped.=20 If you see `check_port_pair_config` below we disable the ports that are not= =20 Mentioned in portmap. " check_port_pair_config(void) { port_pair_config_mask |=3D port_pair_mask; } l2fwd_enabled_port_mask &=3D 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 ski= pped. > >Note: current speed can be fetched only if the port are started too (in >Fortville). > >snipped