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 B176AA328D for ; Tue, 22 Oct 2019 08:29:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C21F4C74; Tue, 22 Oct 2019 08:29:47 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10044.outbound.protection.outlook.com [40.107.1.44]) by dpdk.org (Postfix) with ESMTP id 5168B49DF for ; Tue, 22 Oct 2019 08:29:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WyMSLZUqHPgD5IhaQH/0EJhJR6Lv/geaILyv1B9fqQzUkB6CTTc73IjyekZ1gJ3o4SBsHOUcqTpPa5LIskV4uYN79OUYtjtmXRyOI2T8EkyEJ01GZ/KRHVG1nexQAoAp3S+WHPxKfaSjGp7DgP/LuEdk2JhJK092Mcws/DrciS4gL1Dg9zfaN7vT+hYYJXtuQA4PfiIBq3J9iAfdnUMSNlNbie3ZEc+XWWNqYjAU3E5c/LQj6kPEDcEGCUCWdfCC5HQw3HwSMqQ+NDoDB1rRXfpnF0w+m2a+05c2gvv9niOxFzIXzt7/6V88c6dEO31gJDo+wKIAmc25D3sBw8yaXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HN8hO91XWrhPtkFgJ8hgjJbM+MpK9CgGUW2pKXSW6EM=; b=bibPc/Vkvcy34pjaVGZV9uWbX0bQl3aIUmGjip2a8JUDoyOr9TWZPhCMylA65/U7Em+jlKhCJjNhIbal2NrrkxBx0CGkogB+4IHj7GJzAaBER6XM+ixAxREMTDBqrWV4Xj+X97CW9oNbxv/luEbtawPpQAV/rjQdzbqT9c8IapoZ9Oj8ue6q0a8k3GiSLz1PCtlgYKJVWWHWHW/ANSv8wIDz7Zo0d9Rt733fdAYf+x5rODOFzy5MOKNxOy1SVjZVUaTyL3AZhGC6ANsl/vyWKsE99argU9btEdJrJSQVdC4b0dsc0a/WtgUBxJdPCHOEm7ZOedPlz9UaIc4HKyMneA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HN8hO91XWrhPtkFgJ8hgjJbM+MpK9CgGUW2pKXSW6EM=; b=CTG0YlhsAqsGCrmEBBXLXp0Q35YLos5FNfRBrMX1baQWHhO7/D1sit87F1Kn7iipxmdT1IuElHKyIzJxTfIdpYMtrSDT+uEmIP3xAr95ipNtaJ3YYMy4FQlTOHkLDFJV9CTDUTuhiRGHbhGyR08iQoHMxKeP5aY4qYlFxnDItWM= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3700.eurprd05.prod.outlook.com (52.133.44.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Tue, 22 Oct 2019 06:29:44 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::380a:57ee:f35:e802]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::380a:57ee:f35:e802%7]) with mapi id 15.20.2347.028; Tue, 22 Oct 2019 06:29:44 +0000 From: Shahaf Shuler To: Stephen Hemminger CC: "dev@dpdk.org" , Thomas Monjalon , "olivier.matz@6wind.com" , "wwasko@nvidia.com" , "spotluri@nvidia.com" , Asaf Penso , Slava Ovsiienko Thread-Topic: [dpdk-dev] [RFC PATCH 20.02] mbuf: hint PMD not to inline packet Thread-Index: AQHVhLxYTxA8mjc/OUSuHakYs7S0hqde8b0AgAdIN7A= Date: Tue, 22 Oct 2019 06:29:44 +0000 Message-ID: References: <20191017072723.36509-1-shahafs@mellanox.com> <20191017081444.7f91b680@hermes.lan> In-Reply-To: <20191017081444.7f91b680@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9c4b5c53-37b0-459d-8d2f-08d756b93a5f x-ms-traffictypediagnostic: AM0PR0502MB3700:|AM0PR0502MB3700: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 01986AE76B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(136003)(376002)(346002)(39860400002)(199004)(189003)(14454004)(486006)(5660300002)(6116002)(33656002)(305945005)(316002)(3846002)(54906003)(71190400001)(71200400001)(2906002)(7736002)(14444005)(256004)(74316002)(6436002)(66476007)(66556008)(64756008)(55016002)(66446008)(476003)(11346002)(66946007)(76116006)(446003)(9686003)(6916009)(52536014)(7696005)(186003)(107886003)(6506007)(6246003)(25786009)(76176011)(4326008)(66066001)(26005)(102836004)(86362001)(478600001)(8676002)(229853002)(81156014)(81166006)(8936002)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3700; H:AM0PR0502MB3795.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5aHfSOGHrsayWv3x2spbpYgdOdX2DJi+WLEVs5EHJ76gFlLXOzaQq59ULhg1W9rSG+0Ibh3bzFtmNdf2nwSJhuFgVazg7qbfNNdVlhyaeV+oNGO/MdtRE43/NNdtbXAMQp7UCPujDl1ogisPpuHHrTeaWPyjM1vsCSoOC58nwsNqv/aQYaKZEB2CVtDJgvsgUmNybpapDF6u5d9u3zOv5i2qczO/2KNnZV46A3ahFbKPx3kzJW45E3IWF1HPhcelGiTFbLQkTBda44BGsFgRz2y70Hcj28YOEOCB+A7lsUR8SygZTXcSuDkzmvASe7uQulaWTUosDBXhfvou9H1oRMtI9AMqL7SM0EDGOnrXTcawi42T4Njt1Rx8pkhxbQIF/bl3NQog7MnhjbCdm/j3eFhbX1QCOynY1qWJe/Zr0Qv/0ugZ1V6o9VeKSCeDtlyX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c4b5c53-37b0-459d-8d2f-08d756b93a5f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2019 06:29:44.3774 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: f10faWKX5d3ForDkH+4p54TG9E4JyDsEpBXJHf/bmY4Iy4vTS9rk/J3kRfyLAEaeJ8PnMqxWn7gqmq0fU54aPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3700 Subject: Re: [dpdk-dev] [RFC PATCH 20.02] mbuf: hint PMD not to inline packet 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" Thursday, October 17, 2019 6:15 PM, Stephen Hemminger: > Subject: Re: [dpdk-dev] [RFC PATCH 20.02] mbuf: hint PMD not to inline > packet >=20 > On Thu, 17 Oct 2019 07:27:34 +0000 > Shahaf Shuler wrote: >=20 > > Some PMDs inline the mbuf data buffer directly to device. This is in > > order to save the overhead of the PCI headers involved when the device > > DMA read the buffer pointer. For some devices it is essential in order > > to reach the pick BW. > > > > However, there are cases where such inlining is in-efficient. For > > example when the data buffer resides on other device memory (like GPU > > or storage device). attempt to inline such buffer will result in high > > PCI overhead for reading and copying the data from the remote device. > > > > To support a mixed traffic pattern (some buffers from local DRAM, some > > buffers from other devices) with high BW, a hint flag is introduced in > > the mbuf. > > Application will hint the PMD whether or not it should try to inline > > the given mbuf data buffer. PMD should do best effort to act upon this > > request. > > > > Signed-off-by: Shahaf Shuler >=20 > This kind of optimization is hard, and pushing the problem to the applica= tion > to decide seems like the wrong step. See my comments to Jerin on other thread. This optimization is for custom a= pplication who do unique acceleration using look aside accelerators for com= pute while utilizing network device zero copy.=20 Can the driver just infer this already > because some mbuf's are external? Having mbuf w/ external buffer does not necessarily means the buffer locat= ion is on other PCI device.=20 Making optimization based on such heuristics may lead to unexpected behavio= r. =20