From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH v3 4/5] testpmd: handle all rxqs in rss setup Date: Mon, 27 Jun 2016 16:23:40 +0200 Message-ID: <20160627142340.GO14221@autoinstall.dev.6wind.com> References: <1462488421-118990-1-git-send-email-zhihong.wang@intel.com> <1465945686-142094-1-git-send-email-zhihong.wang@intel.com> <1465945686-142094-5-git-send-email-zhihong.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, konstantin.ananyev@intel.com, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, thomas.monjalon@6wind.com To: Zhihong Wang Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 33FB55477 for ; Mon, 27 Jun 2016 16:23:44 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id a66so117900044wme.0 for ; Mon, 27 Jun 2016 07:23:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1465945686-142094-5-git-send-email-zhihong.wang@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jun 14, 2016 at 07:08:05PM -0400, Zhihong Wang wrote: > This patch removes constraints in rxq handling when multiqueue is enabl= ed > to handle all the rxqs. >=20 > Current testpmd forces a dedicated core for each rxq, some rxqs may be > ignored when core number is less than rxq number, and that causes confu= sion > and inconvenience. >=20 > One example: One Red Hat engineer was doing multiqueue test, there're 2 > ports in guest each with 4 queues, and testpmd was used as the forwardi= ng > engine in guest, as usual he used 1 core for forwarding, as a results h= e > only saw traffic from port 0 queue 0 to port 1 queue 0, then a lot of > emails and quite some time are spent to root cause it, and of course it= 's > caused by this unreasonable testpmd behavior. =20 >=20 > Moreover, even if we understand this behavior, if we want to test the > above case, we still need 8 cores for a single guest to poll all the > rxqs, obviously this is too expensive. >=20 > We met quite a lot cases like this, one recent example: > http://openvswitch.org/pipermail/dev/2016-June/072110.html >=20 >=20 > Signed-off-by: Zhihong Wang > --- > app/test-pmd/config.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index ede7c78..4719a08 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -1199,19 +1199,13 @@ rss_fwd_config_setup(void) > cur_fwd_config.nb_fwd_ports =3D nb_fwd_ports; > cur_fwd_config.nb_fwd_streams =3D > (streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports); > - if (cur_fwd_config.nb_fwd_streams > cur_fwd_config.nb_fwd_lcores) > - cur_fwd_config.nb_fwd_streams =3D > - (streamid_t)cur_fwd_config.nb_fwd_lcores; > - else > - cur_fwd_config.nb_fwd_lcores =3D > - (lcoreid_t)cur_fwd_config.nb_fwd_streams; > =20 > /* reinitialize forwarding streams */ > init_fwd_streams(); > =20 > setup_fwd_config_of_each_lcore(&cur_fwd_config); > rxp =3D 0; rxq =3D 0; > - for (lc_id =3D 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++) { > + for (lc_id =3D 0; lc_id < cur_fwd_config.nb_fwd_streams; lc_id++) { > struct fwd_stream *fs; > =20 > fs =3D fwd_streams[lc_id]; > --=20 > 2.5.0 Hi Zhihong, It seems this commits introduce a bug in pkt_burst_transmit(), this only occurs when the number of cores present in the coremask is greater than the number of queues i.e. coremask=3D0xffe --txq=3D4 --rxq=3D4. Port 0 Link Up - speed 40000 Mbps - full-duplex Port 1 Link Up - speed 40000 Mbps - full-duplex Done testpmd> start tx_first io packet forwarding - CRC stripping disabled - packets/burst=3D64 nb forwarding cores=3D10 - nb forwarding ports=3D2 RX queues=3D4 - RX desc=3D256 - RX free threshold=3D0 RX threshold registers: pthresh=3D0 hthresh=3D0 wthresh=3D0 TX queues=3D4 - TX desc=3D256 - TX free threshold=3D0 TX threshold registers: pthresh=3D0 hthresh=3D0 wthresh=3D0 TX RS bit threshold=3D0 - TXQ flags=3D0x0 Segmentation fault (core dumped) If I start testpmd with a coremask with at most as many cores as queues, everything works well (i.e. coremask=3D0xff0, or 0xf00). Are you able to reproduce the same issue? Note: It only occurs on dpdk/master branch (commit f2bb7ae1d204). Regards, --=20 N=E9lio Laranjeiro 6WIND