Received: by 10.223.185.116 with SMTP id b49csp1340558wrg; Sat, 3 Mar 2018 23:00:23 -0800 (PST) X-Google-Smtp-Source: AG47ELtpuqFiJ0WsnRzHrE/l1K4irkIr0b3BT/d0us+kjgIg3cVy8W19ve2WoiiebmppH3VRw4PS X-Received: by 10.98.198.146 with SMTP id x18mr11247174pfk.22.1520146823749; Sat, 03 Mar 2018 23:00:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520146823; cv=none; d=google.com; s=arc-20160816; b=LFA+h2jS46lcptTNx2digXBj7mMjW98RKNdngmnh5rUif2adqrdsG/d0gHGT21Kmfn 9QfPZWHWn2uKTwTRs+7qiqvm+QYctF5SSbHPOyvXCh+KbpKW4hxU0dXKGg0Yl3XcJtCN 61bo3dlDudHD4fxWR34pE5sBUa0Ap6HSilCC+1pVEu4AK3FbRFs8HEdkij7uf6Shznno GfRq+q87AKVQXoOQoZHdUbEF/+4VXdmmkhuTQLEOq45EQIlNSiYFVfI8fh5tT3RCTr6w WzhiK72JXW2YCYjxZCsfJOJ6dhtfL1ZTG5521u0Wxg0uxGaYVjiJ1LscDTBZ/lPYjdm6 asJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=uvU3Z/WmBMlLtlYJ7lRiKNZ551+CGKunzaVzOhMJL/8=; b=CzB8ynv17RHQA2p8L41GeoDcPer7gH9RwGS6p8xfiM0upDNSMNLkxk8B7ZyYm1pZXb DbrP7Y0GbIDTS2xRRqOkJ+nBOipmObARmvHL7C/I6kBTJ7OtyJ/hDfNSY8srPTTJarBg bVeU7+Sdn4k9HX6w3ommIJ6UvMKRPGO8a4XAFXwqUdKau3diqYmWK/4VMkhlem3rgy23 ZKmTmVWBFlZvuxeAR/+xVnbu+qOFQB/PWLyYbl/fnU5t/xhkHY4DMDp0mVZfkdOgs3E2 vHSmvDZo0CkGzQJOauZ+8BGGzOUce1aklgsHdhAlXm8ytkcUjvLocjtUd5oplP2QtQgx Jdsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26-v6si7494916pli.36.2018.03.03.23.00.08; Sat, 03 Mar 2018 23:00:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbeCDG7a convert rfc822-to-8bit (ORCPT + 99 others); Sun, 4 Mar 2018 01:59:30 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:42192 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751793AbeCDG73 (ORCPT ); Sun, 4 Mar 2018 01:59:29 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w246wT3l003687; Sat, 3 Mar 2018 22:59:24 -0800 Received: from il-exch02.marvell.com ([199.203.130.102]) by mx0a-0016f401.pphosted.com with ESMTP id 2gfsxqa1e1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 03 Mar 2018 22:59:24 -0800 Received: from IL-EXCH01.marvell.com (10.4.102.220) by IL-EXCH02.marvell.com (10.4.102.221) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 4 Mar 2018 08:59:21 +0200 Received: from IL-EXCH01.marvell.com ([fe80::5d63:81cd:31e2:fc36]) by IL-EXCH01.marvell.com ([fe80::5d63:81cd:31e2:fc36%20]) with mapi id 15.00.1210.000; Sun, 4 Mar 2018 08:59:21 +0200 From: Stefan Chulski To: Thomas Petazzoni , Antoine Tenart 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" Subject: RE: [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports Thread-Topic: [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports Thread-Index: AQHTsj18Q7zohIDi9EOdxXOWqy0sHKO8+ZSAgAKuY9A= 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> In-Reply-To: <20180302170159.258bcdbc@windsurf.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.5.102.207] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-04_03:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=944 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803040089 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.