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 DA787A04FD; Tue, 14 Jan 2020 11:15:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 717A01C1EF; Tue, 14 Jan 2020 11:15:34 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2043.outbound.protection.outlook.com [40.107.22.43]) by dpdk.org (Postfix) with ESMTP id 2A4A91C1D9 for ; Tue, 14 Jan 2020 11:15:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkX0Fs83i7ukB9lxQTgEtqqkAhFrtNIU4xF53RiS3L2GrvV9U/xrTpyN5LcfPxPgIJ4tJvKEnQdNSyHUA9QTQyYOa3Tu8qnJiiXmkxgMJNExsrYcPv2Ptn9ofxlWqxzaSI8hc1IfzvD/UzmtePLAZJE21fpDJiEwMAoNdPjm6PE0jgvxivacfODgZqp1QsNYDk6Yd621Y9V5yJuvAszuvbzc5oOS0nG5pYxgpS2Aik48eWMI2EMzs+X+VRemnO2Vz9bKgQwIFl5oKuljo3Ix2M7GtzVowzxYIZKK4WteylssY9G7RPRQ7VsbGk56GzjNR5LSBXZO8wCVIrZwkhZumw== 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=kl8DbTEvLAikM1+khxvd5D0/LQRh9p9odF313JFuYtA=; b=hPxBcFJ1lsi9eaa1BvkJ21Yc1O2Yma9aORD5iC/BORBzCm/xQjZ18B/u1dEfAedW3LEZLU8ZFsg8cs1qZ0CY2+LhF2UCjvdyFrPTQTklhMYtqV4Cr7xLJRc8oJsFruB8unMHRkMcnG+rmQUoLPqDPCZTDmnQ5+H9YqB/6H8GOAiLEvhR6i2wqTVtdbOSyqQVdZyIj6N47YKpjugGkaiBhHshAsQqUbaO6kiYwRvPHs2jF12sj2NTct55WeGHmyOEZqJrDSJiyWjtczmPfuSMFaM0A5SbB/+/cmpCOxaJ0pgbFXjAtaNBDAV/P/huvhw5GUd8drXE6ncV1I9G+F6RMA== 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=kl8DbTEvLAikM1+khxvd5D0/LQRh9p9odF313JFuYtA=; b=fNxnNusKqrubEc8awBbpa0TcotSjHD+ZkYSJBcoO73aDawRTaeubYtElNvPmwg/Jox5NcA/3N57Zjy1sa6dJMh79sVaVnCqx1Lqh7QAryQQjPwepa5MOgcXNcz92dc2ijizgvZFb9AtuiYXRGmepksODZgke1l4+waIuMoFg1hM= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB6248.eurprd05.prod.outlook.com (20.179.0.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.8; Tue, 14 Jan 2020 10:15:31 +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; Tue, 14 Jan 2020 10:15:31 +0000 Received: from mellanox.com (2408:8025:349:cd40:4c79:37ab:a156:2a29) by HK2PR02CA0159.apcprd02.prod.outlook.com (2603:1096:201:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9 via Frontend Transport; Tue, 14 Jan 2020 10:15:23 +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: AQHVyo0ebFLVuOWJqESlO7IdojqQK6fpkeKAgABgBwA= Date: Tue, 14 Jan 2020 10:15:31 +0000 Message-ID: <20200114101512.iew54qyy44siei7e@mellanox.com> References: <620a2408b0dd370b8483c452d2b5957b3144fac7.1578969179.git.jackmin@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR02CA0159.apcprd02.prod.outlook.com (2603:1096:201:1f::19) 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: 0b3d343f-7f40-41f2-b07c-08d798daaf28 x-ms-traffictypediagnostic: AM6PR05MB6248:|AM6PR05MB6248: 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:6430; x-forefront-prvs: 028256169F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(366004)(376002)(136003)(396003)(189003)(199004)(54906003)(1076003)(16526019)(6916009)(5660300002)(186003)(7696005)(52116002)(36756003)(316002)(6666004)(2906002)(53546011)(2616005)(55016002)(8676002)(478600001)(81156014)(81166006)(4326008)(8936002)(86362001)(66476007)(66946007)(66556008)(107886003)(64756008)(66446008)(8886007)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB6248; H:AM6PR05MB6567.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: XzF0Omit1ts7qh3n5dF7O8ydEjAD+3g7lZD55etKi25HSXZXgs/6FXFT+mY+OoJA/OZoeSfhzqhGVf+b9OT7Has+/b3qqd5xZQfTmdEvlz/WMBr7RLE+3r6mYbi6wY2UeAp8mNG81L99qp4xMC0u1JsaHRRc8nBhfEVFl2FChjnjpdfvhq8z6ZVOTihnhsyS8StjWvk3yHRrC3dR0aikwnNz13Ri/8/O6dzzxwWktS/HNps9O2aXcPNdiqusqveTryHch89W9CPd5lxBcEr+Vou1HzxqK9Vsiu7BlXyhTeqjgyhuNvEJyZ9je0h9AJR+YDIPBM+cKCPOiCZ+gjO0o6kJEukkzsMIB+5DixS2soU9GAdv7OP+TRomcGo3aSN8JwudWnUJj9/9udTG0IsHZP7FOcxjF5QlJ/psJNXQJJ4TugfCioRR3rnOjg+eV8h5 Content-Type: text/plain; charset="us-ascii" Content-ID: <8CE373C8B9F25D4BA4F1A8B72A9D13EF@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b3d343f-7f40-41f2-b07c-08d798daaf28 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2020 10:15:31.1243 (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: aIl/88YA4COhiitH935oavFVOVBHgiwqvTHOIBrsAa2giIXs8gBk8eG8/iHCp7qU+9Ts2K4ugAs/TsYZF15AoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6248 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, 10:01, Jerin Jacob wrote: > On Tue, Jan 14, 2020 at 9:15 AM Xiaoyu Min wrote: > > > > 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(+) > > >=20 > > > > +/** 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 >=20 > IMO, It should be the last resort to add driver-specific symbols in testp= md. > Why not introduce rte_flow_dump() and hook the MLX driver underneath? >=20 Hey Jerin, Thanks for you comments. What my understanding is this flow dump is very Mellanox specific, it will = dump all flows in Mellanox HW using Mellanox format. They are hardware flows in short, which are different from rte flow. I don't know whether other vendor has the similar functionality and needs so an rte flow level API could be helpful. And basically rte flow API is based on rte_flow, a dump function probabily = means dump rte_flow itself (i.e flow->attr, pattern, actions). This is the reason a private API is choosen and driver-specific symbols add= ed in testpmd as result. -Jack