[dpdk-dev] [PATCH v3 4/5] examples/l3fwd: implement FIB lookup method

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Mon Mar 8 11:43:02 CET 2021


Hi Conor,

Please see comment below

On 19/02/2021 15:09, Walsh, Conor wrote:
> This patch implements the Forwarding Information Base (FIB) library
> in l3fwd using the function calls and infrastructure introduced in
> the previous patch.
> 
> Signed-off-by: Conor Walsh <conor.walsh at intel.com>
> ---
>   examples/l3fwd/l3fwd_fib.c | 475 ++++++++++++++++++++++++++++++++++++-
>   1 file changed, 469 insertions(+), 6 deletions(-)
> 
> diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
> index 0a2d02db2f..d5b9a4eae4 100644
> --- a/examples/l3fwd/l3fwd_fib.c
> +++ b/examples/l3fwd/l3fwd_fib.c
> @@ -2,59 +2,522 @@
>    * Copyright(c) 2021 Intel Corporation
>    */
> 
> +
> +/*
> + * If the machine does not have SSE, NEON or PPC 64 then the packets
> + * are sent one at a time using send_single_packet()
> + */
> +#if !defined FIB_SEND_MULTI
> +static inline void
> +fib_send_single(int nb_tx, struct lcore_conf *qconf,
> +struct rte_mbuf **pkts_burst, uint16_t hops[nb_tx])
> +{
> +int32_t j;
> +for (j = 0; j < nb_tx; j++)
> +send_single_packet(qconf, pkts_burst[j], hops[j]);
> +}

I think in fib_send_single() you need to implement the same 
functionality as in send_packets_multi, such as mac swap and 
rfc1812_process()


> +#endif
> +
> +/* Bulk parse, fib lookup and send. */
> +static inline void
> +fib_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,
> +uint16_t portid, struct lcore_conf *qconf)
> +{
> +
> +#if defined FIB_SEND_MULTI
> +send_packets_multi(qconf, pkts_burst, hops, nb_rx);
> +#else
> +fib_send_single(nb_rx, qconf, pkts_burst, hops);
> +#endif
> +}
> +
> --
> 2.25.1
> 

-- 
Regards,
Vladimir


More information about the dev mailing list