From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B6839A046B for ; Tue, 28 May 2019 15:12:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F2B64C9D; Tue, 28 May 2019 15:12:48 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40063.outbound.protection.outlook.com [40.107.4.63]) by dpdk.org (Postfix) with ESMTP id 043CE1B945 for ; Tue, 28 May 2019 12:14:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dA7OxLpv9iBUcK+MELQ6zx9e5W7NjIxzDQHC7mGQpXA=; b=l89c2wZra8IEEN1fwVNDcHdXa4UI4hilxLAK8mA8l7u4ThfqRrbgJPaHR0RvfJ3CzkAcXTDMLXSmReG2qracfEG64jtWC1iBvoQoqG6WUJUs0OE4OejthdNkGxtzH+IRWXtrFFKLhoOCrhE4eqmFqtSbu+wvFUcJYXS3ZUIY/ko= Received: from AM0PR05MB4435.eurprd05.prod.outlook.com (52.134.95.151) by AM0PR05MB4866.eurprd05.prod.outlook.com (20.176.214.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.18; Tue, 28 May 2019 10:14:29 +0000 Received: from AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::c40a:d6fe:1246:7278]) by AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::c40a:d6fe:1246:7278%4]) with mapi id 15.20.1922.021; Tue, 28 May 2019 10:14:29 +0000 From: Moti Haimovsky To: Shahaf Shuler CC: "dev@dpdk.org" , Moti Haimovsky Thread-Topic: [PATCH 2/2] net/mlx5: remove TCF support from PMD Thread-Index: AQHVFT4i36DP3RTcGUGfdJZqVS/MpQ== Date: Tue, 28 May 2019 10:14:29 +0000 Message-ID: <1559038447-41184-3-git-send-email-motih@mellanox.com> References: <1559038447-41184-1-git-send-email-motih@mellanox.com> In-Reply-To: <1559038447-41184-1-git-send-email-motih@mellanox.com> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0701CA0036.eurprd07.prod.outlook.com (2603:10a6:800:90::22) To AM0PR05MB4435.eurprd05.prod.outlook.com (2603:10a6:208:61::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.8.3.1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 94ceffa4-eba6-48d2-7577-08d6e35544f7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR05MB4866; x-ms-traffictypediagnostic: AM0PR05MB4866: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:67; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(376002)(396003)(346002)(39860400002)(52314003)(189003)(199004)(76176011)(476003)(8936002)(50226002)(52116002)(11346002)(316002)(14454004)(4720700003)(30864003)(386003)(6506007)(99286004)(36756003)(37006003)(102836004)(2616005)(54906003)(5024004)(256004)(14444005)(6512007)(7736002)(73956011)(68736007)(486006)(4326008)(3846002)(6116002)(446003)(305945005)(25786009)(81156014)(71190400001)(66066001)(5660300002)(66946007)(6486002)(53946003)(2906002)(6862004)(66556008)(107886003)(66476007)(66446008)(64756008)(53936002)(26005)(86362001)(81166006)(6636002)(6436002)(71200400001)(186003)(478600001)(8676002)(21314003)(559001)(579004)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4866; H:AM0PR05MB4435.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-message-info: NveEmqRW4oCRSH+MkC60uGaM6SXLAvANVlDFm4xiaVyDBW0JY3NeORqZEsrwSek7AuBU2E6997oc/Y/b+b7Vf82SmYLZcc5sBgBm5UMqJ9Tp3zD4zrDWYfMYWPhPE+upLdWqsAtVoghlTXiDBo4yAeNvEdOA4rKlq7xCRSUJluvLZiJR8MHXxgPyzPxiA9ci+aBXJze+ZpQuA+MtpOMyJePNyim5ifXNZ9fepWO92yPqDVL4jxe8cfUKEmSQBijCDT71ayIQpWMLVN2t5D6dt7v4voTWdHgu5s2ANlAYg7V2GSth9nZgWmC2fRVyEnlOgMQbXT6OldmcvZPk+R1dSKFYFXUwlHYjHTdU/qHmxAVqxuxgUthMj0Ny1Z/q1TJjQCl4suAsK92yzDtjIY6D+21n2gPQJ++sn5s92qruTYA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94ceffa4-eba6-48d2-7577-08d6e35544f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 10:14:29.5043 (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: motih@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4866 X-Mailman-Approved-At: Tue, 28 May 2019 15:12:47 +0200 Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: remove TCF support from PMD 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" VGhpcyBjb21taXQgcmVtb3ZlcyB0aGUgc3VwcG9ydCBvZiBjb25maWd1cmluZyB0aGUgZGV2aWNl IEUtc3dpdGNoDQp1c2luZyBUQ0Ygc2luY2UgaXQgaXMgbm93IHBvc3NpYmxlIHRvIGNvbmZpZ3Vy ZSBpdCB2aWEgRFIgKGRpcmVjdA0KdmVyYnMgcnVsZXMpLCBhbmQgYnkgdGhhdCB0byBhbHNvIHJl bW92ZSB0aGUgUE1EIGRlcGVuZGVuY3kgaW4gbGlibW5sLg0KDQpTaWduZWQtb2ZmLWJ5OiBNb3Rp IEhhaW1vdnNreSA8bW90aWhAbWVsbGFub3guY29tPg0KLS0tDQogZG9jL2J1aWxkLXNkay1tZXNv bi50eHQgICAgICAgICAgIHwgICAgMiArLQ0KIGRvYy9ndWlkZXMvbmljcy9tbHg1LnJzdCAgICAg ICAgICB8ICAgMTkgLQ0KIGRvYy9ndWlkZXMvcGxhdGZvcm0vYmx1ZWZpZWxkLnJzdCB8ICAgIDQg LQ0KIGRyaXZlcnMvbmV0L21seDUvTWFrZWZpbGUgICAgICAgICB8ICAzMDMgLS0NCiBkcml2ZXJz L25ldC9tbHg1L21lc29uLmJ1aWxkICAgICAgfCAgMTIzICstDQogZHJpdmVycy9uZXQvbWx4NS9t bHg1LmMgICAgICAgICAgIHwgICAzMiAtDQogZHJpdmVycy9uZXQvbWx4NS9tbHg1LmggICAgICAg ICAgIHwgICAgMyAtDQogZHJpdmVycy9uZXQvbWx4NS9tbHg1X2Zsb3cuYyAgICAgIHwgICAxNCAr LQ0KIGRyaXZlcnMvbmV0L21seDUvbWx4NV9mbG93LmggICAgICB8ICAgMjUgLQ0KIGRyaXZlcnMv bmV0L21seDUvbWx4NV9mbG93X3RjZi5jICB8IDYzODIgL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ZDoNCiANCiAgICAtIGxpYmlidmVyYnMNCi0gICAtIGxpYm1ubA0K ICAgIC0gbGlibWx4NQ0KICAgIC0gbGlibmwtMw0KICAgIC0gbGlibmwtcm91dGUtMw0KQEAgLTEw NSwxOSArMTA0LDE2IEBAIHRhcmJhbGwgZm9yIHRoZSBjcm9zcyB0b29sY2hhaW4uDQogICAgICAg ICAjIENvcHkgbGlicmFyaWVzDQogICAgICAgICBta2RpciAtcCBsaWI2NA0KICAgICAgICAgY3Ag LWEgL2xpYjY0L2xpYmlidmVyYnMqIGxpYjY0Lw0KLSAgICAgICAgY3AgLWEgL2xpYjY0L2xpYm1u bCogbGliNjQvDQogICAgICAgICBjcCAtYSAvbGliNjQvbGlibWx4NSogbGliNjQvDQogICAgICAg ICBjcCAtYSAvbGliNjQvbGlibmwtMyogbGliNjQvDQogICAgICAgICBjcCAtYSAvbGliNjQvbGli bmwtcm91dGUtMyogbGliNjQvDQogDQogICAgICAgICAjIENvcHkgaGVhZGVyIGZpbGVzDQogICAg ICAgICBta2RpciAtcCB1c3IvaW5jbHVkZS9pbmZpbmliYW5kDQotICAgICAgICBta2RpciAtcCB1 c3IvaW5jbHVkZS9saWJtbmwNCiAgICAgICAgIGNwIC1hIC91c3IvaW5jbHVkZS9pbmZpbmliYW5k L2liX3VzZXJfaW9jdGxfdmVyYnMuaCB1c3IvaW5jbHVkZS9pbmZpbmliYW5kLw0KICAgICAgICAg Y3AgLWEgL3Vzci9pbmNsdWRlL2luZmluaWJhbmQvbWx4NSouaCB1c3IvaW5jbHVkZS9pbmZpbmli YW5kLw0KICAgICAgICAgY3AgLWEgL3Vzci9pbmNsdWRlL2luZmluaWJhbmQvdG1fdHlwZXMuaCB1 c3IvaW5jbHVkZS9pbmZpbmliYW5kLw0KICAgICAgICAgY3AgLWEgL3Vzci9pbmNsdWRlL2luZmlu aWJhbmQvdmVyYnMqLmggdXNyL2luY2x1ZGUvaW5maW5pYmFuZC8NCi0gICAgICAgIGNwIC1hIC91 c3I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