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 93D06A034C; Fri, 25 Feb 2022 11:36:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5376041199; Fri, 25 Feb 2022 11:36:38 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D2AE841160 for ; Fri, 25 Feb 2022 11:36: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=1645785397; x=1677321397; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=coWF81UEGpt1G5VKFZL1za2WNJccVbLKlLrotzsOBdM=; b=RginjnVzKj92hhR6G4zLIFuMKAPNXy3KSsjG9FXw7t/1ytRT/YdEJy/E hTuW2mlv7hKXFeRtLktQNsS/h2cv5o7mmP1h25SqGBbSXPxcFGcA5WkL4 mCsJhRPPWwpEFtexl8+7N/rt5P/T+oZSc+ZZMmgPWbK10O9FKG+s7/Olt V24zZQSjMkPfk0qXGQOMARdysinF6nyy0XbnkKz9+cySTkbXhx87j3luC 4THJkFvHNLep/ZfLYq46Z7wy9G/OusNO2cS0PXOyvIYl8nX07SH9J+68c VLf4AedndWQEFWdM0gVB+V5+OYbblVKmhZNSqMBFIxKzcSoU9a7kDux9+ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="251301656" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="251301656" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 02:36:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="607732381" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga004.fm.intel.com with ESMTP; 25 Feb 2022 02:36:35 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 25 Feb 2022 02:36:35 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) 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.2308.21; Fri, 25 Feb 2022 02:36:35 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Fri, 25 Feb 2022 02:36:35 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 25 Feb 2022 02:36:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQ6MikqtD9CaHldcDEoEafo/sSfVqw1cEM6eZgsTIzP3bEAh2guaY3tVorDsoDu7wJArMXOQ+H0H55FUPjF3M12z61A/hf88IM5yNFcx/1Od8X8cWFhYnRUIQFIqRFAxbUaD8T+EGk8ylWSjReuHY9x4+ScjXWFfnxXuPT+qT3+CzFnszliNAXdgglH5er5nEAzV5H2GwlnEQ26b4ayikbuwASyRGnDYR/vYIjNLBVXWXFoFsrX7fCxB75VMooD1tdP9X3cWNEZuXMhz7LZqhwABnRxonoX+1Uqei53XHLZDvdmsgVtQnNrruLf0g0gBI/2h5f6rTQgDvl3vsK7FgQ== 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=mhPQ04JmY8//nnDOKvcfmWGNFIYtfnn9B/Wfba/m+dc=; b=U4kX73IwIFcqstGo7MYgJ3MwbrWjzvZh0SpdF6/PckMBiNmVTdfk6WngJHyY+jb17Kqrf1L15vIpooIlfaSdGPcUvOAkJj+yYONkobmGZ7HYwQagqIv3U4Z5tkRMRIrPaDqvRcIzcmp7YK4SeB/00Goc4wL97ytEAJraM4kR/9OCX2AE2tql2MLXsebiNfHaEh9RUA+Ln5T0v7DaB0QsWxmHas+tnqF6rr0OD3Qjn6aOVCFZ4978Bi/2jtDF180XlqoyuCODxdWOBLCTHOflkpcJmLjC+Eedk7nx8m3E2EhLd4RzrMMIMlMfwruehRq2rRrLd0ozs2AuVpCBjGhJIQ== 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 Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB3963.namprd11.prod.outlook.com (2603:10b6:5:19b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Fri, 25 Feb 2022 10:36:29 +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.5017.025; Fri, 25 Feb 2022 10:36:29 +0000 From: "Ananyev, Konstantin" To: "Richardson, Bruce" , Thomas Monjalon CC: Stephen Hemminger , "Medvedkin, Vladimir" , "dev@dpdk.org" , "Morrissey, Sean" , "honnappa.nagarahalli@arm.com" , "jerinj@marvell.com" , "ajit.khaparde@broadcom.com" , "olivier.matz@6wind.com" , "maxime.coquelin@redhat.com" , "david.marchand@redhat.com" , "ktraynor@redhat.com" 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+IYAgAKg5FCAAmOzgIAAe1hAgABhpICAABo2AIABKkCAgBRTGICAAAL2gIAAPHYAgAAJqgCAAClggIABFLbQgAHc/ACAAANlgIABU7xg Date: Fri, 25 Feb 2022 10:36:29 +0000 Message-ID: References: <20220126124459.2469838-1-sean.morrissey@intel.com> <2262420.IPqQCg1nHW@thomas> <2122832.NgBsaNRSFp@thomas> In-Reply-To: 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.401.20 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: 17f09707-70a3-4115-c59a-08d9f84aaeca x-ms-traffictypediagnostic: DM6PR11MB3963:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dqXBeA6LZM7LoAO1tZlUZ7qlMpyKauTrWOH6pSmgy8GgF24KtR/JMIXZCjcsLTplfPIopgspVcqjkK46TEkK24BbAK2x83/gfE0Et4zJkleiSJzxNuRtPWI5EgL/GI95OLmNr24ja77kSo2C6T3HHIpDhjpd+JR48YG23WYlGHBe4qPabHlFps5TtzKLKVU4IdrK8MNXQQLeCAeB69dE9MPyFmsiUWCD532v74Sc04vupzFzOnpKYwUMmFSfFkpuG+RLAwdVQNJ6yb7T3zZMyQn+RixKqFIppvLlKX+M0Kumn1BiO1Gp8EULRTAECVtHdT+TyT29kjAtoKukJ/1CAq35ZfteKBfr9DxRT8ahhzGiYrmYjv7RnSPmC2grtBl3SxTdqtbf4vFDzUSL3Mugyhg0Hdh/ktvHdwsgv9LGebyA29oFcHi+1GBJKkN9eX4u2602YMKuLjerG5Rt799KzxGblC7Vn2lPg4D5EcQBuAQuRICAdhFacn+t6G1InDPjnmPZyaU8eSN9u9iuR+f1bmNoxRrkwal8XDQuwO3kobOyf0h2gYiFINZijHrRIRY/2q+Q9pw4+h/j32UELf0Pr6AOMGCii2LiFdi71uvMhsEpYlHmuvriaT9+hsdxa/+JcZ/FW//nIWu33+vq4KtNv380AP1QWK3xpKJGUo5IN7Kip3OEgqnFqnnHgxCj6/CPgk3JwtfiCDBOOUNgDK5ZQ69ch+w9FXA7yyuLNXbF83Q= 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)(55016003)(186003)(26005)(83380400001)(7416002)(122000001)(2906002)(33656002)(4326008)(54906003)(64756008)(508600001)(38070700005)(66476007)(66446008)(8936002)(66556008)(8676002)(66946007)(76116006)(86362001)(110136005)(82960400001)(316002)(52536014)(71200400001)(38100700002)(5660300002)(9686003)(7696005)(6506007)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sOxW41paxe62hvTCqre9YKZ2YYnQNu3Zctm3qLhUj/TO8YkNz8NSnxWDWATa?= =?us-ascii?Q?/9qbWlSu8yOg/aO3nujCiEILIgmepSIp1QQPISSisU/UfmTKIabUs9rCqHYw?= =?us-ascii?Q?vhDbIR2XeJMm3PymDsVJST5YRD9OKYo1TZS9ArbdNvawGo8u8w1oTQuM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zrfk97V8WT8NmtzQ7aHWO/U4L1v8lx+6k0PUuCJ6?= =?us-ascii?Q?xWXVck8A55n+3IEyhaGaGfARSOldsZwfyOarvCXog2udFgIffLgu7Qt1BF46?= =?us-ascii?Q?r/eu1odFR8bK2eg5xqWzciKmGmNoRFV44+bO7Ub7wSSymL2QP6j6YEGQXYZ6?= =?us-ascii?Q?1L9Roci0Sa8dkiDlm2DXAFd7MbvUs2FcTqd04kLAwye3e7anrTGbHbgcZheZ?= =?us-ascii?Q?1ZQAh9pmEW4+NXDSxCgMHmXPxsqP4SQDNDC19LsitNZX8pjgQCZJvOzXUHZF?= =?us-ascii?Q?LRXXLkksuRBkBFfFO5pITFRytOJB+UTwA3WKKBT5VgnV/++Eo/b4OhT/hlnJ?= =?us-ascii?Q?/Zhhkj8t8cUicfB1jYIB2daUAVF5VHojYVlie6UzNfNWx9d9ynk+lVxXDOo/?= =?us-ascii?Q?8lKrt5Qnw6ahHT4fDjAZRkwBPgbRTOpTS3e9ryrsfltsgFfo/hfHVz4KB40F?= =?us-ascii?Q?0UbeyDbAtMIbBHC0/R3jiALO9iCr2deU9t+Jm9C5tK7wqhon799F9d91W+lW?= =?us-ascii?Q?htPOGhVe87nf8EqlDwCfEvjFzVL2fZeafFXrlHlAbbHacpy8/hekW0Y93SbH?= =?us-ascii?Q?usKfESqhT2UJylei+4MoVgeE6TNtJ92UKlaCnUnQr448IYgPXtkvsF/4Hyl6?= =?us-ascii?Q?k383Lw=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: 17f09707-70a3-4115-c59a-08d9f84aaeca X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2022 10:36:29.2491 (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: fa2/VnXHnxdTECrW5Z1Q5202GRpEcGH05LM0ZfOGV+p3HlloHCkiuCASnq5kUjnyDVV7XGQcVKRFxO49c8n4x5jl5h6Q2R2k2PnhGuL/+g0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3963 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 > On Thu, Feb 24, 2022 at 02:46:24PM +0100, Thomas Monjalon wrote: > > 24/02/2022 12:06, Ananyev, Konstantin: > > > > > > > > > > > >> 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 ot= her applications. > > > > > > > > > > > > > > > > > > > > > > > > I never heard users ask about such thing, > > > > > > > > > > > > but if there is a demand for that, then I suppose i= t could be considered. > > > > > > > > > > > > CC-ing LPM/FIB maintainers to comment. > > > > > > > > > > > > Though I believe it should be a subject of separate= patch and discussion > > > > > > > > > > > > (I think many questions will arise - what format sh= ould be, how to support > > > > > > > > > > > > different types of user-data, to make it generic en= ough, etc.). > > > > > > > > > > > > > > > > > > > > > > Agree, it is very application specific, so it could b= e really difficult > > > > > > > > > > > to make it generic. > > > > > > > > > > > > > > > > > > > > But several other also have LPM tables, so why not have= common code for other applications. > > > > > > > > > > > > > > > > > > > > examples/l3fwd-power/main.c > > > > > > > > > > examples/ipsec-secgw/rt.c > > > > > > > > > > examples/ip_fragmentation/main.c > > > > > > > > > > examples/l3fwd/l3fwd_lpm.c > > > > > > > > > > examples/ip_reassembly/main.c > > > > > > > > > > > > > > > > > > Ah yes, that's good point. > > > > > > > > > All these examples (except ipsec-secgw) started as l3fwd = clones, > > > > > > > > > so all of them have hard-coded LPM (and EM) tables too. > > > > > > > > > Yes it would be good thing to address that problem too, > > > > > > > > > and have some common code (and common routes file format)= for all of them. > > > > > > > > > I don't know is that a good idea to introduce parse file = function in LPM/FIB library > > > > > > > > > itself, might be better to have something like examples/= common/lpm_parse*. > > > > > > > > > Anyway, this is an extra effort, and I think no-one has t= ime for it in 22.03 timeframe. > > > > > > > > > My suggestion would be for 22.03 go ahead with current l3= fwd patches, > > > > > > > > > then later we can consider to make it common and update o= ther examples. > > > > > > > > > > > > > > > > I don't think this patch is urgent. > > > > > > > > I suggest taking time to have common code for all examples > > > > > > > > and target a merge in DPDK 22.07. > > > > > > > > > > > > > > Well, yes, from one perspective it not really a critical one, > > > > > > > we do live with hard-coded routes inside l3fwd for nearly 10 = year by now. > > > > > > > Though l3fwd is one of mostly used examples inside DPDK and > > > > > > > it is quite a pain to patch/rebuild it each time someone need= s to run > > > > > > > l3fwd with a different routing table. > > > > > > > Merging this patch will allow people to use l3fwd for more re= alistic test > > > > > > > scenarios in a painless manner. > > > > > > > So I believe this patch is really helpful and should be benef= icial for the whole community. > > > > > > > Looking from that perspective, I don't see why it has to be "= all or nothing" attitude here. > > > > > > > Why we can't move one step at a time instead? > > > > > > > That would allow to split and effort in terms of development/= testing/upstreaming/etc. > > > > > > > > > > > > When a feature is merged, there is less incentives to rework. > > > > > > That's why, when a feature is not urgent, > > > > > > it is better to wait for the complete work. > > > > > > > > > > That's true till some extent, though from other side > > > > > even without further rework that patch improves situation > > > > > from what we have right now. > > > > > So I don't see any harm here. > > > > > > > > It is adding a lot of code to an example which is already too big. > > > > There are a lot of complain about the size of l3fwd. > > > > That's why I think it makes sense to require this extra code > > > > (not demonstrating anything, but just for testing convenience) > > > > outside of the example. > > > > > > Ok, so your main concern is l3fwd code size increase, right? > > > Then would it help if for we'll move file parsing code into a separat= e file(s) > > > (under examples/l3fwd) for now? > > > Something like examples/l3fwd/(lpm_em)_route_parse.c. > > > > Yes it would help to isolate the config file parsing code. > > What others think? > > > I still would like config code for loading an LPM table or FIB table to b= e > put inside the relevant libraries themselves, rather than having it in th= e > examples themselves (even if shared between them). Honestly, I don't see any good reasons for that: I presume users of these libraries already have their own routing config files with their own format requirements and I suppose these formats differ a lot (depending on use-case). For DPDK internal purposes (provide sample apps with ability to load routes= dynamically) some common code inside examples/ seems more than enough.=20 Konstantin