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 BC08DA00C2; Thu, 3 Nov 2022 16:20:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0AA742D18; Thu, 3 Nov 2022 16:20:43 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 0347942D19 for ; Thu, 3 Nov 2022 16:20:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667488842; x=1699024842; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=oMf9Rh6EUMkEeupGEgKzQccr6mVUOurjCgqqZnzvnl0=; b=nFwjYQslN4niKVXYdGM32MWZaAjSdle3tV3TqDgGQwxMWWdqOiZXGFsm JjO17bq+9hGmUk69Fx+ak3niQE6wQFRQ5IKCF6UGSAJBTMt8D5v5PReVr KMFjcnl+LFBJ9r2npZKnkRTpwWIA2AXfRVvcv0M8KINsubMp3TL6N6cwx oU6cXVmkXgoESeYj45EehBzv3nYizoXuMELbaMFJwolxZ8fllZ5JNfQ2j LSa4SMWg8UnUhqNcDVFCiOVRtP3fR+yOzO5w3tjIT4Gspc8TCjXv4jvL3 0tEyFI5+Tud/EG1Typ1IcP6NGenl2lfK0sb+olTm6tBrhdJsERH8lLpxK A==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="373944869" X-IronPort-AV: E=Sophos;i="5.96,235,1665471600"; d="scan'208";a="373944869" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 08:20:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="668006720" X-IronPort-AV: E=Sophos;i="5.96,235,1665471600"; d="scan'208";a="668006720" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 03 Nov 2022 08:20:40 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 3 Nov 2022 08:20:40 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 3 Nov 2022 08:20:39 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 3 Nov 2022 08:20:39 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.45) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 3 Nov 2022 08:20:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jda4Qyzkdr8xJWqLF9WX9fE1wxw7LF3KN7/gbBkJ2r9hPUdysCZJNT/3GUq/iOL5BgJ8eKV55e1aiUhaBy0QjB3xPgCdYeEC/e1SZIZwRNMQPYGj3CnBZDjQaom77KTXLDPxL9WcBVjfwlHCAUy6Xuyt5hGDmPOG/OMWDjvqcZzRepb5cVcAFSgNG9ccd8habO0D96qEnDTs33oOzvHwGg1B+1H05Y23rTmfyZRuFZdmAQRSNEtCxoQB0EAUSAeJn04p6WWVq9RnMgWzKK+++2yqXjF71uL/Lsr/HGPRGBnG/R+oYm3VoRlCWwNoF12Pz/5P4bw8rGHc2ruopgIY7w== 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=WW8kPWUnBku0dw8W1uYcBFaUD3DkGmiP4yELz7WsQag=; b=DZkwwujSOLLct1Rw+IhuQeKAOTIcNGMDrCQD+4IWsurFqFG8yvZkXQJD3+QNqcy//tUvstLaS/vGUpjByMnCQ5e9DyCRu8qAPcVP+pMF7XgBClV7nZPFkDWckxcUrASiQxYJ1WCneZJ2z8lNkutw/LYpqYhjs0HzIKhjPjA8pfq7cT1tQs0cLLoV3saS1yTVMyuVgwAWRc55o4kUTqB0j7B8jEDrhlKP1w9QG4fs0Qn5P2gf7QSr0ZwUi1px0aIm0gReE1j0RPdCtPhq/+5ARttkdMLN5CzNDxZSll73YzQyjDWOXKqb4HWKmioWZqQ7uvytmvWnEcOEWkV/PhYw9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) by SN7PR11MB6897.namprd11.prod.outlook.com (2603:10b6:806:2a5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Thu, 3 Nov 2022 15:20:37 +0000 Received: from MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::3ce4:6499:4578:7b93]) by MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::3ce4:6499:4578:7b93%3]) with mapi id 15.20.5791.022; Thu, 3 Nov 2022 15:20:37 +0000 Message-ID: <56eb7c3e-acb0-2c8f-57b8-bdb5d38e8f33@intel.com> Date: Thu, 3 Nov 2022 20:50:26 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [EXT] Re: [PATCH v11 1/1] app/testpmd: support multiple mbuf pools per Rx queue Content-Language: en-US To: Hanumanth Reddy Pothula , Yuying Zhang CC: "dev@dpdk.org" , "andrew.rybchenko@oktetlabs.ru" , "thomas@monjalon.net" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram References: <20221024040757.2012432-1-hpothula@marvell.com> <20221025014005.2054913-1-hpothula@marvell.com> <0069f01b-afb0-aac2-7d63-adc7d55a6ba1@intel.com> From: "Singh, Aman Deep" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0112.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:96::20) To MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB0062:EE_|SN7PR11MB6897:EE_ X-MS-Office365-Filtering-Correlation-Id: f673dd67-3672-4fd8-53dd-08dabdaef5c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GhiGZSgqp+v1S33K+bH/pgbijh8eT5XhLQQ72s7WHuiDand32zX8Gg1b9esIc5adXjZe4uYFCEu2kXOTzmv9QHDldbYlosflenMAnIvWccxUBfjJU4TQKiN9zL9JBUsVIdhiYrK/BFF9b7XI6nWRf6x3imWBL3CBqiXk7F2SLvwokfB/I9bM3tJPzrqgDIGhIkGRn8dzNnxY3JcKLh20BrbCEUeU01BWDaIFFxIsz7OAvvC8TLGUy6TDGFYUGNJasVyA5Uug5q6XPEGTMBzX192JRzvXcJg9dKmbX7F1mCcUpTgXBjccSfomTWYrAgUTgZh/Qa8z+ow1yNLcTKnKqkvf2XobVuVIq8XvhfK6wLhDdL3hGUtDEu/ODazKVfCRe4G0sDolOn+ErEn2vBWeJrZ68tRhrpTbwMRaHrQTsr72wqrOQuP9DX4TwiT5fC63aOg9kVkgJPWLa7z2KsR1Kcu5USkTf3KpPuPS4UAfYXZ34aG395cHi2AhbL9lQC2msHNj2hm/t+UHrfLui+5C2HNEMHkdsTZjskedGHunVqEymoqBLBYQlRqGvdJck5HraeOzTx+oW2KBkyEaf1IAgQbXHyhvxQGQYt8mEumTOS/FVZ5gP5o2nZNzySigGeu5PAKvu4YSKuQR+ZTxRvq7bt52Y9Hy51aT3Bv6KpkwdnU+MEF9TQiznYSkDRLvNF6UUE6iaQk9comp+iBrC4P1cg9ODw53icFQfI4O7iuL48RBdE1AAgX07dk8EptYg8igll+6R7ysUeCj2/VdZVlJxa4EDJ9AU3pJu1IxcrUyUW0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB0062.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(6486002)(82960400001)(8936002)(86362001)(2906002)(38100700002)(186003)(4326008)(316002)(66946007)(6636002)(66476007)(41300700001)(26005)(110136005)(2616005)(8676002)(31696002)(83380400001)(53546011)(6512007)(6506007)(6666004)(31686004)(5660300002)(478600001)(66556008)(54906003)(36756003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?elg1NTRVaU5nSmZNcDAxanZEc2MyOFV1UzJ1RDBGUDd5SEtZeVJkdmhsU0dX?= =?utf-8?B?QWVJZk96NEVuMm9NSktlUEUvTj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QeFVVVXUx?= =?utf-8?B?UlQrczV2UUFmaXBhRHBIdzkrVFA1d0plVmVXOUFvTTlZeXlQNTl6ampNa1dr?= =?utf-8?B?bC95cC9TZCtjZzVydDdZWEJ2cnVlanhpSGpJamRFOEpGQWtIbWdBd0NrZ3Zu?= =?utf-8?B?UjBOb0h0SkZwV2Q1RndJMEQ2c0tTOXVScHBmcVoxWWNZZGdGVjY5ZEJjWTBM?= =?utf-8?B?bEg4MGc2ZThlUUtNR0xsRG1JRi85eCtvdDJ6NEQrVFZuSWFxdDkrS3hPRXJs?= =?utf-8?B?aWR5ZVkvRGtTSXc4Rkh0Yk80c1NTSTh0UFFsR3hNeURzUmZTWEVRblgzMG9H?= =?utf-8?B?SUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: f673dd67-3672-4fd8-53dd-08dabdaef5c0 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB0062.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2022 15:20:37.2890 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X1o9icDjfHMkMkH0W9YCc6ufs076FzwrirKpWOgt6i6PBwM4A0bMS3+kUrJ3J3QOSdWkDdqkv7WNcC//uC8ByX2Dw6yFf6KxJB1EcYGRVAw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6897 X-OriginatorOrg: intel.com 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 11/3/2022 6:06 PM, Hanumanth Reddy Pothula wrote: > >> -----Original Message----- >> From: Singh, Aman Deep >> Sent: Thursday, November 3, 2022 5:46 PM >> To: Hanumanth Reddy Pothula ; Yuying Zhang >> >> Cc: dev@dpdk.org; andrew.rybchenko@oktetlabs.ru; thomas@monjalon.net; >> Jerin Jacob Kollanukkaran ; Nithin Kumar Dabilpuram >> >> Subject: [EXT] Re: [PATCH v11 1/1] app/testpmd: support multiple mbuf pools >> per Rx queue >> >> External Email >> >> ---------------------------------------------------------------------- >> >> >> On 10/25/2022 7:10 AM, Hanumanth Pothula wrote: >>> Some of the HW has support for choosing memory pools based on the >>> packet's size. The pool sort capability allows PMD/NIC to choose a >>> memory pool based on the packet's length. >>> >>> On multiple mempool support enabled, populate mempool array >>> accordingly. Also, print pool name on which packet is received. >>> >>> Signed-off-by: Hanumanth Pothula >>> v11: >>> - Resolve compilation and warning. >>> v10: >>> - Populate multi-mempool array based on mbuf_data_size_n instead >>> of rx_pkt_nb_segs. >>> --- >>> app/test-pmd/testpmd.c | 63 +++++++++++++++++++++++++++--------------- >>> app/test-pmd/testpmd.h | 3 ++ >>> app/test-pmd/util.c | 4 +-- >>> 3 files changed, 45 insertions(+), 25 deletions(-) >>> >>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index >>> 5b0f0838dc..62f7c9dba8 100644 >>> --- a/app/test-pmd/testpmd.c >>> +++ b/app/test-pmd/testpmd.c >>> @@ -2647,11 +2647,18 @@ rx_queue_setup(uint16_t port_id, uint16_t >> rx_queue_id, >>> struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) >>> { >>> union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {}; >>> + struct rte_mempool *rx_mempool[MAX_MEMPOOL] = {}; >>> + struct rte_mempool *mpx; >>> unsigned int i, mp_n; >>> int ret; >>> >>> - if (rx_pkt_nb_segs <= 1 || >>> - (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) { >>> + /* Verify Rx queue configuration is single pool and segment or >>> + * multiple pool/segment. >>> + * @see rte_eth_rxconf::rx_mempools >>> + * @see rte_eth_rxconf::rx_seg >>> + */ >>> + if (!(mbuf_data_size_n > 1) && !(rx_pkt_nb_segs > 1 || >>> + ((rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) != 0))) { >>> rx_conf->rx_seg = NULL; >>> rx_conf->rx_nseg = 0; >>> ret = rte_eth_rx_queue_setup(port_id, rx_queue_id, @@ - >> 2659,29 >>> +2666,39 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, >>> rx_conf, mp); >>> goto exit; >>> } >>> - for (i = 0; i < rx_pkt_nb_segs; i++) { >>> - struct rte_eth_rxseg_split *rx_seg = &rx_useg[i].split; >>> - struct rte_mempool *mpx; >>> - /* >>> - * Use last valid pool for the segments with number >>> - * exceeding the pool index. >>> - */ >>> - mp_n = (i >= mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; >>> - mpx = mbuf_pool_find(socket_id, mp_n); >>> - /* Handle zero as mbuf data buffer size. */ >>> - rx_seg->offset = i < rx_pkt_nb_offs ? >>> - rx_pkt_seg_offsets[i] : 0; >>> - rx_seg->mp = mpx ? mpx : mp; >>> - if (rx_pkt_hdr_protos[i] != 0 && rx_pkt_seg_lengths[i] == 0) { >>> - rx_seg->proto_hdr = rx_pkt_hdr_protos[i]; >>> - } else { >>> - rx_seg->length = rx_pkt_seg_lengths[i] ? >>> - rx_pkt_seg_lengths[i] : >>> - mbuf_data_size[mp_n]; >>> + if (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) { >> In case this flag *_OFFLOAD_BUFFER_SPLIT is not set, but rx_pkt_nb_segs > 1 >> Will it still enter below loop, as before. > Yes Aman, RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT flag to be set to proceed further. > Do you suggest to enter the loop on rx_pkt_nb_segs > 1 irrespective of RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT flag. > Something like, > if (rx_pkt_nb_segs > 1) { > for(i = 0; i < rx_pkt_nb_segs; i++){ > } > } As per the old logic, either of the case was supported- if (rx_pkt_nb_segs <= 1 || (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) > >>> + for (i = 0; i < rx_pkt_nb_segs; i++) { >>> + struct rte_eth_rxseg_split *rx_seg = &rx_useg[i].split; >>> + /* >>> + * Use last valid pool for the segments with number >>> + * exceeding the pool index. >>> + */ >>> + mp_n = (i > mbuf_data_size_n) ? mbuf_data_size_n - 1 : >> i; >>> + mpx = mbuf_pool_find(socket_id, mp_n); >>> + if (rx_conf->offloads & >> RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) { >> >> Isn't above check already found to be TRUE, before we reached here. > Yes this is redundant, will remove. >>> + /** >>> + * On Segment length zero, update length as, >>> + * buffer size - headroom size >>> + * to make sure enough space is accomidate for >> header. >>> + */ >>> + rx_seg->length = rx_pkt_seg_lengths[i] ? >>> + rx_pkt_seg_lengths[i] : >>> + mbuf_data_size[mp_n] - >> RTE_PKTMBUF_HEADROOM; >>> + rx_seg->offset = i < rx_pkt_nb_offs ? >>> + rx_pkt_seg_offsets[i] : 0; >>> + rx_seg->mp = mpx ? mpx : mp; >>> + } >>> + } >>> + rx_conf->rx_nseg = rx_pkt_nb_segs; >>> + rx_conf->rx_seg = rx_useg; >>> + } else { >>> + for (i = 0; i < mbuf_data_size_n; i++) { >>> + mpx = mbuf_pool_find(socket_id, i); >>> + rx_mempool[i] = mpx ? mpx : mp; >>> } >>> + rx_conf->rx_mempools = rx_mempool; >>> + rx_conf->rx_nmempool = mbuf_data_size_n; >>> } >>> - rx_conf->rx_nseg = rx_pkt_nb_segs; >>> - rx_conf->rx_seg = rx_useg; >>> ret = rte_eth_rx_queue_setup(port_id, rx_queue_id, nb_rx_desc, >>> socket_id, rx_conf, NULL); >>> rx_conf->rx_seg = NULL; >>> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index >>> e65be323b8..14be10dcef 100644 >>> --- a/app/test-pmd/testpmd.h >>> +++ b/app/test-pmd/testpmd.h >>> @@ -80,6 +80,9 @@ extern uint8_t cl_quit; >>> >>> #define MIN_TOTAL_NUM_MBUFS 1024 >>> >>> +/* Maximum number of pools supported per Rx queue */ #define >>> +MAX_MEMPOOL 8 >>> + >>> typedef uint8_t lcoreid_t; >>> typedef uint16_t portid_t; >>> typedef uint16_t queueid_t; >>> diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index >>> fd98e8b51d..f9df5f69ef 100644 >>> --- a/app/test-pmd/util.c >>> +++ b/app/test-pmd/util.c >>> @@ -150,8 +150,8 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, >> struct rte_mbuf *pkts[], >>> print_ether_addr(" - dst=", ð_hdr->dst_addr, >>> print_buf, buf_size, &cur_len); >>> MKDUMPSTR(print_buf, buf_size, cur_len, >>> - " - type=0x%04x - length=%u - nb_segs=%d", >>> - eth_type, (unsigned int) mb->pkt_len, >>> + " - pool=%s - type=0x%04x - length=%u - >> nb_segs=%d", >>> + mb->pool->name, eth_type, (unsigned int) mb- >>> pkt_len, >>> (int)mb->nb_segs); >>> ol_flags = mb->ol_flags; >>> if (ol_flags & RTE_MBUF_F_RX_RSS_HASH) {