From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 3/4] app/test-eventdev: add Tx adapter support Date: Mon, 24 Sep 2018 20:15:01 +0530 Message-ID: <20180924144500.GA26713@jerin> References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> <20180919222235.6239-3-pbhagavatula@caviumnetworks.com> <20180923113508.GA13456@jerin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Andrzej Ostruszka Return-path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690041.outbound.protection.outlook.com [40.107.69.41]) by dpdk.org (Postfix) with ESMTP id 162BB4F9C for ; Mon, 24 Sep 2018 16:45:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Mon, 24 Sep 2018 10:30:30 +0200 > From: Andrzej Ostruszka > To: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 3/4] app/test-eventdev: add Tx adapter > support > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > > > On 23.09.2018 13:35, Jerin Jacob wrote: > > -----Original Message----- > >> Date: Thu, 20 Sep 2018 03:52:34 +0530 > >> From: Pavan Nikhilesh > [...] > >> - struct rte_event_dev_info info; > >> - struct test_pipeline *t = evt_test_priv(test); > >> - uint8_t tx_evqueue_id = 0; > >> + uint8_t tx_evqueue_id[RTE_MAX_ETHPORTS] = {0}; > > > > Some old compiler throws error with this scheme. Please change to memset. > > Really? Could you give an example? > > That is perfectly legal C (since "forever"?) and I find it more readable > than memset. Don't treat it as a request to keep the original version - > if I were Pavan I would object this particular request since I prefer > direct initialization, however here I'm more interested in learning more > about your statement about compilers not supporting zero initialization > of array members after the last initializer. And maybe also about to > what extent we should be supporting old/non compliant compilers (the doc > suggest to use gcc 4.9+). Clang don't like this kind of zero-initialization depending on which type of parameter comes first in the structure. An array of uint8_t should be OK. I thought of keeping safe here as it was going for next revision. Unofficially, people used to test with old compiler such as gcc 4.7 etc. http://patches.dpdk.org/patch/40750/ // Search clang here. http://patches.dpdk.org/patch/38189/ > > Best regards > Andrzej