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 4D6B9439F1; Tue, 13 Feb 2024 13:19:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28B7C4029C; Tue, 13 Feb 2024 13:19:25 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id D941F4027B for ; Tue, 13 Feb 2024 13:19:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707826764; x=1739362764; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=QG0eZ0wvfu+xYiEW8Y+KiE6MW62OykPG2Apz1plKQ1Y=; b=H42Yp55WTPOMwRVccaeZKhYeDKKlG59R2VCDWaRAXn65ggR4u52Ikxbf kzF4hrUocvkKoVL7Pr6DC5N1XQ1MzBkfSsDKki9gaDMUMSsJQR0Hyfirh de68ddN41kBnc4zb9zjZHG1sAv+pNHyi81FItc8uLBlUEYXKrD7zSo8Jk HNyeih/Akv3XJMkCRJxK4w4UHxla19XLN/f7pfqudcmxVfj96vVm6NCDS fFBQx6VD1ad7lgeHsHuir/4fzWg7t4OX51I3WT+EKE9Xkw9/uBxJzVo3+ vL9t/gQaQnwOfN6TwPaR6gmiocTzZLxc4SBqG63CpSwRUNDLCZ9ePQ2Iq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="1709356" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="1709356" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 04:19:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="826092555" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="826092555" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.184]) by orsmga001.jf.intel.com with ESMTP; 13 Feb 2024 04:19:22 -0800 From: Cristian Dumitrescu To: dev@dpdk.org Subject: [PATCH V2] examples/pipeline: simplify the L2 forwarding example Date: Tue, 13 Feb 2024 12:19:21 +0000 Message-Id: <20240213121921.1522224-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240213121337.1521711-1-cristian.dumitrescu@intel.com> References: <20240213121337.1521711-1-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Simplified the L2 forwarding examples by removing all tables and actions, as they are not really needed for this simplest use-case. Signed-off-by: Cristian Dumitrescu --- examples/pipeline/examples/l2fwd.spec | 34 +++++++-------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/examples/pipeline/examples/l2fwd.spec b/examples/pipeline/examples/l2fwd.spec index 0aebafd07b..1e3e1ad040 100644 --- a/examples/pipeline/examples/l2fwd.spec +++ b/examples/pipeline/examples/l2fwd.spec @@ -1,42 +1,24 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation +; The simplest pipeline processing with just packet reception and transmission. No header parsing, +; table lookup or action execution involved. Packets received on port 0 are sent out on port 1, +; those received on port 1 are sent out on port 0, etc. + // // Meta-data. // struct metadata_t { - bit<32> port_in - bit<32> port_out + bit<32> port } metadata instanceof metadata_t -// -// Actions. -// -action NoAction args none { - return -} - -// -// Tables. -// -table stub { - key { - } - - actions { - NoAction - } - - default_action NoAction args none const -} - // // Pipeline. // apply { - rx m.port_in - table stub - tx m.port_in + rx m.port + xor m.port 1 + tx m.port } -- 2.34.1