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 CD137A0C40; Thu, 5 Aug 2021 16:38:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DA9241281; Thu, 5 Aug 2021 16:38:22 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E17CD40040 for ; Thu, 5 Aug 2021 16:38:20 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10067"; a="275213932" X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="275213932" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 07:38:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="586233784" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 05 Aug 2021 07:38:18 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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:38:17 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx607.amr.corp.intel.com (10.18.126.87) 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:38:17 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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:38:17 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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:38:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y3lEkLHtkR56i+LTmgg9uN0BTfWlJKt+y3hAmYCA77bhKcnMp7l/PPLhEhUDMaWjGZBGV/NNJbwN08gIwt0ut/8J3xuF6kcS6sManLIXEFKgWWchxLPawQKR5sOpk7vA2fzMTIDmbZlU/u7XecxEd4gU8k6gOodoGTY1igIfk7FiBVj/mmFpmsunSLlBlWBC1mNVaRdGNVtshANtwxXpVZB//wcehAYlSNhiAphVB7dOzKsWEB4azKjZubg/RS4tIJVidrnrLUIi5BWaiyxSg33PoiS7nBefT9PBVqn0v4uhpJD5ZUH9//T5Owrv6o56LXVOq7ctXaI3E8Z4JTyoyQ== 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=ifMuqFpqd/4yrSw3+5jZfDqq/ZIm6ZhuyCJz3lwyB48=; b=lBgsjlk6ZfUgWxyUSwrWl5kVDZp504j3Goi/IvaHjaqUjAMmgvbPSOHlInhKrxHltEYAL1m03fr14uJDN8fdhTBSFIAM598bggWdbcjcUKlefMhCvmSSvje3loRQcjWixR6Web+YpfJkFLwh5Czo9UE7BMJdupYkJVMLTOUogC4jCKDwyZu76qOPXeJTOFP+U2YU7VN57KzrKGCEz0EItdfU16ykklkyKsdEslMm9SORzwngWOz5Mky7ZVkiS+FUJkuaET0eQWJ5LsXhD4onLO6+R2aRoaSSZIohjCEjozhDj3aGKI0cC5/7E5a0t6kIw0cGubuRuc+mtUpEkcUX2Q== 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=ifMuqFpqd/4yrSw3+5jZfDqq/ZIm6ZhuyCJz3lwyB48=; b=CL7YlGO6Ud6oJxcAoSC/kqXg4ihCAotw2TLvKUv8gZ0K7CDaWybSUz9dAW/70eHWkSecWI4E6CWl5jy15OUP094reXaBnIYTd+kNv4xM6Yxu83bqxkF1TBeL3YKR08JV0cTcJGuKXMzkLjkNLQFmejs/EHMNOBmEKXV5NImbE5A= 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 MWHPR11MB1646.namprd11.prod.outlook.com (2603:10b6:301:c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16; Thu, 5 Aug 2021 14:38:15 +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:38:15 +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> <22b94f92-c7f5-f1de-6d24-243ed6e0c90b@intel.com> <20210805163421.2641da2a@coaster.localdomain> From: "Medvedkin, Vladimir" Message-ID: <572215e2-8d9e-a744-a4df-63528c9f318b@intel.com> Date: Thu, 5 Aug 2021 16:38:04 +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: <20210805163421.2641da2a@coaster.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ZR0P278CA0030.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::17) To CO1PR11MB5012.namprd11.prod.outlook.com (2603:10b6:303:90::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.55.54.51] (192.55.54.51) by ZR0P278CA0030.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::17) 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:38:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5da1c1da-c03e-4375-db32-08d9581ea8a9 X-MS-TrafficTypeDiagnostic: MWHPR11MB1646: 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: VNQUOg0hc9iJVC5bIHNXqk/89GUbWe9fI6ghQETCAx9qCqoN1/08BAFrolUJcaHza78bp8KbD1Mg5momjtf2bn25P3vV7NiTJtmphB0JpZt/SVoYNcCU4KjImdnP7f9b+8FZQs249Dm6+5drpYCe3A1WitZmEn4tXiM4LhQJtt4PIwVGgAPkwgsTACu5bwvGrQQBDxUJMIxEQO0ZMmXE0ZPQMAWUBM7GGGFvovyRJkVI1C6dEkaPlxn9B0o/BNQMiZ1eBN1aWqi1WBXK2+UqmY95AUmkzaoUu3V3TRFAkYbdFYVRLQbCEa//DsVOCfHTPXbD5nUBZo/4P7K2NlXFg7SEiGbh5RhL5CBFKwYMLYSMx3+tDfEvRrouMjoeobehDSqrbO0ilHvLsoVvOKEurWrroVeOZHA0Uaw+f75a+JtdGRCXX4ZJOlU7tdSPGyt0RfhXfqL+iCxpa16f/kfxuK+mXpquf01igCvFFESTfzVTpMcwqf71ZoZmZMi/X4Y3/BJh4PCLEblcYgOQTxaPtxEOpGsxcl61oYxveiAo9x2L7irY5Zj9ha4ohgPI3BLjdNGsycACOeXGJsiUcO2c41DlTMIcAohai7v6DmBRL2BNrNiUh7amcrDXiGacCRIKsVLHp4uo3LwFEjbvBhIQxvoBAYpaN4X8EZ3Bj2Fy/d44B1OcvVzdy4W/k6O/s4ltGBbQeFnVgsRQzgliyFYDraQKC6pYKxZT+sVLoAwJ+czUvBIQWE6SH3uvE15+xV9xj3pMsZZjHgw5qD1Jo6KPKw== 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)(366004)(376002)(39860400002)(396003)(346002)(136003)(8936002)(53546011)(66556008)(66476007)(66946007)(16576012)(6486002)(316002)(8676002)(478600001)(31686004)(31696002)(956004)(2616005)(2906002)(83380400001)(86362001)(26005)(38100700002)(6666004)(4326008)(186003)(36756003)(6706004)(5660300002)(6916009)(3940600001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UU5yTmVxajRaNTA0KzIzbWRqeTNtMFduVHZzZ2ZsSDIvM0RsK2tueE54QkxI?= =?utf-8?B?TkUxZ1FpdlcrZ0xIY0xyTWQxWVYyNXZrTUtJNERweTJJcCtVb2FrV2I1Zmcz?= =?utf-8?B?Z09sMldhTGpBUkdQ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utf-8?B?RUMzdmhZNjE1RlpPNkMwSFR5UDRHY1VlK3VISU9CRER6QWpTeUtIWG0yZDJR?= =?utf-8?B?SStKbHRWY0dCUkMyT3M4dlFrT0oyL3E0b3hyUWhZNXB1bTZtS20wWDYzZWJl?= =?utf-8?B?cHVkQXl1WVFUdktxaUNkam5BYy9PTGVmeEVyUjVCaTdNM1R0OFc3N3FBWTN6?= =?utf-8?B?VFhJdVNhd09KdzBXRWc5N21PT0poL3NqU01SWmd6aG82a29xU1pGNEZWWVlB?= =?utf-8?B?TmxSelN3RmdhOCtjT1MwR2JBNlNtaHRDWGRsNDQwdml5VEQ0UzZ6cDE3L2cv?= =?utf-8?B?WitOMVNISzNQb3RRQXBFRGkzU2piNWZGY2FTb3oyNzEvRllBcklCcFlUdGNw?= =?utf-8?B?NEN3SjVsenJtd1RrOHdKcW1QN2ovZTBjcFdrTjlMRXhheEI1N0h4VmlkM3pZ?= =?utf-8?B?SllDS1o4QkhjL2tBaUVnRTU3RjdsZWpHbDRpSm1teURQYjFnakdYL3diMzBJ?= =?utf-8?B?cE8wVzFOOHY0aTJubjR4RXkzWWg0c25UUzVBeEplam9DTmZodjVHRk9CdkVk?= =?utf-8?B?a2RKY3gxRDF5UW5KTERGa2t2VjBKL2w0T1Q3SEtYWWNQb1FyOG9EUFoySTVD?= =?utf-8?B?RXgzVFphR0dLaWxwSDlXMVdOUHEvN09TNlRhVys4KzN5SEduUnZoRms1d2M0?= =?utf-8?B?KzFYMVIrdUYvdUs0b2tvalB1NXFJcVRvaXJhbnNVZ1J5WS84S2ZZdWgzSU9F?= =?utf-8?Q?zz+M3Yn4D654uPQGykvsrfc8TWX2hVitiwr8WAX?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5da1c1da-c03e-4375-db32-08d9581ea8a9 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:38:15.2588 (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: HULaLCAz2xO9nymddlclnlwys/rz+xzAdIkKMo9dnMTWLB1WrvlSBTLaOkZhiOPjmNQeIvseK9Hxjjmwkwpp/pLjddrdBcYg5r/VgA+H97Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1646 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:34, Jan Viktorin wrote: > On Thu, 5 Aug 2021 16:29:50 +0200 > "Medvedkin, Vladimir" wrote: > >> 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. > > But reflecting the changes is sometimes really more difficult than just > rebuilding from scratch. > Why? Could you provide an example? >> >> 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 > > But than I've got two RIBs that I have to keep in sync with each other > which is quite difficult. > In this case you'll only have a single rib embedded into the fib >> be cautious, all adding/deletion and next hop changing must be done >> using fib API. > > Because, otherwise the DIR24_8 is not in sync, right? > Yes > Jan > >> >>>> >>>>>> >>>>>> >>>>>> 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