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 5902AA0C4C; Wed, 18 Aug 2021 13:48:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBF8F4069E; Wed, 18 Aug 2021 13:48:03 +0200 (CEST) Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by mails.dpdk.org (Postfix) with ESMTP id 221B140151 for ; Wed, 18 Aug 2021 13:48:03 +0200 (CEST) Received: by mail-il1-f169.google.com with SMTP id u7so1900449ilk.7 for ; Wed, 18 Aug 2021 04:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sD8047TohxMEBxNBkE9bP3EUblXsKdHlja+i1GclQsA=; b=u5bAo9hYoJreJ8ByS92azTDflHwyffZ/LFvArlwXkcBtr8YbsAwupfgN0dqaL9osOP PGZQl5v0pcYSc+D1LOamw8Ydm/9kg643GLzDlkHpklFURZvB6X7WUxnvHk7w66SLV+FP nY5gDtZNpEiLJpsf3K9Gb+R2Z10P5HlR5lDYhXwA2jYf7ZhtjARInBk4pcTARmcUHUDM FhKJwp6SXx9jHECk5tyeJn2Li6cU3TmUsybOT3f5Wj4n/TCMcWt7RuBp3Ah2GfQicXU2 RoMinJYu+/MrIhnUVEZ0KQJplOycjc3Tk1MDDWVZ+wVbptkrmTeKMWzrVihXJ0M7o1M/ AI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sD8047TohxMEBxNBkE9bP3EUblXsKdHlja+i1GclQsA=; b=SG1i0jI2YmnTQwieH+H6HmQ4bNLkGGB2/P5zqMI3Lm0yMamXZV+y55zA1mI9/i6IlS EY4rg+pndHPphbfGfi7w+ZtJDyNsH3lGLFOPUfLi0H+fsUwf8qT0ggbr+62U1rBd/iAq GiA4hVCH3FvCam5DD853eBqkmFW4SSoHSBy3wPQDMdaZzGX4SxeqwOc+M2kEPJBLv3ov ptuCCwO2EXkrtCHbZlO+KdB+OSwPXIX1hRZ97I4kS3osH899y/GM4aopmyctwPCgU0BR FXKJdlzRnhXQEmOHbCKSCFVtXAyhRhMzTSI/71baFFg2mQsQHyGEaZ7+9jQathXkhtrg OCvg== X-Gm-Message-State: AOAM533BxAty5GUA5WqsfJJXD5xVUOmmLkT3DltzMO8+xDzZdCcJBgn1 7FmODE0ag/DRVcmOlE3dOroUR8iaBHxqTEploo4= X-Google-Smtp-Source: ABdhPJwyk51KN08GIj8knjRoxTqBOFE0CstuhpRaZElzjyYYGE9VF5ITKWZ0AKByMEkGNW2BD1pdmN2Biep0T01JdOQ= X-Received: by 2002:a05:6e02:160f:: with SMTP id t15mr6102683ilu.60.1629287282402; Wed, 18 Aug 2021 04:48:02 -0700 (PDT) MIME-Version: 1.0 References: <20210727034204.20649-1-xuemingl@nvidia.com> <20210811140418.393264-1-xuemingl@nvidia.com> <20210811140418.393264-6-xuemingl@nvidia.com> In-Reply-To: From: Jerin Jacob Date: Wed, 18 Aug 2021 17:17:36 +0530 Message-ID: To: "Xueming(Steven) Li" Cc: Jack Min , dpdk-dev , Xiaoyun Li Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 06/15] app/testpmd: add common fwd wrapper function 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" On Wed, Aug 18, 2021 at 4:57 PM Xueming(Steven) Li wrote: > > > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Tuesday, August 17, 2021 5:37 PM > > To: Xueming(Steven) Li > > Cc: Jack Min ; dpdk-dev ; Xiaoyun Li > > Subject: Re: [dpdk-dev] [PATCH v2 06/15] app/testpmd: add common fwd wrapper function > > > > On Wed, Aug 11, 2021 at 7:35 PM Xueming Li wrote: > > > > > > From: Xiaoyu Min > > > > > > Added an inline common wrapper function for all fwd engines which do > > > the following in common: > > > > > > 1. get_start_cycles > > > 2. rte_eth_rx_burst(...,nb_pkt_per_burst) > > > 3. if rxq_share do forward_shared_rxq(), otherwise do fwd directly 4. > > > get_end_cycle > > > > > > Signed-off-by: Xiaoyu Min > > > --- > > > app/test-pmd/testpmd.h | 24 ++++++++++++++++++++++++ > > > 1 file changed, 24 insertions(+) > > > > > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > > > 13141dfed9..b685ac48d6 100644 > > > --- a/app/test-pmd/testpmd.h > > > +++ b/app/test-pmd/testpmd.h > > > @@ -1022,6 +1022,30 @@ void add_tx_dynf_callback(portid_t portid); > > > void remove_tx_dynf_callback(portid_t portid); int > > > update_jumbo_frame_offload(portid_t portid); > > > > > > +static inline void > > > +do_burst_fwd(struct fwd_stream *fs, packet_fwd_cb fwd) { > > > + struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; > > > + uint16_t nb_rx; > > > + uint64_t start_tsc = 0; > > > + > > > + get_start_cycles(&start_tsc); > > > + > > > + /* > > > + * Receive a burst of packets and forward them. > > > + */ > > > + nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, > > > + pkts_burst, nb_pkt_per_burst); > > > + inc_rx_burst_stats(fs, nb_rx); > > > + if (unlikely(nb_rx == 0)) > > > + return; > > > + if (unlikely(rxq_share > 0)) > > > > See below. It reads a global memory. > > > > > + forward_shared_rxq(fs, nb_rx, pkts_burst, fwd); > > > + else > > > + (*fwd)(fs, nb_rx, pkts_burst); > > > > New function pointer in fastpath. > > > > IMO, We should not create performance regression for the existing forward engine. > > Can we have a new forward engine just for shared memory testing? > > Yes, fully aware of the performance concern, the global could be defined around record_core_cycles to minimize the impacts. > Based on test data, the impacts almost invisible in legacy mode. Are you saying there is zero % regression? If not, could you share the data? > > From test perspective, better to have all forward engine to verify shared rxq, test team want to run the > regression with less impacts. Hope to have a solution to utilize all forwarding engines seamlessly. Yes. it good goal. testpmd forward performance using as synthetic bench everyone. I think, we are aligned to not have any regression for the generic forward engine. > > > > > > + get_end_cycles(fs, start_tsc); } > > > + > > > /* > > > * Work-around of a compilation error with ICC on invocations of the > > > * rte_be_to_cpu_16() function. > > > -- > > > 2.25.1 > > >