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 AB92945AF4; Wed, 9 Oct 2024 19:37:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CA33427C7; Wed, 9 Oct 2024 19:37:47 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 1946C427C6 for ; Wed, 9 Oct 2024 19:37:44 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-71df67c6881so54482b3a.3 for ; Wed, 09 Oct 2024 10:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728495464; x=1729100264; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=xdG7qMB44gBR6yYWksUgyFeIqlmT0bXmTBhVw07HJaw=; b=YbMxsM1iOmbyJ0YHvhQuqbvLOfjA9naeS2hpwE2uGO7i0rOvi40QL2ik0UHJxuOtgw ImLbDd1j9iYUNSNs1Xh3RuUMXIhN0owE6kJiNtQtmUScLEa6AxJLRvQh4pICBWC5zKx/ IEiKd3cCjp/DJyIdUTqf9aZwdyvliEiHOKK+3jiDCv4dtXv9yFcb11A5BgHxayxHOi/p /SEO4UzPN++5GSqCj7oRBvnMLMZp6fP3kdiGQ6TQy8R1Bn/zmFEdtC9VtJNnTxLWM+dg ak8a4OGIwTNOXdES5ARKQorvAIvZBgYMh7Zcxrdx+dH0kPN1mXnA05T07XQAQluL4Ym+ gMCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728495464; x=1729100264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xdG7qMB44gBR6yYWksUgyFeIqlmT0bXmTBhVw07HJaw=; b=izPKsqHuFb59uZidZjUppsGkon8bAGv2JENHpKMN5ydrEoPnx+OuH0UlT1R/Y97b7F KBuWp3DiZzewAFu75VH1RdlwII+RmM5pYgbRSNYEfrHGJbdaSGnPockbiSJ/ug9VsMo/ wUyexu3Hx4thNw7fKE7WOyajxOfJ9KuJXAHSjvSx5HQ63y7YLo5rlgyFRX0F0g1Zpnkk FqIEH8pG0PHOJP8uj0U6leTuck/82i7lEmcNqjr+9ha4ncbXpXh+P6d1KmM9MoynPVnX XaBr03HH0oMRrL98fZZRaPE9MENv0NaOgA6o42EtFVyuGHM426U1osd9RUw4+/PBi9jV hlvw== X-Forwarded-Encrypted: i=1; AJvYcCVRANcJUKhAmDwFXFJLgLISwpoM4Nmuf1Q1FUBZXiI/gNO7EbLQrDi+iBNfJmxXhNEaAqw=@dpdk.org X-Gm-Message-State: AOJu0YwXL3ySj10VnQxi2FiqQJp03syIJoqYfcnVWqa90aWooTrDjT0/ SDBISeZxY9UsGm+OagP81V2VY9BOrGT+mFn5gDtapFfcnA08Y7BQ3WtANR+g3ho= X-Google-Smtp-Source: AGHT+IEskDX8redur2yetPVPXPEk+jRSgJnSlsAWfzPvRpwUmkI6ts/PSvQXO6UUkbVsYfZFYhXsBA== X-Received: by 2002:a05:6a00:3d15:b0:71e:695:41ee with SMTP id d2e1a72fcca58-71e1db6eca5mr5664293b3a.5.1728495463996; Wed, 09 Oct 2024 10:37:43 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0d66821sm8303629b3a.175.2024.10.09.10.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 10:37:43 -0700 (PDT) Date: Wed, 9 Oct 2024 10:37:41 -0700 From: Stephen Hemminger To: Nitin Saxena Cc: Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Zhirun Yan , Robin Jarry , Christophe Fontaine , , Nitin Saxena Subject: Re: [PATCH v3 0/5] add feature arc in rte_graph Message-ID: <20241009103741.6dbb04db@hermes.local> In-Reply-To: <20241009133009.1152321-1-nsaxena@marvell.com> References: <20241008133020.814101-1-nsaxena@marvell.com> <20241009133009.1152321-1-nsaxena@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 9 Oct 2024 18:59:57 +0530 Nitin Saxena wrote: > 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 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 | 13 + > lib/graph/graph.c | 1 + > lib/graph/graph_feature_arc.c | 1223 ++++++++++++++++ > 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 | 674 +++++++++ > 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, 4494 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 > Looks good, but likely missing an RTE_ATOMIC() around the feature enable bitmask. Build fails: #################################################################################### #### [Begin job log] "ubuntu-22.04-clang-stdatomic" at step Build and test #################################################################################### rte_atomic_store_explicit(&arc->feature_enable_bitmask[passive_list], bitmask, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/eal/include/rte_stdatomic.h:76:2: note: expanded from macro 'rte_atomic_store_explicit' atomic_store_explicit(ptr, val, memorder) ^ ~~~ /usr/lib/llvm-14/lib/clang/14.0.0/include/stdatomic.h:127:31: note: expanded from macro 'atomic_store_explicit' #define atomic_store_explicit __c11_atomic_store ^ ../lib/graph/graph_feature_arc.c:1084:2: error: address argument to atomic operation must be a pointer to _Atomic type ('rte_graph_feature_rt_list_t *' (aka 'unsigned short *') invalid) rte_atomic_store_explicit(&arc->active_feature_list, passive_list, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/eal/include/rte_stdatomic.h:76:2: note: expanded from macro 'rte_atomic_store_explicit' atomic_store_explicit(ptr, val, memorder) ^ ~~~ /usr/lib/llvm-14/lib/clang/14.0.0/include/stdatomic.h:127:31: note: expanded from macro 'atomic_store_explicit' #define atomic_store_explicit __c11_atomic_store ^ 10 errors generated.