From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AD10A0C40; Thu, 5 Aug 2021 16:30:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3499E40143; Thu, 5 Aug 2021 16:30:01 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id DBD7540040 for ; Thu, 5 Aug 2021 16:29:59 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10067"; a="201351366" X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="201351366" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 07:29:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="442448811" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 05 Aug 2021 07:29:57 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 5 Aug 2021 07:29:57 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Thu, 5 Aug 2021 07:29:57 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Thu, 5 Aug 2021 07:29:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XlmiQiV7YS/D90zJBqT1cUojoBYd+F4VpXZXF3yyWEKqyDTA+NDIkyNZi8a5gR80HN/ODPQ0QEO0KoEuaQvS+HbsNYF+1rEWG1yWasdbj7nC/QTGrvXn5WUuTbT6wrfoOC4a4r4EAQhw8vzq8mx5SYHl5YqKPVF37iy+xk7SeP8OKv++F86sTYC4TC0jRdaV4h+XMo31jIWXiDaI4sHwcpSFMHSZIDTjZYvXL+jHUKBbmLonTNKEg2uMAYg5pDWT6ZaE1p2FrFDc8H7EwLucq65QJo6WU81NLP2Bj6ig+9VvIP+rqkQjLe0aIsCdUP6k7P9vRraRpzgEcgQrDAvDJg== 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=1Of0+BuuJUbW63bzJAsP2yA6wfc7OXuhippzylBVsQI=; b=DE6WWiQ7PVkAZoaxDyjXj5nBKaJLp/l7f5gXFnTmO7N5BcKC5tS0suMvlhZ9fkwJ/6gX8ooIb1ckkiQfEnUwIvlCduu0hfyAQe38KRXkt2LPq8tp0ix8n4f96xvbGgn4EcGyHXZl+LwC26Q7NulvlJdG1qNqW4yebwczYuWXbeq7ur0sIVBWFDcInzKEAGeWefph07vqz7oWDwWKcJVoyTfEoC8EVtZezj8kLXW/Scc/e6tg9ng/dK9MynwPSqzaJ+kDy/UfErIHNVxCyHdwltB/KjnEbyy3dRh5nQFhoTuUQl6isYqSjiGkYBcN1SxcrIwMjVJVtVuqmFatVIjA9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Of0+BuuJUbW63bzJAsP2yA6wfc7OXuhippzylBVsQI=; b=j/6anuzOUL6EMcVi5wUsSpHEEWw8/mN2CK5XGaIzCToLOcZZIcsBSQwm2ofONInks3UH8yYooVwk/HD8JKSHka5JYyPxhol7nK0y03ewwZXVm3HcA/flPrytDesn3PTf3bmcvufw2HKXle/l19Ggfp8XRO789ORvae8rVPSvSmc= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from CO1PR11MB5012.namprd11.prod.outlook.com (2603:10b6:303:90::18) by CO1PR11MB4788.namprd11.prod.outlook.com (2603:10b6:303:97::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Thu, 5 Aug 2021 14:29:55 +0000 Received: from CO1PR11MB5012.namprd11.prod.outlook.com ([fe80::8dc5:29c1:180e:11fc]) by CO1PR11MB5012.namprd11.prod.outlook.com ([fe80::8dc5:29c1:180e:11fc%6]) with mapi id 15.20.4373.026; Thu, 5 Aug 2021 14:29:55 +0000 To: Jan Viktorin CC: "dev@dpdk.org" References: <20210805151451.59932409@coaster.localdomain> <32cb2d90-2a08-ec06-0c71-031b6187c472@intel.com> <20210805153201.0f6a1dee@coaster.localdomain> <4369f1c3-c9f6-693a-5b21-1a5a4774478d@intel.com> <20210805160720.401f877c@coaster.localdomain> From: "Medvedkin, Vladimir" Message-ID: <22b94f92-c7f5-f1de-6d24-243ed6e0c90b@intel.com> Date: Thu, 5 Aug 2021 16:29:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 In-Reply-To: <20210805160720.401f877c@coaster.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR0P264CA0145.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::13) To CO1PR11MB5012.namprd11.prod.outlook.com (2603:10b6:303:90::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.198.151.51] (192.198.151.51) by PR0P264CA0145.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Thu, 5 Aug 2021 14:29:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5d5b055-6c7b-481f-d330-08d9581d7efe X-MS-TrafficTypeDiagnostic: CO1PR11MB4788: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PEuVNDC15gC/hVr0KUH3MRdBv/zREz9gAtHGo33MZwk/7iOXSTOosFevCLytxt92lE4H0R3MwUAe3sJhvyNHh97+Jp81YzSK/8xZ2TmQOlwocBbC8XcDzMi0h5QfThXb86gBJfvlbXrhypCf6bI71Q8hOPYHVeZ+2h1yqX7oXgFBjdwQx1Y9660iGggBonAKph/Wc4IhHv+ZqurlcYoNfOBM9qDNDF1K5OLdRJ/1RkRadZwZma4hY3cla7jW1d8a5mtwQBQhNjrbzIeeb4fVyeLxh0tGxu+2OkLhIjDGubTLd37j61JsY2vJ852DAyMX6VdNwRiwbQwPEg6HVQhwlaOqWw/hN72ZCjRjXNYogEmRxoRDx/KSvWNDJSn5MIBm4pkdRy+YjqivqPBVPKgCn1ooktDxdMYTyEFvTWXrUijxdzmY163fjBTR5vzYA7jTwcP/4uqA31vz7IWosGfL5BNcnCw7bdaOYA5482spFw8XLfXstuuwmPq3JaOuXj2rwXZFHp8ZaNi6HjN9jDDyEa0NTVLzN+5pPf4B4XYU5GzRBZvsEFxeOaD0X5zyN1peusQ7WA0ji2znSYEmkRvRyO19JWlJ+mnilU2Ojmd30M4mF6GKayTKaSAcLlsBrTciAleWSgn4AylDynf183cr+4L30MKu7kq8fxaUJ3y7xi9iXNY3l2jmMgtMEBmxEYlZuIJJLAyGL4IIda92oXnDm1ahlniIju0hteyBud6mcO3DwHXLO+c5zi/Rh+riWT/dn9cst8AEL25nWBIUtwxxVg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5012.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(376002)(346002)(136003)(39860400002)(8936002)(66556008)(66946007)(86362001)(66476007)(316002)(8676002)(16576012)(83380400001)(36756003)(6666004)(26005)(186003)(478600001)(53546011)(956004)(2616005)(31696002)(6706004)(38100700002)(4326008)(6916009)(2906002)(31686004)(5660300002)(6486002)(3940600001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SDRSSFRreWZoZXYwTkFkZnNFSU9aQ3d4VVpXMkJwZDhaUXlydTFrZ1ZqNTd3?= =?utf-8?B?ZWtVbzRvQ2IvWFovVlpHZzBQK1hFclpNbnVsUkpQalFJY3B0SkFlRUl3UUMv?= =?utf-8?B?cXV4YzY2M3VDQndUYWQraTlQcnVCditOR0kvZlJLSVEyVXlEZFVFK1E2NkVh?= =?utf-8?B?RFRxMWxaMGZZVEpDVlhUTmwwWFRaSUt2RFc5VWxVRXN0MVBoNVZNMHZhRTFR?= =?utf-8?B?Y2x5d3g3YjZvS2pITElQbGV2ek5EWU1Qc2xNZU9XSUovMU81VTRaWjB4eTl6?= =?utf-8?B?aWRmSXJ3a2pmQkhjWkl4NXl1Rm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?b1h1Z0RvV2NQL3REU1BqU0JGRG9wM1NQcDhWMDBNYXhleitRT0hKc21SWHNi?= =?utf-8?B?TjVIcFQvL2o3c0lIektaZ3ZiODNOTTZHOE13bEx4bmRPRW9NcFczWTM1ZXg2?= =?utf-8?B?RlVDR1Q4bWlvSXo2OEY0QmRPdTF3bEtvMDl1a0FEQmFOaEp3dSs5TnJ2RjVy?= =?utf-8?B?VTMxd1lwaHFaSkxIeFFRbThnSTgzMENTV3FVZWF0OEdjeU42KzdWbkhLYXFp?= =?utf-8?B?NTdQV2ZQVU03ekVKZ0dpM1cvRUR4OVBDWHBaak9ocnhqWVlCaU96ejFzeS9I?= =?utf-8?B?TzhKc1NLSTBFVWRHczQ1NGc2UEFmZXZvdVBHM1N2RzhFMHJOMm85VEFWUDlu?= =?utf-8?B?QWNkQXpTNVhhRmVXZmNmekdtTzBIWmpWNi9Ka0xnczcxK0VnVVdEK1VscU1w?= =?utf-8?B?SWNpT1Y3MmhRaGRycFdiZHR3L3hSRDdSb2RDazlyK2xWYjQ1UzJTQWJ4ZzI4?= =?utf-8?B?WjBhQld2UlFnZ2xxdTVrbkh0TE8zY0F0VHRKOVpKT3NRd0dFM1c0Y3dvT1lz?= =?utf-8?Q?Ojf4Zw+uLt6gALxMI97g9T/FWwL2L35a5nFhOY1?= X-MS-Exchange-CrossTenant-Network-Message-Id: f5d5b055-6c7b-481f-d330-08d9581d7efe X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5012.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2021 14:29:55.8676 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n7bjNBE6BaNJZntyrkh/XCudxmPjxiQyKdffTaZNVo3rdfBFxAfBSC5yXzrHsVG/dxgiikhBeGrudiTzHf5R1QgfmChD/oXt/sYsqWU+dtw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4788 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/2] fib: announce experimental tag removal of the fib API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 05/08/2021 16:07, Jan Viktorin wrote: > On Thu, 5 Aug 2021 15:57:14 +0200 > "Medvedkin, Vladimir" wrote: > >> On 05/08/2021 15:32, Jan Viktorin wrote: >>> On Thu, 5 Aug 2021 15:27:15 +0200 >>> "Medvedkin, Vladimir" wrote: >>> >>>> Hi Jan, >>>> >>>> The RIB is always used as a control plane struct intended to >>>> maintain the correct content of the dataplane struct, such as >>>> DIR24_8 for example. So it is always used on _add()/_delete(). For >>>> simplicity you can consider it as an LPM's rule_info. But instead >>>> of keeping routes in a plane array as it is in LPM, FIB uses RIB >>>> which is more suitable binary tree. >>> >>> OK. I thought that I can have a single RIB, use it for maintaining >>> routes and based on this single RIB, I can build a FIB for the data >>> plane. And when the single RIB is updated (which can take quite a >>> lot of time) I build a new FIB and locklessly give it to the >>> dataplane. Such approach is not considered? >>> >>> Jan >>> >> >> I'm not sure I understood completely your use case. Do you want to >> rebuild the entire FIB from scratch every time the RIB changes? > > The idea was to maintain a single RIB and two FIBs. One FIB is active > and under heavy load and when a route change arrives, it is first > written to RIB. When RIB is ready, it is used to quickly > construct/update the second inactive FIB. Then I swap with the current > active FIB. The old one can be edited/updated/recreated and new one is > active. > > I've got one place where all routes are placed (RIB). And two FIBs that > contain only routes that are relevant. (Well, yes, not all routes in RIB > might be relevant, this depends on other conditions.) > > Jan > This technique is used for data structures that do not support incremental updates. However FIB supports incremental updates. You can keep a separate rib struct and reflect changes to the fib. Also, using rte_fib_get_rib() you can get the corresponding RIB struct and work with it directly using rib API. However you need to be cautious, all adding/deletion and next hop changing must be done using fib API. >> >>>> >>>> >>>> On 05/08/2021 15:14, Jan Viktorin wrote: >>>>> On Thu, 5 Aug 2021 15:08:13 +0200 >>>>> Vladimir Medvedkin wrote: >>>>> >>>>>> This patch announces the experimental tag removal of all fib >>>>>> APIs, which have been experimental for 2 years. >>>>>> API will be promoted to stable in DPDK 21.11 >>>>> >>>>> Hi Vladimir, >>>>> >>>>> I have a question related to FIB. I am just learning how to use it >>>>> and I found that each FIB always creates a new RIB internally. >>>>> There is no doc about this topic... >>>>> >>>>> If I understand correctly, the underlying RIB is only used when >>>>> dummy_lookup() and dummy_modify() are used. But they are only used >>>>> when the configured mode is RTE_FIB_DUMMY. Is there any reason to >>>>> create the RIB with RTE_FIB_DIR24_8? >>>>> >>>>> The issue with this is that each RIB allocates a new mempool >>>>> internally which can waste quite a lot of never used memory that >>>>> would be unused with DIR24_8 implementation. >>>>> >>>>> Regards >>>>> Jan >>>>> >>>>>> >>>>>> >>>>>> Signed-off-by: Vladimir Medvedkin >>>>>> --- >>>>>> doc/guides/rel_notes/deprecation.rst | 2 ++ >>>>>> 1 file changed, 2 insertions(+) >>>>>> >>>>>> diff --git a/doc/guides/rel_notes/deprecation.rst >>>>>> b/doc/guides/rel_notes/deprecation.rst >>>>>> index afb599a..58826a8 100644 >>>>>> --- a/doc/guides/rel_notes/deprecation.rst >>>>>> +++ b/doc/guides/rel_notes/deprecation.rst >>>>>> @@ -195,3 +195,5 @@ Deprecation Notices >>>>>> communicate events such as soft expiry with IPsec in >>>>>> lookaside mode. >>>>>> * rib: The ``rib`` library will be promoted from experimental >>>>>> to stable. + >>>>>> +* fib: The ``fib`` library will be promoted from experimental to >>>>>> stable. >>>> >>> >> > -- Regards, Vladimir