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 <wei....@intel.com>; Ananyev, Konstantin > <konstantin.anan...@intel.com>; Yang, Qiming <qiming.y...@intel.com>; > Lu, Wenzhuo <wenzhuo...@intel.com>; Wu, Jingjing <jingjing...@intel.com> > Cc: dev@dpdk.org; sta...@dpdk.org > Subject: RE: [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer > settings > > Hi Wei, > > 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=maybe-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=maybe-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) > > Could you help to check it? > > Thanks. > Yuan. > > -----Original Message----- > From: Dai, Wei > Sent: Thursday, January 11, 2018 12:58 PM > To: Ananyev, Konstantin <konstantin.anan...@intel.com>; Yang, Qiming > <qiming.y...@intel.com>; Peng, Yuan <yuan.p...@intel.com>; Lu, > Wenzhuo <wenzhuo...@intel.com>; Wu, Jingjing <jingjing...@intel.com> > Cc: dev@dpdk.org; sta...@dpdk.org; Dai, Wei <wei....@intel.com> > Subject: [PATCH v4 0/2] app/testpmd: fix invalid rxq and txq nubmer settings > > 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 variable > 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 all > rxq 5", "port config all txq 5" and "start" in sequence. > > 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. > > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > Cc: sta...@dpdk.org > > Signed-off-by: Wei Dai <wei....@intel.com> > Aced-by: Konstantin Ananyev <konstantin.anan...@intel.com> > > --- > v4: update git log message and rename 2 new added functions > > v3: follow the guide from Konstantin to use functions to check > input rxq and txq instead of usage of new added global variables. > > v2: fix a bug in v1 > > > > Wei Dai (2): > app/testpmd: fix invalid rxq number setting > app/testpmd: fix invalid txq number setting > > 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(-) > > -- > 2.7.5