From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD35CA0546; Mon, 8 Mar 2021 11:43:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B20522A384; Mon, 8 Mar 2021 11:43:09 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 77BC24068A for ; Mon, 8 Mar 2021 11:43:08 +0100 (CET) IronPort-SDR: 2+44UtAAyZVAdgiUYpS0LAuUbsZH5ctRtgRcFedhAEETfIVuXF7bgwjzOdoKIwtaqM55LXdWCw pQm/yD0VzA7w== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="185617882" X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="185617882" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 02:43:07 -0800 IronPort-SDR: 3w1vL5xWEQBspG6oQ4MI3uk/ObQzIRaFFURwk3PhC+kXX84LSPQ7ODcS0CT4IT6HMjxPhkZjcz AIRxya4LLNUw== X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="409251498" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.214.231.108]) ([10.214.231.108]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 02:43:04 -0800 To: "Walsh, Conor" , "jerinj@marvell.com" , "stephen@networkplumber.org" , "Iremonger, Bernard" , "Ananyev, Konstantin" Cc: "dev@dpdk.org" References: <20210218152056.1893590-1-conor.walsh@intel.com> <20210219150945.2071651-1-conor.walsh@intel.com> <20210219150945.2071651-5-conor.walsh@intel.com> From: "Medvedkin, Vladimir" Message-ID: Date: Mon, 8 Mar 2021 10:43:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210219150945.2071651-5-conor.walsh@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 4/5] examples/l3fwd: implement FIB lookup method X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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