Message ID | 20241010133111.2764712-1-nsaxena@marvell.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 2951F45B04; Thu, 10 Oct 2024 15:31:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1A8C402A3; Thu, 10 Oct 2024 15:31:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B0BD340298 for <dev@dpdk.org>; Thu, 10 Oct 2024 15:31:26 +0200 (CEST) Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49A9SDsq009614; Thu, 10 Oct 2024 06:31:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=2 DlCFVugNsxMrKsHkBczQL04yTNJdhCav1M9Gzl7/Jg=; b=UA/diGi+ocsWKg1LT pBnCy0P1EdEXIx0a4J0JniyGSAjbAZfur46UssZhtDrj8m4LjcXDOZ/YSBvlrkwI Ld1Fyqmxh1qN7c9t/dIABWZrtx8R6xdj4aBkQDE2xRX+NMPRnL0VJxT8WeqZEVll Vs6iLQ98ibwZJQtw0DzXlVL5me1Gpr/82a4IoQHXyUvWvNCcUzmFbd3r7xnRlHv/ +wqYgFB/WqbcijVDAHoWGadc//pyhaa2FZtACtV2p1466yuEeDr0TeWsVpHki+GS Bd+wEE1OMXVFy7uk8f0tbFEt9K83ZaNywpcCX8w/uek7zRGt2lKb/ooBP7SpXZGN yl1Aw== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 426a5n0paf-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 06:31:19 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 10 Oct 2024 06:31:14 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 10 Oct 2024 06:31:14 -0700 Received: from cavium-PowerEdge-R640.. (unknown [10.28.36.207]) by maili.marvell.com (Postfix) with ESMTP id 36EB75C68E6; Thu, 10 Oct 2024 06:31:11 -0700 (PDT) From: Nitin Saxena <nsaxena@marvell.com> To: Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, Zhirun Yan <yanzhirun_163@163.com>, Robin Jarry <rjarry@redhat.com>, Christophe Fontaine <cfontain@redhat.com> CC: <dev@dpdk.org>, Nitin Saxena <nsaxena16@gmail.com> Subject: [PATCH v4 0/5] add feature arc in rte_graph Date: Thu, 10 Oct 2024 19:01:01 +0530 Message-ID: <20241010133111.2764712-1-nsaxena@marvell.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241009133009.1152321-1-nsaxena@marvell.com> References: <20241009133009.1152321-1-nsaxena@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: oi4GxTAEgQHlhggpR6T5hUvDBPpAg59i X-Proofpoint-ORIG-GUID: oi4GxTAEgQHlhggpR6T5hUvDBPpAg59i X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series | add feature arc in rte_graph | |
Message
Nitin Saxena
Oct. 10, 2024, 1:31 p.m. UTC
Feature arc represents an ordered list of features/protocols at a given networking layer. It is a high level abstraction to connect various rte_graph nodes, as feature nodes, and allow packets steering across these nodes in a generic manner. Features (or feature nodes) are nodes which handles partial or complete handling of a protocol in fast path. Like ipv4-rewrite node, which adds rewrite data to an outgoing IPv4 packet. However in above example, outgoing interface(say "eth0") may have outbound IPsec policy enabled, hence packets must be steered from ipv4-rewrite node to ipsec-outbound-policy node for outbound IPsec policy lookup. On the other hand, packets routed to another interface (eth1) will not be sent to ipsec-outbound-policy node as IPsec feature is disabled on eth1. Feature-arc allows rte_graph applications to manage such constraints easily Feature arc abstraction allows rte_graph based application to 1. Seamlessly steer packets across feature nodes based on whether feature is enabled or disabled on an interface. Features enabled on one interface may not be enabled on another interface with in a same feature arc. 2. Allow enabling/disabling of features on an interface at runtime, so that if a feature is disabled, packets associated with that interface won't be steered to corresponding feature node. 3. Provides mechanism to hook custom/user-defined nodes to a feature node and allow packet steering from feature node to custom node without changing former's fast path function 4. Allow expressing features in a particular sequential order so that packets are steered in an ordered way across nodes in fast path. For eg: if IPsec and IPv4 features are enabled on an ingress interface, packets must be sent to IPsec inbound policy node first and then to ipv4 lookup node. This patch series adds feature arc library in rte_graph and also adds "ipv4-output" feature arc handling in "ipv4-rewrite" node. Changes in v4: - Fixed clang build compilations - Captured `feat_arc_proc` function in ABI change section of release notes Changes in v3: - rte_graph_feature_arc_t typedef from uint64_t to uintptr_t to fix compilation on 32-bit machine - Updated images in .png format - Added ABI change section in release notes - Fixed DPDK CI failures Changes in v2: - Added unit tests for feature arc - Fixed issues found in testing - Added new public APIs rte_graph_feature_arc_feature_to_node(), rte_graph_feature_arc_feature_to_name(), rte_graph_feature_arc_num_features() - Added programming guide for feature arc - Added release notes for feature arc Nitin Saxena (5): graph: add feature arc support graph: add feature arc option in graph create graph: add IPv4 output feature arc test/graph_feature_arc: add functional tests docs: add programming guide for feature arc app/test/meson.build | 1 + app/test/test_graph_feature_arc.c | 1410 +++++++++++++++++++ doc/guides/prog_guide/graph_lib.rst | 288 ++++ doc/guides/prog_guide/img/feature_arc-1.png | Bin 0 -> 61532 bytes doc/guides/prog_guide/img/feature_arc-2.png | Bin 0 -> 155806 bytes doc/guides/prog_guide/img/feature_arc-3.png | Bin 0 -> 143697 bytes doc/guides/rel_notes/release_24_11.rst | 17 + lib/graph/graph.c | 1 + lib/graph/graph_feature_arc.c | 1236 ++++++++++++++++ lib/graph/graph_populate.c | 7 +- lib/graph/graph_private.h | 3 + lib/graph/meson.build | 2 + lib/graph/node.c | 2 + lib/graph/rte_graph.h | 3 + lib/graph/rte_graph_feature_arc.h | 431 ++++++ lib/graph/rte_graph_feature_arc_worker.h | 679 +++++++++ lib/graph/version.map | 20 + lib/node/ip4_rewrite.c | 476 +++++-- lib/node/ip4_rewrite_priv.h | 15 +- lib/node/node_private.h | 20 +- lib/node/rte_node_ip4_api.h | 3 + 21 files changed, 4516 insertions(+), 98 deletions(-) create mode 100644 app/test/test_graph_feature_arc.c create mode 100644 doc/guides/prog_guide/img/feature_arc-1.png create mode 100644 doc/guides/prog_guide/img/feature_arc-2.png create mode 100644 doc/guides/prog_guide/img/feature_arc-3.png create mode 100644 lib/graph/graph_feature_arc.c create mode 100644 lib/graph/rte_graph_feature_arc.h create mode 100644 lib/graph/rte_graph_feature_arc_worker.h