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 30C18A3168 for ; Thu, 17 Oct 2019 09:27:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAE6E1E864; Thu, 17 Oct 2019 09:27:37 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50076.outbound.protection.outlook.com [40.107.5.76]) by dpdk.org (Postfix) with ESMTP id 464011E568 for ; Thu, 17 Oct 2019 09:27:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=INXitoy7OjfGAOeT7JzWs8h4GI6eHmSOPldbBxmgpiWUvN3K32OskaoJomJORsWKXeHcYm1ftkK3bcJwXCfE6/TSDCtzlJ00fLwpNcdl8Amg761o5vIEQKDS9uF/Gy0wToJuofTxmDLvLhSaaxw6jD/h/3hHCfoGzVtqzLQzWHlu2d0cWn/0z7WXrsZZyd0yDUwpWomr7uucuEhM+0Zerf1KA/WV8vAxAp2xEK3HIVPwyJI8V0OCdKybwJ45Qxq+Rcn1i+z8Nt8il2UC+jM1LaBzxiXD29eH3eV5VuPv/LpUI57s0v18xJRAdYDHc2VNp1d+2NRDKw0eGgfB8sTedA== 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=LfkGBG8BiMe3qrtOUwKn1PgPYz1XpdGfh3O5/0YqRS0=; b=UsIyiHrRFSP7jwOfTjeOdj6EmxNwNdRz5wL2WTMN+91I7ckci2NPxcQfb+ZrIA5D85NP3+oivmQticTT/v1w2X6RgtMbs7322Vk3sezXBsC38FFwrrHB4mplUo3jP7wdsOxaGSIbn3PvsmtXpJlywWqvLVH8yBCZlBog0RYyxXnGqR64B9mJXUMccHS0sfc+OJCoZCCoaMSQUeObpEvffmfSerEdyyUbMYZ4YMsD8hTfHQOTtSCjJzgpWRA91wljHHbPrl++t/kC6p+1C4V0qLwyGUjrj9UI8vB7yHxM3q5vIoe9I+luoY9mgZj8fe4FLLPVLh06mM8+zaVG1p3ilg== 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=LfkGBG8BiMe3qrtOUwKn1PgPYz1XpdGfh3O5/0YqRS0=; b=Y3YICRx9ZjOn89g2dIh1luBCEZrAr9VWxqKpCufbpmKk6qsS7AxtrERfZdEtKh5EiR75dbY5JnmRC3+3W0cn6K3AQxaHtFYK1wdg/CbYKdDA1ylLzWMa34Xe52l7rMbib7XVyx7tCdR6yIRYo54br2XD5Hg5H5MMflFWrNGI4qk= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3763.eurprd05.prod.outlook.com (52.133.50.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Thu, 17 Oct 2019 07:27:35 +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.024; Thu, 17 Oct 2019 07:27:34 +0000 From: Shahaf Shuler To: "dev@dpdk.org" , Thomas Monjalon , "olivier.matz@6wind.com" CC: "wwasko@nvidia.com" , "spotluri@nvidia.com" , Asaf Penso , Slava Ovsiienko Thread-Topic: [RFC PATCH 20.02] mbuf: hint PMD not to inline packet Thread-Index: AQHVhLxYTxA8mjc/OUSuHakYs7S0hg== Date: Thu, 17 Oct 2019 07:27:34 +0000 Message-ID: <20191017072723.36509-1-shahafs@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.12.0 x-clientproxiedby: AM0PR0402CA0004.eurprd04.prod.outlook.com (2603:10a6:208:15::17) To AM0PR0502MB3795.eurprd05.prod.outlook.com (2603:10a6:208:1b::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.188.199.18] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 43057283-b545-4670-549e-08d752d37a6c x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: AM0PR0502MB3763:|AM0PR0502MB3763: 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:8273; x-forefront-prvs: 01930B2BA8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(376002)(366004)(346002)(396003)(199004)(189003)(36756003)(25786009)(4326008)(6512007)(2501003)(107886003)(3846002)(305945005)(14454004)(7736002)(5660300002)(86362001)(1076003)(2906002)(6116002)(6436002)(52116002)(316002)(102836004)(99286004)(66446008)(14444005)(256004)(64756008)(66556008)(66476007)(50226002)(66066001)(486006)(110136005)(54906003)(476003)(81156014)(81166006)(2616005)(386003)(6506007)(6486002)(66946007)(8676002)(26005)(478600001)(186003)(8936002)(71190400001)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3763; 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: BVB8hppuncGYFa4b3l95Uwa4hFlwCSERU0H9kOJCstSXC98itK9RZDQtLWx2K1o7sSzYNDeI+JslIDpPhHSH9jNvE5HUFw7AJQM54xOYcViChKrN+hWIhP8mg2M4xjC82p9R2m012PqEYnwmAHniBJneBtMHpssfNK5q5nJOL4NPZl2BGLyTk1A98VZqvA70M4fufFeuNcmalJ8ax5jIHn/1Ea+eoy6VSJ0Lk1w4tXnh/6Qy+ZXc79DlBkaB4PSQQOzRYwylHMlBLOnuFIi5GfPKo2hJD48cywLrHLNH/FvZN834lGeP/5PV5fGPTePjiftNWoVaL/rmvG7zvjKjCzT66Atamd6QTyJa9M1qLXA/vOkgm7Z3KmeZZ0q+cx4ZKbMV2sWqoHprPzJtNh2Fi1mRCq6Q743lfy4zGkuNaSI= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 43057283-b545-4670-549e-08d752d37a6c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2019 07:27:34.3750 (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: ijtT83R3hJ88HBITyfdtohXohBTwtYtOxfsN6PRvzorjIPqLGwHPrrw2k5jR0mNtNKuTr5HC0qNF8giElkMLBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3763 Subject: [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" 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 --- lib/librte_mbuf/rte_mbuf.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 98225ec80b..5934532b7f 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -203,6 +203,15 @@ extern "C" { /* add new TX flags here */ =20 /** + * Hint to PMD to not inline the mbuf data buffer to device + * rather let the device use its DMA engine to fetch the data with the + * provided pointer. + * + * This flag is a only a hint. PMD should enforce it as best effort. + */ +#define PKT_TX_DONT_INLINE_HINT (1ULL << 39) + +/** * Indicate that the metadata field in the mbuf is in use. */ #define PKT_TX_METADATA (1ULL << 40) --=20 2.12.0