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 EBADBA00C5; Fri, 8 May 2020 12:33:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CCBDD1DB2E; Fri, 8 May 2020 12:33:25 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80050.outbound.protection.outlook.com [40.107.8.50]) by dpdk.org (Postfix) with ESMTP id 4DB511D98B for ; Fri, 8 May 2020 12:33:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZVedNJuCUdCSN2RFceM7nIkwuL2Xtmmhqlbd2xyXazfOL4vB2wGsTTwhXBXVKZjDkn1ZQUrnq5S8XJH1PJh/jhm98chVL1xtqc4F3IdCQdgnPeQIHdthjJQM1/BRWtq4/xmZRqSUEvTqiKNKQzJaQQQE+UTLqLjdFGdB6G2AJSAnD2YQm/m+v48mN/Su/cpzxduoryH8ev7o/Ff4JyrOiIPvahmjkuz8/Ua4aeJCHaQukW39BWIGLjhA/sF2dKPHtxPgpfIWonebLPiQCjrVOVx2oO5MIDo2gLy1RFrWGUI0hprTaEZi8wIKNBdbNrhjWY1croK1Kfg/26FuDRyZQ== 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=p6oF5fVXhspjcO8MxJMI7kd67m7Khm5HnUJaeA/CO5g=; b=l2dRkeAx6PLOM1KSqNAG1C7Q79RSisSbBGbfL082mOHWfg7GGpxNfDSrinHiFL4hFJfckcJkDnK7y6BeQ2UD4cI2mmKW1lWKxY7QM5+O+ixrbx9ZiKjm2k5YqBQnYe7KK1rWR5ucZ+JEStcJxqHooQMp70qTrO7lRd69njF1RKEd0acBZFgnVUOXkdvB5drCkxXF7JM6mhGhLu2mGC0lvsf1qJAqh1kKZ5nESjk7GVCEeexXHm+YFeJqmJm+BjqX1WElIHMtvPtmC/GUn8RRGf+4om1KXmDIAeMPiveVoHGkPJXRjstQYo80TSC+DqfOKzLqjKR79IU738vsI3ibCA== 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=p6oF5fVXhspjcO8MxJMI7kd67m7Khm5HnUJaeA/CO5g=; b=GdNio4bjpS2vdKW0QZ69z8aLBMaPNxZCIhl86av1c39stluHc2L7ACpZvbS0OnksicVPLWnZV3FUW7wXHSTmlpMLCFqjxrRYln1xlszRiJ3afMOqxwT4e1Hjuz1aWORErMlWHD5MyXadp2zSEODP3eSt4NstmsZl1msvawvA9rw= Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; Received: from HE1PR05MB3484.eurprd05.prod.outlook.com (2603:10a6:7:2f::12) by HE1PR05MB4618.eurprd05.prod.outlook.com (2603:10a6:7:9a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Fri, 8 May 2020 10:33:18 +0000 Received: from HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::3022:cbe2:4523:718a]) by HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::3022:cbe2:4523:718a%4]) with mapi id 15.20.2958.033; Fri, 8 May 2020 10:33:17 +0000 To: Matan Azrad , Ori Kam , Slava Ovsiienko From: Suanming Mou Cc: dev@dpdk.org, waela@mellanox.com, rasland@mellanox.com Message-ID: Date: Fri, 8 May 2020 18:33:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-ClientProxiedBy: SG3P274CA0001.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::13) To HE1PR05MB3484.eurprd05.prod.outlook.com (2603:10a6:7:2f::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.31.73] (125.120.142.31) by SG3P274CA0001.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Fri, 8 May 2020 10:33:15 +0000 X-Originating-IP: [125.120.142.31] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 813b9d8b-e05e-44d7-a40d-08d7f33b389e X-MS-TrafficTypeDiagnostic: HE1PR05MB4618:|HE1PR05MB4618: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 039735BC4E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6llkBTQBCSspqFI9nzhTuGpBjNy6QEAuxm5RwfJlBW+QCegYxnCFS9iikkvalwBlDUvH1Whf/5YMuSLnwacyCxygacrAmDGwlcQiFgNqgSkAtm+LgDDmI0SDBZMySmU8wMWkulBmZXKW6wPiu2zGs3klHh/3aX+bnkMYE/0iGTEwLPuP0TTZxHxSKmLlVmnvcQbjLkSAiq/bZmCOYr1UgFsHvWYHY8qs0nY7zEl8ufLzXYrzqvC2loWqqdxF5/47sDsIsU3/oyv0rW2l/7HHkzTp16C7TUnI3+G6h2BciLa2HR6GmL81qpaKFvqW9KaBYH3+Vj9puiWmuOL9LUktP4Wy6kPvjcCfGQPGLbXaeEO8gjttNTpSNiHzmtoLbH8bgohbma78fHUcPO5py7FvU8UYLQAwTdUY2LAL2GhkcPixDaMMaDwdN4G8VL5JMbm3xHmPf/+RaY02Nbixf/VIzlxZNhjsV8iD3iz56NvDf+2I8H2OkGjEcrmKjBYiVWGfTOOZRn+SB4r6oAm6Igz+HZV1oSjl0p0ucs89/qVIL1vIXJ2N3UKr/c9BTmnCAY18 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR05MB3484.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(376002)(366004)(396003)(346002)(33430700001)(66946007)(36756003)(4326008)(33440700001)(16526019)(186003)(26005)(110136005)(16576012)(52116002)(5660300002)(6486002)(31686004)(316002)(107886003)(956004)(66556008)(66476007)(2616005)(83280400001)(83290400001)(86362001)(478600001)(6636002)(31696002)(83310400001)(8936002)(8676002)(83300400001)(2906002)(6666004)(83320400001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: SAhQ3wa8w0ZBIQuOX+hnMRphiGhpwh0r29nd7ZzofaPnue4VDCTpG6mvzvQldegHSk+MuN2EOsI9Gv0mSrgRX6FVtzACbSOb1zww7Kypok3ap/SZaENGP1Eg0uhV2b+ArxrlO46pKkxSO6dk2X8Yy/ET9/b/eubk5Nzxsp5b7qvFVXSuiN/WILPuFDQxCHqkamrNrqn2Ox486jjG+Re65CGlhAvywInR++32OVL+1hPS6CfoTMNAIZJCos5hXkUqru45F+XQQeREZerGTBYqSD6S6A9Au5AUE2eguXLQZSUikfBe65+5Aj689I7v7BNuaiPDw6Tuf9X0JO0Y8lUBYnUDT7bfGDyIQZT5uLjEqciwnEhY73yhFPLfOEbqt2sOWcnbC/ZrZfng9RP7nUTOtg7zR3f/tQnq5X6y9LVTgsVxqolo+x6w8hfRBYy5OqNjrDLkqA777GavPOhL+D4lOBFVKXwEZlHXnT7SF876OYuwh7+AnKSdNOpcqZUXePWV X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 813b9d8b-e05e-44d7-a40d-08d7f33b389e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2020 10:33:17.8173 (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: LCqbteRIj0/TSnw4Ssa2E/nBQ61wbo7UD3m1MbcVbTOmKYIwp5qhChJccRLXG2cK4akmsev+sTpGxjkOFhs8Mg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB4618 Subject: [dpdk-dev] [RFC] net/mlx5: add reclaim_mem_mode devarg 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" Currently, when flow destroyed, some memory resources may still be kept as cached to help next time create flow more efficiently. Some system may need the resources to be more flexible with flow create and destroy.  After peak time, with millions of flows destroyed, the system would prefer the resources to be reclaimed completely, no cache is needed. Then the resources can be allocated and used by other components. The system is not so sensitive about the flow insertion rate, but more care about the resources. Both DPDK mlx5 PMD driver and the low level component rdma-core have provided the flow resources to be configured cached or not, but there is no APIs or parameters exposed to user to configure the flow resources cache mode. In this case, introduce a new PMD devarg to let user configure the flow resources cache mode will be helpful. The intention is to add a new "reclaim_mem_mode" to help user configure if the destroyed flows' cache resources should be kept or not. Their will be three mode can be chosen: 1. 0(none). It means the flow resources will be cached as usual. The resources will be cached, helpful with flow insertion rate. 2. 1(light). It will only enable the DPDK PMD level resources reclaim. 3. 2(aggressive). Both DPDK PMD level and rdma-core low level will be configured as reclaimed mode. With these three mode, user can configure the resources cache mode with different level. The sample configuration as below: ./testpmd -n 4  -w 0000:d8:00.0,reclaim_mem_mode=2 -- --burst=64 --mbcache=512 -i  --nb-cores=7 Thanks, SuanmingMou