DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Nitin Saxena <nsaxena@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	 Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Zhirun Yan <yanzhirun_163@163.com>,
	dev@dpdk.org
Subject: Re: [RFC PATCH 1/3] graph: add feature arc support
Date: Wed, 16 Oct 2024 15:30:15 +0530	[thread overview]
Message-ID: <CALBAE1OWxRbkfxRMfKEW1G2E9bk_Cv-B4gcLY8=OnwL8OeUcKQ@mail.gmail.com> (raw)
In-Reply-To: <20240907070503.1529918-2-nsaxena@marvell.com>

On Sat, Sep 7, 2024 at 1:07 PM Nitin Saxena <nsaxena@marvell.com> wrote:
>
> add feature arc to allow dynamic steering of packets across graph nodes
> based on protocol features enabled on incoming or outgoing interface
>
> Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
> ---
>  lib/graph/graph_feature_arc.c            | 959 +++++++++++++++++++++++
>  lib/graph/meson.build                    |   2 +
>  lib/graph/rte_graph_feature_arc.h        | 373 +++++++++
>  lib/graph/rte_graph_feature_arc_worker.h | 548 +++++++++++++
>  lib/graph/version.map                    |  17 +
>  5 files changed, 1899 insertions(+)
>  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

Missed adding these new files in doc/api/doxy-api-index.md


>
> diff --git a/lib/graph/graph_feature_arc.c b/lib/graph/graph_feature_arc.c
> new file mode 100644
> index 0000000000..3b05bac137
> --- /dev/null
> +++ b/lib/graph/graph_feature_arc.c
> @@ -0,0 +1,959 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(C) 2024 Marvell International Ltd.
> + */
> +
> +#include "graph_private.h"

Internal header files, move after public header files.

> +#include <rte_graph_feature_arc_worker.h>
> +#include <rte_malloc.h>
> +
> +#define __RTE_GRAPH_FEATURE_ARC_MAX 32

Internal symbols may not need __RTE_...

> +
> +#define ARC_PASSIVE_LIST(arc) (arc->active_feature_list ^ 0x1)
> +
> +#define rte_graph_uint_cast(x) ((unsigned int)x)

Internal symbols may not need rte_


> +#define feat_dbg graph_err
> +
> +rte_graph_feature_arc_main_t *__feature_arc_main;

No global variables, please. It will break the multiprocess. use
memzone_lookup() scheme instead.

> +
> +/* Make sure fast path cache line is compact */
> +_Static_assert((offsetof(struct rte_graph_feature_arc, slow_path_variables)
> +               - offsetof(struct rte_graph_feature_arc, fast_path_variables))
> +              <= RTE_CACHE_LINE_SIZE);

use static_assert or RTE_BUILD_BUG_ON from rte_common.h

> +
> diff --git a/lib/graph/meson.build b/lib/graph/meson.build
> index 0cb15442ab..d916176fb7 100644
> --- a/lib/graph/meson.build
> +++ b/lib/graph/meson.build
> @@ -14,11 +14,13 @@ sources = files(
>          'graph_debug.c',
>          'graph_stats.c',
>          'graph_populate.c',
> +        'graph_feature_arc.c',
>          'graph_pcap.c',
>          'rte_graph_worker.c',
>          'rte_graph_model_mcore_dispatch.c',
>  )
>  headers = files('rte_graph.h', 'rte_graph_worker.h')
> +headers += files('rte_graph_feature_arc.h', 'rte_graph_feature_arc_worker.h')
>  indirect_headers += files(
>          'rte_graph_model_mcore_dispatch.h',
>          'rte_graph_model_rtc.h',
> diff --git a/lib/graph/rte_graph_feature_arc.h b/lib/graph/rte_graph_feature_arc.h
> new file mode 100644
> index 0000000000..e3bf4eb73d
> --- /dev/null
> +++ b/lib/graph/rte_graph_feature_arc.h
> @@ -0,0 +1,373 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(C) 2024 Marvell International Ltd.
> + */
> +
> +#ifndef _RTE_GRAPH_FEATURE_ARC_H_
> +#define _RTE_GRAPH_FEATURE_ARC_H_
> +
> +#include <assert.h>
> +#include <errno.h>
> +#include <signal.h>
> +#include <stddef.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <string.h>
> +
> +#include <rte_common.h>
> +#include <rte_compat.h>
> +#include <rte_debug.h>
> +#include <rte_graph.h>
> +#include <rte_graph_worker.h>
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/**
> + * @file
> + *
> + * rte_graph_feature_arc.h

Not yet reviewed the full API spec, will do a bit later.

  reply	other threads:[~2024-10-16 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07  7:04 [RFC PATCH 0/3] add featur arc in rte_graph Nitin Saxena
2024-09-07  7:04 ` [RFC PATCH 1/3] graph: add feature arc support Nitin Saxena
2024-10-16 10:00   ` Jerin Jacob [this message]
2024-09-07  7:04 ` [RFC PATCH 2/3] graph: add feature arc option in graph create Nitin Saxena
2024-09-07  7:04 ` [RFC PATCH 3/3] graph: add IPv4 output feature arc Nitin Saxena
2024-09-17 10:37 ` [RFC PATCH 0/3] add featur arc in rte_graph Kiran Kumar Kokkilagadda
2024-09-07  7:31 [RFC PATCH 0/3] add feature " Nitin Saxena
2024-09-07  7:31 ` [RFC PATCH 1/3] graph: add feature arc support Nitin Saxena
2024-09-11  4:41   ` Kiran Kumar Kokkilagadda
2024-10-10  4:42     ` Nitin Saxena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1OWxRbkfxRMfKEW1G2E9bk_Cv-B4gcLY8=OnwL8OeUcKQ@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=nsaxena@marvell.com \
    --cc=yanzhirun_163@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).