From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0044.outbound.protection.outlook.com [104.47.1.44]) by dpdk.org (Postfix) with ESMTP id AB47F2C54 for ; Tue, 24 Apr 2018 23:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1Sdb9z0gJozxRDWUmDwjROMfKWQH12cKeMHVY91Xdu8=; b=bSbREJ4Ux+5MBd5K7Du73dtcrvMK8C+1wHY+hkbgGsdQn21BB/3Rj7JTZcoGNZ7Yu2LZ14K4I0Gj+7StYvvoCTofe5qe24wr7oZsq3zlne1KFvMTj/fmdQAhocWErA4pALWRmbo3+R5uBpgvvfw6HNpHo6+GwrnzrT5z2y0DIPA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from yongseok-MBP.local (209.116.155.178) by VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Tue, 24 Apr 2018 21:53:50 +0000 Date: Tue, 24 Apr 2018 14:53:41 -0700 From: Yongseok Koh To: Thomas Monjalon Cc: Olivier Matz , Andrew Rybchenko , wenzhuo.lu@intel.com, jingjing.wu@intel.com, dev@dpdk.org, konstantin.ananyev@intel.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Message-ID: <20180424215340.GA88208@yongseok-MBP.local> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180424191538.exjgzoif4odhndew@neon> <1963503.R6hUdDjUTB@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1963503.R6hUdDjUTB@xps> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BL0PR02CA0009.namprd02.prod.outlook.com (2603:10b6:207:3c::22) To VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2045; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 3:oJLlvdtd5sgV2Rzhz+bWJzYvU0owgEGELp0vd2msEsXVwDEqKe0ljt6iZ8loMCWUOYPtlWzfrFhbrqzVBdZuQE7r76Ocm3RYlBervBLZovOnwMstbio39a8/kQlawSAMm19iZDCnrGbvoGe4MA7yNH2tH2cJWJkhk6QaUBxUytCEGXrZaF1oxONg+9HKs0qNO+jOMhoDD+etJe53/OWCBLVLHWrlDwOzwwyVor3RDqzmYNm3G0b4u6R60hXCZt5G; 25:NJxH+w4SVzoDYgwX1jUweg14d1fT7mDwzVuP0HNEHcggi3Ul0EaTvw/n1b7U77ngO10JC5ieBZQuXaepUI5z12+JzrF8xHU+8A6FkfumcnQ/dNjGhGciTp+/2dI2E0oUMoecLdxDKMRH9BvsGVi8QKaDsEefJtiQdjb7W6/IPXhQlTsMATQbQSB5tVZIJe7Oz0VxbE9Pw2husHJxrmaGkISeciOFtRNUCE/46hQikUGK6r/kPDKNNejGluEAUcqEkMw9lqy9LNKw1cnbJ+CoWoCG+d3zHMGGtDKvKFuwOLJruZXc5av8NWtN15AFfvYsS/8xwGWd1/YG5C5yIAK6yA==; 31:vjhcDoYNJbtmq2CUZgtuW1lkluPn+8Qg6++pw31+BpUV/5OjwVvA8eZsZ6Ut9IbIy5NHCDmvhQCQpVezB8pWEPpuaBPND1CF5Q1eEsDGDxueqDGSJHl5GHVS/f6v9+8FE97VxZrNTbsTryY3joLib8Tjt1rBMb+X3+2WgGRyVzVlOT6ueUdTxUl3XigTj4PX3uIcXO/w6VHgS52zc8nW+eau5JhWWQvwaMejHcX1ec4= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2045: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 20:jL/waOtSIgtTyWpZZG3udXUd6O+iPDp/WDIaNZpiRTiLi0bfXiYncaBp/EpC8Z1Eb+7tzwTxQrtbJnT/3d6cI1G+EpOrAA5lUefaN/EpxLdZwu5wvRBHo3/FKXkV3/+0z1eoVxdwLhp65WXK2mmDxsJ7MnhA46/Fc2iDaBg0FkGID2zfHftEX51ONgQK8DsuQFJ7QDVbBbI8K37BhciVvxnU1aAMJgeMUFD08F5+/b8vLdTY+z1kkxnEIpCuxCLHt4LpT5Mt3rF3vaJ7n+ID6biLcNBXVm/0o5UAwvppm9jC0iKqaAPI14lj1IyEOJyyuGtsttk5F7JrpZ7fDlYHRv09PYFJ17oXDCXoszqlsVrWt0ro8nkK2e2Z4GH/wSRAilxNtVLq2n8hlGX79c3Lw/4XoBa6mPIv2CuSe3K1MROVW7GBKqxDh8WS1vYyd9jSyLZNhHQl7SDtF5I92kYgmEJrBPM4tBwLWyXLQslrrJAj7NMQYimohEZwdTbZy+AW; 4:PgG+DXzJ49ol/LFWNT0hSaLwnS3PL1gMwG+kSBovM9kn8xnbf/HNGk4vrEN4OehinjU66O64LZvKOfKDwyS18SYOMFsY2pUw2o9ome9wJRE1FtHLodPG4ef3jyU1t5ZKZG5RqIx+bZTis6zSgpONskeNAbRzWMuWHqjqR41YQkIabktI8eAoucZ1NeF4usyi66NmAdm6kQg5HYKx7Qf1l4euV4dZVTjPhNeLX1ZF7Vp5c/Eqb8EzslgFQpnr2EL57nFgXdQt36UdAooOQ68u1g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0501MB2045; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2045; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(39380400002)(396003)(346002)(376002)(189003)(199004)(69234005)(53936002)(93886005)(9686003)(186003)(55016002)(16526019)(956004)(86362001)(229853002)(25786009)(47776003)(5660300001)(66066001)(305945005)(16586007)(54906003)(476003)(2906002)(6916009)(6666003)(11346002)(486006)(446003)(81166006)(478600001)(58126008)(7736002)(8676002)(5890100001)(3846002)(6116002)(8936002)(26005)(68736007)(81156014)(53546011)(6506007)(59450400001)(316002)(97736004)(33896004)(76176011)(52116002)(7696005)(106356001)(23726003)(1076002)(98436002)(33656002)(50466002)(4326008)(386003)(6246003)(105586002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2045; H:yongseok-MBP.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2045; 23:4UVns6lrUpojODRSGGFIxbLloLrz1Ccf6RNpUPG?= =?us-ascii?Q?Eo80H2XvaAqqLotAvAniE6g1c+JMlUsSg7OqdWc+w+bvM99hIDASzVPErp0Y?= =?us-ascii?Q?3HS16xl89ODn68XrgdkpAnrP2Xx89WQwH4T3mEAZBo87oNe+GWoL9ugOgKXp?= =?us-ascii?Q?6/cayQp9S6uqhgSSQ8uFxFbmA5ZkAq+/9ZcqZcJps6Rlm/qeUI/LK7nU2uSD?= =?us-ascii?Q?TeC2ltGJmE8Tng8xCpTL2TeP1V9hLtAleq6jYLJORdi122vblNYVlH3U2CTN?= =?us-ascii?Q?qngCR1J0vxMHJGoo63ctjZ5HbjtN+f1AqPUDywG/ISlts442/Rq3dA69pVfB?= =?us-ascii?Q?mrOGmXp4ffVySfZbH8sX9lL7DbVdRIwhmANjx18QhS9aBSGPkWn8aBsFn5Dq?= =?us-ascii?Q?+euhAcMlkEyi0GuFW5cPBJzc8r64RedA1b1bDMgnwQhp4Hse0Ul0WTnxy5dq?= =?us-ascii?Q?aoSPdjFhDemgIadWjIZqkl8Mntso9HqxXDawn+nJGRXJWM+N8inrLMJBOYa/?= =?us-ascii?Q?9aQ30HYn08ZMdkq76+zEz8TAZVHsxephjaSIfMCxW5AYvoqdutHaMG0XZWEO?= =?us-ascii?Q?WnJQaW3//4qPlgKrelJ4jmv8wW7rJj1P76qmOHgqPRoDjIrgh5+id0dC+o5M?= =?us-ascii?Q?UXDuSTOBJ8u8X4a6O0OxURaIvMfmyX2ySKoULXeyBtQmAqBxPwJJKfZqw9du?= =?us-ascii?Q?NZHXP+D02B5A2DwUENqlezMILRAWkvumrI+TxoUztbAXrx1IpxvlKU00U2cf?= =?us-ascii?Q?bNn3X2LvhrAYIel5/POKri0OnskE3l+mXoPvIob4SWFJGe6awmN39rVU7oBk?= =?us-ascii?Q?GEIcTWUEOx01KPhQ6fyLMcZ/ozI0qf03QQci8OzpIn3K/ij44DvrY/6XJubs?= =?us-ascii?Q?B3++Wx39MzWml3zFUQFozLAQs0vvxCi4k5AJ1jTUAFkapnQcZJZck4706i1Q?= =?us-ascii?Q?3rSewlrjOb9UN6saM/6F//ZxxFQPPOhM+jmw+6awKyHs9xkH2ILyAxr4J0LY?= =?us-ascii?Q?92MxZov5n+QNEQQpw767DRbUNMUEvqgtjbbtFGcW+tAXaVPG+thdR2rm9PJX?= =?us-ascii?Q?pbSwSvuspLIzGVALiiIk82OW5kmaQiLuQrVq7gye4yO4oj9KPpfHJN+KAhxD?= =?us-ascii?Q?t8Vj7J7HkMo1cpFut7mhk70hEBe6EziW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X/Wgw==; 5:2cO8cg9LxEJoUHgTW6qY35jRrjR4lCNmm7h5dKLg5rOqayjNsC6tbE7VJT0JV31Lr4ZH6zVbQSYcaVr9cr6akQT4O7ttlAdk6TOvmMwnehi9oUkbQkzd3ncaM86QwXadcNdxb+/4sScG4c2WV7ZPzD2SRlrOw0bT1UwoBwqhwkQ=; 24:K1J+aFc3GQ/2rFDfAnzjFOqyfyRfKhE44mUm9SlzK9srHfJmT5dgvEMOMragzsqkUXeECi2cckc4Y+8tUBmKN5Nj1HvYWUEMy9QRjgzK7s8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 7:xCZISWS9iZNHNHlvhyY6+zmWQsgwkTYnVagyH20jf/6Fdqg0iIdvD7ZeSvSBKCWN+u2oetOxjlVgpvwKbfZcxSpp+aOVutDDbQDye/9MepTIgJ6Y/GfwkNQuU8DYxLHbkIPe+lwtB7/7sZ0kxa2g8PvrLW+CBo/jdDfBotiE9GNdprcvh5LNUTq+lRYq9dnk9OTIfEMe7zELQ65dEj4i3TbWBB90raH+stXRQ8vc1ujQ/v1e4HSyblGZ70QCBZb1 X-MS-Office365-Filtering-Correlation-Id: 4ebb03e9-d1ff-46d0-b283-08d5aa2ddea9 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 21:53:50.9956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ebb03e9-d1ff-46d0-b283-08d5aa2ddea9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2045 Subject: Re: [dpdk-dev] [PATCH v4 1/2] mbuf: support attaching external buffer to mbuf 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: , X-List-Received-Date: Tue, 24 Apr 2018 21:53:55 -0000 On Tue, Apr 24, 2018 at 10:22:45PM +0200, Thomas Monjalon wrote: > 24/04/2018 21:15, Olivier Matz: > > On Tue, Apr 24, 2018 at 09:21:00PM +0300, Andrew Rybchenko wrote: > > > On 04/24/2018 07:02 PM, Olivier Matz wrote: > > > > On Tue, Apr 24, 2018 at 03:28:33PM +0300, Andrew Rybchenko wrote: > > > > > On 04/24/2018 04:38 AM, Yongseok Koh wrote: > > > > > > + * Returns TRUE if given mbuf is cloned by mbuf indirection, or FALSE > > > > > > + * otherwise. > > > > > > + * > > > > > > + * If a mbuf has its data in another mbuf and references it by mbuf > > > > > > + * indirection, this mbuf can be defined as a cloned mbuf. > > > > > > + */ > > > > > > +#define RTE_MBUF_CLONED(mb) ((mb)->ol_flags & IND_ATTACHED_MBUF) > > > > > > + > > > > > > +/** > > > > > > * Returns TRUE if given mbuf is indirect, or FALSE otherwise. > > > > > > */ > > > > > > -#define RTE_MBUF_INDIRECT(mb) ((mb)->ol_flags & IND_ATTACHED_MBUF) > > > > > > +#define RTE_MBUF_INDIRECT(mb) RTE_MBUF_CLONED(mb) > > > > > It is still confusing that INDIRECT != !DIRECT. > > > > > May be we have no good options right now, but I'd suggest to at least > > > > > deprecate > > > > > RTE_MBUF_INDIRECT() and completely remove it in the next release. > > > > Agree. I may have missed something, but is my previous suggestion > > > > not doable? > > > > > > > > - direct = embeds its own data (and indirect = !direct) > > > > - clone (or another name) = data is another mbuf > > > > - extbuf = data is in an external buffer > > > > > > I guess the problem that it changes INDIRECT semantics since EXTBUF > > > is added as well. I think strictly speaking it is an API change. > > > Is it OK to make it without announcement? > > > > In any case, there will be an ABI change, because an application > > compiled for 18.02 will not be able to handle these new kind of > > mbuf. > > > > So unfortunatly yes, I think this kind of changes should first be > > announced. > > > > Thomas, what do you think? > > What is the impact for the application developer? > Is there something to change in the application after this patch? Let me address two concerns discussed here. 1) API breakage of RTE_MBUF_DIRECT() Previously, direct == !indirect but now direct == !indirect && !extbuf. But to set the new flag (EXT_ATTACHED_MBUF), the new API, rte_pktmbuf_attach_extbuf() should be used and it is experimental. If application isn't compiled without allowing experimental API or application doesn't use the new API, it is always true that direct == !indirect. It looks logically okay to me. And FYI, it passed the mbuf_autotest. 2) ABI breakage of mlx5's new Multi-Packet RQ (a.k.a MPRQ) feature It's right that it could breadk ABI if the PMD delivers packets with external buffer attached. But, the MPRQ feature is disabled by default and it can be enabled only by the newly introduced PMD parameter (mprq_en). So, there's no possibility that 18.02-based application receives a mbuf having an external buffer. And, like Olivier mentioned, there's another ABI breakage by removing control mbuf anyway. So, I don't think there's need for developers to change their application after this patch unless they want to use the new feature. Thanks, Yongseok