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 0F646A034C; Fri, 25 Feb 2022 13:21:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCF954115C; Fri, 25 Feb 2022 13:21:27 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B2E1A4068B for ; Fri, 25 Feb 2022 13:21: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=1645791686; x=1677327686; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j/oV+1O9MWGymI/cxtt+Lc+k/H3LXcLv8z+5WLDb3cc=; b=cDMwSOmw/Fq3UExcoSBfVKYSLFggIuRMjRIePua/e319B9Lt7LygtECy 4QMAlcB8ox3xeZ7HvOOqKQItiBNBxaIQ4fONlxv7Cz74U9yYKtU6w2h45 frYzD7l+2e8GL0vNF4IAXCT1qpMd0G+zBvm21DDApn/pSzbt7cFyHjF2/ 7rjUHdLsu1f5qOxrerNVzr9j7rjcUU6/joq4jAI7BXQFKG0Ng0uuOnf18 4Xu6TL1GzUt2+nj0DmmuMyBpSk2TpzGdL0s2GIUC0bA8mLbfL3qURWVJT aghsphL62h4tkLwFa81wd0aymvqMuuauWt3LbQMTxqzOXrCoyrRddi1YY w==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="252214852" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="252214852" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 04:21:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="777399684" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga006.fm.intel.com with ESMTP; 25 Feb 2022 04:21:07 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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 04:21:07 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX610.amr.corp.intel.com (10.22.229.23) 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 04:21:06 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) 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 04:21:06 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) 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; Fri, 25 Feb 2022 04:21:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KewqtaSB6mo9SHdtiFGm0Xpy+8syFuFPM8PgE6uG1tB2dyJLCDO//14Hl0Hj0lCdfv++Tu1GYzDBRPYfL4h8GMhG7QgxYQ0sbXoXO01jY+tzL516Vrwy52CcLIK/F8LhiQ3vtugKlGsbNJ3p9i9Lqd0IMTEHU33eL/B/qfFaucfyZmpPdU0+HfX3CdEIS0lzUUhSml10SYJi0Km1P690aTVKkC+4tCpZnBKuMlMYpBnqfbcQFb7wUPImh26vSmvwX479kBXAoW22nJBEr4VMCaCd9CNtvJRsCs2Nu+lmPy5IV5YdUY7RQCiiLDjDTw/eA11BUjYfR/fJvr7kLBQIYw== 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=mOik8YT5ZrzTT+p5Hhqnw3bM/GuJ1uwB720FyIYioH8=; b=hnjOiimbxEW0VNJzuT26fkYoVmcj3Db8tBy+HpRN7FYQg4/Rr4s4NL9uQ+5N9QTUmB+Rp1fPH3sublZzLItTDtZjEbmVPKmO4B86+7vm25Ww+WFPdL3NRpbJS6MYeA2acwMrOrVp74FeHX+uBt9914FABXFKKZ5xStw+u+FUK2sfUcuI2zdkaWnCE6wJ6C4GFMkRrtB4CuqF8IkdStN0nkGQTGAzkQTNFE4tQhCQL+SNzj+wEcKQ70JFwO6fr95ZrWukzOhrq6mpQAq11AF/gBZ4nJKBL+Rv2dXSUMMAMPCkFAR3txqRVceymtaaA9ku0CFwJ14wspnsDR6jHLybMg== 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 BN6PR1101MB2179.namprd11.prod.outlook.com (2603:10b6:405:52::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.26; Fri, 25 Feb 2022 12:21:03 +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 12:21:03 +0000 From: "Ananyev, Konstantin" To: "Richardson, Bruce" CC: Thomas Monjalon , 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/ACAAANlgIABU7xggAAHNICAABpSEA== Date: Fri, 25 Feb 2022 12:21:03 +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: 141a4fec-1d93-4e2e-b040-08d9f8594a97 x-ms-traffictypediagnostic: BN6PR1101MB2179: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: 8YvQGvNx7/gUl0eT9Z0iNLGZrCao925sV4MiZERutzComIevVkqADiil4jXf7fKr/Tapt4ph4wAt0N2kacGHPLplh9fDHYw4EzQE3lxizWTADh6yhtG2TzDcry4CYgEHyP/IMUUVTysHAXKCwNVi9eU97pwFmpUcQ/XIq+vc6B8KQAFGiREeVBGbu55Zm13TLtiMpjsGMomrK4xRkFcbNKzMV8pV7+gFCbTP5/rvyUNXrIbvMSBfxjfyvimYWW/xH1pp2+7BM9KndyXAuV1+RA4f/OURMMC2u3QDQ4vFgRr8oW/IJnEq77bYydFZWW4C9Zj682IfbVs4TNQpCxXEuRi1o4Nv0ut2g9iMs5wKiuwjQUXwEzxNgKBSkJWJHrzJjxYw2YCDUWTIz4ULeKAHtZpxQKKw3W3v5ovutLP+XElhuyH+IEUOMdCqS+pU7zCHaSEBEl5sEJ+4a4+POJcN53KguDJgp8xhdsjPVFNj2mjk75tqxY8cyEgVMZ/zIEddXB3JpPzUeslBV6Wpadr+neYZ+QxEJ681XogMxjexYTZZP8LOO5FTHzZHDQfYOeMYMyKaKhZInKRsNwvKPL7YepnfvnAF1nuYREMJ6yIge5Zk2F1AcJk6N9qxpzHJnB08GR3z2f1/2nkd0uWLInjW91G6lVxAncS2kK2Xvh/K2togbwvfg6HKur9ASCPjmY57O3QioIXA+LfWSXXbHkBX28yS+FaOBcta9WwG24dwuuk= 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)(122000001)(316002)(26005)(76116006)(186003)(82960400001)(38100700002)(54906003)(6636002)(9686003)(8936002)(5660300002)(38070700005)(86362001)(52536014)(83380400001)(6506007)(7696005)(2906002)(55016003)(66946007)(66476007)(8676002)(64756008)(71200400001)(66446008)(4326008)(6862004)(7416002)(66556008)(33656002)(508600001)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U7WU6sQRLEruWBvUp44XlDF97Ny6BhlYejCk5aU/CLZzqPCKM0B9Kb2KNNFG?= =?us-ascii?Q?MG48HrhmaHAC6id7CTOgWs1QwgEEi9YMdeuMQGTq2Laqk75E/MBla6Jalpq9?= =?us-ascii?Q?v3gq1s/L1svyzG4D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AUWzE?= =?us-ascii?Q?d9+5p3f2Xqhr8hD6TLi5PJP67Ap0Aa2AKvkMox/SFbRsMM3mkSCjbdyrO55k?= =?us-ascii?Q?Fa0yfospPyT8qjrJws8W2581GT3BTVEfsUoCyESMPN23EDemTOxS+pqpUBhV?= =?us-ascii?Q?3NYIDbURwLuBBHo3QgrSGbpxkwpus+TG8oGRzsb+nMBsPKrcBCP0wDwZp1ju?= =?us-ascii?Q?R6O6uW2fZeo9IjCKcmo4IL7mU3YPILQqOEd0eHrX7odAwrgXV8c8unP0jn5z?= =?us-ascii?Q?yt27icXtCdbsB6tVW7octkxIV6va5AAEkAoGK3kx5NjpVUxC84BWhhf4i+C6?= =?us-ascii?Q?69D8yfuT4lEGKpu9CHNFN7UiQllrSggP7RTaHNECTbkrO4zN9/HB80IOI0Xv?= =?us-ascii?Q?WU43tWQ7JCialMGB9epsTvrvyLxQ8T77yC99afpC4Xd9fdO6+klnVlQ0NP27?= =?us-ascii?Q?Wgyd4SWTOgXWcDwXigfkJkw2ZaW/4+SBjDnU0fygq7ORpobC6IdX+mgP77O5?= =?us-ascii?Q?pyoxfUX97e6Hu3/OgWDvE+x8iAe47hyAXkaimMCaRqNmLCaaWGNTjKkvNdjQ?= =?us-ascii?Q?JhtCVrKWExemLVs/WSdDjOCI74VS5vOqTGsLBh8210KfrfZl0WdFgtEafu9u?= =?us-ascii?Q?p5smNQZwLpA6XJwPAuwi/jgkSk21npCq1uP0wvay07O0xNBqe1z+lhLs0RX8?= =?us-ascii?Q?biFmtA=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: 141a4fec-1d93-4e2e-b040-08d9f8594a97 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2022 12:21:03.6399 (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: 1qP20oCBw6oOYTerS1YtO0vybIMJPbKaQJisiA6WbMOoYWSB+pPtl6uzFVpm1g9gyaZIKcxCjxiEMp7qlSADSVAe5i4fxtO2IHnkddULMPg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2179 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 > > > > > > > > > > > > > >> Or have a generic library for reading LPM entr= ies. 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 buil= d other applications. > > > > > > > > > > > > > > > > > > > > > > > > > > > > I never heard users ask about such thing, > > > > > > > > > > > > > > but if there is a demand for that, then I suppo= se it could be considered. > > > > > > > > > > > > > > CC-ing LPM/FIB maintainers to comment. > > > > > > > > > > > > > > Though I believe it should be a subject of sepa= rate patch and discussion > > > > > > > > > > > > > > (I think many questions will arise - what forma= t should be, how to support > > > > > > > > > > > > > > different types of user-data, to make it generi= c enough, etc.). > > > > > > > > > > > > > > > > > > > > > > > > > > Agree, it is very application specific, so it cou= ld be 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 l3= fwd clones, > > > > > > > > > > > so all of them have hard-coded LPM (and EM) tables to= o. > > > > > > > > > > > Yes it would be good thing to address that problem to= o, > > > > > > > > > > > and have some common code (and common routes file for= mat) for all of them. > > > > > > > > > > > I don't know is that a good idea to introduce parse f= ile function in LPM/FIB library > > > > > > > > > > > itself, might be better to have something like examp= les/common/lpm_parse*. > > > > > > > > > > > Anyway, this is an extra effort, and I think no-one h= as time for it in 22.03 timeframe. > > > > > > > > > > > My suggestion would be for 22.03 go ahead with curren= t l3fwd patches, > > > > > > > > > > > then later we can consider to make it common and upda= te other examples. > > > > > > > > > > > > > > > > > > > > I don't think this patch is urgent. > > > > > > > > > > I suggest taking time to have common code for all examp= les > > > > > > > > > > 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 a= nd > > > > > > > > > it is quite a pain to patch/rebuild it each time someone = needs to run > > > > > > > > > l3fwd with a different routing table. > > > > > > > > > Merging this patch will allow people to use l3fwd for mor= e realistic test > > > > > > > > > scenarios in a painless manner. > > > > > > > > > So I believe this patch is really helpful and should be b= eneficial 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 developm= ent/testing/upstreaming/etc. > > > > > > > > > > > > > > > > When a feature is merged, there is less incentives to rewor= k. > > > > > > > > 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 b= ig. > > > > > > 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 sep= arate 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 be > > > put inside the relevant libraries themselves, rather than having it i= n the > > > 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). >=20 > Yes, I agree that all existing users of the libraries will have this in > place. However, for new users, this may be useful for bootstrapping thing= s, > and it also makes it generally useable for both example apps, and any app= s > in the "app" folder, i.e. if l3fwd gets moved there. (Something I agree > with, as it's now more than just example code). Inside dpdk for l3fwd like examples, all we need as data associated with route is just a port number. I really doubt that for real-world app that would be all they need - I expect users would like to associate much more data with each route. So I don't see how such library function will be useful even for new apps. >From other side, if we will put sample code in examples/l3fwd/*, users can copy it from there and use it as a starting point for their specific route config parser. =20