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 9542FA0514; Wed, 15 Jan 2020 13:49:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CA1D1BF7E; Wed, 15 Jan 2020 13:49:20 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140058.outbound.protection.outlook.com [40.107.14.58]) by dpdk.org (Postfix) with ESMTP id F2EFA2BF5 for ; Wed, 15 Jan 2020 13:49:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRUbYivUkWD6TKXs9MfvC1VA8PAkdbHLhNZr5L9/eNMVUZRYR2dnswysXMxb+q1yybz1ehLNzp0zEExoNHyAumhhKgR+uHCQ4Lwf7D85zv0M10SRJxPlH19gnpAD+M4AgAtgCK3uuL2ubeLdq6ioOEwaRHaCpfgst/g73nOsU6kRcr8zF+xcvR90+A4WpYntpKma00zEPmpxQ+NEcQG30C1L5Dqs3BCudmzBJoA+5L38o8/Yvdvrx+Y5t/6oyJ7e3HSx0us/56/d0G2zouad8RwHgzachwng/eI75adQBr+pvw+wXmKlBmA76lnc+NqGleHghRxOrw+PyCCBuxGyqA== 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=XMDvI0asSe63VsHrYCRdKX6qKVKfVZFYtVjRp8r6MvQ=; b=RLQwEZ/A6jkyv+TcsacR4c4S02xZ8vgrYP5uiMUMVQb8m/2Kt7F3huvspkxcOnO6PRQSjrS6B5CjP2BzwadrLbdpcvocTFEW2u/NXBPeGOU+50vewbCUE9436zCn4zPcYPGRq81/rZoNDi7vNVY7wz4ujGbxHIN8w6O2i1PT/8ldO8VMAsTQ0cdFXe8WSquN+0uYMK4lu26qAEV9JLs6PWxq4ea3DRKk266Gvbu0mw7RePVOKLijnWF3mv7p6a85C7fLu2RTKKY7iPSzShoOM8nHnAMV+bMjNz1SOxcl1cLkdzgTqfMJ6lbXVQOY6VHJM2ejo/0vH1PH4RjvU9M+zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XMDvI0asSe63VsHrYCRdKX6qKVKfVZFYtVjRp8r6MvQ=; b=b9MjkXRt3Ew04f35QU6P/ucOMgXKpHi/f3ba+QuvygK7RY3xQ3dMchd6A7sW2HMTIb9GfVz1/To8kNuSbo2QbRT8XovuvFZ1c7iiD0TvvZgX5/TuNdz83NVpZ5SGFbgum3IGkn//vuE6dGyF8S7mZ8Jubh7VWdQUuerSyalWWAs= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB4502.eurprd05.prod.outlook.com (52.135.163.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Wed, 15 Jan 2020 12:49:17 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::19a2:76a9:2b23:5c91]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::19a2:76a9:2b23:5c91%4]) with mapi id 15.20.2644.015; Wed, 15 Jan 2020 12:49:17 +0000 Received: from mellanox.com (2408:8025:349:cd40:4c79:37ab:a156:2a29) by HK2PR0401CA0004.apcprd04.prod.outlook.com (2603:1096:202:2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Wed, 15 Jan 2020 12:49:08 +0000 From: Jack Min To: Jerin Jacob CC: Slava Ovsiienko , Matan Azrad , Raslan Darawsheh , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , Adrien Mazarguil , Ori Kam , dpdk-dev , "Xueming(Steven) Li" Thread-Topic: [dpdk-dev] [RFC 2/4] app/testpmd: new flow dump CLI Thread-Index: AQHVyo0ebFLVuOWJqESlO7IdojqQK6fpkeKAgABgBwCAAD8JgIABfkCA Date: Wed, 15 Jan 2020 12:49:17 +0000 Message-ID: <20200115124857.leukic5pfpybzilg@mellanox.com> References: <620a2408b0dd370b8483c452d2b5957b3144fac7.1578969179.git.jackmin@mellanox.com> <20200114101512.iew54qyy44siei7e@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR0401CA0004.apcprd04.prod.outlook.com (2603:1096:202:2::14) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2408:8025:349:cd40:4c79:37ab:a156:2a29] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b3bd1316-aaea-4c46-d329-08d799b954ae x-ms-traffictypediagnostic: AM6PR05MB4502:|AM6PR05MB4502: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(199004)(189003)(66476007)(66946007)(4326008)(66556008)(64756008)(52116002)(7696005)(71200400001)(54906003)(66446008)(8886007)(1076003)(2616005)(16526019)(6916009)(186003)(6666004)(107886003)(36756003)(5660300002)(86362001)(55016002)(2906002)(8936002)(8676002)(81166006)(498600001)(81156014)(53546011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4502; H:AM6PR05MB6567.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +3Od+dxVyqTCZ7YAublsXLVnIOupfwyqoYKiveaA3MDpoOIudDB8vQm1zqG96aoeu/hqtM9Exeq+zaEdsZ+Kf7X76dJIWzF79H0kqsiActYpx7PbKajx1If7emFftP1A9ged/bOaXK99QJ+6B5XkdbW2ZLyr0ERnmBGVTsp7idDvSpTHU4ea73kh7M+TV7BVG9KHTEq31G8yZIGcvIID7Er1JzQqfALLK0RjIMR6uGcaVHrZiOBBkicaUt6hO3mHxK+vsBmPu9V5SexAJw69tNfPIIg6R9qWwXMlQeX8T6pimoFGg31VdwGaulYdNiOkZyDvOMlK4LpbXnzjFk9RlaH0A9HZ6QKQQuwF45JZ7lPaN/C+n8jB2nyUaTTdoIHWECtc1Ohl1HX3Grpq92H3jptrj8o4EXLbIgj2ig+soCq+M63Lx6jOWEc1TYJaoGtl Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3bd1316-aaea-4c46-d329-08d799b954ae X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 12:49:17.1213 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 50UOLqcU99uy0PQhNrdCWX4YSxf53vFtZ+1zDaq/e+lqlsKu7yjIz78rd7Y7CnlTrg87yNJdxlyzcZhGaDCW3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4502 Subject: Re: [dpdk-dev] [RFC 2/4] app/testpmd: new flow dump CLI 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 Tue, 20-01-14, 19:30, Jerin Jacob wrote: > On Tue, Jan 14, 2020 at 3:45 PM Jack Min wrote: > > > > On Tue, 20-01-14, 10:01, Jerin Jacob wrote: > > > On Tue, Jan 14, 2020 at 9:15 AM Xiaoyu Min wro= te: > > > > > > > > From: Xueming Li > > > > > > > > New flow dump CLI to dump MLX5 PMD specific flows into screen. > > > > > > > > Signed-off-by: Xueming Li > > > > Signed-off-by: Xiaoyu Min > > > > --- > > > > app/test-pmd/Makefile | 4 ++ > > > > app/test-pmd/cmdline_flow.c | 91 +++++++++++++++++++++++++++++++++= ++++ > > > > app/test-pmd/config.c | 33 ++++++++++++++ > > > > app/test-pmd/meson.build | 3 ++ > > > > app/test-pmd/testpmd.h | 1 + > > > > 5 files changed, 132 insertions(+) > > > > > > > > > > > > > > > +/** Dump all flow rules. */ > > > > +int > > > > +port_flow_dump(portid_t port_id __rte_unused, > > > > + const char *file_name __rte_unused) > > > > +{ > > > > + int ret =3D 0; > > > > +#ifdef RTE_LIBRTE_MLX5_PMD > > > > > > IMO, It should be the last resort to add driver-specific symbols in t= estpmd. > > > Why not introduce rte_flow_dump() and hook the MLX driver underneath? > > > > > Hey Jerin, >=20 > Hi Jack. >=20 > > > > Thanks for you comments. > > > > What my understanding is this flow dump is very Mellanox specific, it w= ill dump > > all flows in Mellanox HW using Mellanox format. They are hardware flows= in > > short, which are different from rte flow. >=20 > We do have a similar API for other drivers to represent the internal info= . > I think, similar API[1] would suffice for your case. We should not > standardize the output of dump, instead, it will provide a generic API > to dump the internal representation of flow HW to file/stdout. >=20 > Octeontx2 MACM HW (rte_flow) has similar internal information, > We could implement the driver API if it is a generic API. Yes, a generic rte_flow API (as similar as [1])can benifit both of us. :-) I'll propose a new rte_flow API for this in v2. Thanks, -Jack >=20 > [1] > See the below example for eventdev driver. >=20 > /** > * Dump internal information about *dev_id* to the FILE* provided in *f*. > * > * @param dev_id > * The identifier of the device. > * > * @param f > * A pointer to a file for output > * > * @return > * - 0: on success > * - <0: on failure. > */ > int > rte_event_dev_dump(uint8_t dev_id, FILE *f); >=20 >=20 > > > > I don't know whether other vendor has the similar functionality and nee= ds > > so an rte flow level API could be helpful. > > > > And basically rte flow API is based on rte_flow, a dump function probab= ily means > > dump rte_flow itself (i.e flow->attr, pattern, actions). > > > > This is the reason a private API is choosen and driver-specific symbols= added > > in testpmd as result. > > > > -Jack