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 F01FDA00C2; Fri, 9 Dec 2022 14:59:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE5BC42D20; Fri, 9 Dec 2022 14:59:46 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by mails.dpdk.org (Postfix) with ESMTP id 372DA410D7 for ; Fri, 9 Dec 2022 14:59:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZGvQCJ/BeYONe/zsRPiHeBSCXqNdXZeMbVW1M93LMgi52n1LfuktSscBJ5JddadX2Jw+bAdZjxdvaHmRJ419gNSn6jrBuJfaVBz4m14cmtdZkXdpVyQGCuxSZedko44ZETRHxbokRBvedNN1eJ+s1azPKMQ+SpKMzMf4cokb6JajnI+5oy9nExMxorSEzhOty+RndNNnqOM70GaaHVXQ0eEhMwhSCBSfxnkWzsnpGAJ6WEEIPWCQ2SZr4Tb90E35llRAa3Zzs/8V74g9v5r9YSppzxcdTKiTUgFIU4eDSTnYUlQVMr9+d01w21wLBxAIPa6LIqw/q/kfXgXWFDv+4Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bf07uVLZThkBvGeRN3Cmy+ba7PxrB3vD2NUK0gdMDGE=; b=OriGGFslQ7zF3kQWtbLPloLI2eQuFb2ZPgEaZ1ZzZffzI26wh1fMm4IPSNX6TxrB9oD7/VceB8G9SmMEnlxztDRNDhGX4b6Gc6wPtE6pT9qNmM4yn92g8Rx4djA5h1ZWlSe5z4eXVtRSspRp7WkljtACdhlY8oVr2t9o8vy4NMyDFJtQWXD5HOj0q1C18Qn6BSjJnIhGO1J1OI1ecZn4zQqx8/DlzfHWVVGD5tTWM0xXOATNYCAp0PWqwr7OfAM8f0d05TLdWXq3LWLtkEVEWNVL8IBtHiRJ5BfKY6xcdK70Vem18QHD1X6OddoTO4O913X19PrUNr9dkVidquajMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bf07uVLZThkBvGeRN3Cmy+ba7PxrB3vD2NUK0gdMDGE=; b=vHb1zsv1mnttZcElFhRo/TsRRaR+0wlG8f6c3OMpIhoaUIkLY0wA6COxVuYe8ioBP+LsPDyAsv9B6GGJQ/S/wSaXU2Y13bsVycgqdCW4Vv3Odfh0LF6baHc4jq3RsWbmK84pFL/QfUR0uPRrk+taI7wPBUOrFYVsky9Q2CFNMGQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB7794.namprd12.prod.outlook.com (2603:10b6:510:276::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.18; Fri, 9 Dec 2022 13:59:43 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842%8]) with mapi id 15.20.5880.014; Fri, 9 Dec 2022 13:59:43 +0000 Message-ID: Date: Fri, 9 Dec 2022 13:59:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v4 0/2] add a fast path for memif Rx/Tx Content-Language: en-US From: Ferruh Yigit To: Joyce Kong , jgrajcia@cisco.com, stephen@networkplumber.org Cc: dev@dpdk.org, nd@arm.com, Ruifeng Wang References: <20220412093243.3670187-1-joyce.kong@arm.com> <20220915065825.26169-1-joyce.kong@arm.com> <28278beb-5a21-5ec3-1fdf-d2eb7db72f87@amd.com> In-Reply-To: <28278beb-5a21-5ec3-1fdf-d2eb7db72f87@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0128.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB7794:EE_ X-MS-Office365-Filtering-Correlation-Id: 42d1c4c2-decc-40c6-bb36-08dad9ed9f24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vH3zEXWA4OQf5k71250l+GqldFwxeiSdDNdj4EnAUms/KRR2izwtrBtrW74wwHRbYpgefxbEC7bEz8LTVQ92gdwDue9BqepHZiOftE6vhXWGmy38YfzxSSUL7LfQGCx0BpcfP2ZrwbVqkgnDFpW4BFaeHhjECIyZBPnSr6vUO9EgiMAzPC0prJbndu67Mej3iJy5D6tJqRtZ9aA1YH6FhgHzGaX6BFGpS2kk0lBq7Vgg+YYLnBjlLEorbEVHhKi6KGDBtw+Vq7qJZX4bkH0kWWzbBXSXqB6hzJdVJLTpRrwh8UpgJJ8L/5gOoCSuqroeJ6saBTTMCY92+CNDdcAlJmdFAIaLJN49UvGgnQij9iPLPS+HUCdF2rLNAMTxd1sY99fc/nJT5hCdp6ZF0UwTomaryURqreKGrLihDlKD88XuFUWh7Wp5AFsLEimciikovIvBusp2WVmnUesd7lhfUMi/rD988hbgzemzYIbW9DNcZoUUQS5QA3MGqrYGciyikUbfhQQ/gtlz8HLXS0EDHWoz7c8J1lwDuVqkQqpGu/EdeVKFyxT3eiq2mwEZtSFGkwqyWj0DkT3NNVUCwoDPXP4QzORh3Uleu+HGx0wZRecKEbxPRch/CuxXY5Qsc3Dpim8DqPOnI3dhLXKeKMuAOSJ/i1XyxI7Wp8OXOokDGZnTDUyOddFFYTC85TS+/Ipi6qXN6weQ7/1xX4TIjGT3VxWoQsccQBHP0j8WDgKnsGs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(451199015)(6486002)(41300700001)(316002)(4326008)(66556008)(66946007)(8676002)(66476007)(36756003)(83380400001)(38100700002)(86362001)(31696002)(478600001)(6666004)(26005)(186003)(6512007)(2616005)(53546011)(6506007)(44832011)(8936002)(31686004)(5660300002)(2906002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aWs2Wk9uOGNBTERHQ08xUEQ3a016L3VnbElyN2J0VmcvY0hOb3V1YW50MEIr?= =?utf-8?B?NTZPMVp2TlJ6enFuZjFUTlVBNWxZdHhaN0MyN3IxaVdHajd3eStUYmpyWHBC?= =?utf-8?B?ellkbVN6aWxLbXNmTzM3cDM2NHl3aGRlVktIbmhXeWhhMmpGM0lRdm9uV1VI?= =?utf-8?B?NWY1S0FXZjI1cmJRNFFSRFNRcmNicVhCeFZrcnhrUWhOUTlNeDFnbmlPdFZE?= =?utf-8?B?cU5WMHBpTjZLdFhWK2pSd0RHU0hoZGNY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1VQ1gzRldCK3BRVEJQcWJiTk1IZzUvRHla?= =?utf-8?Q?hVsHRMAcxGIPUFWcalJAtpcQO?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42d1c4c2-decc-40c6-bb36-08dad9ed9f24 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2022 13:59:43.0066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dgvzbDNE/mslIffXnUQGEXdKJodgS169fmzRUvxcyNJ967SnEL7j8y2XLJTvojrw X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7794 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 9/22/2022 10:12 AM, Ferruh Yigit wrote: > On 9/15/2022 7:58 AM, Joyce Kong wrote: >> For memif non-zero-copy mode, there is a branch to compare >> the mbuf and memif buffer size during memory copy. Add a >> fast memcpy path by removing this branch with mbuf and memif >> buffer size defined at compile time. For Rx fast path, bulk >> allocating mbufs to get additional speedup. For Tx fast path, >> bulk free mbufs which come from the same mempool. >> >> When mbuf == memif buffer size, both Rx/Tx would choose the >> fast memcpy path. When mbuf < memif buffer size, the Rx >> chooses previous memcpy path while Tx chooses fast memcpy >> path. When mbuf > memif buffer size, the Rx chooses fast >> memcpy path while Tx chooses previous memcpy path. >> >> Test with 1p1q on N1SDP AArch64 server, >> --------------------------------------------------------- >>    buf size  | memif = mbuf | memif < mbuf | memif > mbuf >> --------------------------------------------------------- >> non-zc gain |    47.16%    |    24.67%    |    12.47% >> --------------------------------------------------------- >>     zc gain  |    20.96%    |     9.16%    |    10.66% >> --------------------------------------------------------- >> >> Test with 1p1q on Cascade Lake Xeon X86 server, >> --------------------------------------------------------- >>    buf size  | memif = mbuf | memif < mbuf | memif > mbuf >> --------------------------------------------------------- >> non-zc gain |    23.52%    |    14.20%    |     5.10% >> --------------------------------------------------------- >>     zc gain  |    17.49%    |    10.62%    |    12.42% >> --------------------------------------------------------- >> >> v4: >>   1.Fix incorrect indentation. >>   2.Fix the mbuf array length to avoid additional overhead if >>     stack-protector strong is enabled. >> >> v3: >>   Add bulk allocation to get additional speedup for memif Rx >>   fast path. >> >> v2: >>   Rebase v1 and update commit message. >> >> Joyce Kong (2): >>    net/memif: add a Rx fast path >>    net/memif: add a Tx fast path >> > > Hi Jakub, > > Reminder of this set waiting for your review. > No objection received on the patch, and I can reproduce the performance improvement. Taking into account that we are at the beginning of the release cycle and will have time to address any possible issue later, I will proceed with the set. Series applied to dpdk-next-net/main, thanks.