From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01FB245B63; Fri, 18 Oct 2024 07:50:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3D2640265; Fri, 18 Oct 2024 07:50:25 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2139.outbound.protection.outlook.com [40.107.243.139]) by mails.dpdk.org (Postfix) with ESMTP id F370F4025F for ; Fri, 18 Oct 2024 07:50:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ni+OcT1ua3P4Gc+Fhe+Q2GFUEKbkwv22ZIivHltOcrDnrdaGZABnccWcMClBFDOCgheFYudCKg8pbEue7OhunuwwB5w/oJIhL22qSVZiLSZ9bi2r0yT3f7kle1oF/XP6WQQG85b1KhrfxW+kzja47wfGaR0v9hXNcmGkBv3f0I/Mn31qfKGPVFbWY30TePpxiIL8ZxFOuBA8RHTGCgt2hG12ASeiFXeTCzOASHwppRDKAuJTIyAJXY8p6Ivery3xhqHwPe1fUnLPKshpPLU9+GUKmIZjb8h4vasRgbmggkDJV5obdHtAyW/RpW9jQavIsMNwsuPYd6N6pINQdiyJtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aIg09W5VFnrCQKJU6seuNphagmycJ9X5jeB17gAIUEE=; b=tlaUOP+1sxydY6hOuj82bj5EtanEIeY2G1ch7wyHCHKnKibbl2lmQ/nbWMT5muTycVHTkN1MdlJkN2FsQg9kKrGoP2WXdoxJ+vEnVTvBb596s5ApSvOykA5K+GuEYNs65YWd/yJWgK8Bm4wY1e85TcHlupg18AE47BffO9aTf8vXn9s0ZrCKkFZ7f3rY2tVAHy+oJOlh97F8m4QdV0Qm8BqgWj+OI/N4nAHTMS4wTaDCae2sPI2aOFqWbGHBZwiOCpD/GXEsCPUBj6y5nGdE6fFYz5FoBXeRYRVGc5Vi0J/HafWMEg9616kF35dAw4gOi2K/etKTCe5YJQi/DKq/ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aIg09W5VFnrCQKJU6seuNphagmycJ9X5jeB17gAIUEE=; b=sT7Tsbfl8mhOsh4Ij2iczhSfaSFHqqHd6TpKr2oBcWlSReLjLVtdYPxM62kh5qqxczYFfxx6w/WRRSaU+jzgt+nC3ue8Fzw6EgBRO3z/qMwWuVg5Qoc+FBHYQ69ZQ5FH4fVqMRuA5YH2nRlO1EKUY1wpfT10Lh5uBIfBOFUkUJc= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BN0PR13MB4648.namprd13.prod.outlook.com (2603:10b6:408:116::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.23; Fri, 18 Oct 2024 05:50:21 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8069.019; Fri, 18 Oct 2024 05:50:20 +0000 From: Chaoyong He To: Stephen Hemminger CC: "dev@dpdk.org" , oss-drivers , Long Wu , =?iso-8859-1?Q?Morten_Br=F8rup?= Subject: RE: [PATCH v2] examples/l3fwd: support setting the data size of mbuf Thread-Topic: [PATCH v2] examples/l3fwd: support setting the data size of mbuf Thread-Index: AQHbIQd52lQtZqBPsE2dGb2c3tRw+7KL0WAAgAADXsCAAAiaAIAAIxvA Date: Fri, 18 Oct 2024 05:50:20 +0000 Message-ID: References: <20241016082232.4005800-1-chaoyong.he@corigine.com> <20241018024253.4075609-1-chaoyong.he@corigine.com> <20241017195916.656dacc6@hermes.local> <20241017204206.2dc20546@hermes.local> In-Reply-To: <20241017204206.2dc20546@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR13MB5545:EE_|BN0PR13MB4648:EE_ x-ms-office365-filtering-correlation-id: c517279b-e01d-4ecb-9810-08dcef38c040 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?BRqJ2t3H/wphMMXk4L8agJJad/wun7DyHr8ycCwdXHLUZ0SB4sJTu7jBPa?= =?iso-8859-1?Q?gKxHL2g7K38QxgadOymZkdcD1KTM1AVsnFZK+Ux0Yak3lvgr0YhP/UJo/z?= =?iso-8859-1?Q?wbTXIXTBoACbvlM2SamMOsni9VoUz0l1gkjLH4jZuliRlQx+aIWYbW8naM?= =?iso-8859-1?Q?m3RfTKLmLpMVxgzRQXxQ7G1c339pk1zFr0aVUpvLtZz2sCNH1yDyzu0zja?= =?iso-8859-1?Q?NknVmKc+NoMpbd5kNSXPxtP6giUxdF+m764ozrpjHLqTXxpyZ8IXNdz8p/?= =?iso-8859-1?Q?igaJ0b+L0YWsYkTjC9p3T9A2HuDMM6QQbbpR+I6PknbVrssea24xSPeka9?= =?iso-8859-1?Q?T2fjhrVN1VQCj7V5w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1?Q?q8fDVJ7aXcl89FfkiSB5UWrjnIpjkI454Fe3xXdWIP7Ua3AzjeO6NLYe3i?= =?iso-8859-1?Q?tQKAtWw+/n7ewvgf7emuSsHCkotaOqw8t0mdAGpvbMm2V8YgeOVOKVGWly?= =?iso-8859-1?Q?UbJz4nVOvRnBTfkvAgZJL8ofAiVZ0bieqWHWWP3MNUsLbFOlAbJLo=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?N65f2E+ed9QEu+Ol2FxHIC+5LFD1soycLhnQv0FcgRWzHYxf7P2CXYXQ9T?= =?iso-8859-1?Q?pBwzqrXYgFI8FWv2/w7sIpGaQcISRy3dR6bB0c/Nxne8lxgG6KfvHhAzJP?= =?iso-8859-1?Q?8ohWhO4HiC8fg71gKF5A79gV8Lbqq4Lc+Ijdn64/Or2EPW/KRO/JF3aNi/?= =?iso-8859-1?Q?QcejX1rVchXAslYSRmACJIJCdMADWGKQC53e9ZSFY80eFdfcefZNrs37fa?= =?iso-8859-1?Q?Jtefffo5TZQkc5YJh0QlQwLuyE9/k0QSfqWiCysS0Jbkm3DAuIcveVXFLE?= =?iso-8859-1?Q?QNJqtj4wk2PfethMotiN7PWjz4yLTraKpsxqzIzO/JbD5Xn8T+X2jY61C7?= =?iso-8859-1?Q?zpsQbVBvUFuZji/6nXxM1jrhGP7V+qgKN3FDA1pnhPYYhbE13L8KWCHEIr?= =?iso-8859-1?Q?YeGKo/vrxWb/zOywomZl70N3d86TiGJvf6bUB4WiaFwk4nm5IqvX0zVruZ?= =?iso-8859-1?Q?DnpxAL1gpdEzw3wlhbVPGh0U9bKUTxyNrCqje+oIc7+ZohI/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Vakey+bPu8icQPuKDMfMuzoWkQNREVRcWR?= =?iso-8859-1?Q?U/srA0YJs4dohLq5PHyIW+BNzVQHwE/DjT9sC5fDIelU/iQ7yf/BEZCPNG?= =?iso-8859-1?Q?r3YV32mU8Pfc8NrOfb2tUWnp27JKItkAwcAwpi+V34N+vmx84AnWOhQEg5?= =?iso-8859-1?Q?Ken+gDyA0arsYRrXOX3r/h+z4QJL0auYFA+8XLyklhM/cp7Vcsi22cFyo9?= =?iso-8859-1?Q?cDNBxqll2gHhcCEPdUXBu/x7O6wtCXiQlI?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c517279b-e01d-4ecb-9810-08dcef38c040 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2024 05:50:20.2014 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: V2j3Dufn41VNKApVboD7vgA2ZXvsh75kISRvOXs35BTwc4KN9zAHv2e08xEImJTzOn7mgdqzAz4dUgq4J8iv7AGtVky94IbMQkYY2kdEiZw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR13MB4648 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > On Fri, 18 Oct 2024 03:21:28 +0000 > Chaoyong He wrote: >=20 > > > RTE_PKTMBUF_HEADROOM); } > > > > + > > > > > > Not sure why this is needed? What is the problem with the original co= de? > > > Are you trying to force packets to be segmented? > > > > Actually, we are trying to force packets *not* segmented by making the > mbuf size large enough to hold the packets. > > > > In our user case, we start l3fwd app with parameter '--max-pkt-len 4000= ', > and obviously the original logic with RTE_MBUF_DEFAULT_DATAROOM mbuf > size will cause the packets to be segmented. > > Which is not what we want, so we add this new '--mbuf-size=3D4096' > parameter, the mbuf size will large enough to hold even the largest packe= t. > > > > Do you think this make sense? >=20 > Maybe query the driver, and use the max_rx_pkt_len as input to deciding t= he > right mbuf size. Sorry, I am not quite understanding here. I can't find 'max_rx_pkt_len' in l3fwd app, instead it's exist testpmd app. Could you please explain a little more about the advice? > If max-pkt-len was 4000 and driver can only take 2K buffers, then use 2K = mbuf > size. > If max-pkt-len was 1500 then use mtu + headroom and round up