On Thu, Oct 10, 2024 at 1:27 PM Vladimir Medvedkin
<vladimir.medved...@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

Reply via email to