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 55BF2A058E; Thu, 26 Mar 2020 07:37:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04051374C; Thu, 26 Mar 2020 07:37:11 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 067552C15 for ; Thu, 26 Mar 2020 07:37:08 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02Q6YxoL024433; Wed, 25 Mar 2020 23:37:08 -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=UzXNJnXsXk4NhfTMNgXdlh5/5sFtgnnXHvVz9HTCWbc=; b=rLnrmUkqJABsTmU+XZwZJzeLaAk0f+UA59zDqSccZ4iUvUCGMIUoDoubwelVn5xaPabm F/oITrs0PViHzL6wLl/TRvm4zM98Ba8mpf0vCHSLLGOVpi9lXdzz0Q1NTdzSQbv+9x9Y cc/OImdY7XVJz1CRzuBX8D1KKBUzL4GzS1GuT4GmIGx8QB7OU9ur5KdnkmRvT1le2l4L TDlR6Gjj/L2WR13kWX4l2oKFx5CH8SMpWU1pWzbtxBzdI534DFWhvgwYyLk+IEMevKcu ckb4y4PhRvjSYyiNsSlQsVPzR98GyduiamYMll+3Zbu+osCAl5saRJXPeTBch/BJe8E9 Xg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 300bpctj22-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 25 Mar 2020 23:37:08 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 25 Mar 2020 23:37:06 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 25 Mar 2020 23:37:05 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 25 Mar 2020 23:37:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=atXk2iwIDNS6FFGRFiZaa71q21t9VM3zyef9TSyhqPC7Q/yi9l2SDUIhXD0A3OaGDNtUr2I94jJ/Jz0iOWLxktzmGj9/9Gp/RbEvapK4fZVJcsKg6KeBvCuju0kRsGQp095DQSbFreVmX58bVwal2lnu2/CMBV2hCBfoPoRldf1xVVQ4w39sV1YQHl7nVtT/ou+SCw0CC41rilrc9PzgNwK9DRxxOQqdLVxCoQfwatC2cxLhyfD0GQkX1fvCym3RBqulkU7GQtbZH+9Zr2jTf4BGGUw8mqNtvQz6c8U+SmVzZZJnC05gkCo2o2PWkfL8TOjX5k/uo1tYYwjb2kvBnw== 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=UzXNJnXsXk4NhfTMNgXdlh5/5sFtgnnXHvVz9HTCWbc=; b=ibF4NkKGtfp3paC4kKhzYBC8e0KPLGaXyHAjzTujz6KwP5wYoGiOJWNoe/le3NwYo0JqEropuNll7QNv5T2LAZoIpVoAffd2oMoFcacxZsJqgryRUV0eUP9Yx1UqnPzq43UvY2jWf881hDsoTz8S8nzfvZnCAUo06y74o0Z8WXuQkjwvrwpN3xFmrWFbKCeLEQvZIqnegIdBhCCFUZTzd7r1qmChluMAGCWQG14I3Fh032MszO98kf8UrVFl7n130cYRwSXeQc00EzYueEQG8Ut6bcww6e3BjbhvsW9WYFOOX/Mez5BkKmcOaWnAfGdNsOk9PjOq7ccQAsXBIiwxNA== 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=UzXNJnXsXk4NhfTMNgXdlh5/5sFtgnnXHvVz9HTCWbc=; b=mucz8Xas9R8AJXqG7g3CZZg5IBmEG7c5gbm8BWI4a0vf0tBiYDBb+PmNkCLAoLUlmjpNOnak8vtYJhFjelAvMMV7lrv1bQLcI5Fsd37ZxNEaM9BmhG3KQXf2hbD9Uuvnw01GLZkZ7gGSJVMR6BWSGY6H0KRGcXda/uU3pllchkI= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7b::32) by CY4PR1801MB1831.namprd18.prod.outlook.com (2603:10b6:910:80::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.22; Thu, 26 Mar 2020 06:37:04 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::3ce0:be16:b19f:6383]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::3ce0:be16:b19f:6383%7]) with mapi id 15.20.2835.025; Thu, 26 Mar 2020 06:37:04 +0000 From: Pavan Nikhilesh Bhagavatula To: Sunil Kumar Kori , Jerin Jacob Kollanukkaran , Marko Kovacevic , Ori Kam , Bruce Richardson , "Radu Nicolau" , Akhil Goyal , "Tomasz Kantecki" , John McNamara CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/l2fwd-event: add option to configure port pairs Thread-Index: AQHWAdijC1KIf3DWSU+bTZPruIL6k6hZH+mAgAFN1uA= Date: Thu, 26 Mar 2020 06:37:03 +0000 Message-ID: References: <20200324123446.2397-1-pbhagavatula@marvell.com> <20200324123446.2397-2-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [34.98.205.117] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 06442887-0cfa-4824-18a5-08d7d15018de x-ms-traffictypediagnostic: CY4PR1801MB1831: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0354B4BED2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(39860400002)(136003)(396003)(376002)(66946007)(66446008)(76116006)(66556008)(110136005)(64756008)(9686003)(478600001)(6506007)(186003)(66476007)(55016002)(7696005)(8676002)(5660300002)(8936002)(52536014)(81166006)(81156014)(26005)(2906002)(4326008)(86362001)(316002)(71200400001)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1831; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mpawT7Q+7m1kJAQ14noM2EYvqVh93v6oIKRPa98DnsPrg9S/48I5DUbwVIO43SLb2DW8tzQDBz1GiCeQ7ayXPD4y3bFgXfkLGB8O3nzkeUwbdnWPAy+H37Q8rlsIeRQqAOcPsNCmMAveJpYMYCkaFVY+8x7RFTuHEq0IER9FeLc4U9PPBUEGAzPjRLNqOtog/zY+whtGCuxaffBbKbgp7H43dELtLAkcQ7/wX/tzeS5DYpQFIGX4grSFAigIdVLCHmY0FU4Sc8KAhVMCQdoROlnJugo1TVfgeIsuPbx+bAB1/acKmAgf2D+1Q0nDvGvcn3CsHoelOP9Ehn7EPA4rsoAPUWsw55T0bnp0jCPABvtEG+N+/lmptfqKumzo+kGx7fQJ3baYab464Fj+mQHrGDda+Mid69EDCn7X8kIq9BM18KB2pEbgR6dSeA0U1raU x-ms-exchange-antispam-messagedata: LluzAwyaPVKH1i4cbikezs1Iel6Dk6r/u4GamOMMGoVsOZaa175I/BBf8XWWEhMN31ted97Zq7T1PJ4NMLTFadZ6e08ADhHjgSDnKHDN3A9D7r7Hk/fzpkoOEPsjcxOIHyvlhRZ63fjKhjl42kNE6g== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 06442887-0cfa-4824-18a5-08d7d15018de X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2020 06:37:03.9422 (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: hGNj4zIY0ffL+23vG5kzB2o3LesVZD+auurCh+ExohTHUeA1YYYNwmSHAqadz9HrpQtV0A7oseeVP8ugaSN+0O7x4b47ziq5wz0SATKnn3g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1831 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-25_15:2020-03-24, 2020-03-25 signatures=0 Subject: Re: [dpdk-dev] [PATCH] examples/l2fwd-event: add option to configure port pairs 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" >-----Original Message----- >From: Sunil Kumar Kori >Sent: Wednesday, March 25, 2020 4:10 PM >To: Pavan Nikhilesh Bhagavatula ; Jerin >Jacob Kollanukkaran ; Marko Kovacevic >; Ori Kam ; Bruce >Richardson ; Radu Nicolau >; Akhil Goyal ; Tomasz >Kantecki ; Pavan Nikhilesh Bhagavatula >; John McNamara > >Cc: dev@dpdk.org >Subject: RE: [dpdk-dev] [PATCH] examples/l2fwd-event: add option to >configure port pairs > >Comments inline. > >Regards >Sunil Kumar Kori > >>-----Original Message----- >>From: pbhagavatula@marvell.com >>Sent: Tuesday, March 24, 2020 6:05 PM >>To: Jerin Jacob Kollanukkaran ; Marko Kovacevic >>; Ori Kam ; >Bruce >>Richardson ; Radu Nicolau >>; Akhil Goyal ; >Tomasz >>Kantecki ; Sunil Kumar Kori >>; Pavan Nikhilesh Bhagavatula >>; John McNamara >> >>Cc: dev@dpdk.org >>Subject: [dpdk-dev] [PATCH] examples/l2fwd-event: add option to >configure >>port pairs >> >>From: Pavan Nikhilesh >> >>Current l2fwd-event application statically configures adjacent ports as >>destination ports for forwarding the traffic. >> >>Add a config option to pass the forwarding port pair mapping which >allows >>the user to configure forwarding port mapping. >> >>If no config argument is specified, destination port map is not changed >and >>traffic gets forwarded with existing mapping. >> >>To align port/queue configuration of each lcore with destination port >map, >>port/queue configuration of each lcore gets modified when config >option is >>specificed. >> >>Ex: ./l2fwd-event -c 0xff -- -p 0x3f -q 2 --config=3D"(0,3)(1,4)(2,5)" >> >>With above config option, traffic received from portid =3D 0 gets >forwarded to >>port =3D 3 and vice versa, similarly traffic gets forwarded on other port >pairs >>(1,4) and (2,5). >> >Is this config required to be updated for l2fwd also ? In pipeline. > >>Signed-off-by: Pavan Nikhilesh >>--- >>updating enabled, diff --git a/examples/l2fwd- >event/l2fwd_common.h >>b/examples/l2fwd-event/l2fwd_common.h >>index 7e33ee749..4e8b2fe14 100644 >>--- a/examples/l2fwd-event/l2fwd_common.h >>+++ b/examples/l2fwd-event/l2fwd_common.h >>@@ -69,6 +69,7 @@ struct l2fwd_resources { >> uint8_t sched_type; >> uint8_t mac_updating; >> uint8_t rx_queue_per_lcore; >>+ uint8_t port_pairs; >It can be changed to bool. Will change in v2. > >> uint16_t nb_rxd; >> uint16_t nb_txd; >> uint32_t enabled_port_mask; >>diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd- >event/main.c >>index 89a6bb9a4..92890d1ae 100644 >>--- a/examples/l2fwd-event/main.c >>+++ b/examples/l2fwd-event/main.c >>@@ -2,6 +2,8 @@ >> * Copyright(C) 2019 Marvell International Ltd. >> */ >> >>+#include >>+ >> #include "l2fwd_event.h" >> #include "l2fwd_poll.h" >> >>@@ -22,7 +24,9 @@ l2fwd_event_usage(const char *prgname) >> " Default mode =3D eventdev\n" >> " --eventq-sched: Event queue schedule type, ordered, >atomic or >>parallel.\n" >> " Default: atomic\n" >>- " Valid only if --mode=3Deventdev\n\n", >>+ " Valid only if --mode=3Deventdev\n" >>+ " --config: Configure forwarding port pair mapping\n" >>+ " Default: alternate port pairs\n\n", >> prgname); >> } >> >>+l2fwd_event_parse_args(int argc, char **argv, struct >l2fwd_resources >>+*rsrc) >> { >> int mac_updating =3D 1; >> struct option lgopts[] =3D { >>@@ -134,12 +202,18 @@ l2fwd_event_parse_args(int argc, char >**argv, >> >> CMD_LINE_OPT_MODE_NUM}, >> { CMD_LINE_OPT_EVENTQ_SCHED, >required_argument, NULL, >> >> CMD_LINE_OPT_EVENTQ_SCHED_NUM}, >>+ { CMD_LINE_OPT_PORT_PAIR_CONF, >required_argument, >>NULL, >>+ >> CMD_LINE_OPT_PORT_PAIR_CONF_NUM}, >> {NULL, 0, 0, 0} >> }; >> int opt, ret, timer_secs; >> char *prgname =3D argv[0]; >>- char **argvopt; >>+ uint16_t port_id; >> int option_index; >>+ char **argvopt; >New line is required. Will fix in v2. > >>+ /* reset l2fwd_dst_ports */ >>+ for (port_id =3D 0; port_id < RTE_MAX_ETHPORTS; port_id++) >>+ rsrc->dst_ports[port_id] =3D UINT32_MAX; >> >> argvopt =3D argv;