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 175F545AE1; Tue, 8 Oct 2024 10:04:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAFA74025C; Tue, 8 Oct 2024 10:04:31 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5FB6C4021F for ; Tue, 8 Oct 2024 10:04:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728374669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nqUdfCmDzeNBp4BN5CQe1cvAvfC5YEXLRVdhC/Req+I=; b=OYgulYtkHLVDwKuNmN405Xgekl8A8Pj01qW8iNVp9VA4ztMBCzSktWZg2Al2yecSjy2rD/ ATFjxkRc8Pl451zPm3YkMOeFl/akdjh6dpEeqPkL8eynAjSTygK3Y1nILPmpkc/wpCM8Oc U+fJNAOMQvb58QlnLeQsSF/V3V2gV1o= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-NnM7i1aWNOat_C7lAubD4w-1; Tue, 08 Oct 2024 04:04:29 -0400 X-MC-Unique: NnM7i1aWNOat_C7lAubD4w-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2faccaed382so33881341fa.3 for ; Tue, 08 Oct 2024 01:04:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728374667; x=1728979467; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nqUdfCmDzeNBp4BN5CQe1cvAvfC5YEXLRVdhC/Req+I=; b=Ey8VwLznYsGXyUa7faetkk0SvkZtf1VTsmoRE7pfhG6OUpXblLsINZADyGOTtBKAwu llzyJ0Ahe/EfvE/TlFZd8X7o9Y6EnrFTP6xK76ymEWix2IWpkle8kV4Qc4gYtiHMs7Ph Y7OqRf6Gi6WwnqTH+P3fYtSzFoiBm6NPJlN7jz514H2VqdF7StLQJGQaT50nJBTZkJRF VzIWDvPMEXW50y/Umoc6oDjVaDSd9QKqW4X90Sfps7fS0um9gtaICQQV6thuLBGupCKe 03pdI6OktVqc+IdJ+YJViHnv9dBQQegG6NhyENGIbc6rU46bEaKPYUmRu7ZCLcZROKnt EzqQ== X-Forwarded-Encrypted: i=1; AJvYcCVgoFv0XgtHnPmL9/d2Ll/Izj16+O/XqkzVcG/kuEJK1t8UgiisSjptEgWzFBk6lsVxA0g=@dpdk.org X-Gm-Message-State: AOJu0YyCpbFs4gDzEONCi4oq5SOdJuwGNTZxuI51Fq9ZV9tep9cvi2tz a67yoCRa4+NvDqkxwWOTInze2PjRwR5IoI8GFATCKh69Z9t+7QkdgYOCVGpANpZagIhuOQky73A t6STrjKUEaIpJJ2kY8ntEQKmrw/oQ9nv8p713s/kmfcyCTlMx8WBnS82Aqegu2cQi01r3qXPawo +OCsgdbERt1OvlpVM= X-Received: by 2002:a2e:9e18:0:b0:2f3:f7cf:2f01 with SMTP id 38308e7fff4ca-2faf3d71ab3mr51551651fa.41.1728374667321; Tue, 08 Oct 2024 01:04:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5sWd6DzhIvlu4NnEwrdFE3TWqDN3Fb+cewXLvMifJqNbs5XqJMUkc4gnncnPsl4EAYiEGr5Ie/1HyQjGnAuI= X-Received: by 2002:a2e:9e18:0:b0:2f3:f7cf:2f01 with SMTP id 38308e7fff4ca-2faf3d71ab3mr51551361fa.41.1728374666877; Tue, 08 Oct 2024 01:04:26 -0700 (PDT) MIME-Version: 1.0 References: <20240907073115.1531070-1-nsaxena@marvell.com> In-Reply-To: <20240907073115.1531070-1-nsaxena@marvell.com> From: David Marchand Date: Tue, 8 Oct 2024 10:04:16 +0200 Message-ID: Subject: Re: [RFC PATCH 0/3] add feature arc in rte_graph To: Nitin Saxena Cc: Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Zhirun Yan , dev@dpdk.org, Nitin Saxena , Robin Jarry , Christophe Fontaine X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi graph guys, On Sat, Sep 7, 2024 at 9:31=E2=80=AFAM Nitin Saxena w= rote: > > 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 wheter 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. > > Nitin Saxena (3): > graph: add feature arc support > graph: add feature arc option in graph create > graph: add IPv4 output feature arc > > lib/graph/graph.c | 1 + > lib/graph/graph_feature_arc.c | 959 +++++++++++++++++++++++ > 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 | 373 +++++++++ > lib/graph/rte_graph_feature_arc_worker.h | 548 +++++++++++++ > lib/graph/version.map | 17 + > lib/node/ip4_rewrite.c | 476 ++++++++--- > lib/node/ip4_rewrite_priv.h | 9 +- > lib/node/node_private.h | 19 +- > lib/node/rte_node_ip4_api.h | 3 + > 14 files changed, 2325 insertions(+), 97 deletions(-) > 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 I see no non-RFC series following this original submission. It will slip to next release unless there is an objection. Btw, I suggest copying Robin (and Christophe) for graph related changes. --=20 David Marchand