From: Thomas Monjalon <thomas@monjalon.net>
To: Nitin Saxena <nsaxena@marvell.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
dev@dpdk.org, Nithin Dabilpuram <ndabilpuram@marvell.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
Robin Jarry <rjarry@redhat.com>,
Christophe Fontaine <cfontain@redhat.com>,
dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
Nitin Saxena <nsaxena16@gmail.com>
Subject: Re: [PATCH v7 1/2] node: add global node mbuf dynfield
Date: Fri, 27 Jun 2025 23:36:58 +0200 [thread overview]
Message-ID: <4399662.1SvkZsmPdQ@thomas> (raw)
In-Reply-To: <CAG6-93znfSj8EP8-2TdyWGCBBEskPdd7Rx2y5+Rq87PAXL96=g@mail.gmail.com>
26/06/2025 16:14, Nitin Saxena:
> On Thu, Jun 26, 2025 at 7:29 PM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > On Thu, 19 Jun 2025 21:14:49 +0530
> > Nitin Saxena <nsaxena@marvell.com> wrote:
> >
> > > +#ifndef RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE
> > > +/** Size of persistent mbuf fields */
> > > +#define RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE (0)
> > > +#endif /* RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE */
> > > +
> > > +#ifndef RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE
> > > +/** Size of overloadable mbuf fields */
> > > +#define RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE (8)
> > > +#endif /* RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE */
> > > +
> > > +/** Size of node mbuf dynamic field */
> > > +#define RTE_NODE_MBUF_DYNFIELD_SIZE \
> > > + (RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE + RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE)
> > > +
> > > +/**
> > > + * Node mbuf overloadable data.
> > > + *
> > > + * Out-of-tree nodes can repurpose overloadable fields via
> > > + * rte_node_mbuf_overload_fields_get(mbuf). Overloadable fields are not
> > > + * preserved and typically can be used with-in two adjacent nodes in the graph.
> > > + */
> > > +typedef struct rte_node_mbuf_overload_fields {
> > > + union {
> > > + uint8_t data[RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE];
> > > + };
> > > +} rte_node_mbuf_overload_fields_t;
> >
> > Having a blank scratchpad rather than a real defined structure means you
> > lose any type checking or potential overflow checking.
>
> Patchset-1 creates a blank scratchpad but patchset-2 adds following
> fields when added field is used in ip4/ip6 nodes
> So idea is to add relevant structures as and when they are used
>
> diff --git a/lib/node/rte_node_mbuf_dynfield.h
> b/lib/node/rte_node_mbuf_dynfield.h
> index 1069c07d44..045c13e352 100644
> --- a/lib/node/rte_node_mbuf_dynfield.h
> +++ b/lib/node/rte_node_mbuf_dynfield.h
> @@ -46,6 +46,15 @@ extern "C" {
> */
> typedef struct rte_node_mbuf_overload_fields {
> >------union {
> +>------>-------/* Following fields used by ip[4|6]-lookup ->
> ip[4|6]-rewrite nodes */
> +>------>-------union {
> +>------>------->-------struct {
> +>------>------->------->-------uint16_t nh;
> +>------>------->------->-------uint16_t ttl;
> +>------>------->------->-------uint32_t cksum;
> +>------>------->-------};
> +>------>------->-------uint64_t u;
> +>------>-------};
> >------>-------uint8_t data[RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE];
> >------};
> } rte_node_mbuf_overload_fields_t;
>
I assume it is OK to merge.
It was supposed to be merged in -rc1,
so it is applied now for -rc2, thanks.
next prev parent reply other threads:[~2025-06-27 21:37 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 4:20 [PATCH 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-01 4:20 ` [PATCH 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-01 14:15 ` Stephen Hemminger
2025-04-03 10:27 ` Nitin Saxena
2025-04-04 8:11 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2025-04-04 15:21 ` Stephen Hemminger
2025-04-07 6:01 ` Nitin Saxena
2025-04-01 4:20 ` [PATCH 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-03 10:17 ` [PATCH v2 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-03 10:17 ` [PATCH v2 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-03 10:17 ` [PATCH v2 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-04 7:12 ` [PATCH v3 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-04 7:12 ` [PATCH v3 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-04 21:35 ` Stephen Hemminger
2025-04-04 7:12 ` [PATCH v3 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-07 7:47 ` [PATCH v4 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-07 7:47 ` [PATCH v4 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-07 7:47 ` [PATCH v4 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-08 7:35 ` [PATCH v4 0/2] node: add mbuf dynamic field for nodes David Marchand
2025-04-08 8:42 ` Nitin Saxena
2025-04-09 13:55 ` [PATCH v5 " Nitin Saxena
2025-04-09 13:55 ` [PATCH v5 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-04-18 19:03 ` Pavan Nikhilesh Bhagavatula
2025-04-28 10:42 ` Nitin Saxena
2025-04-09 13:55 ` [PATCH v5 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-04-28 10:37 ` [PATCH v6 0/2] node: add mbuf dynamic field for nodes Nitin Saxena
2025-04-28 10:37 ` [PATCH v6 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-05-09 7:16 ` Pavan Nikhilesh Bhagavatula
2025-04-28 10:37 ` [PATCH v6 2/2] node: use node mbuf dynfield in ip4 nodes Nitin Saxena
2025-05-09 7:17 ` Pavan Nikhilesh Bhagavatula
2025-05-05 17:20 ` [PATCH v6 0/2] node: add mbuf dynamic field for nodes Pavan Nikhilesh Bhagavatula
2025-06-11 11:45 ` Thomas Monjalon
2025-06-19 15:51 ` Nitin Saxena
2025-06-19 15:44 ` [PATCH v7 " Nitin Saxena
2025-06-19 15:44 ` [PATCH v7 1/2] node: add global node mbuf dynfield Nitin Saxena
2025-06-26 13:59 ` Stephen Hemminger
2025-06-26 14:14 ` Nitin Saxena
2025-06-27 21:36 ` Thomas Monjalon [this message]
2025-06-19 15:44 ` [PATCH v7 2/2] node: use node mbuf dynfield in ip4 nodes 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=4399662.1SvkZsmPdQ@thomas \
--to=thomas@monjalon.net \
--cc=cfontain@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=nsaxena16@gmail.com \
--cc=nsaxena@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=rjarry@redhat.com \
--cc=stephen@networkplumber.org \
/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).