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 3038A42833; Fri, 24 Mar 2023 16:53:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1447A406B8; Fri, 24 Mar 2023 16:53:45 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id E45934021F for ; Fri, 24 Mar 2023 16:53:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679673223; x=1711209223; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=v4gMpx+/2Hq8MBTgAuemHlGadvGhQFMbk69sq6UIKtE=; b=P/+ZwlszhOdqFxK/4wxmw28MroNBt5o2ML4ZXVOUVjjQmoO+XNlrmT4r fSUU48dCVYGro/xE0FAViflT2jV5qLokAH5bdLcNmaIuknR0zCYh0TfOk vyxTD8LZFLsaFeYUFQKEClGpANTDEBfl9TmYcMVSxgvMt43wQTTOsGnEm FYGbcSCrRYVb9wAZ4IOMQMEeD84tqgD+LuYklgjJEOxPNATGLztzO2MV4 S7mMQ3ynyDF4RWoCpl0jT7JohOEg8VSEym4Qq/SPslmsCTx4EIwADaFWM 4QzxsT/D3Gm0OvpUOVCPasD4m0NRzuRPeL3CxfOhY5KY0mgwK7yckpZBF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="342198768" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="342198768" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 08:53:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="685224058" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="685224058" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga007.fm.intel.com with ESMTP; 24 Mar 2023 08:53:41 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 24 Mar 2023 08:53:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2507.21 via Frontend Transport; Fri, 24 Mar 2023 08:53:41 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) 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.2507.21; Fri, 24 Mar 2023 08:53:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jHD6qHQ2y2ntgi6+QOc4WUN6UpqdncGP5wusDIIJDmJUc6NjeE6pvA5dtB9v6WRcpUxCjdhCJVTT8fewfpIX3r9r+GLmScwnNbcNIc+uMBJ1oEdKAW/hm3GasSGLT1GAjuEcYjncIYjcMy+B6vFfqMcS0ibwzs5ft6VrjeLcBDbvMZD6FpLwAymDZlcU0WZHyeckNMMi6t0aKuEpYdF5R32lPVA4K/1gsMkR2qdefthpdO0pHXCEJ0avv+SeTH68Ax/UrpQ8mbQyDeNsGUQWuvCReUk2yrruoTmKFUcWC9dtqZ9oZXPZ0L0mqPmKNNIajwMqyWb80DWjSkWenwWqdQ== 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=kQLoUWD3REcmvDV3riUfKf/lJOQVIiejDBf/h/oZAdI=; b=eUwgBZLcSZ1Ios5rEiXDlzJ1CE2oh+mJq3PgvMmk4mnjUHuFqfgALGcafSvoW0qrAUe10N0mQMOdxcBLTqbyLte4qX5mRXmTT1+GO5iaOGDyVhXqfCGopaqIMmfENjOKAPf6pPMrTlsI5vyKuX3I8mYyy+FmHXoAyVuWFF1BvK30gVr2NcOsh2VT2XDFN4CYoPXvbbqtNjLxPujr9qc3H8JnOGXLpw/QJVLNFIrMbVhXUF163+Mhgu6C6BCf84pYYYpDS8RuENptuQGl+Aogh/jmqri+7L2owBR6a1q+NtuHclq6LuqiuNxyHpZpWxOn6DLgNHJzvNDBqCMsRiE6KQ== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CY5PR11MB6365.namprd11.prod.outlook.com (2603:10b6:930:3b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Fri, 24 Mar 2023 15:53:31 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c%6]) with mapi id 15.20.6178.038; Fri, 24 Mar 2023 15:53:31 +0000 Date: Fri, 24 Mar 2023 15:53:25 +0000 From: Bruce Richardson To: Stephen Hemminger CC: Subject: Re: [RFC 1/2] Add clang format file Message-ID: References: <20230322170655.45166-1-stephen@networkplumber.org> <20230322170655.45166-2-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230322170655.45166-2-stephen@networkplumber.org> X-ClientProxiedBy: LO4P265CA0211.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:33a::7) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CY5PR11MB6365:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e24058c-ffe6-4ee5-a263-08db2c7fea91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9jlwEnZaUJTsY9LSXjYfRNbf0bTK5/KW1Hp00eCox9MwIWPor1nILjmDjmEb8sl8HkbpddWscAuQBPndt6HGEK8+54n9ywgR+VQZkhRt2aGvXvbMsinL69cqVeyORbss7/Tm00VekK4CZcVV3WyMd7IIICpGGCyw3opOuJUAFGJjWHdYxnHPfzgWJfo54RshJxwEXBq+bgbapiGJ8g6ssd+DncGL5weq5IAwIgktnamA1Lo+cPgjNzcKVosniBIp7aacx6RzYwAfjDz2k7sHUBdFeva0BGh5JdBtlDEpq+PL9f9D+7RgZzLQjrYSRrtYfNWUQnZGIS+3Avu5ihmGH7/ktaHJkqGHydetKdCJLJGbHKAzvFU8d//aldVjOr/vGUcjWPIAx52ZeBWtN0rpc3m+P1rOlyOJzQnxos6ANcJ6APBJBDzXWaJHuyoP/tl5K5GSr17xFaLknpOnWJbeaA2tdoN48NPSzvNRuX17W3umr0F9fphdWr25btbYm2uxA9rp/M0LO/YuIyjg1vrgcPDyVt0YfI9GOg4dNe37UCo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(366004)(39860400002)(376002)(346002)(396003)(136003)(451199018)(38100700002)(2906002)(8676002)(83380400001)(478600001)(966005)(6486002)(66476007)(186003)(86362001)(6916009)(66946007)(4326008)(66556008)(6512007)(316002)(26005)(6506007)(6666004)(8936002)(82960400001)(41300700001)(5660300002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AL7lPuL4rG8W75pjVUplTODXmv+/ZGa1oe3RsvkVpmhI7MmMgFYZKd22NDxH?= =?us-ascii?Q?9XdzeEHWzyWZh8gnMnsuVDOoab3VukAhooH4XoI3SnjBwO4WiEgDesxXebgx?= =?us-ascii?Q?fo3KnCCXz87L/PuInzuSX8F4rUbLghDDI7fHybnLASZCf5u99nZ7bzWl2WK+?= =?us-ascii?Q?CcM5kJOVJJfav/qAPgP/ZtZs39uDBm3SlddkvaRsU5dwDvU7LfJY06cbQwdn?= =?us-ascii?Q?dk7naDxBCqtk1y1ZfN2lA0kyBedJKfAO/dMLrDjlMVh12PqWYMlrC0YTFcC1?= =?us-ascii?Q?58DUeo0qxxpkQBxf4oiyxIH2cfI1f6wOVuFcJ1PeMGhzdvqtNyqRms7eDe0A?= =?us-ascii?Q?nOrSEL4tqaMgOYO58No8luh1uqEkOGLdrdOwGkByGR+eb61Js6QHxsJU1Isi?= =?us-ascii?Q?/8rUkg4Nfn9jWFxY2xrf7II1rhiMqWcgqPlbm3I4Ve2JR3NHLJHh7S/8JiE0?= =?us-ascii?Q?6qFM8K1qRXi6JEANb0NTdubr4zQaRVmDwokhY7ZnCYDNn83C44kbg2lQxcP7?= =?us-ascii?Q?xmyi5KElAnVFqeZzChATMYBhiA1O2HBfP1QSySU6D5cWumHkC5auL6qUfzTo?= =?us-ascii?Q?8wtn/h/+Gs1CzYXh2CCo9wiiParAoZq8X+4YSL1cXKQpUAGC6KqKAu0Q9PPU?= =?us-ascii?Q?2xup8pKH5GXV0GUX7wsBvCix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?Q?KH28Y57IjqC3o5s0hwYGcHT7g8JSg43D/owqWbSFhu8n2/QQZTy8pmZ16dbv?= =?us-ascii?Q?qQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1e24058c-ffe6-4ee5-a263-08db2c7fea91 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2023 15:53:31.3921 (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: Wor+4S1uHIQeT8iKcmC/+dZY3v96GRGA1VNKQHWzofyN5e8FtnDme3E2TNKduV4Sx1bCOZZ3D0H5ugWMbdoZlis8m/Atqlon++cxiM+o4o8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6365 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 Wed, Mar 22, 2023 at 10:06:54AM -0700, Stephen Hemminger wrote: > Based off of Linux kernel style with some local modifications > and DPDK foreach macros. > > A couple of open questions to be resolved befor merging. > Is GPL license ok for config file (inherited from Linux here)? > Do we want to have per-driver files for some drivers (like MLX5)? > > Signed-off-by: Stephen Hemminger > --- > .clang-format | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 181 insertions(+) > create mode 100644 .clang-format > > diff --git a/.clang-format b/.clang-format > new file mode 100644 > index 000000000000..ad4d30520253 > --- /dev/null > +++ b/.clang-format > @@ -0,0 +1,181 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# > +# clang-format configuration file. Intended for clang-format >= 11. > +# > +# For more information, see: > +# > +# Documentation/process/clang-format.rst > +# https://clang.llvm.org/docs/ClangFormat.html > +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html > +# > +--- > +AccessModifierOffset: -4 > +AlignAfterOpenBracket: Align This may be partially a matter of personal preference, but I disagree with using this setting. This sets up line continuations with varaible widths, and leads to: * continuation lines being very short if the function name in a wrapped call is long * indentation using a mix of tabs and spaces as it tries to line up exactly on a column with brackets I think a better option for this setting, which is also aligned with our coding rules, is for this to be set to "DontAlign" and the "ContinuationIndentWidth" set to 16, leading to double-tab continuations (at least in my testing). /Bruce