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 9C67AA034E; Sun, 6 Feb 2022 16:16:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AA374069D; Sun, 6 Feb 2022 16:16:27 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 7BF5E40685 for ; Sun, 6 Feb 2022 16:16:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644160585; x=1675696585; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=B53Ptro9XcNDgFl7yKaLmAJMhz/bO6zxO6Xt0z/+/uI=; b=lbXX1xTJJITKbbw0FqDzTziy54x2V6i8m+ofe3Ukdb5FNTw+GcA1zle3 F2Cj3V7XzKLmGv6E+QWe6MvX7u6bH4HdAI6X5DdtUw+QHqossDkks2UBj q27aGqPwDruzSpcsqUhLgz5xi2wpQba20cEu6NGFBFZK54DMik6yp/KkM 0ZnJywHDsJJTnWHd3j5ooUxbmK9qHqWx0BRY3l1KJ2RIGfOB+ocWBfrc8 KcTK/XWDnGEiEipLXaJmJGaSN4yTg9BAhfF0f0fC4J0FpdSkY4LMSkMrq nDic3fASm9SdBeAjzaD7jL0zokd/gMc0K2j+FnrogIke6QR5YU0tMxzTw w==; X-IronPort-AV: E=McAfee;i="6200,9189,10249"; a="228558541" X-IronPort-AV: E=Sophos;i="5.88,347,1635231600"; d="scan'208";a="228558541" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2022 07:16:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,347,1635231600"; d="scan'208";a="539772744" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP; 06 Feb 2022 07:16:24 -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.2308.20; Sun, 6 Feb 2022 07:16:24 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.2308.20; Sun, 6 Feb 2022 07:16:23 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Sun, 6 Feb 2022 07:16:23 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Sun, 6 Feb 2022 07:16:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AW/0WuEZie26bIobVeH1VX2hXWpEJ2x59ED0gZEG7uXnzZdKsFd+kT/wF7brwkcS0i5S+RDMVgYQnBOQvim4ozbIm87mox/0lNu+RoWDH0lPQSJj6pXLhI7P5NpK+DJJ7QuAvv+Nh/DJ2QJA8uMzqwLSmJiSvTlZzxp4VKDFtUUEAf2pErNHPPYmlWN6r2e7yVEAdgT3nuj0u0vOuKcZj0vDJhcz5cjD/3qFD+4vkHGDqcTFlDli78ccx0dJT/VXbHGw9J3v+swfXnn1ZQiBYQgTFG1jkdxWbuJF8BaNPyQCfbqLkQQhwyt/dMSkh1DgQPApLDT5DB9cQKhQnBEErw== 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=QR3htLLMFW6UtRK+0MD9ur8sa7DSDdegltYjdHp5Qgw=; b=gPgIUGJKDht+TD753jFcrv6lb1J6q4RfKCMojdBflv357bBW1giOzZ6K3ONgpBLVKmNUepxUght2vo739Rai7hrYtu3rN2ieZV7my60xK96esuxj6iLhWwQHmQZ9PjHIieWFX6ebNJ20aI9AfepjhQtemoRva52iGmfl0Gxewe2xha5QXrvSArIMpWYq2KH1m8l+f24Cv9taZrUghJwNvjEpaMK0fQCrqc36wN0lPR1r5wAuUmfBsAveNvrbInS323ETDE9TxyMfNTIIpPsTG/jEIgY5GZD4uQfzBS/XOzscfhoN/Su7u354E0nVavP8GiubaLlEaeLG3Jcm54mG4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Sun, 6 Feb 2022 15:16:22 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07%4]) with mapi id 15.20.4951.018; Sun, 6 Feb 2022 15:16:22 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger , "Morrissey, Sean" CC: "dev@dpdk.org" Subject: RE: [PATCH v5 0/2] Add config file support for l3fwd Thread-Topic: [PATCH v5 0/2] Add config file support for l3fwd Thread-Index: AQHYGgG/2P6JAfnPu0eGpqCdewcShKyD+IYAgAKg5FA= Date: Sun, 6 Feb 2022 15:16:22 +0000 Message-ID: References: <20220126124459.2469838-1-sean.morrissey@intel.com> <20220204195905.449192-1-sean.morrissey@intel.com> <20220204142636.6250f05c@hermes.local> In-Reply-To: <20220204142636.6250f05c@hermes.local> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 836fe0d5-7931-4944-590c-08d9e983a233 x-ms-traffictypediagnostic: PH0PR11MB5000:EE_ 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: aEQUVvi3z2dTGQR3Am9IeobKlP0RcWgmAtqzEWl7a33C2myNmBwZnqbmWd0GPFnpFqkAOBEvZHvYCath1G2iyY1k8JbaOIPfRG27JFWyO0BS+z4HMEH2DJV0mkWwpPRIEQYCs9Tn41EH4fidYEt+BHcNlpz+j+F/qbp/Mcz71T99MnbwdSAg8Gb04B18CjMkn+RN2FFI/CvNUDEV5oig7PrncXhANWWigd0HyGycagamTT6ISYEuizj6V7sTOBbq53gluOr6Aw1w9ou0MHPb0vYUr5XxeJbjfS6yORwGgUmzu7bMPy1zpb9/fJ5Jvy23Flg1pvKR3ll/AumUcWJPw9cduyssa/UP+frnxpr3+OEKlarrE+F4t9mzEmCJFe6koBMxh/++lnIJLWbfsH9xhQ7/7CArQXV+nU5G9/w9ONfDrulltcAA4ygQMWXAQ/nTbRDrqMS7C9R8njRK508ISEv/UdefgRNuaBu7so8EELXSQqWmUKX/F9Uy46N/2mXe/0MWdh2T24kO4Fb8qsmhxgaefTNe9ctqIzI/sUPH2xdTQ8T7agscmPDJvUDVk1ZG3bee157jXyCeZ6oTv7BWpKza8GzfRwIHPr9WM9ShUJf4gLefIeZBIdkEdyi/iuHlBuMHx3X9EU3c1oPymdgq1VV7XJLLxfB9mSGSoJXjE4coEHi9RV/E9tnLD3kF9lwWvS5Bi3HbT/Li8LcH4EMSR60mwigXJKcwpwsvdpNtJ5s= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(6636002)(38070700005)(5660300002)(122000001)(71200400001)(316002)(7696005)(6506007)(8936002)(86362001)(4326008)(82960400001)(8676002)(76116006)(66946007)(66556008)(66476007)(66446008)(64756008)(2906002)(508600001)(9686003)(186003)(26005)(83380400001)(33656002)(110136005)(38100700002)(55016003)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?obepTSya1/e3d48afkN8jcO38ExLCxj1IJeOKbuSiyJecaSLi2aq0LCkNuVr?= =?us-ascii?Q?DWWJv0OPdQuujZuHO1fCmZVT1zKj+RiWA32EKVzm2u8aIb/mUiR8l4yCPuor?= =?us-ascii?Q?7Q5+NKEfDR3eiDrZXJErbzKDU16EWVDBWzKANNNn/T72ulywm35Qj3xsSC+E?= =?us-ascii?Q?oDMMYPH9GZXh+qFpKV1OTJI9MIfLFgTqPddv9Pmd2miVTyedWvM8nGYoxlEX?= =?us-ascii?Q?fgIU5vPaFfab6eMz/v0Q8ZO1rQNLIV+IvBMQ6q6iJ9Kwt6w6RJaxiRzo05zT?= =?us-ascii?Q?pts2NidiiyVDUVz6J+dzLUU3tVW08sQ/FZCmtJT8ehEbkzR9RFHcWOe3RBok?= =?us-ascii?Q?uN8tWa3lqutQISuHl9ewiISzKv8Z3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skKco0GI3+FZNz1YulX00YJw+IPttPR+bvYCVcyqic4TbJW//AHWY+A1slXY?= =?us-ascii?Q?x92VyM3ghZYhHAg5UCiGZ++eQ1aG4s0SxhmEzEiTWp6uGEpMF9o8BOc0/RUr?= =?us-ascii?Q?eUIyK2EWjU9s6/iHOo4Hm6XR+jfzahuOHK4JeT98130p+kyfSiGTBeMU19lc?= =?us-ascii?Q?R9G7ij4LOrwZQlBksg950BYpi9Z45CHesWPV/8F6Lloffix4i+uc0zwskHfh?= =?us-ascii?Q?9UntLPsv5Mk2q6rQj36ldVuvBxVvsMYQmX0sO50pCTIC6qt3M73iqisoVlBZ?= =?us-ascii?Q?yFJJjthLIUPCNNk/DaUN2acBhbu2vX8z1T1xUNIeWEooK50anogVpJ/f92IY?= =?us-ascii?Q?copHtGUZectKcQHjVb4ZdM572NPVvM/1UhpB2lNvHxxRnQc6uD7Ckq9ojTzQ?= =?us-ascii?Q?vkKGPQ=3D=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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 836fe0d5-7931-4944-590c-08d9e983a233 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2022 15:16:22.0585 (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: 61xJrzqVYCtX0zdHyOVirJIHpUoFhoQ6T4aQ3/pMmnJHNFDDW8iRvK+62sAMxDnnjWPRwVwOkkaGTkimS8mBk3psHpjCnqn3AuUIWcYTIQ0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5000 X-OriginatorOrg: intel.com 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 > > This patchset introduces config file support for l3fwd > > and its lookup methods LPM, FIB, and EM, similar to > > that of l3fwd-acl. This allows for route rules to be > > defined in configuration files and edited there instead > > of in each of the lookup methods hardcoded route tables. > > > > V4: > > * Fix nondeterministic bug of segfault on termination of > > sample app. > > V5: > > * Reintroduce hardcoded tables as to not break dts and > > allow for hardcoded tables to be used if no config > > files presented. > > > > Sean Morrissey (2): > > examples/l3fwd: add config file support for LPM/FIB > > examples/l3fwd: add config file support for EM > > > > doc/guides/sample_app_ug/l3_forward.rst | 89 +++-- > > examples/l3fwd/em_default_v4.cfg | 17 + > > examples/l3fwd/em_default_v6.cfg | 17 + > > examples/l3fwd/l3fwd.h | 41 +++ > > examples/l3fwd/l3fwd_em.c | 471 +++++++++++++++++------- > > examples/l3fwd/l3fwd_fib.c | 50 +-- > > examples/l3fwd/l3fwd_lpm.c | 315 +++++++++++++++- > > examples/l3fwd/l3fwd_route.h | 41 +++ > > examples/l3fwd/lpm_default_v4.cfg | 17 + > > examples/l3fwd/lpm_default_v6.cfg | 17 + > > examples/l3fwd/main.c | 68 +++- > > 11 files changed, 949 insertions(+), 194 deletions(-) > > create mode 100644 examples/l3fwd/em_default_v4.cfg > > create mode 100644 examples/l3fwd/em_default_v6.cfg > > create mode 100644 examples/l3fwd/lpm_default_v4.cfg > > create mode 100644 examples/l3fwd/lpm_default_v6.cfg > > >=20 > Why not use the DPDK cfgfile library and format? > It is model after standard INI format. It is probably some sort of misunderstanding: This patch doesn't add configuration file for some l3fwd run-time parameter= s (number of ports/queues, queue/cpu mappings, etc.). It allows user to specify he's own routing table instead of hard-coded ones= . For routing table .ini file format is not really suitable. Instead we follow format similar to what is used in other DPDK apps (l3fwd-acl, ipsec-secgw, test-acl, test-fib, test-sad, etc.) for these pur= poses: list of route entries, each entry occupies exactly one line. As an example: /examples/l3fwd/lpm_default_v4.cfg #Copy of hard-coded IPv4 FWD table for L3FWD LPM R198.18.0.0/24 0 R198.18.1.0/24 1 R198.18.2.0/24 2 R198.18.3.0/24 3 .... I suppose it is self-explanatory, intuitive and close enough=20 to what user used for with unix-like route config tools. Konstantin