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 36F80A0352; Tue, 8 Feb 2022 17:21:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A14E4111B; Tue, 8 Feb 2022 17:21:46 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 41C95410FD for ; Tue, 8 Feb 2022 17:21:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644337304; x=1675873304; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=txUjaRyoRrlRStaoCQnS/996HbyQKFHU4wXONzAC+Jc=; b=cUjavsqHMOkr8gE6H6V9hDLMDDO4UGAIc8CcvHGm6bfitovIl1/1f0ft QqzDZgsofoU3yFsLMuWj1eBu6D9h2/uAHYvzmprvf35yiiYgAWiEG67q6 0kxuX5DxcnRsHwzRc3pPR409jN183aUNEUSytw3bE1tY28nBWZSU11Gu6 GGr8NKIZWUhjI4dCQeKaQ2QrfSMrZyH+Eq1MOn4rtQ4ZnQpHyJVAJTjX2 YtIgtdzPdKpRNrC1tJX56xnghtKt9wIm0KY+hY/RlCvJIRR9e4jfkbFur hyJpdh3epxns+xavGqyP/pwHN4f6+KgLXu6PJZJ+os5GzfNpMkvXjsj83 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="309727357" X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="309727357" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 08:15:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="525600857" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 08 Feb 2022 08:15: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; Tue, 8 Feb 2022 08:15:24 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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; Tue, 8 Feb 2022 08:15:24 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) 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 08:15:24 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (134.134.137.100) 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 08:15:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xn+jAfLeJWjok/aCDjt4mVFW8sCplhrDBMSNUPd4GEwtKeOLxcaGvwHB8z/CdsK+m8LK9zrcFkzfbNzcTSM50sieSCj4nXssWMoMYYOMNPTUgrZ43u4W+hN11HFSO90YP85xsSM2ouzSuLLACgFKn1DI+GOADvBMkQjDLQyYZkc/Nk0TwSmqWG7ZUhPbO+0Nzh5208S0EZBq1LQKbDXciJ+Olp/O8bi4he9KfJyOKKyfq4k/hmIpb+KskSKT6rzpNG7jV8CfJSY7lR1b6Xdq/1HwKMQG53cjKgFHwWLIwQLQOYyIB7OYD7a1L0YWYNQ34l1ENsXndFxEYkcrKd1UPg== 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=0tkhDjO8yUINSmdl/mGQ9ealrKO6mCv9CHd6yDJk1q4=; b=nZPJaU30yaaGuiiQtCClcEh3+h8CZOZCdUFoq0UexVvAG4KAerK9JcgDmTVHrAnl8Trtn+6Qw9/ook3HhmuTQ8uGwaKp0dnX1y+W2w8YDcChape+Mc2Piks3P4AVrZrT5tkUJ2xSh3g5h6aSFzFthB0sinVbc/dE5L+h/qaceTwtHNf9XzqvjhmcqeIUUJCOyIcNIU6GxF5WTg0o0N0EwY2VskESFjl38wt+sXXoztkdUQsl54LusnktlNfnyFRjyMaE/XB8UUTVfQrpURLkgwLph5AX19JisKyaR9i1D0kZaKypLFtU6kOo/tSUZAuNkkIOX/9Y+n/kjMkvZDqH2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CH2PR11MB4213.namprd11.prod.outlook.com (2603:10b6:610:44::16) by MN2PR11MB3837.namprd11.prod.outlook.com (2603:10b6:208:f6::14) 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 16:15:20 +0000 Received: from CH2PR11MB4213.namprd11.prod.outlook.com ([fe80::6470:bf8f:fa3:7a37]) by CH2PR11MB4213.namprd11.prod.outlook.com ([fe80::6470:bf8f:fa3:7a37%5]) with mapi id 15.20.4951.019; Tue, 8 Feb 2022 16:15:20 +0000 Message-ID: <5a01520b-b85a-02c7-67eb-5a7119e46ada@intel.com> Date: Tue, 8 Feb 2022 16:15:15 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: [PATCH v5 0/2] Add config file support for l3fwd Content-Language: en-US To: "Ananyev, Konstantin" , Stephen Hemminger CC: "Morrissey, Sean" , "dev@dpdk.org" , "Richardson, Bruce" References: <20220126124459.2469838-1-sean.morrissey@intel.com> <20220204195905.449192-1-sean.morrissey@intel.com> <20220204142636.6250f05c@hermes.local> <20220207190419.2a1ca44b@hermes.local> From: "Medvedkin, Vladimir" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0400.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:189::9) To CH2PR11MB4213.namprd11.prod.outlook.com (2603:10b6:610:44::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d936b87d-065a-4442-d949-08d9eb1e33e5 X-MS-TrafficTypeDiagnostic: MN2PR11MB3837: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: eC4jeNyYxGZSSEfxdp3PM3bNQvM683+iLDCvsnO42tFrqWR0oHQi6vDw8Dr7Bfw7vZqJc8DhnfrIpkM+wPjqmOf7+w31+WpHVMhD41WrkFwO1g066adgjLAT+wsoqpE+2c0+KFWGf/6ylZsDk1rp9ulme53VDgj7aKoacjNob92W3QFoD8zMfe/fucKysYn6UOX1iZwChFsHjDsm6dSoxhphDPUVI+gDzCnPYgcVIkJU6dnGp4Po0OQZpJOQaY57R81zz2wD7WPyfnVVKOiyvws/9zb9oTv1KqoSnAiKWKmsmSYis4joBJE6DOYmal9BGt3GUrMCzl9fQYH96mb9jYRqliDZhLKo5IercPlZhKe5X84n38RhSH0RQzkMEKdv1tTJAScAHOE/chejMy2fiKyPMbG7j7wzkKeE52UHadSKtW680D0cnVRwfsYFbzW3J8WmOEmnt0bOH4kqDNzIpS0ignfMLuAoLty8u/z2qcSrtlXlP/WukoCgHJpEtEGbgcpSpZ5ZVe+boiv8XksoNrxtaQCYQcWimavRG4JgJzH5mhDzNac0nQcH7Y+cZOEAxfM1Qe2AGeDARFGTLssxe4RSsK4wu3oVyzVhfjz5B+BXvQv2mY9U2ZA4EjH83J9i0w5nvgFZssFyDk15Ec/BWXnOanM66PxXgL//NAWNI86GNud0ZbWuP44mO+2wTzX4eocSEf10trlljF2/ODfhdH4lrRkXd6dJPKQ0Y9rLszUAKufz60lBdJ5AJzl6CRlNK0tB6g5xHPh0ZfB2vNbxWg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR11MB4213.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(31696002)(6486002)(508600001)(107886003)(2616005)(26005)(186003)(316002)(2906002)(36756003)(6506007)(6666004)(6512007)(53546011)(66476007)(31686004)(4326008)(82960400001)(66946007)(86362001)(54906003)(110136005)(5660300002)(8676002)(8936002)(38100700002)(66556008)(32563001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NnEvTWkyME4xRTZEWWhiMUovYXNqM2dsMGZsU0FuSFJKeGZJaG83UXFNY2hh?= =?utf-8?B?azZ3U3E3U1dQVDN6QWZDa01ydjA3OU5yTlBmM2FhTXhsRWxaSVJwZGpOQmp0?= =?utf-8?B?VzlLUU9GQmJBVHZIZ1VQMW1PNUdHRzErVXdvS1VyS0Z3N1VpcUJoYy9NV2VS?= =?ut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UxaaElhNHhWNTltR1JZcitC?= =?utf-8?B?YVpwcnJnVjJYYWpDMHZudzlxek4rNmVJYnJkeFR3dklRUkRYYmxlNTdyWmI2?= =?utf-8?B?VUJqZ3I1RjA4MFVzbmdDdHM0QjRHZXR4d244TXpFTzNPdlZ1MjhobFlFUDJM?= =?utf-8?B?VUFHWDMxVmRlMVJzdVJQc2t6blRzbk9KR2M5bGtUUlgxbFFvNVFIbHN0RDJl?= =?utf-8?B?bTZiT2h3Tjh5TEh4eHY4YVdvOTVLNmJDZ3pETE5KLzVnSmcrSnpJYkorb0lt?= =?utf-8?Q?KfMoVqSdjHwec5xHC75+GVEvkWns3P71awOOjoyblo=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d936b87d-065a-4442-d949-08d9eb1e33e5 X-MS-Exchange-CrossTenant-AuthSource: CH2PR11MB4213.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2022 16:15:20.4695 (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: Xn9D0cwVMugAQ4+EznrzEmoomebYK4Vka87UxXw0H2juSoqbLDPVBn+CEfTJG3iV6xSdt92LPHRDlzX0HzWl2JmNb1lsAkzEa28BRcjdySs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3837 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 Hi all, On 08/02/2022 10:44, Ananyev, Konstantin wrote: > >>>>> 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 parameters >>> (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 >> >> 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 simple > Agree with Konstantin >> so that it could be an example and also have some generic code for handling >> prefix entries. > > Didn't get your sentence above about 'generic code for handling prefix entries'. > Could you possibly elaborate. > If it is about parsing prefix string, then it is probably possible to use cmdline_parse_ipaddr()? >> 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 > (I think many questions will arise - what format should be, how to support > different types of user-data, to make it generic enough, etc.). Agree, it is very application specific, so it could be really difficult to make it generic. > Konstantin > -- Regards, Vladimir