From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6CDAB1B19; Fri, 12 Jan 2018 07:05:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 22:05:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,347,1511856000"; d="scan'208";a="9028472" Received: from kmsmsx154.gar.corp.intel.com ([172.21.73.14]) by fmsmga007.fm.intel.com with ESMTP; 11 Jan 2018 22:05:51 -0800 Received: from pgsmsx112.gar.corp.intel.com ([169.254.3.86]) by KMSMSX154.gar.corp.intel.com ([169.254.12.88]) with mapi id 14.03.0319.002; Fri, 12 Jan 2018 14:05:50 +0800 From: "Dai, Wei" To: "Peng, Yuan" , "Ananyev, Konstantin" , "Yang, Qiming" , "Lu, Wenzhuo" , "Wu, Jingjing" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer settings Thread-Index: AQHTipsgFU7oG5RQU0SFdX9GZua9raNvNB2AgACMowA= Date: Fri, 12 Jan 2018 06:05:49 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF21AA0@PGSMSX112.gar.corp.intel.com> References: <1515573656-41847-1-git-send-email-wei.dai@intel.com> <1515646700-56892-1-git-send-email-wei.dai@intel.com> <67D543A150B29E4CAAE53918F64EDAEA3746DA9E@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <67D543A150B29E4CAAE53918F64EDAEA3746DA9E@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWViNzkxYzctN2MyZS00ZDg2LWFjZjgtNzU0YjQ2OTA4MjcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Imw2OGNhb0pDWk9lTjBPQjBEWWhcL21sc3l5YTJTdnpnenloXC9IWnVrb1NMWT0ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer settings X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 06:05:54 -0000 Hi, Yuan I can build dpdk with my patches successfully in my Fedora 24 with gcc 6.3.= 1 20161221 (Red Hat 6.3.1-1) Anyway, I will make v5 patch to address the problem you report and correct = typos reported by Konstantin. Thanks > -----Original Message----- > From: Peng, Yuan > Sent: Friday, January 12, 2018 1:40 PM > To: Dai, Wei ; Ananyev, Konstantin > ; Yang, Qiming ; > Lu, Wenzhuo ; Wu, Jingjing > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer > settings >=20 > Hi Wei, >=20 > There is a build error applied your patches to the latest DPDK version. > /root/dpdk/app/test-pmd/testpmd.c: In function 'check_nb_rxq': > /root/dpdk/app/test-pmd/testpmd.c:579:3: error: 'pid' may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > printf("Fail: input rxq (%u) can't be greater " > ^ > /root/dpdk/app/test-pmd/testpmd.c: In function 'check_nb_txq': > /root/dpdk/app/test-pmd/testpmd.c:625:3: error: 'pid' may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > printf("Fail: input txq (%u) can't be greater " > ^ > My gcc verison is gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) >=20 > Could you help to check it? >=20 > Thanks. > Yuan. >=20 > -----Original Message----- > From: Dai, Wei > Sent: Thursday, January 11, 2018 12:58 PM > To: Ananyev, Konstantin ; Yang, Qiming > ; Peng, Yuan ; Lu, > Wenzhuo ; Wu, Jingjing > Cc: dev@dpdk.org; stable@dpdk.org; Dai, Wei > Subject: [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer setti= ngs >=20 > If an invlaid number of RX or TX queues is configured from testpmd > command like "port config all rxq number" or "port config all txq number"= . > or from --rxq and --txq in the command to start testpmd. The global varia= ble > nb_rxq or nb_txq is updated by the invalid input. > This can cause testpmd crash. For example, if the maximum number of RX or > TX queues is 4, testpmd will crash after running commands "port config al= l > rxq 5", "port config all txq 5" and "start" in sequence. >=20 > With these 2 patches, if an invalid input is detected, it is refused and = testpmd > keeps last correct values of nb_rxq and nb_txq. >=20 > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Dai > Aced-by: Konstantin Ananyev >=20 > --- > v4: update git log message and rename 2 new added functions >=20 > v3: follow the guide from Konstantin to use functions to check > input rxq and txq instead of usage of new added global variables. >=20 > v2: fix a bug in v1 >=20 >=20 >=20 > Wei Dai (2): > app/testpmd: fix invalid rxq number setting > app/testpmd: fix invalid txq number setting >=20 > app/test-pmd/cmdline.c | 4 +++ > app/test-pmd/parameters.c | 13 +++---- > app/test-pmd/testpmd.c | 92 > +++++++++++++++++++++++++++++++++++++++++++++++ > app/test-pmd/testpmd.h | 5 +++ > 4 files changed, 108 insertions(+), 6 deletions(-) >=20 > -- > 2.7.5