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 2BF5CA034D for ; Fri, 25 Feb 2022 16:44:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22831411EE; Fri, 25 Feb 2022 16:44:46 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3F72C4068B; Fri, 25 Feb 2022 16:44:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645803883; x=1677339883; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=2Rh82WPIaXkhioRng7x5oUULAJIOY5raUfaR/dGcPdg=; b=anw8XPGVYfdOZF8PJesiOlC1hxXEXi5tCCHuSy+lRW28oPdwjyCs6tDG PK0hri+bkMzS4LON9Gk064zTdtBO2mxfhl/AT4FLt/V7cVpzaQqytbhBN Fa96CI6gwZxVFk0Sd0PK+0RMVRrtoL9BIc0vh+jwIR8yLLYF0Ln1W+azl ZYSzQBt/0byFOXvBwC6rSpkg7txkhInSOSbDr8Hz0j5aiEFerRZPRNiZh EhyXS9TMMt3wlbdyxhwAb/EIXUeWoSWSDSZ30ZWNMSKRV9oiEvAqYtZO6 YIRmZk8pz2b6YDBGL9W4qNEnAfdd1l0DATlHRiEMy+U75v4oumNjFla8e Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="338954992" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="338954992" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 07:44:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="509304694" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga006.jf.intel.com with ESMTP; 25 Feb 2022 07:44:41 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.2308.21; Fri, 25 Feb 2022 07:44:41 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Fri, 25 Feb 2022 07:44:41 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 25 Feb 2022 07:44:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6q0SlP99tZ1LCI79BYJ6AWFsDi6iHe8VqnEZXE0xpIfPujHeME2DpeocOwXUmlm8majcgQ2XtkMQXetO32QYAV1dWTvbhvmIdfuKCL+Kz9sa3STE3Q8e/amt0oCjuMHx3NDyWK1fBp1Jkawy9Ra1YZkta0zn33hC7obg94tKh0MlqXk9meDQ0nB37uIEsiGC5NjI3QJMnMBu3OIbWiP/Hy+5+km8pBGxZFNgy2OMV0diCb8CIxjC196C+XQq0ioSsSiBuXbqpfXOuIrG6DSSIErkJsg8GvXQm51e83rzIY4zT7w56Asn4EI0cgTgz6hAakWZ8GJ/COOzSbpmKFlVA== 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=15L3diSFarERQklLthZn6OfPbvllKPOjLqdsKqKFGUk=; b=O43fnDfy7OWNZvA7xX1q587ynVVtcODTHrUUe6+AGA+kpKw0D9aoaou2tEhnMN7Dcp4ZYsAY+93orA6N1+FYYaojIKyEVjdnd1+IS9Xfagf7e+HhucHO52EyaMkMIpxV4B/H3SnaPe2JwLpo9CYBEQwAFqHTEznEIom4ttsPfie0jLv4FuGRzmCmsghTNHWjXnz/E4QNTL6h9DwwoVJy4izF/9CL/bOJ3j6vageXYXEORTwH6kAsxsQNr71i29Vlbg3WhNaQN4n5rboIYh1ctI3PAslFI3WvwvevM8uX5hQLPvM7s246j7QUOg12U1BqU3JiLhmQvKet7B9yntd5+g== 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 CH2PR11MB4263.namprd11.prod.outlook.com (2603:10b6:610:3f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Fri, 25 Feb 2022 15:44:39 +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.024; Fri, 25 Feb 2022 15:44:39 +0000 Message-ID: <3aef94f4-238c-00db-3dfd-f2928ec8f3c2@intel.com> Date: Fri, 25 Feb 2022 15:44:33 +0000 Subject: Re: [PATCH] app/testpmd: fix raw encap of GENEVE option Content-Language: en-US To: Bing Zhao , , , , , CC: , References: <20220224070214.326158-1-bingz@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20220224070214.326158-1-bingz@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2P251CA0030.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::30) 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: 6e5a7908-0864-4c3e-410e-08d9f875bb66 X-MS-TrafficTypeDiagnostic: CH2PR11MB4263:EE_ 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: gx9QePjtQUAdIqrffsazfjuSCaQYoJxsVy3Mt8hnuqH+J3qmyjea58VUrb4DyGDjv0G2i7/hA9bjRGVkvpdvGmUG/+pefNB0FKmOtmCOSh8Ed0WrK9pA6oOWxEwhjBgyMr3Xrqj3ZEE3vBOeosQBeKGgorwQhTlgy4vAU3jngwjko3kvYUQ6113sleJ9r+LgPP8qvu58X3Dhcs8ZeDchh/ZoxMc7e3w0u4C6GhwyCr+6/g+xE0PyPBOCb70UQVjLcnY+8kdPxrdH3XvWAiWPNCQWtTgGM0LGx/ZzHUO33A38tpsWwKz88uzLltt16vSP9E1WUMWVY8BsOobFdkSnUU61MSHINsM6UvgYfwXcBMeDnZgylI5IDhz4uw6rgAPPqzzxmxRW6RXJxRdjpylJhHN14dGnH5z8IGTac4367hPDI9gSGXW8EwiZnKrAGKUAekJ6h8LJ6IopYhVo3IuPuqSzMzu/qHv+KvDxtPC2QiwEldgo3VHAFBwaJjnuUsvJkiAFmpybAkNaTQtGhGP7nG1lc4ya0MZK8mljxyiVF9iBrjQjwM4w5V0WDLqOJpPVHg7tCCKQgpVFMVVM4OrpvEDjWjp2z9sWwUVtoh6UuTwb/23KDFTepoLJvuYxFF4ZAXMLpIBv5mrYKsAA5eANWb1bExQ/gPMiCofFCHMqKX2Ju1eyOUQ/+/x/BeawiZcWTFsdHIJaZdrkeK2loMgZpw== 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)(86362001)(31686004)(38100700002)(316002)(36756003)(2616005)(5660300002)(2906002)(6506007)(6666004)(26005)(6512007)(6486002)(82960400001)(8936002)(53546011)(6636002)(31696002)(66946007)(66476007)(66556008)(4326008)(508600001)(8676002)(186003)(44832011)(4744005)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Ni93czQwQjVDN1RkZ1V3WnJydFF2V0drUXdLdWZ4c1I5SnVVYzJyanNTNzFL?= =?utf-8?B?MnhUL29zMitobTBXZkM4VzR3TW1mclJJYmorSW9XY2ZCWkkzK1dKbnRySUNi?= =?utf-8?B?UDZoSFlIT2NZbTJlWHRqUHBxSjJKRWZ0eXpoaXV1Yk9tYmZNWXFFT0VHTXlF?= =?utf-8?B?UWdjSU54TkU4b0tCWS9MS3J4b3lsQ1YrTmlJQ0NQK2s2c0R0UCthQlcwd0Ur?= =?utf-8?B?dytBcE16cE1wT25VcUhMbHNrVDBKZ0dzQm92L2Zya1FCelRrdUJGcHEvTGRn?= =?utf-8?B?bnZqN1NpempDRjl2V0JrWVIwb0dIUDJNNmRFeS9SVk1qVGF0UDdGbnJqcHBG?= =?utf-8?B?aUNuenpoTndVM05udjRQWTRpMXBNakd0RERDcmovajlWblRVNmJiY3dnNkxi?= =?utf-8?B?dWZROVJEeGNKS0ZGMStqRjJ3bjdJdHRZbURqV2RPRmFteFJWek4wVnF6dkZC?= =?utf-8?B?L0lZZ3dETXRuWE1WYWQyL0VxT1JRZTNEOHIzc2RrNjQwZHB5cjVOc0FTcDg1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jhldTZLRXdtUnpJb0E5eXkv?= =?utf-8?B?RjJrYk5QYnNVLzlRcXEyekY0dEw4WDRydXpMdW93N1VnT05PaER3SlZSVG45?= =?utf-8?B?UVFhRys1L0VUKytMbi9aekJzR21SeFZEN2Nza2pmS2pSS3J4N0F3K1YwZTd0?= =?utf-8?B?S285TVU1bnpGMjUyNmtheWwzZUpmUEcyc1Y3VzVXdjhkT0RiS25GMlQwWGMr?= =?utf-8?B?bFQ3dDhkOUcvK0JDdUlEVlMxZVJTMlFmV2M1NUFVZzYzbEFuc09pMTVKMXR2?= =?utf-8?B?M3VxN3U1LzloUGZSUXVxZUpFMkp1Vmt4SmRjY0M5U1ZwUElYL1BaTUF6bWsr?= =?utf-8?B?c1RJejFEOCtEcVVCTVdMMXcvMjhsZHFsQy9PUWdpRFRCR1lxU3F5TnVRNDFM?= =?utf-8?B?TFNTVXc5MzVkbXkzbGE3SDBlbllWZjF6OWVNdlQ5cGFuQzZlMmovdFYrUTBP?= =?utf-8?B?OWxYSS84NVpGMDZXWUMyYmQ0UDhlNzlCZytJNmlGVVJOYXloNVhjZmIxenJy?= =?utf-8?B?enlrc3ZBVENNRnZzeFNIRGt2VkFBMlg3TTZUZkZnUUt0VmdxK0JyUWszcHdm?= =?utf-8?B?WkNIbXNtaUhiclVGWTRtQVZXeHRmbFFvNnpMK3RNN0pjL1NsaVFtWDBscmoz?= =?utf-8?B?bkh5TDdhZFZqeXoyU1k2UmxnVkZUTHQrQXpPKzl6NnVwaEJxaDFmcElJU3Jz?= =?utf-8?B?YWU4NGxOdXNBNDZpV1dDYkQvVXM2WXA5SlBqS2RLNGdoY2NwS2w2d0FiSm9i?= =?utf-8?Q?hWPZJOHFqtdgez3OkX9sG3o=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6e5a7908-0864-4c3e-410e-08d9f875bb66 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2022 15:44:39.1341 (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: zuaXhapCl/0DlyoGULEN0QEW7berEWzTKNMmqNXdzhcwLnuJemubZVn99vcFQlMkRq98jT6rg5g6w4kYNuBRYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB4263 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/24/2022 7:02 AM, Bing Zhao wrote: > The structure "rte_flow_item_geneve_opt" is not a protocol header of > geneve tunnel option from rfc8926. The field "data" is a pointer > which points to the actual variable-length option data. So the > structure is not packed. > > There is 4 bytes hole before the pointer in a 64-bit system. The > option header is just 4 bytes. When using offsetof() to get the > fixed part's size of option header, the wrong value 8 was got. When > constructing the encap header, a wrong size and offset was used due > to this hole. > > With this commit, the fixed part's size is calculated explicitly > based on all fields. > > Fixes: 55c074f3ba1d ("app/testpmd: support GENEVE option item") > Cc: viacheslavo@nvidia.com > Cc: stable@dpdk.org > > Signed-off-by: Bing Zhao > Reviewed-by: Viacheslav Ovsiienko Applied to dpdk-next-net/main, thanks.