Message ID | 20200907112826.48493-1-qi.z.zhang@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D3A5A04B5; Mon, 7 Sep 2020 13:24:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 973651BEE1; Mon, 7 Sep 2020 13:24:35 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id F254729AC for <dev@dpdk.org>; Mon, 7 Sep 2020 13:24:32 +0200 (CEST) IronPort-SDR: aaKzDAHrjI4BQ98/85pV1GUmFiGF+/DIGzPFBLk4szWHU1RamLmtopvkxSMOQWkPXTHZBPaWsS teIwpcQXNJsg== X-IronPort-AV: E=McAfee;i="6000,8403,9736"; a="157252574" X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="157252574" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 04:24:31 -0700 IronPort-SDR: Bo6F5guRYtuks2MnOkJYF3B86t/5ZoWa60i3+hjnPgaMx17ltUcwk1sB4x5C22xzLW1g4lpCjE WxAMEd0x/96g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="328058708" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga004.fm.intel.com with ESMTP; 07 Sep 2020 04:24:29 -0700 From: Qi Zhang <qi.z.zhang@intel.com> To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com> Date: Mon, 7 Sep 2020 19:27:46 +0800 Message-Id: <20200907112826.48493-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH 00/40] ice base code update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
ice base code update
|
|
Message
Qi Zhang
Sept. 7, 2020, 11:27 a.m. UTC
main changes: 1. Added support for outer IP filter for GTPC. 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. Added support for QinQ switch filter 4. code refactor and bug fixes Qi Zhang (40): net/ice/base: handle error gracefully in HW table calloc net/ice/base: split caps discover into two functions net/ice/base: avoid unnecessary single-member variable-length structs net/ice/base: fix issues around move nodes net/ice/base: cleanup stack hog net/ice/base: clean the code wrapping net/ice/base: cleanup misleading comment net/ice/base: silence static analysis warning net/ice/base: replace single-element array used for C struct hack net/ice/base: introduce and use bitmap set API net/ice/base: introduce and use bitmap hamming weight API net/ice/base: add function header net/ice/base: introduce and use for each bit iterator net/ice/base: correct abbreviations net/ice/base: add AQ cmd 0X0A0A LLDP fltr control net/ice/base: add support for GTP-U type switch rule net/ice/base: join format strings to same line net/ice/base: introduce Tx rate limiting on port level net/ice/base: reduce profile to recip info get from firmware net/ice/base: refactor DCB related variables net/ice/base: support outer IP filter for GTPC net/ice/base: support outer IP filter for GTPU without inner IP net/ice/base: move a function net/ice/base: clear advanced rules in reset preparation net/ice/base: move a function net/ice/base: add check for failed acts allocation net/ice/base: remove repeated words net/ice/base: remove function ACL count query net/ice/base: preserve NVM capabilities in safe mode net/ice/base: misc minor ACL changes net/ice/base: adjust rate limit profile ids runtime database net/ice/base: enable QinQ filter for switch advanced rule net/ice/base: create flash info structure and separate NVM version net/ice/base: remove unused parameter net/ice/base: minor code clean net/ice/base: cache NVM module bank information net/ice/base: rename function net/ice/base: remove unnecessary conditional net/ice/base: rename ACL priority values net/ice/base: preserve default aggr vsi information drivers/net/ice/base/ice_acl.c | 40 +- drivers/net/ice/base/ice_acl.h | 22 +- drivers/net/ice/base/ice_acl_ctrl.c | 200 ++++---- drivers/net/ice/base/ice_adminq_cmd.h | 83 +--- drivers/net/ice/base/ice_bitops.h | 47 ++ drivers/net/ice/base/ice_common.c | 434 +++++++++--------- drivers/net/ice/base/ice_common.h | 6 +- drivers/net/ice/base/ice_controlq.c | 42 +- drivers/net/ice/base/ice_dcb.c | 44 +- drivers/net/ice/base/ice_dcb.h | 10 +- drivers/net/ice/base/ice_flex_pipe.c | 266 ++++++----- drivers/net/ice/base/ice_flex_type.h | 49 +- drivers/net/ice/base/ice_flow.c | 280 ++++++------ drivers/net/ice/base/ice_flow.h | 1 + drivers/net/ice/base/ice_nvm.c | 293 ++++++++---- drivers/net/ice/base/ice_protocol_type.h | 15 + drivers/net/ice/base/ice_sched.c | 213 +++++---- drivers/net/ice/base/ice_sched.h | 10 +- drivers/net/ice/base/ice_switch.c | 755 +++++++++++++++++++++++++------ drivers/net/ice/base/ice_switch.h | 60 ++- drivers/net/ice/base/ice_type.h | 77 +++- drivers/net/ice/ice_ethdev.c | 20 +- 22 files changed, 1803 insertions(+), 1164 deletions(-)
Comments
> -----Original Message----- > From: Zhang, Qi Z <qi.z.zhang@intel.com> > Sent: Monday, September 7, 2020 19:28 > To: Yang, Qiming <qiming.yang@intel.com> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com> > Subject: [PATCH 00/40] ice base code update > > main changes: > 1. Added support for outer IP filter for GTPC. > 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. > Added support for QinQ switch filter 4. code refactor and bug fixes > > Qi Zhang (40): > net/ice/base: handle error gracefully in HW table calloc > net/ice/base: split caps discover into two functions > net/ice/base: avoid unnecessary single-member variable-length structs > net/ice/base: fix issues around move nodes > net/ice/base: cleanup stack hog > net/ice/base: clean the code wrapping > net/ice/base: cleanup misleading comment > net/ice/base: silence static analysis warning > net/ice/base: replace single-element array used for C struct hack > net/ice/base: introduce and use bitmap set API > net/ice/base: introduce and use bitmap hamming weight API > net/ice/base: add function header > net/ice/base: introduce and use for each bit iterator > net/ice/base: correct abbreviations > net/ice/base: add AQ cmd 0X0A0A LLDP fltr control > net/ice/base: add support for GTP-U type switch rule > net/ice/base: join format strings to same line > net/ice/base: introduce Tx rate limiting on port level > net/ice/base: reduce profile to recip info get from firmware > net/ice/base: refactor DCB related variables > net/ice/base: support outer IP filter for GTPC > net/ice/base: support outer IP filter for GTPU without inner IP > net/ice/base: move a function > net/ice/base: clear advanced rules in reset preparation > net/ice/base: move a function > net/ice/base: add check for failed acts allocation > net/ice/base: remove repeated words > net/ice/base: remove function ACL count query > net/ice/base: preserve NVM capabilities in safe mode > net/ice/base: misc minor ACL changes > net/ice/base: adjust rate limit profile ids runtime database > net/ice/base: enable QinQ filter for switch advanced rule > net/ice/base: create flash info structure and separate NVM version > net/ice/base: remove unused parameter > net/ice/base: minor code clean > net/ice/base: cache NVM module bank information > net/ice/base: rename function > net/ice/base: remove unnecessary conditional > net/ice/base: rename ACL priority values > net/ice/base: preserve default aggr vsi information > > drivers/net/ice/base/ice_acl.c | 40 +- > drivers/net/ice/base/ice_acl.h | 22 +- > drivers/net/ice/base/ice_acl_ctrl.c | 200 ++++---- > drivers/net/ice/base/ice_adminq_cmd.h | 83 +--- > drivers/net/ice/base/ice_bitops.h | 47 ++ > drivers/net/ice/base/ice_common.c | 434 +++++++++--------- > drivers/net/ice/base/ice_common.h | 6 +- > drivers/net/ice/base/ice_controlq.c | 42 +- > drivers/net/ice/base/ice_dcb.c | 44 +- > drivers/net/ice/base/ice_dcb.h | 10 +- > drivers/net/ice/base/ice_flex_pipe.c | 266 ++++++----- > drivers/net/ice/base/ice_flex_type.h | 49 +- > drivers/net/ice/base/ice_flow.c | 280 ++++++------ > drivers/net/ice/base/ice_flow.h | 1 + > drivers/net/ice/base/ice_nvm.c | 293 ++++++++---- > drivers/net/ice/base/ice_protocol_type.h | 15 + > drivers/net/ice/base/ice_sched.c | 213 +++++---- > drivers/net/ice/base/ice_sched.h | 10 +- > drivers/net/ice/base/ice_switch.c | 755 > +++++++++++++++++++++++++------ > drivers/net/ice/base/ice_switch.h | 60 ++- > drivers/net/ice/base/ice_type.h | 77 +++- > drivers/net/ice/ice_ethdev.c | 20 +- > 22 files changed, 1803 insertions(+), 1164 deletions(-) > > -- > 2.13.6 Acked-by: Qiming Yang <qiming.yang@intel.com>
> -----Original Message----- > From: Yang, Qiming <qiming.yang@intel.com> > Sent: Wednesday, September 9, 2020 3:17 PM > To: Zhang, Qi Z <qi.z.zhang@intel.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH 00/40] ice base code update > > > > > -----Original Message----- > > From: Zhang, Qi Z <qi.z.zhang@intel.com> > > Sent: Monday, September 7, 2020 19:28 > > To: Yang, Qiming <qiming.yang@intel.com> > > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com> > > Subject: [PATCH 00/40] ice base code update > > > > main changes: > > 1. Added support for outer IP filter for GTPC. > > 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. > > Added support for QinQ switch filter 4. code refactor and bug fixes > > > > Qi Zhang (40): > > net/ice/base: handle error gracefully in HW table calloc > > net/ice/base: split caps discover into two functions > > net/ice/base: avoid unnecessary single-member variable-length structs > > net/ice/base: fix issues around move nodes > > net/ice/base: cleanup stack hog > > net/ice/base: clean the code wrapping > > net/ice/base: cleanup misleading comment > > net/ice/base: silence static analysis warning > > net/ice/base: replace single-element array used for C struct hack > > net/ice/base: introduce and use bitmap set API > > net/ice/base: introduce and use bitmap hamming weight API > > net/ice/base: add function header > > net/ice/base: introduce and use for each bit iterator > > net/ice/base: correct abbreviations > > net/ice/base: add AQ cmd 0X0A0A LLDP fltr control > > net/ice/base: add support for GTP-U type switch rule > > net/ice/base: join format strings to same line > > net/ice/base: introduce Tx rate limiting on port level > > net/ice/base: reduce profile to recip info get from firmware > > net/ice/base: refactor DCB related variables > > net/ice/base: support outer IP filter for GTPC > > net/ice/base: support outer IP filter for GTPU without inner IP > > net/ice/base: move a function > > net/ice/base: clear advanced rules in reset preparation > > net/ice/base: move a function > > net/ice/base: add check for failed acts allocation > > net/ice/base: remove repeated words > > net/ice/base: remove function ACL count query > > net/ice/base: preserve NVM capabilities in safe mode > > net/ice/base: misc minor ACL changes > > net/ice/base: adjust rate limit profile ids runtime database > > net/ice/base: enable QinQ filter for switch advanced rule > > net/ice/base: create flash info structure and separate NVM version > > net/ice/base: remove unused parameter > > net/ice/base: minor code clean > > net/ice/base: cache NVM module bank information > > net/ice/base: rename function > > net/ice/base: remove unnecessary conditional > > net/ice/base: rename ACL priority values > > net/ice/base: preserve default aggr vsi information > > > > drivers/net/ice/base/ice_acl.c | 40 +- > > drivers/net/ice/base/ice_acl.h | 22 +- > > drivers/net/ice/base/ice_acl_ctrl.c | 200 ++++---- > > drivers/net/ice/base/ice_adminq_cmd.h | 83 +--- > > drivers/net/ice/base/ice_bitops.h | 47 ++ > > drivers/net/ice/base/ice_common.c | 434 +++++++++--------- > > drivers/net/ice/base/ice_common.h | 6 +- > > drivers/net/ice/base/ice_controlq.c | 42 +- > > drivers/net/ice/base/ice_dcb.c | 44 +- > > drivers/net/ice/base/ice_dcb.h | 10 +- > > drivers/net/ice/base/ice_flex_pipe.c | 266 ++++++----- > > drivers/net/ice/base/ice_flex_type.h | 49 +- > > drivers/net/ice/base/ice_flow.c | 280 ++++++------ > > drivers/net/ice/base/ice_flow.h | 1 + > > drivers/net/ice/base/ice_nvm.c | 293 ++++++++---- > > drivers/net/ice/base/ice_protocol_type.h | 15 + > > drivers/net/ice/base/ice_sched.c | 213 +++++---- > > drivers/net/ice/base/ice_sched.h | 10 +- > > drivers/net/ice/base/ice_switch.c | 755 > > +++++++++++++++++++++++++------ > > drivers/net/ice/base/ice_switch.h | 60 ++- > > drivers/net/ice/base/ice_type.h | 77 +++- > > drivers/net/ice/ice_ethdev.c | 20 +- > > 22 files changed, 1803 insertions(+), 1164 deletions(-) > > > > -- > > 2.13.6 > > Acked-by: Qiming Yang <qiming.yang@intel.com> > Applied to dpdk-next-net-intel. Thanks Qi
On 9/10/2020 4:26 AM, Zhang, Qi Z wrote: > > >> -----Original Message----- >> From: Yang, Qiming <qiming.yang@intel.com> >> Sent: Wednesday, September 9, 2020 3:17 PM >> To: Zhang, Qi Z <qi.z.zhang@intel.com> >> Cc: dev@dpdk.org >> Subject: RE: [PATCH 00/40] ice base code update >> >> >> >>> -----Original Message----- >>> From: Zhang, Qi Z <qi.z.zhang@intel.com> >>> Sent: Monday, September 7, 2020 19:28 >>> To: Yang, Qiming <qiming.yang@intel.com> >>> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com> >>> Subject: [PATCH 00/40] ice base code update >>> >>> main changes: >>> 1. Added support for outer IP filter for GTPC. >>> 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. >>> Added support for QinQ switch filter 4. code refactor and bug fixes >>> >>> Qi Zhang (40): >>> net/ice/base: handle error gracefully in HW table calloc >>> net/ice/base: split caps discover into two functions >>> net/ice/base: avoid unnecessary single-member variable-length structs >>> net/ice/base: fix issues around move nodes >>> net/ice/base: cleanup stack hog >>> net/ice/base: clean the code wrapping >>> net/ice/base: cleanup misleading comment >>> net/ice/base: silence static analysis warning >>> net/ice/base: replace single-element array used for C struct hack >>> net/ice/base: introduce and use bitmap set API >>> net/ice/base: introduce and use bitmap hamming weight API >>> net/ice/base: add function header >>> net/ice/base: introduce and use for each bit iterator >>> net/ice/base: correct abbreviations >>> net/ice/base: add AQ cmd 0X0A0A LLDP fltr control >>> net/ice/base: add support for GTP-U type switch rule >>> net/ice/base: join format strings to same line >>> net/ice/base: introduce Tx rate limiting on port level >>> net/ice/base: reduce profile to recip info get from firmware >>> net/ice/base: refactor DCB related variables >>> net/ice/base: support outer IP filter for GTPC >>> net/ice/base: support outer IP filter for GTPU without inner IP >>> net/ice/base: move a function >>> net/ice/base: clear advanced rules in reset preparation >>> net/ice/base: move a function >>> net/ice/base: add check for failed acts allocation >>> net/ice/base: remove repeated words >>> net/ice/base: remove function ACL count query >>> net/ice/base: preserve NVM capabilities in safe mode >>> net/ice/base: misc minor ACL changes >>> net/ice/base: adjust rate limit profile ids runtime database >>> net/ice/base: enable QinQ filter for switch advanced rule >>> net/ice/base: create flash info structure and separate NVM version >>> net/ice/base: remove unused parameter >>> net/ice/base: minor code clean >>> net/ice/base: cache NVM module bank information >>> net/ice/base: rename function >>> net/ice/base: remove unnecessary conditional >>> net/ice/base: rename ACL priority values >>> net/ice/base: preserve default aggr vsi information >>> Hi Qi, I am getting build error [1], can you please check. [1] ../drivers/net/ice/ice_rxtx.c: In function ‘ice_tx_queue_start’: ../drivers/net/ice/ice_rxtx.c:486:15: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 486 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); | ~~~~~~~~~~~~~^~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ 462 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ ../drivers/net/ice/ice_rxtx.c:498:54: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 498 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, | ~~~~~~~~~~~~~~~~^~~~~~~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ 462 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ ../drivers/net/ice/ice_rxtx.c:514:29: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 514 | txq->q_teid = txq_elem.txqs[0].q_teid; | ~~~~~~~~~~~~~^~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ 462 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ ../drivers/net/ice/ice_rxtx.c: In function ‘ice_fdir_tx_queue_start’: ../drivers/net/ice/ice_rxtx.c:658:15: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 658 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); | ~~~~~~~~~~~~~^~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ 640 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ ../drivers/net/ice/ice_rxtx.c:670:54: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 670 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, | ~~~~~~~~~~~~~~~~^~~~~~~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ 640 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ ../drivers/net/ice/ice_rxtx.c:686:29: error: array subscript 0 is outside array bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] 686 | txq->q_teid = txq_elem.txqs[0].q_teid; | ~~~~~~~~~~~~~^~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:52, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/ice_ethdev.h:12, from ../drivers/net/ice/ice_rxtx.h:8, from ../drivers/net/ice/ice_rxtx.c:9: ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing ‘txqs’ 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; | ^~~~ ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ 640 | struct ice_aqc_add_tx_qgrp txq_elem; | ^~~~~~~~ cc1: all warnings being treated as errors
> -----Original Message----- > From: Ferruh Yigit <ferruh.yigit@intel.com> > Sent: Friday, September 11, 2020 7:08 PM > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming > <qiming.yang@intel.com> > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 00/40] ice base code update > > On 9/10/2020 4:26 AM, Zhang, Qi Z wrote: > > > > > >> -----Original Message----- > >> From: Yang, Qiming <qiming.yang@intel.com> > >> Sent: Wednesday, September 9, 2020 3:17 PM > >> To: Zhang, Qi Z <qi.z.zhang@intel.com> > >> Cc: dev@dpdk.org > >> Subject: RE: [PATCH 00/40] ice base code update > >> > >> > >> > >>> -----Original Message----- > >>> From: Zhang, Qi Z <qi.z.zhang@intel.com> > >>> Sent: Monday, September 7, 2020 19:28 > >>> To: Yang, Qiming <qiming.yang@intel.com> > >>> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com> > >>> Subject: [PATCH 00/40] ice base code update > >>> > >>> main changes: > >>> 1. Added support for outer IP filter for GTPC. > >>> 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. > >>> Added support for QinQ switch filter 4. code refactor and bug fixes > >>> > >>> Qi Zhang (40): > >>> net/ice/base: handle error gracefully in HW table calloc > >>> net/ice/base: split caps discover into two functions > >>> net/ice/base: avoid unnecessary single-member variable-length structs > >>> net/ice/base: fix issues around move nodes > >>> net/ice/base: cleanup stack hog > >>> net/ice/base: clean the code wrapping > >>> net/ice/base: cleanup misleading comment > >>> net/ice/base: silence static analysis warning > >>> net/ice/base: replace single-element array used for C struct hack > >>> net/ice/base: introduce and use bitmap set API > >>> net/ice/base: introduce and use bitmap hamming weight API > >>> net/ice/base: add function header > >>> net/ice/base: introduce and use for each bit iterator > >>> net/ice/base: correct abbreviations > >>> net/ice/base: add AQ cmd 0X0A0A LLDP fltr control > >>> net/ice/base: add support for GTP-U type switch rule > >>> net/ice/base: join format strings to same line > >>> net/ice/base: introduce Tx rate limiting on port level > >>> net/ice/base: reduce profile to recip info get from firmware > >>> net/ice/base: refactor DCB related variables > >>> net/ice/base: support outer IP filter for GTPC > >>> net/ice/base: support outer IP filter for GTPU without inner IP > >>> net/ice/base: move a function > >>> net/ice/base: clear advanced rules in reset preparation > >>> net/ice/base: move a function > >>> net/ice/base: add check for failed acts allocation > >>> net/ice/base: remove repeated words > >>> net/ice/base: remove function ACL count query > >>> net/ice/base: preserve NVM capabilities in safe mode > >>> net/ice/base: misc minor ACL changes > >>> net/ice/base: adjust rate limit profile ids runtime database > >>> net/ice/base: enable QinQ filter for switch advanced rule > >>> net/ice/base: create flash info structure and separate NVM version > >>> net/ice/base: remove unused parameter > >>> net/ice/base: minor code clean > >>> net/ice/base: cache NVM module bank information > >>> net/ice/base: rename function > >>> net/ice/base: remove unnecessary conditional > >>> net/ice/base: rename ACL priority values > >>> net/ice/base: preserve default aggr vsi information > >>> > > > Hi Qi, > > I am getting build error [1], can you please check. > > > [1] > ../drivers/net/ice/ice_rxtx.c: In function ‘ice_tx_queue_start’: > ../drivers/net/ice/ice_rxtx.c:486:15: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 486 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); > | ~~~~~~~~~~~~~^~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ > 462 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > ../drivers/net/ice/ice_rxtx.c:498:54: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 498 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, > | > ~~~~~~~~~~~~~~~~^~~~~~~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ > 462 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > ../drivers/net/ice/ice_rxtx.c:514:29: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 514 | txq->q_teid = txq_elem.txqs[0].q_teid; > | ~~~~~~~~~~~~~^~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ > 462 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > ../drivers/net/ice/ice_rxtx.c: In function ‘ice_fdir_tx_queue_start’: > ../drivers/net/ice/ice_rxtx.c:658:15: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 658 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); > | ~~~~~~~~~~~~~^~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ > 640 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > ../drivers/net/ice/ice_rxtx.c:670:54: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 670 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, > | > ~~~~~~~~~~~~~~~~^~~~~~~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ > 640 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > ../drivers/net/ice/ice_rxtx.c:686:29: error: array subscript 0 is outside array > bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] > 686 | txq->q_teid = txq_elem.txqs[0].q_teid; > | ~~~~~~~~~~~~~^~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:52, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/ice_ethdev.h:12, > from ../drivers/net/ice/ice_rxtx.h:8, > from ../drivers/net/ice/ice_rxtx.c:9: > ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing > ‘txqs’ > 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; > | ^~~~ > ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ > 640 | struct ice_aqc_add_tx_qgrp txq_elem; > | ^~~~~~~~ > cc1: all warnings being treated as errors Seems this issue is only reported by a new version GCC, and it does help to detect a invalid memory access issue. The bug has been fixed in dpdk-next-net-intel on below commit commit 978dddfae32764dd6ba81d615399fbc0452ecfb3 Author: Qi Zhang <qi.z.zhang@intel.com> Date: Wed Aug 26 14:57:07 2020 +0800 net/ice/base: replace single-element array used for C struct hack Convert the pre-C90-extension "C struct hack" method (using a single- element array at the end of a structure for implementing variable-length types) to the preferred use of C99 flexible array member. Thanks Qi
On 9/11/2020 12:52 PM, Zhang, Qi Z wrote: > > >> -----Original Message----- >> From: Ferruh Yigit <ferruh.yigit@intel.com> >> Sent: Friday, September 11, 2020 7:08 PM >> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming >> <qiming.yang@intel.com> >> Cc: dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH 00/40] ice base code update >> >> On 9/10/2020 4:26 AM, Zhang, Qi Z wrote: >>> >>> >>>> -----Original Message----- >>>> From: Yang, Qiming <qiming.yang@intel.com> >>>> Sent: Wednesday, September 9, 2020 3:17 PM >>>> To: Zhang, Qi Z <qi.z.zhang@intel.com> >>>> Cc: dev@dpdk.org >>>> Subject: RE: [PATCH 00/40] ice base code update >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: Zhang, Qi Z <qi.z.zhang@intel.com> >>>>> Sent: Monday, September 7, 2020 19:28 >>>>> To: Yang, Qiming <qiming.yang@intel.com> >>>>> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com> >>>>> Subject: [PATCH 00/40] ice base code update >>>>> >>>>> main changes: >>>>> 1. Added support for outer IP filter for GTPC. >>>>> 2. Added support for outer IP filter for GPTU control packet (no inner IP) 3. >>>>> Added support for QinQ switch filter 4. code refactor and bug fixes >>>>> >>>>> Qi Zhang (40): >>>>> net/ice/base: handle error gracefully in HW table calloc >>>>> net/ice/base: split caps discover into two functions >>>>> net/ice/base: avoid unnecessary single-member variable-length structs >>>>> net/ice/base: fix issues around move nodes >>>>> net/ice/base: cleanup stack hog >>>>> net/ice/base: clean the code wrapping >>>>> net/ice/base: cleanup misleading comment >>>>> net/ice/base: silence static analysis warning >>>>> net/ice/base: replace single-element array used for C struct hack >>>>> net/ice/base: introduce and use bitmap set API >>>>> net/ice/base: introduce and use bitmap hamming weight API >>>>> net/ice/base: add function header >>>>> net/ice/base: introduce and use for each bit iterator >>>>> net/ice/base: correct abbreviations >>>>> net/ice/base: add AQ cmd 0X0A0A LLDP fltr control >>>>> net/ice/base: add support for GTP-U type switch rule >>>>> net/ice/base: join format strings to same line >>>>> net/ice/base: introduce Tx rate limiting on port level >>>>> net/ice/base: reduce profile to recip info get from firmware >>>>> net/ice/base: refactor DCB related variables >>>>> net/ice/base: support outer IP filter for GTPC >>>>> net/ice/base: support outer IP filter for GTPU without inner IP >>>>> net/ice/base: move a function >>>>> net/ice/base: clear advanced rules in reset preparation >>>>> net/ice/base: move a function >>>>> net/ice/base: add check for failed acts allocation >>>>> net/ice/base: remove repeated words >>>>> net/ice/base: remove function ACL count query >>>>> net/ice/base: preserve NVM capabilities in safe mode >>>>> net/ice/base: misc minor ACL changes >>>>> net/ice/base: adjust rate limit profile ids runtime database >>>>> net/ice/base: enable QinQ filter for switch advanced rule >>>>> net/ice/base: create flash info structure and separate NVM version >>>>> net/ice/base: remove unused parameter >>>>> net/ice/base: minor code clean >>>>> net/ice/base: cache NVM module bank information >>>>> net/ice/base: rename function >>>>> net/ice/base: remove unnecessary conditional >>>>> net/ice/base: rename ACL priority values >>>>> net/ice/base: preserve default aggr vsi information >>>>> >> >> >> Hi Qi, >> >> I am getting build error [1], can you please check. >> >> >> [1] >> ../drivers/net/ice/ice_rxtx.c: In function ‘ice_tx_queue_start’: >> ../drivers/net/ice/ice_rxtx.c:486:15: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 486 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); >> | ~~~~~~~~~~~~~^~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ >> 462 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> ../drivers/net/ice/ice_rxtx.c:498:54: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 498 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, >> | >> ~~~~~~~~~~~~~~~~^~~~~~~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ >> 462 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> ../drivers/net/ice/ice_rxtx.c:514:29: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 514 | txq->q_teid = txq_elem.txqs[0].q_teid; >> | ~~~~~~~~~~~~~^~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:462:29: note: defined here ‘txq_elem’ >> 462 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> ../drivers/net/ice/ice_rxtx.c: In function ‘ice_fdir_tx_queue_start’: >> ../drivers/net/ice/ice_rxtx.c:658:15: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 658 | txq_elem.txqs[0].txq_id = rte_cpu_to_le_16(txq->reg_idx); >> | ~~~~~~~~~~~~~^~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ >> 640 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> ../drivers/net/ice/ice_rxtx.c:670:54: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 670 | ice_set_ctx(hw, (uint8_t *)&tx_ctx, txq_elem.txqs[0].txq_ctx, >> | >> ~~~~~~~~~~~~~~~~^~~~~~~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ >> 640 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> ../drivers/net/ice/ice_rxtx.c:686:29: error: array subscript 0 is outside array >> bounds of ‘struct ice_aqc_add_txqs_perq[]’ [-Werror=array-bounds] >> 686 | txq->q_teid = txq_elem.txqs[0].q_teid; >> | ~~~~~~~~~~~~~^~~ >> In file included from ../drivers/net/ice/base/ice_controlq.h:8, >> from ../drivers/net/ice/base/ice_type.h:52, >> from ../drivers/net/ice/base/ice_common.h:8, >> from ../drivers/net/ice/ice_ethdev.h:12, >> from ../drivers/net/ice/ice_rxtx.h:8, >> from ../drivers/net/ice/ice_rxtx.c:9: >> ../drivers/net/ice/base/ice_adminq_cmd.h:2429:31: note: while referencing >> ‘txqs’ >> 2429 | struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN]; >> | ^~~~ >> ../drivers/net/ice/ice_rxtx.c:640:29: note: defined here ‘txq_elem’ >> 640 | struct ice_aqc_add_tx_qgrp txq_elem; >> | ^~~~~~~~ >> cc1: all warnings being treated as errors > > Seems this issue is only reported by a new version GCC, and it does help to detect a invalid memory access issue. > The bug has been fixed in dpdk-next-net-intel on below commit > > commit 978dddfae32764dd6ba81d615399fbc0452ecfb3 > Author: Qi Zhang <qi.z.zhang@intel.com> > Date: Wed Aug 26 14:57:07 2020 +0800 > > net/ice/base: replace single-element array used for C struct hack > > Convert the pre-C90-extension "C struct hack" method (using a single- > element array at the end of a structure for implementing variable-length > types) to the preferred use of C99 flexible array member. > Hi Qi, Can you please send the fixed patchset as a new version to mail list first? Also there are build errors on the patch by patch build, can you address them too in next version? Thanks, ferruh