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 329F043913; Tue, 13 Feb 2024 13:13:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03F084029C; Tue, 13 Feb 2024 13:13:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 0FAC24027B for ; Tue, 13 Feb 2024 13:13:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707826421; x=1739362421; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=k+BpRi0SoOkmKgYXGl2Vvk5ns3/vEl7I+LamnhNvn0o=; b=l0I3oJ2DJxUVvpe4PNPGYILmqt//UoUrGgfgLgTFRmqmO/JzrjcTmOO7 586qMOUbVVieyQhWm59d6o9NHF5QO0IfzfWCE+VPmLWX8kq/bmKHooFyg BIdjcfVzT2FeFvg9bnZzmnr3ZDKBvx0J+4mA+sC3g1+O9ihpjkf768y38 ZmgRg6B/hqcocRhkQzjC2VRNJYjP7GP5BSKDqmR0lIO2C5tW/2n9+uZCx BI985In7fRPr+liZyZwyYNTdCOuXOELJOHQrQYd/rplIUQe8GoZ+tINzg yA9aC0xgyFzVGnTJbEwOJJvn7OVZfusx09mgTUem72blZvrtmIOpQwbT1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="12380092" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="12380092" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 04:13:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="40339785" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.184]) by orviesa001.jf.intel.com with ESMTP; 13 Feb 2024 04:13:38 -0800 From: Cristian Dumitrescu To: dev@dpdk.org Subject: [PATCH] examples/pipeline: simplify the L2 forwarding example Date: Tue, 13 Feb 2024 12:13:37 +0000 Message-Id: <20240213121337.1521711-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 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. --- 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