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 D109DA0350; Tue, 1 Mar 2022 18:50:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CC2240DF6; Tue, 1 Mar 2022 18:50:37 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id B195E40040 for ; Tue, 1 Mar 2022 18:50:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646157035; x=1677693035; h=message-id:date:cc:from:to:subject: content-transfer-encoding:mime-version; bh=snyHribK2ePPQOVkWov1Sx5LeEWzHSKu5r5IHEQglHE=; b=hvnCu37GoeI8VCSwwTdEl8SXj2Lo+GVgATMiM4jsASbYALRikLe8Fhyv SKl4P0mWMOcvXGDkw5+UdhKfL9/a8JdEwff1oDzW+/cE1Xk/KrZnwFY/H A4zvWhloKPCC2x3p/wxLIxKhYtIi8RhD9Sq1L7d8+14/KSLzACx4mICQJ u5eoCo+pJkheqCt+eJWYhIZANAdI5EGXeLRG/hZ1ExPGjaUYPkCXcd9RE b0hR2A9iSohp/dYWZtjbbhAjCcYa80cBh6UV83WKhEUB3/I6zcKBO3ftL Mihhp6wHnjzG6sh+urCn56J37CZHTHzmwYDQch8NsJ7C6QA52OyU10+kk w==; X-IronPort-AV: E=McAfee;i="6200,9189,10273"; a="253388132" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="253388132" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 09:50:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="493200435" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 01 Mar 2022 09:50:33 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 1 Mar 2022 09:50:32 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Tue, 1 Mar 2022 09:50:32 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) 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.2308.20; Tue, 1 Mar 2022 09:50:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NkPUTb5A/93eMX37A4r6wd3EIC9qpY3gpwbxuTiqwaICzxIWoXJh3IvKOciZREhinVYYXM2xXdk5T4LP9CRYXGV25868gj6RoWEuF9vJv4lc3Xm5SkaTUIcLoBXH2n1BdhF5sS6ROTdzn+Q2ugyZK5M5mJHK6jEOkBTbkBfiFLAqr+OmICvPJPiB8ybaz0RoN2qpTVl0xVNnRBEXDtWDGlP63giXZTirm1i8s+TUpxWafiyo+wepRQv2G7hTbTz9h14/3Tjg4Kjh83jCq94opCsCQc2E11vY1fo9XvFsLXFBexgvaTHEVbSLxOIpNX9jt4n4m3H0/Y/fUyxTLT9y8A== 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=pMXB+dAFNHcM4frM6ObK5PNFMv7OTa2s0Nlwo/Mtc1E=; b=HdE30+JS2CdyDR1aVknodrUQKSdO/22vrGEkt5a/T9u97hM8u4/WKz9j23QvEkoAegi24wQmCaC1VI6/TbGbf1H3fGcjdvXEIX3ou2DXH7imV5c1N66ShVH4bUmFJcERLDTu0xwY7orxOwIAvsvtq2x2ocjnMuTJVPnhEDNkKEihDtbE0NopeTD+RfduaI4vBS0U+jBdfFztINozPNuW6sPLGloE103O+YPbuX/LJhovVCmRfvMSuKqd1si7I9drkPu6CrSj7GunYL6XADK75zTz8fRd08EHrIDbfQONo6tTE1f+VizwZ/LLJuyh6OxVVAPobTbdan99UrYlCFm3vg== 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 PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MN2PR11MB4446.namprd11.prod.outlook.com (2603:10b6:208:17a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Tue, 1 Mar 2022 17:50:24 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf%5]) with mapi id 15.20.5017.027; Tue, 1 Mar 2022 17:50:24 +0000 Message-ID: Date: Tue, 1 Mar 2022 17:50:16 +0000 Content-Language: en-US CC: Thomas Monjalon , Andrew Rybchenko , "matan@nvidia.com" , "Qi Zhang" , Ajit Khaparde , Stephen Hemminger , Ray Kinsella , Bruce Richardson , "Damjan Marion (damarion)" , Roy Fan Zhang , =?UTF-8?Q?Morten_Br=c3=b8rup?= , "Min Hu (Connor)" , Konstantin Ananyev , "Stokes, Ian" , David Marchand From: Ferruh Yigit To: "dev@dpdk.org" Subject: MTU and frame size filtering inaccuracy X-User: ferruhy Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0443.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::23) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 96eb8970-6923-4198-f02d-08d9fbabf642 X-MS-TrafficTypeDiagnostic: MN2PR11MB4446:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mwgBAMcCpqsripatRlvvdU4bLa2mMVMIVgBPX2c6C7j+aWOmc0oF3e3x46p61a545aK0iYH8X7Pq0ZTOaOwe9fnH5KZyN+OpR62rfPEdHpsokGwpudg1X+9QUJynHLxn445+lFMC71mvvUk2oimqM7Pa89aThVFrKm07ZW0DlctAA35fH/sbUjfpiq9zHv2ulMGqIxMaz5DZiFtY9vNG0OTY+hBWrhrW2lO+coch8A94PauXDn2Epq0xMxW0aLt6C8VBQ4P6eZI7+Wa7JojMXeea02oAHtX+EKQNS4rixDc7yKnegXfwEaWdIT+ymvSVG77I5X3olZAzF+coLhTTQ5JuP4A5dVCkvs/2A4rpC/LkIRFNTYqlfEb2tUvO9hln/LO986el+tfhu2gP2nw2ItMcxEJSKRuXxhgPaBniJj2aInsn0ioXwINoYAtBnGYY3/qWiRJ81JWNVvHXarZmdqaueTStXh8JYkoEh8e5cXDkQ31fkHjjzhYkjWjKYGsT3T5Lg4eqZ/QR9AV/G7y9Vq+0pO9Wa6NqG3BLUWmSPXWrC9gOD/WtUCHelTj+tO0tdq3CvJWDJ+028Q1pSRCQvCtQVZxLrcs0MLl33Kuy8BOw0KUwb3n8HMsnY/KqCZGKd25NCTgw8fsIT4xeXfCURzTW+WJdW047wbAX9N8IdnT/QP2I9tcafqYG3NRScSkGSefCF9NWZU/JBw1QVwh3ag== 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:(13230001)(366004)(6506007)(316002)(6666004)(508600001)(6512007)(54906003)(6916009)(6486002)(31686004)(82960400001)(38100700002)(66476007)(66556008)(66946007)(86362001)(8676002)(2906002)(26005)(4326008)(186003)(2616005)(44832011)(7416002)(8936002)(31696002)(5660300002)(36756003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NHB2TDhZZmpJeTc4TExrblpZNGVkVkJkUXdQOHNVTnZFaUxGYWE1UWJHSXVE?= =?utf-8?B?UGJxUU1jYTBGTGZ0SUY4LzBWbFh1ZzU4cXBCNmFWb0dZWWpsM2J1OXJPcjY0?= =?utf-8?B?OGMrd2hFRFBmb3AwRGVUc1ZYcmlzYWI5Qjg2cUx6WlZnZWViTDA5ZXp2amJk?= =?utf-8?B?VHVpN3V1RnlDM2JweWs1WE1zYzFtZDQxS2JCRW95SGI2Q0ZYaTNMUjl0bGNP?= =?utf-8?B?blR3VzBScVZKZHZDZFRzWm9ueFpsWDZVZlY3cUU3ZnhzUG5NclBVM29CRnJo?= =?utf-8?B?SktrRzhCdDdpd1BTeDBVbDV0MGZ4Q1ZyUUpTckgyd2pHQmRpK3V1K1ZvVmxs?= =?utf-8?B?MWZVQ1EwV0pxdEdvcDdnOW5VNVA0a3loWWg3eDJMSDVBcjNjK3owWFR3eTNl?= =?utf-8?B?M3hzdlFQd0hGZ1lMTGROQ0p0dEpGMzh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Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2022 17:50:24.2009 (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: V8Gyr8ZGvPWJMq3ZvEZDfoq/GnfWGe6WHlmNDcioOHcvME0QGfrmsw8pejaB+DdApcRzV7R6TV7cX3oI9H9NGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4446 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 Hi all, There is a problem in MTU setting in DPDK. In 'rte_eth_dev_configure()'and 'rte_eth_dev_set_mtu()', MTU is converted to frame size. Since L2 protocol header size changes based on what HW supports, L2 overhead information get from PMD, but this still doesn't solve the issue. PMD reports max overhead based on what it supports, but there is no way to know what will received packets have. Sample: i40e has 26 bytes overhead: HRD_LEN + CRC_LEN + VLAN_LEN *2 when MTU set to 1500, configured frame size become 1526 When a packet received with no VLAN tag and 1504 bytes payload, packet frame size is 1522 bytes and it is accepted. So although MTU is set 1500 bytes, packet with 1504 bytes is accepted. There is an inaccuracy in frame size filtering up to 8 bytes. Damjan reported the same, and he has good point on the application need (I hope it is OK to quote from his email): 1) information about the biggest l2 frame interface it can receive and send (1518,1522, 2000 or jumbo) 2) ability to ask hardware to help him with filtering oversized frames We need to fix (2), I am not quite sure how, any comment is welcome. -- Thanks, ferruh