From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Chulski Subject: RE: [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports Date: Sun, 4 Mar 2018 06:59:20 +0000 Message-ID: <732b36eb681a4254b654f08636fa9204@IL-EXCH01.marvell.com> References: <20180302154044.25204-1-antoine.tenart@bootlin.com> <20180302154044.25204-2-antoine.tenart@bootlin.com> <20180302170159.258bcdbc@windsurf.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Cc: "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "maxime.chevallier@bootlin.com" , "gregory.clement@bootlin.com" , "miquel.raynal@bootlin.com" , Nadav Haklai , Yan Markman , "mw@semihalf.com" To: Thomas Petazzoni , Antoine Tenart Return-path: In-Reply-To: <20180302170159.258bcdbc@windsurf.lan> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > Hello, > > On Fri, 2 Mar 2018 16:40:40 +0100, Antoine Tenart wrote: > > +static struct { > > + int pkt_size; > > + int buf_num; > > +} mvpp2_pools[MVPP2_BM_POOLS_NUM]; > > Any reason for not doing: > > } mvpp2_pools[MVPP2_BM_POOLS_NUM] = { > [MVPP2_BM_SHORT] = { > .pkt_size = MVPP2_BM_SHORT_PKT_SIZE, > .buf_num = MVPP2_BM_SHORT_BUF_NUM > }, > [MVPP2_BM_LONG] = { > .pkt_size = MVPP2_BM_LONG_PKT_SIZE, > .buf_num = MVPP2_BM_LONG_BUF_NUM, > }, > }; > > And get rid of: > > > +static void mvpp2_setup_bm_pool(void) { > > + /* Short pool */ > > + mvpp2_pools[MVPP2_BM_SHORT].buf_num = > MVPP2_BM_SHORT_BUF_NUM; > > + mvpp2_pools[MVPP2_BM_SHORT].pkt_size = > MVPP2_BM_SHORT_PKT_SIZE; > > + > > + /* Long pool */ > > + mvpp2_pools[MVPP2_BM_LONG].buf_num = > MVPP2_BM_LONG_BUF_NUM; > > + mvpp2_pools[MVPP2_BM_LONG].pkt_size = > MVPP2_BM_LONG_PKT_SIZE; } > > ? > No, we can change it. Stefan.