From patchwork Wed Jan 26 12:44:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Morrissey X-Patchwork-Id: 106584 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88C98A04A8; Wed, 26 Jan 2022 13:45:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E28C342728; Wed, 26 Jan 2022 13:45:07 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BF5F242716 for ; Wed, 26 Jan 2022 13:45:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643201106; x=1674737106; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WBVohLsoNwWWdwgjuuGcZLgjadjAqfqrULy+09pUFmk=; b=E253ADlYuPC0KJNkjSMSyYXz5bu5K65eJDbw3aRvlMoSnETBbcGwZtri 9DYu+w2x2yszBSenBvn8INeaCwSMLfrVnBZzNnfFWaujFWo3a06nwexre 3f8tbN0DPgr+NbuwEUilNydZXV4FjsBwvN4gq32gI3GMO/qqs6Z9Remvj LFVyl6JIHzOB+FNk8Hu4kbQpEPGGNe3pgchtuW00VM+cyX59NAOY9fLHm huyO134chOUrwLMD7moEpcST5ng3uhPSf9Quu9cveuEcTc/aHjJGU1JCt IMkpn/v5IIz8XqLl8z3EwSgCxZX9WaORBwQ7jKD0GVuzhaQQ8vGTkHlqP Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="270991890" X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="270991890" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 04:45:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="597452980" Received: from silpixa00401215.ir.intel.com ([10.55.128.96]) by fmsmga004.fm.intel.com with ESMTP; 26 Jan 2022 04:45:03 -0800 From: Sean Morrissey To: Cc: dev@dpdk.org, Sean Morrissey Subject: [PATCH v4 0/2] Add config file support for l3fwd Date: Wed, 26 Jan 2022 12:44:56 +0000 Message-Id: <20220126124459.2469838-1-sean.morrissey@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211221123037.1037203-1-sean.morrissey@intel.com> References: <20211221123037.1037203-1-sean.morrissey@intel.com> MIME-Version: 1.0 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. 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 | 479 ++++++++++++++---------- examples/l3fwd/l3fwd_fib.c | 52 +-- examples/l3fwd/l3fwd_lpm.c | 278 +++++++++++++- examples/l3fwd/l3fwd_route.h | 49 ++- examples/l3fwd/lpm_default_v4.cfg | 17 + examples/l3fwd/lpm_default_v6.cfg | 17 + examples/l3fwd/main.c | 106 +++--- 11 files changed, 857 insertions(+), 305 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