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 EA16042439; Fri, 20 Jan 2023 18:21:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7DB41101; Fri, 20 Jan 2023 18:21:22 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) by mails.dpdk.org (Postfix) with ESMTP id 4BE3B40E5A for ; Fri, 20 Jan 2023 18:21:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RiP+B8FbWT/6YArLWHtJr9a3mhjmUUtOVUeP9k1pJu7MF8dwLhuyS4IQSoVfPfW7GfAdBTbkGqW0ksvZbEXofv6VgZVtwFPcgAf0EE6IxG/R6UDrwskJoFwO0TShX2sKGEpKa+NfymHkYIBePUJ/xHI9IDrKO+k/8yNDA897Zf5GeLJ17XlL8vVFPb+URKx+zIBOrDkxTkG/NZ/gktFGOPnMRinFm91+As8gjIZp3Eim+L75SqePuRlFU6SK1nvaKn19r+XUy1ZVURLvREdxIHxIRJYCSHIBs9jq9Srfb2eYEBlcQz90r1dHvZC7DyO6f9q8M8/J9yZ1EpvqoZcYBg== 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=Ejm8OemkPMHJaDuMlxk6pslau6Uz/gnISC5j6WjBxv0=; b=ftj6mYKAvcIQOFU2LZX88+ZESDO9BW34NhuHKn+PWEBEhyrwtNfWpq9GMoc/pcOjv+9AeykRaUt2fIBs6I6YrF3CXde+4rYGpmQ801FaSqC4FbV+azwieDCpbLGb8FPKkThIlpMPpXfSjPrBNhRa4ISRICgOBG8kf1rqY9OyKi4qE3MTGCPrOMH/elMOZDNS7I9woWCSN+6qN+5ZYO017gBhDm3NVrxHTCC0klodt/j+IF5XXvy1KE9MkclwNmk3qWn0ibTZqdirQiksUJk2PLn8oudbcOb3Z28F2ENbHA63YvF85mSo9cbtUH/Zrgt7nKH54K/9xECOSGWMI+Z9CA== 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=Ejm8OemkPMHJaDuMlxk6pslau6Uz/gnISC5j6WjBxv0=; b=Yrf6iL37bhSqzM4twYf18eOOYiojCiYqDxsLP2VcNrBXiCZKnaY2s8feWU5AimP5u2tpWFGZXmJLyo86tQ/NxhWiPRejp5NfeHgR5kZ9ZGEbTfjB/T2FRlejJp5P65zIIR7KzeQ+dxmQsA9PDUDZ93sXELOxAmLoNqtXLcD796A= 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 CH2PR12MB4295.namprd12.prod.outlook.com (2603:10b6:610:a7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Fri, 20 Jan 2023 17:21:19 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6002.024; Fri, 20 Jan 2023 17:21:18 +0000 Message-ID: <88dee301-fdb9-c49c-a27b-1ec7d94a1129@amd.com> Date: Fri, 20 Jan 2023 17:21:11 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 4/8] ethdev: use GRE protocol struct for flow matching Content-Language: en-US To: David Marchand , Thomas Monjalon Cc: dev@dpdk.org, andrew.rybchenko@oktetlabs.ru, Wisam Jaddo , Ori Kam , Aman Singh , Yuying Zhang , Ajit Khaparde , Somnath Kotur , Hemant Agrawal , Sachin Saxena , Matan Azrad , Viacheslav Ovsiienko References: <20221025214410.715864-1-thomas@monjalon.net> <20221025214410.715864-5-thomas@monjalon.net> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0120.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH2PR12MB4295:EE_ X-MS-Office365-Filtering-Correlation-Id: b05f751a-6334-4b5b-ce57-08dafb0abe0b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M8PT4x+rqr8KJgXLcKb+kOIqllvRstwjhcAG64xg1ghqaAMhFetl/4BglxUK1jH8Rd+lNC1nffOi+mB9kIhdL1ctu42M6uMIufyxYy2jZoc0exctYHyTWjCr6QQtbTKsGVt7ChFbo83/KDxkvGiJueI6vJRTwB+HCyqYFlPkhuFSfXq94d38d3SJGyo026V7nhN9ehUiu9DDeqajjIS3wEj3FMACygESpoWMkeOG5EMKaHmfSHw4bERvfPjjNbsAsxCewgeXPWPmLyzE0TUmv60cKoVZiLISuqN2rGHhMCNnp3zpPl1tW2Jpt8ESnJ5BMs6NPr74yFxP52hSXwa2QtpOZuvPTQweUQ35roqYsXG5m5mZ0QE8hQVRHjP9Jf2A8uOT2Yk0kPb0yLw0qOGYLVbmJ9eOPyXwHuI6oL5PwJHdbLWKX103tAkCWGamXJEtfwEfCk07zfob8alfa/7CbUnpv9Ui/+CifIkAIoLmnoYDgo8z6C3uGclt1adtC7j5PasKreyQwTbQ5LkQUbRrhbI2zaoHMutyBM1GmTARrMRf++r8+OIyL+NujNfowYl/DpiZ0eskyaJciSUSl0HwOoHDDq3xhFL2V1HpPAplCbwUi8FbuXUtkg6/LOPJLZ5Yb31+JBHWbEz756PEowhQI75ZVjWasl+wjTOB5RrLyfPtEplRRNf0WzpFucIhiR3V6qZsSz9aT5DI+uEKL6nlrS7mutP9OXCcGulN+nEtMgQ= 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)(396003)(366004)(136003)(346002)(39860400002)(376002)(451199015)(41300700001)(4326008)(31686004)(6666004)(8676002)(66946007)(8936002)(66476007)(66556008)(36756003)(2906002)(44832011)(5660300002)(54906003)(7416002)(110136005)(316002)(2616005)(53546011)(31696002)(86362001)(6512007)(478600001)(6506007)(26005)(6486002)(186003)(83380400001)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ME9EQWdSUVdzcGRQcXg1OW5IdlFVakxSV1hMWjZHTk4rRitYeGVRdTR1RE1k?= =?utf-8?B?Q3FPdVE1NW1IVEhHTGViY0tFaEh6R0xPamgvSTR1ZlNQb1BHZml2SEdPYnB6?= =?utf-8?B?dkdoYXpRRkJucGhscElyLzA5bG95bFdUZjMvTlJvcjZTOGlENHA3a0hpZlAy?= =?utf-8?B?Y2c3Ri9LdGIzWWhBSnNCV2dBaU9YRXVHVnM4L0xXT0xTY04rTnVWbXBqL1Uv?= =?utf-8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ZUxJVE4rRjNaTmg1M3BKNEF6dUQ2dDBkTGhW?= =?utf-8?B?Y2d4MjdCZTVaM2pvRjFQM2VSbTBjUXJMYkUvajZLTkJyemFRWlgvQ3gyTkhI?= =?utf-8?Q?b2x2Fa2qNa77589pWDpFJHfSx?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b05f751a-6334-4b5b-ce57-08dafb0abe0b X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2023 17:21:18.6643 (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: r/ySXWofvhge/YkuDQmFeMqFAX3GPuI2gnHpFOtlGs5sGXGFuKdynax7PgHrHG+e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4295 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 10/26/2022 9:45 AM, David Marchand wrote: > On Tue, Oct 25, 2022 at 11:45 PM Thomas Monjalon wrote: >> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h >> index 6045a352ae..fd9be56e31 100644 >> --- a/lib/ethdev/rte_flow.h >> +++ b/lib/ethdev/rte_flow.h >> @@ -1069,19 +1069,29 @@ static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = { >> * >> * Matches a GRE header. >> */ >> +RTE_STD_C11 >> struct rte_flow_item_gre { >> - /** >> - * Checksum (1b), reserved 0 (12b), version (3b). >> - * Refer to RFC 2784. >> - */ >> - rte_be16_t c_rsvd0_ver; >> - rte_be16_t protocol; /**< Protocol type. */ >> + union { >> + struct { >> + /* >> + * These are old fields kept for compatibility. >> + * Please prefer hdr field below. >> + */ >> + /** >> + * Checksum (1b), reserved 0 (12b), version (3b). >> + * Refer to RFC 2784. >> + */ >> + rte_be16_t c_rsvd0_ver; >> + rte_be16_t protocol; /**< Protocol type. */ >> + }; >> + struct rte_gre_hdr hdr; /**< GRE header definition. */ >> + }; >> }; >> >> /** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */ >> #ifndef __cplusplus >> static const struct rte_flow_item_gre rte_flow_item_gre_mask = { >> - .protocol = RTE_BE16(0xffff), >> + .hdr.proto = RTE_BE16(UINT16_MAX), > > > The proto field in struct rte_gre_hdr from lib/net lacks endianness annotation. > This triggers a sparse warning (from OVS dpdk-latest build): > > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:1095:22: > error: incorrect type in initializer (different base types) > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:1095:22: > expected unsigned short [usertype] proto > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:1095:22: > got restricted ovs_be16 [usertype] > > added endianness annotation for GRE 'proto' field in v2, can you please check if it fixes the warning?