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 36A40A034F; Tue, 9 Nov 2021 12:32:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0929C40E03; Tue, 9 Nov 2021 12:32:49 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A60854068B for ; Tue, 9 Nov 2021 12:32:47 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10162"; a="232671875" X-IronPort-AV: E=Sophos;i="5.87,220,1631602800"; d="scan'208";a="232671875" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 03:32:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,220,1631602800"; d="scan'208";a="451862328" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 09 Nov 2021 03:32:44 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 9 Nov 2021 03:32:44 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 9 Nov 2021 03:32:44 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 9 Nov 2021 03:32:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lvtk97GJS6ActAa6z3ZdvG5BINl93WG8QkA2XYrJoPr2q0/DN2i9aHswsGimhdl77A7PyC8sTHXoKz/JPTZgPEmvUEiBjUr2loaVeQS0PM57L/uvgT7SLRBLuWyQCHW0kxwiwEg0QWUSv5GC4+8kwZuQFeKYd5vSsN+YsiS3d6E2jhCH+fs/1bnxRa8CYuHTlM/QrODc0XooVWrYE/D/nLGG6pcGTPdrMX4Q6EN+xh0cpdUZ043AAFEqekmdsN4Jutt9JEMJTPCfv1rNdWpFw3sJvm7mukbUe6Gu+H1eTo59umCttp8dlN1Q0JbisI+6iIXmoGmy5Rg/EBMtPMoV/A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MOFdzO6DWQiKV3SPMsBgE60lte+u4e+Un6SJaByWXPg=; b=gjVrxzKtK/2uN/tseVKfRIhzu+bnc+8AfzRKlNol3HKNgaXLnLEX5Yyz/KuaSIg38bIJLGM+V9D5C6O/kgqZ0tOlAbA4Qrq8/tiulSXSTTUneFZO0HRo4TJGjTC/0PxWuA/qSdJZEyTQoG3WfjYON123OLCi3UndbLk3ug+6I5lFw4jG9kMTFfthlglozZ+SEAZvxhbbWfjTb7jf7E8Bbnxn2K/jiemjIensa9yA1Sxccy9q0kJRj1Qph+u/hwGce7icOCY28LexoEck1K8VrIzO9TsRNpKupPiYahy+cXvrOiDatxxMhcn3FuhMC3HQpkghgjUO2nsCOGZ6r3fzUw== 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=MOFdzO6DWQiKV3SPMsBgE60lte+u4e+Un6SJaByWXPg=; b=zPfmPREyaDf8wW3QKDJKGFGMXuhIBXoueiwvJt20Z2lFQRjvK9TJrjfiL+y+zTSNsD0xQG8IzqFeP1SdFUVDshrNeDGG+p8HfJbZhwLySK3u0riVVJtc7k2ujVPY4nCrpiRZi8TD3BYboJtfF7ODkd4It1Bf9cprqQEJ2BTiQ74= Received: from PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) by PH7PR11MB5885.namprd11.prod.outlook.com (2603:10b6:510:134::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 9 Nov 2021 11:32:42 +0000 Received: from PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::f076:f51c:9101:b0ff]) by PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::f076:f51c:9101:b0ff%8]) with mapi id 15.20.4669.016; Tue, 9 Nov 2021 11:32:42 +0000 From: "Walsh, Conor" To: "Medvedkin, Vladimir" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] doc: add programmer's guide for the RIB library Thread-Index: AQHX1MoRnbZiUXzI00iwBSMIjPKpwqv7CHlQ Date: Tue, 9 Nov 2021 11:32:42 +0000 Message-ID: References: <20211108173727.133124-1-vladimir.medvedkin@intel.com> In-Reply-To: <20211108173727.133124-1-vladimir.medvedkin@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1ac00e42-a56c-479e-8327-08d9a374a4f5 x-ms-traffictypediagnostic: PH7PR11MB5885: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:949; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: s5S9uOcXvtNYRt+UEmwjZ/wUSrECJqHH9P31rxm/JB15n3a1ib54cbylpZTpgHS3B1L/kGMHd9f2W+nPnh/ZE/JfvIDtX3OahlxTSmdi2dJ5NGfrBVY03q4FLs2MKGK/qrF+OoXzHqXqxmyZev2Sj2esBhQMxItm15b5nyr2o7FHfYA1UNMegzcnfxpjq/N1lec3eoqFXdCcbCsCh/XtiKGB70s0j1pg7MqiG0YefDAR0+3tUUMTnWP02Xl4Mb1+KgRIdrXktqp6MGFijCvhJ35h9gctDk/Nrng4e/F0UWwi5yZ9tT/HybliG6e92Z6BjAOYZNocvocvtHj0PvM975ZdrG/AoCjTzeCLSUIB9KkDd9P5D3oMctJ9lOEp77RJWrBfnJxd4BQ3HGXqePgWZDAe6Cx/5f4LMnRsFnz5VyJ3j965GVhl+VxqHyhQqZABvXd7SUfCFLRyBztK7dv2uOm9/f4OgPQnGstIx0x+AXE1lN3DoVDNugohNOhOJWg1Rv+LPuxU87Ab/PQ8HYpIKN18hOW38cBZRFGT0afkaTlwIdTQyxdRKJssD5xZ8hj9GE/UPtW4Svf0D1hxr9hwRhYATYX8cyoT96K1JN8GMJU7qtCUqtrVopGnRkcisD1HIqJPtGzijTUktuuOgiuVX6HkJBmvE3QYukB2jUT7vqnwSHalcYMfHfNcblGAhAIACH+nhTBBcPacL8AqE4PAkQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(7696005)(6506007)(55016002)(53546011)(52536014)(122000001)(316002)(8936002)(2906002)(66946007)(76116006)(83380400001)(66476007)(66556008)(64756008)(186003)(8676002)(66446008)(9686003)(38070700005)(82960400001)(5660300002)(38100700002)(71200400001)(508600001)(26005)(86362001)(110136005)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GhkN5usb/yzflblK3WEY+9qPcgRzeWhiiN93yu1uzMN2P6SPkyLOEIRZRcts?= =?us-ascii?Q?KNF+PmSgbrBp8cNSAss110czHtXlKG8QXnfAhP04TDQuDP9vSlNWqTo6F29D?= =?us-ascii?Q?8ya9mrVBGp8HrTJXRhJcfJ2LFM7h/7oVp07idl1mWXvVR5rRE+aPfrTGbCDe?= =?us-ascii?Q?V1zzr6U3n2G4THRRZBNE08rad+Ji9DxQLETe1jkx7EwRO4gBDDsqrTNk8Hmv?= =?us-ascii?Q?nxcVh2TkD1v/snB7QSwuFsbk5sZSCm3bjciLIR6bvpBW1n54c/emvu13poI3?= =?us-ascii?Q?X14J8mcGvEXCMLW8BdRvJsPol1GU3C01tPRkz0VpOjTNzpEWDOz9CnDWLdq3?= =?us-ascii?Q?v/2IYn/06j/WyTf693B0PX99At3/dYaN7rte1+0SfUy7uqpqdpu5DX8e35nn?= =?us-ascii?Q?kytVbK9go0V/3R9Uo2wMOkxQozL3J/+1hcu2DhXlk+nVO84sZ96bubD624Ay?= =?us-ascii?Q?BW1h8tV49ylao94f2+eYP4b9eaA1qDoskje4CQADDO1+iSKJBoSwTBYzS0sk?= =?us-ascii?Q?wnVrPIwzaTu8/h7ZCpYW6hDfx3U32TZAbLUnfo8JEbHmL84RrIr5mUy7MUu4?= =?us-ascii?Q?b1RBHYEpOGWUTKoLUwG6iBkTJkaWnyymY6Tv9/bcPh9gEYFcv0zRJWNP/DUf?= =?us-ascii?Q?BaZYMl0WXLTLvt407W8cNyrr5L1/ww9DEa1Pxh9aYr0EE6sxqli2d8LfXUmR?= =?us-ascii?Q?3dLNeZxmB3BOQ10pmGfOMlXKgoDdZkA+ZV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LsFUkp2fKYwAhpZpCJng=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ac00e42-a56c-479e-8327-08d9a374a4f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2021 11:32:42.7657 (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: lVvv+DeWAeNBbE1l0UAF3kQEw4j9VFJ+6SmdBGamXp4bzKzTeSwQ/BIjMuSz2j3Yi1FvS1Ym4CFtsB4fVFoteA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5885 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] doc: add programmer's guide for the RIB library 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" > From: dev On Behalf Of Vladimir Medvedkin > Sent: Monday 8 November 2021 17:37 > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] doc: add programmer's guide for the RIB > library >=20 > Currently, programmer's guide for the RIB library is missing. > This commit adds it. >=20 > Signed-off-by: Vladimir Medvedkin > --- > doc/guides/prog_guide/img/rib_internals.svg | 148 +++++++++++++++++ > doc/guides/prog_guide/img/rib_pic.svg | 152 +++++++++++++++++ > doc/guides/prog_guide/index.rst | 1 + > doc/guides/prog_guide/rib_lib.rst | 172 ++++++++++++++++++++ > 4 files changed, 473 insertions(+) > create mode 100644 doc/guides/prog_guide/img/rib_internals.svg > create mode 100644 doc/guides/prog_guide/img/rib_pic.svg > create mode 100644 doc/guides/prog_guide/rib_lib.rst >=20 > + RIB prefix independent convergence > + > +In case of a next hop failure, we need to replace an active failed next = hop > with a > +feasible next hop for every corresponding route without waiting for the > routing daemon > +recalculation process to complete. > +To achieve this we can link all existing routes with the same active nex= t hop > in a linked list, > +saving the feasible next hop ID and a pointer inside the extension space= of > each ``rte_rib_node``. > + > +.. code-block:: c > + > + struct my_route_ext { > + struct rte_rib_node *next; > + uint64_t feasible_nh; > + }; > + > + struct rte_rib_conf conf; > + conf.ext_sz =3D sizeof(struct my_route_ext); > + rib =3D rte_rib_create("test", 0, &conf); > + ... > + /* routing daemon task */ > + struct rte_rib_node *route =3D rte_rib_insert(rib, RTE_IPV4(192,0,= 2,0), 24); > + rte_rib_set_nh(route, active_nh_from_rd); > + struct my_route_ext *ext =3D rte_rib_get_ext(route); > + ext->feasible_nh =3D feasible_nh_from_rd; > + list_insert(nh_table[active_nh_from_rd].list_head, route); > + ... > + /* dataplane monitoring thread */ > + /* nexthop id fail_nh fails */ ^^^^^^^ > + route =3D NULL; > + do { > + route =3D get_next(nh_table[fail_nh].list_head, route); > + uint32_t ip; > + uint8_t depth; > + rte_rib_get_ip(route, &ip); > + rte_rib_get_depth(route, &depth); > + ext =3D rte_rib_get_ext(route); > + uint64_t new_nh =3D ext->feasible_nh; > + /* do update to the dataplane, for example to the fib */ > + rte_fib_add(fib, ip, depth, new_nh); > + /* update nexthop if necessary */ ^^^^^^^ These two comments are showing as spelling errors on aspell but I think the= y are ok as this is technically a code comment and nexthop often appears in the code without a space. > + rte_rib_set_nh(route, new_nh); > + } while (route !=3D NULL); > + > -- > 2.25.1 Reviewed-by: Conor Walsh