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 084B3A0C43; Mon, 18 Oct 2021 10:54:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BFC840141; Mon, 18 Oct 2021 10:54:52 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id BD9FB4003C for ; Mon, 18 Oct 2021 10:54:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10140"; a="225662539" X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="225662539" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 01:54:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="565954390" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by FMSMGA003.fm.intel.com with ESMTP; 18 Oct 2021 01:54:48 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 18 Oct 2021 01:54:48 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 18 Oct 2021 01:54:48 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.46) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 18 Oct 2021 01:54:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1+9uEmaZnuoKgaa7clu+piUE3cIQDMhkdPBsNxITSMArHYfX4Fzas4mmGvK+z7s/nvsBgzHsRcRlZ5lO0QAlkVhDh0RKtZdcvmmo5UITpt90oChfLBCGVgZENnPwI6WEDQV9/88/Txw2tBjtmw4dCb5wGxCTrHifxRuVswLZDn3su/u1DB+Sxm7l8TwO9oFkqbhuDQy9b1Q2rgHxLNBgl3m3giREo471YQsCb+xgU08KyV+60vdqxlTwmfzE6ow2/3zsY+/uV+NF/MHoWxY2JBDtqJr1EpU5oppqre/egOVqI6UutuJY0KFAI2dLgzHmGetIVvBzFYUMh7IX7TjBQ== 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=dI5R4MOIFaL7/FA/i+A8bF555yZwN9pyY+LVeWVTYR8=; b=UB2a8QANHGtu21xhjeHZPVS/05dey3nIp7Bjg9riKOeeVwX/0t5wU4Mx3z4G7T7261BquwAwcWnKMjQIj+IP6lL5APNnckoO5abxBoievIgn8L039BEq6X7AmVC/oVcdVKPmiEBbaXfwlpCcDU6tzISHioo67l5MneCTQseSCBAOBbbaHXL2d/yX7ajR4pv0OScyZoKazQpKH+WISXAkROSoZZxkRET+0ET3GhIaVTW5U9i0k70Kv07Nnni3fSe912WySzyP9RpwunMOrPbf/lWPRrOJ8ZTUCQueAk2hwXsROHHZE9IlD7rePuAoUbDKWfYx2HNA6CkVJQrDP3us9g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dI5R4MOIFaL7/FA/i+A8bF555yZwN9pyY+LVeWVTYR8=; b=VowSdNNt3s3rkmMfu3UV+bhqLAC102dBZtzQxhEWCOZZweetVP7vzAZ1TVSJtHrEJwFjKc5Ntt3vQGDmjgim84h4yGtCTG0SUEJPES2/5TtmzAHdNE9Xbxp2iEKa8yqj6RApCVpIrmwB9iif4Helyl/1NwvQ0bZUCjMsZkdrW6Y= Authentication-Results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5109.namprd11.prod.outlook.com (2603:10b6:510:3e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Mon, 18 Oct 2021 08:54:38 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021 08:54:38 +0000 Message-ID: Date: Mon, 18 Oct 2021 09:54:21 +0100 Content-Language: en-US From: Ferruh Yigit To: Jerin Jacob , Xiaoyun Li , "Chas Williams" , "Min Hu (Connor)" , "Hemant Agrawal" , Sachin Saxena , Qi Zhang , Xiao Wang , "Matan Azrad" , Viacheslav Ovsiienko , Harman Kalra , Maciej Czekaj , "Ray Kinsella" , Bernard Iremonger , Konstantin Ananyev , Kiran Kumar K , Nithin Dabilpuram , "David Hunt" , John McNamara , "Bruce Richardson" , Igor Russkikh , Steven Webster , "Matt Peters" , Somalapuram Amaranath , Rasesh Mody , Shahed Shaikh , "Ajit Khaparde" , Somnath Kotur , Sunil Kumar Kori , Satha Rao , Rahul Lakkireddy , Haiyue Wang , Marcin Wojtas , "Michal Krawczyk" , Shai Brandes , "Evgeny Schemeilin" , Igor Chauskin , "Gagandeep Singh" , John Daley , Hyong Youb Kim , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Yisen Zhuang" , Lijun Ou , Beilei Xing , Jingjing Wu , Qiming Yang , Andrew Boyer , Rosen Xu , Shijith Thotton , Srisivasubramanian Srinivasan , Zyta Szpak , Liron Himi , Heinrich Kuhn , Devendra Singh Rawat , Andrew Rybchenko , Keith Wiles , Jiawen Wu , Jian Wang , Maxime Coquelin , Chenbo Xia , Nicolas Chautru , Harry van Haaren , Cristian Dumitrescu , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , Declan Doherty , "Pavan Nikhilesh" , Kirill Rybalchenko , Jasvinder Singh , Thomas Monjalon CC: , Huisong Li References: <20211001143624.3744505-1-ferruh.yigit@intel.com> <20211011235345.851742-1-ferruh.yigit@intel.com> X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2PR04CA0352.eurprd04.prod.outlook.com (2603:10a6:10:2b4::23) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0352.eurprd04.prod.outlook.com (2603:10a6:10:2b4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Mon, 18 Oct 2021 08:54:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8c65477b-f55a-4d64-eebe-08d99214ea2f X-MS-TrafficTypeDiagnostic: PH0PR11MB5109: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nAmASvEAiTV6UxlHyhP3Vm1pZSK5TD1CEcT7KqcSq8eoZOjCFP1vyxdCoKC6TXa4c5iLMDGuNneo66FE0MYPrJxDTnJtSRSgDbMUCGZWl4o/FwlJOEES32so1F0jghYByIYrH99XnCtdf5t8qusqzNYxEXWOwwnIQelaoGdmECsgfizWTvaGrv8soXQLBWauQ+r570ciaeOZbAqAKom+Oor3Itj1vWY7z8VzF2zdU6gCI56DMrPe+nAiWmf0FzU84N8Fe7DiiUZuvzXksm0gg4VwxS3bqBMahJSbghGA7/R9bC3ALWEhCfMx3Axzotzl7edAGDjfc1IpkV3BDSmDQGuSTVBKh9nPf/lmKphTY34rzhd0CGPZJZRDYw4U7yGMIvO/QqV78gQydtR3gVnk9YY/okt4z7iOsq79dlFcR28OCvXhiIM7k04Wnw77olUWASNJVhmDvHGoLaEhes89YZJ6e5tmZWRxh7AhTywsnI4PNxdlRSSuMDKI7P04d7igrKnowqFi+fAjjt3KYs6lTNJ/E3rSklTJBQ4y6zDcD6JxFH8erDQrlfsGHBoDoO+tqV4oE/smkGUBjNEpSQbA4WBHdGattS6Jz0IrbcCcZA0m71XLVfr7kFViRPksYs5waH7JPr0J1a/0t9Y8R5p5HCbmaozUCc5FCAHG5F4jcSwU0b9/8Xeqldi1U3BfB8SvimL4WOj+wLY22oB5Um7e49RhmMGRzuMVLu/YM1yVvaY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(66476007)(66946007)(7366002)(44832011)(7416002)(86362001)(2906002)(1191002)(7406005)(31686004)(16576012)(110136005)(186003)(2616005)(26005)(82960400001)(508600001)(5660300002)(8936002)(36756003)(83380400001)(316002)(38100700002)(921005)(6666004)(53546011)(4326008)(956004)(31696002)(8676002)(6486002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ME9vWWFiVDFBdmh2OWc4amQvT3k3Q2lxYXJMV1YzSExHZ1BTdG8zMzJiSG92?= =?utf-8?B?WlBhL3FkSTJmOXBkdk9ieFJhbzErVUVtR1BncHNNVldGenZFT243VlZnNndO?= =?utf-8?B?aGRPOTg5cGg1QmQ5L2pTWWZ2QnhHYW8zamVGUjNvL3FockNjRG9GcURvWnBk?= =?utf-8?B?eFMvVHJDWUpvSW5yZXR1NGVyMUdEdGJmYzd4UGQyL3pMejlYZnVPZ0pqZFZh?= =?utf-8?B?TkR3K0lTSStPV1ZWcUNSSXh6bXlEdStpUzNBUGxiMjJRb2NHZlNjQnNyMWtM?= =?utf-8?B?bUZSV3o4VUIrV2pmbXp1anNDRkFSK3JoMkI5RGlDWWZCajNCbHRnaUxyK1gw?= =?utf-8?B?bXNsekFqTHBMUjF4UWNFYmNmNE5TZjZSMDhXSUNlSjRZUFNJT3lqOHRtNGdH?= =?utf-8?B?RXgvMjB2dkRKMXVEZVJWSWRweVNIN3lPYld5NDlKK1MrTEl0QkRNcjkxVUFx?= =?utf-8?B?UkRscjNhVmhZM1FxZGNpUzJEb3dud2Y2YXEva2c2NzJWbTNIOEJENEhyZlNM?= =?utf-8?B?dyt4bGdwSVowTlBLRndRUVNRczZ5em1qWUZvajhSeTRmY3NZZkZGRmx3dzJZ?= =?utf-8?B?c1E4M2tXWXpnMHhmbENRTFV4c1pnOXc0aXRyS0VHZlZkekN4T2Z4TkpQSmZL?= =?utf-8?B?dkZ5NURYQUlNbFozYXZNUWF3OExIVGc3Z2tCc05wWUo3RGoyUi9YenlHQ1RS?= =?utf-8?B?d29DWXUwQi9FeWc2dUxYNWVBd085bTVUc1ZjMmFoNDgyd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VsclhIWkNxYVJUUFk2MlNyQkVCSVF3YU9KVVNl?= =?utf-8?B?Rlp5SVhRZ0pTdjlWOWFQTTY0dklCYVFQOGtndW9LS3JsamtuT0FtbDdHckhW?= =?utf-8?Q?1CrOmFBMqn6wdDP0gHrozNhUwGqAzr8Zx3cwXF5?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8c65477b-f55a-4d64-eebe-08d99214ea2f X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2021 08:54:38.1580 (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: ASamJA7Zg+xi1yi7coWbD2LIe16h7aJRoXZtSbs1cGGZYoc+ghPFtTTehIQTSjPqfBVGYsKrlrZ9EtAvJVaG1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5109 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 1/6] ethdev: fix max Rx packet length 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 Sender: "dev" On 10/16/2021 1:24 AM, Ferruh Yigit wrote: > On 10/12/2021 12:53 AM, Ferruh Yigit wrote: >> There is a confusion on setting max Rx packet length, this patch aims to >> clarify it. >> >> 'rte_eth_dev_configure()' API accepts max Rx packet size via >> 'uint32_t max_rx_pkt_len' field of the config struct 'struct >> rte_eth_conf'. >> >> Also 'rte_eth_dev_set_mtu()' API can be used to set the MTU, and result >> stored into '(struct rte_eth_dev)->data->mtu'. >> >> These two APIs are related but they work in a disconnected way, they >> store the set values in different variables which makes hard to figure >> out which one to use, also having two different method for a related >> functionality is confusing for the users. >> >> Other issues causing confusion is: >> * maximum transmission unit (MTU) is payload of the Ethernet frame. And >>    'max_rx_pkt_len' is the size of the Ethernet frame. Difference is >>    Ethernet frame overhead, and this overhead may be different from >>    device to device based on what device supports, like VLAN and QinQ. >> * 'max_rx_pkt_len' is only valid when application requested jumbo frame, >>    which adds additional confusion and some APIs and PMDs already >>    discards this documented behavior. >> * For the jumbo frame enabled case, 'max_rx_pkt_len' is an mandatory >>    field, this adds configuration complexity for application. >> >> As solution, both APIs gets MTU as parameter, and both saves the result >> in same variable '(struct rte_eth_dev)->data->mtu'. For this >> 'max_rx_pkt_len' updated as 'mtu', and it is always valid independent >> from jumbo frame. >> >> For 'rte_eth_dev_configure()', 'dev->data->dev_conf.rxmode.mtu' is user >> request and it should be used only within configure function and result >> should be stored to '(struct rte_eth_dev)->data->mtu'. After that point >> both application and PMD uses MTU from this variable. >> >> When application doesn't provide an MTU during 'rte_eth_dev_configure()' >> default 'RTE_ETHER_MTU' value is used. >> >> Additional clarification done on scattered Rx configuration, in >> relation to MTU and Rx buffer size. >> MTU is used to configure the device for physical Rx/Tx size limitation, >> Rx buffer is where to store Rx packets, many PMDs use mbuf data buffer >> size as Rx buffer size. >> PMDs compare MTU against Rx buffer size to decide enabling scattered Rx >> or not. If scattered Rx is not supported by device, MTU bigger than Rx >> buffer size should fail. >> >> Signed-off-by: Ferruh Yigit >> Acked-by: Ajit Khaparde >> Acked-by: Somnath Kotur >> Acked-by: Huisong Li > > Series applied to dpdk-next-net/main, thanks. > I recognized some errors in jumbo frame detection checks, I am sending a new version, dropped from next-net.