From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D12DDA0487 for ; Wed, 3 Jul 2019 11:43:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B57201B964; Wed, 3 Jul 2019 11:43:03 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id EEF021B958 for ; Wed, 3 Jul 2019 11:43:02 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x639dvBk012223; Wed, 3 Jul 2019 02:43:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=SOsZAFTWtjdxS69nteufXOjynML9bPw3shDxlerLlV4=; b=tW3AYzmjAB/qNUpxwAGeJW1eSqnTtbw7Ps8UJw4Odi7XuYds6Lncf5jJfvPrfo9EgjJ0 O+aaxMTkoyOe7NTvLuwKvZJN1sHwf6lGWDNpr+4FIr8p3Fq1dlTxiEKz0PH6nE+WWjxS dBL1o5lQe+do95wxmvIBOB9kXJrO3N8AAxz4nC3kUF0Z+tifsfcQl6KsMKoarntvmSwB pnfb8G17for23JhOkAriqy3Pg9Xbel2EaxXsEId4dT6mQ425ANDNeiCKcQtCMRmkig49 i8QB+qhVq0TyDFXg59Cxiq0AVi+6gg3ayR2xX5EYSdNWpCAhW4W1RFWDU+YGFvzHgOI5 hw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2tgrv18890-10 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 Jul 2019 02:43:01 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 3 Jul 2019 02:42:43 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.50) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 3 Jul 2019 02:42:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SOsZAFTWtjdxS69nteufXOjynML9bPw3shDxlerLlV4=; b=GhxaVs+XFsmmhomlEI+YA5yck1QEZ4BCOEgI5anlqmAd3sHNYpNxsZsk+N2H5BqS1wM7tkcpNG2ugbGd89SduW8DrI/Amr96dF4KDVs9dsg/KfxzEStfcp9fW8b0bPgdyuHRC+p9HGYr2qBR94ByvQ+OlUouRWhS1nBLDoMYd0M= Received: from MN2PR18MB2640.namprd18.prod.outlook.com (20.179.81.96) by MN2PR18MB2895.namprd18.prod.outlook.com (20.179.20.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.17; Wed, 3 Jul 2019 09:42:41 +0000 Received: from MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::d050:30de:6ad1:a3e8]) by MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::d050:30de:6ad1:a3e8%7]) with mapi id 15.20.2052.010; Wed, 3 Jul 2019 09:42:41 +0000 From: Krzysztof Kanas To: Ferruh Yigit CC: Krzysztof Kanas , "dev@dpdk.org" , "John W. Linville" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH] net/af_packet: set default blocksize to pagesize Thread-Index: AQHVKpmbE++MnuKXlES1llcs4CoWUqav1j2AgAjb3AA= Date: Wed, 3 Jul 2019 09:42:41 +0000 Message-ID: <20190703094238.GA13142@kk-box-0> References: <20190624143200.10369-1-kkanas@marvell.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.233.58.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 52c6bfbc-de99-42a3-1c46-08d6ff9acadd x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB2895; x-ms-traffictypediagnostic: MN2PR18MB2895: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 00872B689F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(4636009)(366004)(136003)(346002)(376002)(396003)(39860400002)(199004)(189003)(6436002)(8936002)(68736007)(4326008)(2906002)(8676002)(7736002)(476003)(186003)(81166006)(86362001)(305945005)(66446008)(53936002)(71190400001)(6486002)(66556008)(66476007)(64756008)(478600001)(71200400001)(81156014)(1076003)(73956011)(66946007)(486006)(99286004)(76116006)(91956017)(33716001)(9686003)(316002)(66066001)(256004)(6506007)(53546011)(6512007)(3846002)(102836004)(25786009)(54906003)(76176011)(446003)(26005)(11346002)(5660300002)(229853002)(6246003)(33656002)(14454004)(6116002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2895; H:MN2PR18MB2640.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: YrnkGPY0lx4pq4Eo3nXrv1ReKfhhwpHEmmi8f1dmwPtHNUPVTrGMM7RaOCTpyOknnQPqWaGofUfUBsCjjrQO2ZDuVu7ymSkYxKkVC6DwHQici0rGkoS+J4Pwi21wFery8onOjEApt+U9l9sMyZwoq9WVWxo5qjOqROgUoSaRLFWZ3l1KKwQ72nBPFRbvpUdHHeZK3/7fdO6pqCXKJxPD8OVox+Yz0ZeII0cue3DUSgiJNebjG4tfsy4ZrrWw2xTlRcH3i2clwlg/Lq/KdLMIS0WXIWkuUgoezXQjCXxj3sKtO8iw6YrNNa/M+fFWJb0E3XfRGCsYf/MRg1FjeJlsy3cogq0oC2Q038xBS2M6ebchnEOUFbm+LQykrt2KnJ4SGD3X1uaM70ornKOs+rGkGKEddlRMckrXdHrm2lfn8bs= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52c6bfbc-de99-42a3-1c46-08d6ff9acadd X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2019 09:42:41.1189 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kkanas@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2895 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-03_03:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] net/af_packet: set default blocksize to pagesize X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 19-06-27 19:25, Ferruh Yigit wrote: > External Email >=20 > ---------------------------------------------------------------------- > On 6/24/2019 3:32 PM, kkanas@marvell.com wrote: > > From: Krzysztof Kanas > >=20 > > Kernel validates block size to be aligned to page size. Code works on > > platforms with page size 4k, but on others e.g. Arm64 fails with defaul= t > > parameters. >=20 > What is the pagesize in arm64? On aarch64 it is configurable. Linux kernel, supports sizes 4k, 16k, 64k=20 see ARM64_64K_PAGES in arch/arm64/Kconfig. >=20 > >=20 > > Signed-off-by: Krzysztof Kanas > > --- > > drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af= _packet/rte_eth_af_packet.c > > index 4a660d5f013f..ec3d2cbb5202 100644 > > --- a/drivers/net/af_packet/rte_eth_af_packet.c > > +++ b/drivers/net/af_packet/rte_eth_af_packet.c > > @@ -32,7 +32,6 @@ > > #define ETH_AF_PACKET_FRAMECOUNT_ARG "framecnt" > > #define ETH_AF_PACKET_QDISC_BYPASS_ARG "qdisc_bypass" > > =20 > > -#define DFLT_BLOCK_SIZE (1 << 12) > > #define DFLT_FRAME_SIZE (1 << 11) > > #define DFLT_FRAME_COUNT (1 << 9) > > =20 > > @@ -811,7 +810,7 @@ rte_eth_from_packet(struct rte_vdev_device *dev, > > struct rte_kvargs_pair *pair =3D NULL; > > unsigned k_idx; > > unsigned int blockcount; > > - unsigned int blocksize =3D DFLT_BLOCK_SIZE; > > + unsigned int blocksize; > > unsigned int framesize =3D DFLT_FRAME_SIZE; > > unsigned int framecount =3D DFLT_FRAME_COUNT; > > unsigned int qpairs =3D 1; > > @@ -821,6 +820,7 @@ rte_eth_from_packet(struct rte_vdev_device *dev, > > if (*sockfd < 0) > > return -1; > > =20 > > + blocksize =3D getpagesize(); > > /* > > * Walk arguments for configurable settings > > */ > >=20 >=20 --=20 - Regards, Krzysztof(Chris) Kanas=