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 17F66A00C3; Wed, 15 Dec 2021 22:04:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9227040688; Wed, 15 Dec 2021 22:04:40 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 187E740041 for ; Wed, 15 Dec 2021 22:04:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639602279; x=1671138279; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=WxZXY5ncNU5SaDriB8bmnK91TlHvdEjdnNKkLmke9Gs=; b=aApw38QUAtRviJUPFzhLsemN6QQHFYpZC0hcjDMwa4Oi3er2Ke6t6VjX C7HsbzFBeGzUgQUjdasmlqQoM/oAdrZFUdXSb4u44mo7U0mTubMXtcG69 VP53sasv18EhX3iDWXZzNAoIkvIMF/GFGcHV48zToKvAv9V4cRvwKGZxM ErLlMFHFEe/44wA17Lvf24PshpbB3f/aVQLCuSmXe64HY6Xu8vGL5i2bQ qZMvlRN0aEhzF8chTxCSd53EdbER20f9FMGPHab8vepcY4Sk6JShpTN9o MOXyrpW8WDags1yEStOTT7Rx84xYceWWPHE7AvIVt2muCO2x7CYYtwgD8 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10199"; a="300112264" X-IronPort-AV: E=Sophos;i="5.88,209,1635231600"; d="scan'208";a="300112264" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2021 13:04:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,209,1635231600"; d="scan'208";a="662068015" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 15 Dec 2021 13:04:37 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 15 Dec 2021 13:04:37 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 15 Dec 2021 13:04:36 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 15 Dec 2021 13:04:36 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.175) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 15 Dec 2021 13:04:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnZbejS/NpzKRCtxAsIQvVObw443sC4HD55I5d+0FKE4/NGjd+tb+ipsRVOn/hk8KOvJXfyQ3umLBMWbiwDNrqxn/29laKmht2Ag9A8Jbdjjtz4PjBlEE/x5BToDpHDOUVUBe9v/oiNb8JTGO3ojBauVJsTgd7ROjMC778r19xcViYZ8v/tAe4cMdXWzBrdtOok9XIsiuKcVi9xY+M8GuExf1NH4JihPRBrdzPwkwHaGuodNOsqurfAyU5gjujPLIhPR6WnSXE0wFvQ3yFGeMAcPrWc5p0deysYV7scZ9r5vH9bnApMS5vGXYiH0PwoBRofpuEP8nZ1/CZ9U72VdNg== 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=pXM2GiViaTEK/D5z4KUgDZgNVwriO2cAAYo7IrktNQs=; b=a/3nsbwIiX9g3Nr81n3p4aCxt1J2KWt6FOG3xt6axCfL4LCBOHNosebuNttikP6QcgxwMWc6fcOz+MLAETw6a02Rd81DkfqVSfpzSvOzdsVrz44On1vXMcxdbbi9wkZBNezVuy6ytGfEnc0VFrAOnfz9t6kzsda0hpbpIlOOm3AU6FvrSsFcf1vxYMLHu6pk18TASTfC0i6UU7EwPTJ+uwCGoY1XFYpROeVgrdbfmf/bcKeo7WpapQ1osEMi+ZyiIq/wpm0QJLHgFAQfhmVTAtxFvkwDVP76FwzQLufiQzNtYET5riKp94rxizlNeZGumxjtsFKei8eE4haZ74kgNw== 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 PH0PR11MB5832.namprd11.prod.outlook.com (2603:10b6:510:141::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Wed, 15 Dec 2021 21:04:35 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%6]) with mapi id 15.20.4801.014; Wed, 15 Dec 2021 21:04:35 +0000 Message-ID: <19cc482d-d7a4-7a14-a34f-33fd15a99a04@intel.com> Date: Wed, 15 Dec 2021 21:04:30 +0000 Content-Language: en-US To: Stephen Hemminger CC: References: <20211215184859.1859870-1-ferruh.yigit@intel.com> <20211215112017.26958d79@hermes.local> From: Ferruh Yigit Subject: Re: [dpdk-kmods] linux/igb_uio: fix build for switch fall through X-User: ferruhy In-Reply-To: <20211215112017.26958d79@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0364.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::9) 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: bc7a22f6-9600-4be5-9c84-08d9c00e7fa2 X-MS-TrafficTypeDiagnostic: PH0PR11MB5832:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QT88QU/AdYsW9jA/DpEc1auMdyD74H/YX6QL7NVQjsbFDWSAEmrZ46qOtq+MAMABqyAkHOGpbPiL6w8dVGrjjTY0Ik7To7Bm8rS2Sy2g+jn2MyU74Ob1+Q4tjTiQLfCGrQyhiIrd4tZqhy8jJ6X03WL0IPQ+4OWTGjKODsJ1SiN+coRLsBSv/j+v8mcnV/OpxU5ijS5Z8GTxKZUKwBtnVZn1hCTobBRJ6isZLT6rPoxiHwgTVBay4XE++ZDNm2Vo7tixWsadkazujWNq9CUlhIfv/4jrLOxt/5u29QCwmPIGl4sJwlkP7wzVAeLICNczOxo0XeztvRsCKJDIz9DmtGRFWO1eC3jumZsvV+/j9Hxz/j7MsVXihASFzhPli74QubM/KIrL4sTjUygwh0wcn8fIrJgDepcjhdhQIXyp9cy6avsxTMSsK9kvvhlDGms9DF6S6Wqqq6jGQA8ORpXLJEVjYVsb/9pqxnhzgyDguscvaKWggB0PGGIoRDE3eu7MdJTs1keOqACgJQ/OSq6Cz94eDryJegWSqLjDWnsz/dVTrDRSLEgUqRaSkcW7df1IKvPuN9u8IkRckuT6O5mCTDoVaTdnxfnWQaFN8y5oc1cbfkl5VrA2zgKyS5O71bICtrlh+zu6vUFt5HjmqEEB8AmJdfYzaFld6kITdIQEv4E1A+z1p8VymneU6rgDYqueQV2cUg6NIbJVW6JDFq+TDg== 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)(8676002)(2906002)(26005)(53546011)(36756003)(6486002)(6506007)(316002)(4326008)(6666004)(31686004)(66476007)(186003)(2616005)(508600001)(66946007)(82960400001)(86362001)(38100700002)(83380400001)(31696002)(44832011)(6512007)(6916009)(8936002)(5660300002)(66556008)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bFdOWHVmdzZYSWFuckFXMVZwMVRsazhHSTlHN080RGVkL3VrK2g5TVJsNjFw?= =?utf-8?B?LzFZc2N3aDZ4eFoxanFQSGFiQzkyNmxFcUdydDgxVnAvS3ozOHd0WjVGUUdT?= =?utf-8?B?QlkvTFJwQytCSUJVZ3lsNVNiYnFzd2lnZnFkOTY0eFBzRFRrbWNxU3NzV1V0?= =?utf-8?B?cXpXK0lSWm9lcmhrdkt1SWRDcjVKZk1CSkpkbTBXQ3BvK21MOXd0MFFGSzUz?= =?utf-8?B?RnlsZEd2VSt0UFE0eGtkNVBueFZJRThVYTNjSThrbG5kZjVtV1dCNHp0RzVV?= =?utf-8?B?TkdXTm1FZWlQVHl3WGVYNnBJUGN2MXg5T1pqMER1U29VaC9YWjFTRXhqdmts?= =?utf-8?B?QjI4UnJUUndxV09GVlZ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pHbTdG?= =?utf-8?Q?nTSOqAzz9ropNC797PBaFCU=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bc7a22f6-9600-4be5-9c84-08d9c00e7fa2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2021 21:04:35.5175 (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: Mmw/plNleFj5P44EodNyTm5kNEFnBfvLf1FAAv77vp6HgzVr+sAMbIEhVVxZBZWslOkygJAZdb0B4OSO9jlkcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5832 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 12/15/2021 7:20 PM, Stephen Hemminger wrote: > On Wed, 15 Dec 2021 18:48:59 +0000 > Ferruh Yigit wrote: > >> Linux is using '-Wimplicit-fallthrough=5' compiler option, which doesn't >> take any fall through comments into account but only uses compiler >> 'fallthrough' attribute to document fall through action is intended. >> >> "falls through" comment was used in the code which is causing a build >> error now, this patch converts comment to the 'fallthrough' macro >> defined in the Linux. >> >> To cover the case where Linux version doesn't have the macro, defined it >> in the compatibility header too. >> >> Signed-off-by: Ferruh Yigit > > Are you sure that fixes it? because the comment in the macro is typically > not visible in a macro expansion. > Since in most case Linux uses gcc why not use the gcc attribute > > __attribute__ ((fallthrough)) Hi Stephen, That is the intention already. Patch is using the Linux kernel defined macro: #if __has_attribute(__fallthrough__) # define fallthrough __attribute__((__fallthrough__)) #else # define fallthrough do {} while (0) /* fallthrough */ #endif And it builds fine without the macro in the 'compat.h'. I added the define in the 'compat.h' for old kernels which doesn't define the macro. For that case I expect default '-Wimplicit-fallthrough' option is used which accepts 'fallthrough;' as a regex hit.