From: David Marchand <david.marchand@redhat.com>
To: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Cc: dev@dpdk.org, rjarry@redhat.com, mb@smartsharesystems.com,
stephen@networkplumber.org, ruifeng.wang@arm.com,
honnappa.nagarahalli@arm.com
Subject: Re: [PATCH v3 1/2] fib: implement RCU rule reclamation
Date: Mon, 14 Oct 2024 18:58:34 +0200 [thread overview]
Message-ID: <CAJFAV8ykurAJamxTwET-EVSy621Br6Dcc_+3Hk-PA1dmFw+eKQ@mail.gmail.com> (raw)
In-Reply-To: <20241010112734.682093-1-vladimir.medvedkin@intel.com>
On Thu, Oct 10, 2024 at 1:27 PM Vladimir Medvedkin
<vladimir.medvedkin@intel.com> wrote:
> diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c
> index 4f9fba5a4f..730f50c1ba 100644
> --- a/lib/fib/rte_fib.c
> +++ b/lib/fib/rte_fib.c
> @@ -338,3 +338,14 @@ rte_fib_select_lookup(struct rte_fib *fib,
> return -EINVAL;
> }
> }
> +
> +int
> +rte_fib_rcu_qsbr_add(struct rte_fib *fib, struct rte_fib_rcu_config *cfg)
> +{
> + switch (fib->type) {
> + case RTE_FIB_DIR24_8:
> + return dir24_8_rcu_qsbr_add(fib->dp, cfg, fib->name);
> + default:
> + return -ENOTSUP;
This does not align with the documented API.
Please send a fix.
> + }
> +}
> diff --git a/lib/fib/rte_fib.h b/lib/fib/rte_fib.h
> index d7a5aafe53..346eb7f149 100644
[snip]
> /**
> * Create FIB
> *
> @@ -219,6 +248,25 @@ rte_fib_get_rib(struct rte_fib *fib);
> int
> rte_fib_select_lookup(struct rte_fib *fib, enum rte_fib_lookup_type type);
>
> +/**
> + * Associate RCU QSBR variable with a FIB object.
> + *
> + * @param fib
> + * the fib object to add RCU QSBR
> + * @param cfg
> + * RCU QSBR configuration
> + * @return
> + * On success - 0
> + * On error - 1 with error code set in rte_errno.
> + * Possible rte_errno codes are:
> + * - EINVAL - invalid pointer
> + * - EEXIST - already added QSBR
> + * - ENOMEM - memory allocation failure
> + * - ENOTSUP - not supported by configured dataplane algorithm
In general, the fib API returns a negative integer in general.
I'll merge this patch as is for rc1 but I would prefer to have
something consistent for rc2.
Can you send a followup patch?
> + */
> +__rte_experimental
> +int rte_fib_rcu_qsbr_add(struct rte_fib *fib, struct rte_fib_rcu_config *cfg);
> +
> #ifdef __cplusplus
> }
> #endif
Thanks.
--
David Marchand
next prev parent reply other threads:[~2024-10-14 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 17:09 [PATCH] " Vladimir Medvedkin
2024-09-27 22:12 ` Robin Jarry
2024-09-27 23:52 ` David Marchand
2024-10-04 12:03 ` Vladimir Medvedkin
2024-10-08 17:55 ` [PATCH v2 1/2] " Vladimir Medvedkin
2024-10-08 17:55 ` [PATCH v2 2/2] test/fib: add RCU functional tests Vladimir Medvedkin
2024-10-08 18:18 ` [PATCH v2 1/2] fib: implement RCU rule reclamation Stephen Hemminger
2024-10-09 19:12 ` Doug Foster
2024-10-08 18:28 ` Stephen Hemminger
2024-10-10 11:21 ` Medvedkin, Vladimir
2024-10-10 11:27 ` [PATCH v3 " Vladimir Medvedkin
2024-10-10 11:27 ` [PATCH v3 2/2] test/fib: add RCU functional tests Vladimir Medvedkin
2024-10-11 9:10 ` [PATCH v3 1/2] fib: implement RCU rule reclamation David Marchand
2024-10-14 16:58 ` David Marchand [this message]
2024-10-14 17:10 ` David Marchand
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=CAJFAV8ykurAJamxTwET-EVSy621Br6Dcc_+3Hk-PA1dmFw+eKQ@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=mb@smartsharesystems.com \
--cc=rjarry@redhat.com \
--cc=ruifeng.wang@arm.com \
--cc=stephen@networkplumber.org \
--cc=vladimir.medvedkin@intel.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).