From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83CFDA328D for ; Tue, 22 Oct 2019 05:13:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B5374C8D; Tue, 22 Oct 2019 05:13:09 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B02964C8B for ; Tue, 22 Oct 2019 05:13:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 20:13:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,325,1566889200"; d="scan'208";a="281152288" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 21 Oct 2019 20:13:06 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 21 Oct 2019 20:13:06 -0700 Received: from bgsmsx104.gar.corp.intel.com (10.223.4.190) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 21 Oct 2019 20:13:06 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.199]) by BGSMSX104.gar.corp.intel.com ([169.254.5.180]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 08:43:04 +0530 From: "Varghese, Vipin" To: Pavan Nikhilesh Bhagavatula , "Jerin Jacob Kollanukkaran" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "Kovacevic, Marko" , "Ori Kam" , "Nicolau, Radu" , "Akhil Goyal" , "Kantecki, Tomasz" , Sunil Kumar Kori CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 08/10] examples/l2fwd-event: add eventdev main loop Thread-Index: AQHVgryniVnEWHqY1UansMBKecuW7qdkdVNggACJPYCAAQZ68A== Date: Tue, 22 Oct 2019 03:13:03 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D3DE2EB@BGSMSX101.gar.corp.intel.com> References: <20191002205754.11746-1-pbhagavatula@marvell.com> <20191014182247.961-1-pbhagavatula@marvell.com> <20191014182247.961-9-pbhagavatula@marvell.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D3DCA5B@BGSMSX101.gar.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzZjZDg1MDAtNTY3Ny00MGUzLTg2YWItYjVhYWVhOWY0YTkxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT3B5NU53ak51RmtCUUp1RUpTXC9FVzN6XC9oVWpMMk1cLyt1UGYyNDBENG9USDhrcEo0YWlyZ3RHRXFiUlZvbzRWdyJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 08/10] examples/l2fwd-event: add eventdev main loop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Pavan, snipped > >> Add event dev main loop based on enabled l2fwd options and > >eventdev > >> capabilities. > >> > >> Signed-off-by: Pavan Nikhilesh > >> --- > >> + if (rsrc->event_mode) { > >> + port_conf.rxmode.mq_mode =3D ETH_MQ_RX_RSS; > >> + port_conf.rx_adv_conf.rss_conf.rss_key =3D NULL; > >> + port_conf.rx_adv_conf.rss_conf.rss_hf =3D ETH_RSS_IP; > >> + } > >Question, is RSS hash configured for generating flow id for Eventdev? > >As my understanding. RSS for single RX port-queue pair does not require > >the same. Thanks for the confirmation. > >snipped >=20 > In case of SW event device i.e. vdev=3Devent_sw0 the software Rx adapter = requires > mbuf::rss:hash to distribute packets else it has to calculate rss. >=20 > @see lib/librte_eventdev/rte_event_eth_rx_adapter.c +817 ' > rss =3D do_rss ? > rxa_do_softrss(m, rx_adapter->rss_key_be) : > m->hash.rss; > ' >=20 > >> + if (is_master && timer_period > 0) { > >> + cur_tsc =3D rte_rdtsc(); > >> + diff_tsc =3D cur_tsc - prev_tsc; > >> + > >> + /* advance the timer */ > >> + timer_tsc +=3D diff_tsc; > >> + > >> + /* if timer has reached its timeout */ > >> + if (unlikely(timer_tsc >=3D timer_period)) { > >> + print_stats(rsrc); > >> + /* reset the timer */ > >> + timer_tsc =3D 0; > >> + } > >> + prev_tsc =3D cur_tsc; > >> + } > >Is it possible to move the print_stats to service core, as 'CALL_MASTER' > >is enabled in remote_launch making this a potential worker? > > >=20 > Since not every eventdevice requires Service core user might not pass ser= vice > core mask. > Instead we could do SKIP_MASTER and prints stats here. Thanks >=20 > >> + > >> + /* Read packet from eventdev */ > >> + if (!rte_event_dequeue_burst(event_d_id, port_id, > >&ev, 1, 0)) > >> + continue; > >Is not this unlikely `nb_burst =3D=3D 0` > > >=20 > Not necessarily refer > https://mails.dpdk.org/archives/dev/2018-July/108610.html Thanks for the article and links it is helpful. Following the article sugge= stion, should not the code be enhanced for execute code rather than continu= e? snipped > >> + /* Read packet from eventdev */ > >> + nb_rx =3D rte_event_dequeue_burst(event_d_id, > >port_id, ev, > >> + deq_len, 0); > >> + if (nb_rx =3D=3D 0) > >Can we use `unlikely`? >=20 > Not necessarily refer > https://mails.dpdk.org/archives/dev/2018-July/108610.html Same as above. >=20 > >> + continue; > >> + > >> + for (i =3D 0; i < nb_rx; i++) { > >> + l2fwd_event_fwd(rsrc, &ev[i], tx_q_id, > >timer_period, > >> + flags); > >> + } > >> + > >> + if (flags & L2FWD_EVENT_TX_ENQ) { > >> + nb_tx =3D > >rte_event_enqueue_burst(event_d_id, port_id, > >> + ev, nb_rx); > >> + while (nb_tx < nb_rx && !rsrc->force_quit) > >> + nb_tx +=3D > >> rte_event_enqueue_burst(event_d_id, > >> + port_id, ev + nb_tx, > >> + nb_rx - nb_tx); > >Can we use `continue` as we do not transmit from the same worker int > >his case? >=20 > I'm not sure I follow what you meant here. We are trying to transmit the = work > present on the worker till we succeed, if we do a continue then we would = loose > the untransmitted packets. Maybe I mistook the L2FWD against ETHDEV_EVENT flags. As per my current und= erstanding L2FWD_EVENT_TX_ENQ uses extra queue stage for single-event-enque= ue for TX adapter, while L2FWD_EVENT_TX_DIRECT allows the worker to do tran= smit via port. May be this is wrong expectation. >=20 > @see examples/eventdev_pipeline/pipeline_worker_generic.c +109 I will check the same and get back as required. >=20 > >> + } > >> + > >snipped