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 70651A04F1; Wed, 11 Dec 2019 08:53:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBABF23D; Wed, 11 Dec 2019 08:53:32 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70040.outbound.protection.outlook.com [40.107.7.40]) by dpdk.org (Postfix) with ESMTP id E7BE323D for ; Wed, 11 Dec 2019 08:53:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YB4aqYv6JtFudEWVBzp8wiMg055n46dkCsXoZp8XzuoPnQqjKv4FROTKA1xDsNJ4yWdTIBxyh9Lc4Dkm43zI54zj20Asx5RVDqT3mM/Ni7EXINAp1EhSCwHP5KyRbOkmsjtdyvxRWq7zPcsaXpUFDc3UFASqw+5tufIE3emZIqw3cnqY0imTSd1ih5TsFCNMsvokyzRQTkH7jqMe39gLBTmxeyH8iUWk4bMzbgrwAZcRhdhA0/IEC/nFHXrxa/1dAU0+/rv7QFqnT5P/tck+VmxgSx+bh0tanKsKzP6g0Ub8co0ybVTfdvhQrv/Ro2PuAAyWZjH1vKU5uQpc8SRzyw== 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=xOyaSlZMwzIsVdysw6bev1EL9CZ2r0sBCGZNmDDd6Zg=; b=jdXk7O4c4PwUbW4+sW3f2fM1hf+ZxbuNi/qaKUgoFKSNknlor5TNoyaXaxH4esn3QIz0R6oIDbsImEdCCMXl5dVXi4PWD7Z5ckYj2TC8vwe/ykjNfdUeVd10Tj8qJ/sTytrOJ7qxTKaOQOdbxQknd4PqvUFFORNJXMwxR1D26LTMR855MwcpRry6AbMqHltyPJCYaSejbrhZi1vBn81zapHgV0FnFd07iaHvyqZDRJBLKi5qXecZ/AtuCX9I+qmT3tT2xNrgNp94mi3f3bEiv0RBqSelQdgqSeGMUl4CEsUeBW/o6X97rfQ3LlXrkSJ/8yKqpvf6zjDwbYdGXklHwQ== 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=xOyaSlZMwzIsVdysw6bev1EL9CZ2r0sBCGZNmDDd6Zg=; b=gEqKhbylxdAap4yinrVTGc8FjY/6UFU2fkAIQ3VdN8aGphzvc4AN3js6RnH7bXUuIsu0wVep+saZ9hXhXBhHojNZSB5QDkvLPuBjFT+MBRvYXvFPFzwZF17n5YmiN1tJrktvO6kjaHoDuPoyfuZ7+b48gLqF6EozvYu5WhawGtM= Received: from VI1PR05MB4192.eurprd05.prod.outlook.com (10.171.183.18) by VI1PR05MB4205.eurprd05.prod.outlook.com (52.133.13.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Wed, 11 Dec 2019 07:53:30 +0000 Received: from VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::c830:19e7:82a:619b]) by VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::c830:19e7:82a:619b%7]) with mapi id 15.20.2538.012; Wed, 11 Dec 2019 07:53:30 +0000 From: Bing Zhao To: Shahaf Shuler , Matan Azrad , Slava Ovsiienko CC: Ori Kam , "dev@dpdk.org" Thread-Topic: [RFC] net/mlx5: move to non-cached mode for flow rules Thread-Index: AdWv9XJVVLMioDl6SCikSvyXT7qs1Q== Date: Wed, 11 Dec 2019 07:53:29 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=bingz@mellanox.com; x-originating-ip: [117.147.46.153] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 990cefce-a243-4bfb-ace1-08d77e0f36a3 x-ms-traffictypediagnostic: VI1PR05MB4205:|VI1PR05MB4205: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(376002)(366004)(346002)(396003)(199004)(189003)(66446008)(26005)(64756008)(54906003)(110136005)(86362001)(66946007)(6506007)(316002)(52536014)(8936002)(8676002)(66556008)(66476007)(76116006)(186003)(81156014)(81166006)(7696005)(2906002)(5660300002)(71200400001)(9686003)(55016002)(33656002)(478600001)(4326008)(6636002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4205; H:VI1PR05MB4192.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: 5RDwWP6XGenodzwSkCDJCg4lyAWfTJT4wvhbTkXpJUELIl4T8CRpj/Uk5F/KOVUJa99FwsJu4HlXNlLxLVoiM72f2wIKkMVby0vfEkx29rPsuNcvWKh8CtMYDOm8kQNdst7olcXbxcl9QMcu2WLC6CRp+udUg9qg8iYlWqG5auS5Mw7fj4kw4irfBRQtepQM8WbhGL5nADijFUspPWwHKKg2k+gvCeaM31uADFdhWmIQry/l830VKUUP2ScUj/QnqQfSrVbWUfyKQQwSLFdHyZqxZA0ejPs+xjkHezGj4jO5PPrlyxkuwFN1Yo5Va1x7Zmfv2Shm8APviDECthAjrCWytwl+DOawpfKgaW2+G4kMGO+xMr99WJxI6Qsggn2XEz1cLe/P957XIkHw6juBekrpDTtpxNVnlCCsrDLyROb/Zc8zMzhc+den9diR75KD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 990cefce-a243-4bfb-ace1-08d77e0f36a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2019 07:53:30.0051 (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: dk8Z1uIywPxRthxQWO5Gfbl2wv2x57+Z/Qh0TQCScBo8zFZDReE88ycpqx6jh3y+j+OTwJ+VnO6HZ90zJJ6ihg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4205 Subject: [dpdk-dev] [RFC] net/mlx5: move to non-cached mode for flow rules 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" In the current PMD implementation, all the flow rules' related information = is stored by default, like the table resources, matchers and actions and so on= that are already translated into the hardware descriptions via the interfaces. W= hen restarting a device after stopping it, all the flow rules will be retained = and reapplied to the NIC automatically. Handling for each packet will remain th= e same after the device restarting. And this is what we are talking about "ca= ched mode" for flow rules. There are also two disadvantages of cached mode, listed as below: - redundancy information and memory consumption: due to the fact that usu= ally the application on top of DPDK will also store such information for management purpose. - moreover, flows may be not valid or used anymore after a device restart= ing Process. There might even be some conflict with the configuration. And in the meanwhile, from the description and definition of 'RTE Ethernet Device API', there is no need for flow rules to be retained during the rte_eth_dev_stop()/rte_eth_dev_start() process. Caching the flow rules make= s no sense, and cached mode is almost useless. So we will remove the flow rules cache and move to the non-cached mode. In = the device closing stage, all the software resources for flows created will be = freed and corresponding hardware resources will be released. Then the total cost = of the memory will be reduced and the behavior of mlx5 PMD will comply fully w= ith the ethdev API expectations. After a device restarting, all the needed flow rules should be reinserted v= ia the create routine in the rte_flow lib.