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 08BDBA04AE; Tue, 8 Feb 2022 11:44:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8128E410FD; Tue, 8 Feb 2022 11:44:38 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id DB048410FC for ; Tue, 8 Feb 2022 11:44:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644317077; x=1675853077; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XKeJIlZ+oj1vCKql0ZB4m6mAC65BRFeKgakVNQSngK0=; b=R+OQnnFl5FuYe7jxyHVTek9AaQ/8Crot0ZFcqu4KZGGmFNiQYcyK0jFV hF2HPa76F06Lapr0zF9fMjHYIpAhVkMjnF8A/apSeDy2QLuqU/1tu513E 5yUupcpXHKRh23sBKxXrA4dfUh8hCfQJxR//MWAm+aTZcmeuZFLUCVf/R XVGZzH64r8oSL+3Gs+w5+y7OQUe8thfy7xqo/og6vQezbMKJOf6FWvpzh UJKZzufjRUkIRT/AxlyVxxzvXJHwWBCsRyftFYE1MtGC6YjnAGCBcvp3B 2m5Bp2Or0s6DiCE5d54MmC5bCADN6Wkrt40lAK1gOy61KtI3gtn7mONo6 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10251"; a="232488336" X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="232488336" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 02:44:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="773092708" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga005.fm.intel.com with ESMTP; 08 Feb 2022 02:44:34 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 8 Feb 2022 02:44:34 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 8 Feb 2022 02:44:34 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 8 Feb 2022 02:44:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbsWtlL04CaVFebUQ4kffDnA3VPI32qxGWroTERoP+ufmf/hh3VDhUtj05lLofpE1Ucw7hTvE6A+k1B/ovqL5vVS9noRA+u7jNPDMHj6NjOhaxvX/1e0uulVYK4RHYEcb4BP/ccB7A8HVcIdgFElIC50C2y0bxUC8EAIvi8eZqjIybN1LvAZ8BoQFXxIwnhydoS3uYJWnCxI9muc0YHtLMF7UjEMQLbpmDlFL+EV5b+JJlJS3YTzS/ybGKCMuRNWwxAx8QxgdxDmnYxIaysgc4FPpL/FZAGjOWRrTksYgzh9fAPmt5fC3mFumJtuTiqiu8XYGG2X+M9UJHDqiPpHow== 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=dtU2w7qceX81hxizBRC9U7gsvPHKc+Jzn92/4wFvbUE=; b=fFpR39HokZ9L5g1GnCipDk5VKB7gL9eyJbpEdMa3J4dgIaVD326ebUIddkLvPB7M0itDWdx1JPuVL1E623X4qcfi8AGzmuN3VmWTvkbkDoO1jNeET/VoSeM+zVXHkSEamdIbwSd0VKENzrvDS1WWAikklVx0XTZ6H9+0PI+/V1At2mzyhOCExrP7yxcWrMZ1Acm3pSl8xoV/nVmCxziF5uJTww5TeUjJMha/gh39im4qfMZnBLivHbLj3OZKS6pVaYDp8Yw4PS8NmnF6RVAvWA0WF+5aw/jlPHAC00iA6Ah5j2Bw+Fk5vtnqv9O1YmNeC08OSBcsYgU2jK4kGdBFxg== 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 MN2PR11MB3934.namprd11.prod.outlook.com (2603:10b6:208:152::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Tue, 8 Feb 2022 10:44:31 +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.019; Tue, 8 Feb 2022 10:44:31 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger CC: "Morrissey, Sean" , "dev@dpdk.org" , "Medvedkin, Vladimir" , "Richardson, Bruce" 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+IYAgAKg5FCAAmOzgIAAe1hA Date: Tue, 8 Feb 2022 10:44:31 +0000 Message-ID: References: <20220126124459.2469838-1-sean.morrissey@intel.com> <20220204195905.449192-1-sean.morrissey@intel.com> <20220204142636.6250f05c@hermes.local> <20220207190419.2a1ca44b@hermes.local> In-Reply-To: <20220207190419.2a1ca44b@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: 6c0872d4-2ffa-4537-3bdb-08d9eaeffd46 x-ms-traffictypediagnostic: MN2PR11MB3934:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k/SzqebQojkB0R9ticqMyyvZ07+sryC46LP+CiBes2rNlw1CUC8W1KJ+MR4b4ozQcwtc7JsxG+M8Bt/N0f8cNM7Z+EsqcdiOqmCf0J6YhTgaO+vLGIjGG+/cKvOC8cYkW/7lb28/xiZYs7HTtJ32B32xOKRz9XD7znJdsPPSmITPHQOc81cFsj51EdPMT42pY1Ts45HdqABoRvZDWEz/8Q0+rd2Dd546hI8FqPya/hfb54RqF2S6jVoffC/Kc2zGG+dV/nC1Fr8R9QT63uFATa0LISuyooXt8bIVQ61h7z0N6+TcImygx+Izwmi7F57TvFlQF0Bj6xyRNX1gC1hIRxzgyJ13wGZr+nUeIcbjQBJWV816G4ii3m8mXu3Nq8OTGxaBBpP6LdA/8DGdHNEOuEzUEowQluqZlTpqI1abyyBrNIhNtqjH9+4ObzUfuLHnQzc3G7xO+JDfij5GCnfoEYnQ5tVMp+pUVtqQpOJOWbXFlARVK9Ldr7EOxHucLUc99yCOZsd0QSLPhRljSrJJm1t4tK+mqV7GS508iAnqDsrImpKf4OP1qC7gQwRJmXrRc/Vje6BdjdxWVLuCr/2yjp1+O/iHwNj8ZAV4YpEVA8s5Km/rjJ90w+9FO8AAbEaCpizlpE4iDyeNPzvdVH/4dM+GdvRqtQ+9k7248pDJTseSlMfdZCgESzA8/jWXMl18zs5bE0ipH/Fta8vXA6ilBi9vUrkXhU6HmR96eskVwH4= 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)(38100700002)(316002)(26005)(2906002)(9686003)(33656002)(83380400001)(186003)(7696005)(6506007)(5660300002)(71200400001)(8936002)(66556008)(66946007)(38070700005)(54906003)(8676002)(64756008)(66446008)(86362001)(76116006)(4326008)(82960400001)(66476007)(52536014)(6916009)(122000001)(508600001)(55016003)(107886003)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IxNeV0mALz7oANp2Hy2ImymrZHxjt1a2PMV2tzsCEeY4X4z8jFEd6L/C0td7?= =?us-ascii?Q?X/jMhu0GXO+CAGp1B7tdXQfTsDlHfR+qC98yGL2pMweFlHw8DS1pW6ofAQQ4?= =?us-ascii?Q?IHgPpesfpAvVoEVgTg8rpgs4W8kFa+oYt7BzR71l2XxZ5GOwaKuF80KObm4j?= =?us-ascii?Q?D4q00oy8X6eSxnCQjjToLrr7orM7iOIplLi8M21rQZZDJO3i6lIG16/WOb7c?= =?us-ascii?Q?5kYdaeomNnOim7rrdRjuKgiJ8bbcDxScffEAM1MzONH/jRV4+HQLY7DCjPLp?= =?us-ascii?Q?xFDlh4M2pD41cErDdLVLdih/j0pV0qI3hEl/+fyfSLol3hGvIrJTO1aQlI7u?= =?us-ascii?Q?Zx/1ZI9zdmx5NcqUoiw9ZjHp8WNkm7B4hT/rn1Z3RbkT+0pAzK0a0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5RbOxH4Ta8/Q5B9sCIvXod1MvJ92yPVJnTh0N1jXV?= =?us-ascii?Q?FFoPpm1bXn0hGablmoeVyyGFtKqbaeYVXtGn5jvN/fuxjeTt6GDnWajNofaJ?= =?us-ascii?Q?+11COXVCDYCJvirs21bRgB82QtLEJLsGfYGA0commoXJa95GUuF1aCGdNG2e?= =?us-ascii?Q?YaoqYqnsTehODnXvGJtmxb4B2a05XirgGykV7WHfbu9zaXgo68Z9ASxB8tTX?= =?us-ascii?Q?EFIkpxdraMfQ7ew072ZA98aLClPFuaiJosPuA8t/0QpBmu1Dr3s0B1dJKvs8?= =?us-ascii?Q?yHg7NTpijtqvpS8zDmvV1rSpzg0umEgN5m0PX+fLT0cZgngJ1WvfPVnGn2US?= =?us-ascii?Q?/9iaeOch/Ur3oTVMTbqCusGTcU6PuH0Cec6Aw4qcSX97h0ATWhKwJIT/aduo?= =?us-ascii?Q?BD0F1A=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: 6c0872d4-2ffa-4537-3bdb-08d9eaeffd46 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2022 10:44:31.5864 (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: RNStX2RZnSbl8xjb4EASNurihjd0vFYjUtWXBkRZQH79qldQcg+att6xsRCzk7HHz3yznwHqeUyKCm1cvc7mh5QrRkscF0dVKaLNxRZKt0k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3934 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 > > > > > > > > > > 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 param= eters > > (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= purposes: > > 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 > > to what user used for with unix-like route config tools. > > Konstantin >=20 > I was think either, use existing cfgfile and a a section of LPM LPM can have thousands or even millions entries, it probably wouldn't be nice to pollute all of them in .ini file together with usual settings. At least my preference would be to have them in separate file - clean and s= imple > so that it could be an example and also have some generic code for handli= ng > prefix entries. Didn't get your sentence above about 'generic code for handling prefix entr= ies'. Could you possibly elaborate. =20 > Or have a generic library for reading LPM entries. L3fwd is supposed > to be as small as possible (it no longer is), and the real work should > be done by libraries to make it easier to build other applications. I never heard users ask about such thing, but if there is a demand for that, then I suppose it could be considered. CC-ing LPM/FIB maintainers to comment. Though I believe it should be a subject of separate patch and discussion=20 (I think many questions will arise - what format should be, how to support= =20 different types of user-data, to make it generic enough, etc.). Konstantin=20