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 61531A0C43; Tue, 17 Aug 2021 18:45:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0139A40DF5; Tue, 17 Aug 2021 18:45:02 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1D8C94014E for ; Tue, 17 Aug 2021 18:44:59 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10079"; a="216141974" X-IronPort-AV: E=Sophos;i="5.84,329,1620716400"; d="scan'208";a="216141974" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2021 09:44:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,329,1620716400"; d="scan'208";a="449344112" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga007.fm.intel.com with ESMTP; 17 Aug 2021 09:44:58 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 17 Aug 2021 09:44:57 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 17 Aug 2021 09:44:57 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 17 Aug 2021 09:44:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YQdYhxBDhSGhIP0HqJ06J0Focu/cuJ47oj7QvrrRQ6y8KGKgjElc+hlwAW9WEiFnxQiQK+PF+Z2FTxn4MMCqOcFvRV7h4QEy+vrsLF0kqSBO5qqfIaGBcsLV7ndUzPdegjM4O1oJc/TKJ0dCstqwDkq2pLiAPK6EADzDa7TuMWJthMsOA/mtU+RtvqEUJuYXUM8BLsDxDulZ/OKeUo4LUB6zCQ8b0XsKLgdnMDuQ0Up1nTzPn3G63wFN95lk6R7Z6jrBe2yZZmZjlVCZ94OiuaMEy/abXKvFqeWbi6RxUzND+ht/88iCV8mQWP66ahFaCE0eDuY0VSqwcm7kuB+rGg== 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-SenderADCheck; bh=/YpO1Z+qEadkwXItWyKoRgpKsZSkPctWmjCVk1rMaF4=; b=Nt9xX33YQ3L7MbcZ6IQZ0NYsz7pksnQ9Q6GHDpwT3VWOVIFEgegwBTmbG8Rbuaz9tL4Mvfh2dVvvlOOXzqgiEpsZTjBOM5ZMyQHSnlcuuMp30dusVREvZ5TO6epwcf7vPei7JoXx5rSYYrEMj2aa3Ht6YhiSgVUn6tjM8csVAryleInx3FoNyepWVF/Ha25pPw6gPPzQHbzIGV51gI8Zw5XB5sM2Z8ZLYoAUgB7KmZ7BxD2VLZQQn0NJ0W4sCw9j21KD6CRz1KNw7JzbGVunRpyWL3nc9FeoC39vM72JBsy7VnYkn1kHzJ7Xwn+7m4DaV4llcUMPYsP0ldGAT7r8sQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/YpO1Z+qEadkwXItWyKoRgpKsZSkPctWmjCVk1rMaF4=; b=aTO53RB9NNmjzp95PHbWZEafFc1RnlygcFiM9ACKjnrsfTa3w1/DHhd8hxihiipbIY8d8YmsQbfF1y35dzvOrMXPstAT1mZ9FWJ+VLS1yKxENk3SCjw7yKTFbZldHLmUhcOp4tbgBZB8hgNfhU4QRNu+dxqQqOd1CWC3Lsnrvb4= Authentication-Results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4935.namprd11.prod.outlook.com (2603:10b6:510:35::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Tue, 17 Aug 2021 16:44:56 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf%7]) with mapi id 15.20.4415.024; Tue, 17 Aug 2021 16:44:56 +0000 To: Stephen Hemminger CC: Aman Singh , , Andrew Rybchenko References: <20210816095728.17193-1-aman.deep.singh@intel.com> <20210816095728.17193-3-aman.deep.singh@intel.com> <20210816160347.0a35723a@hermes.local> <8b0c151c-fc49-59f2-863c-233f419f4d40@intel.com> <20210817082543.21ae2483@hermes.local> From: Ferruh Yigit X-User: ferruhy Message-ID: <31c1c42e-317d-d10f-ebe0-8d5058c09f75@intel.com> Date: Tue, 17 Aug 2021 17:44:51 +0100 In-Reply-To: <20210817082543.21ae2483@hermes.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR3P192CA0018.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::23) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by PR3P192CA0018.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Tue, 17 Aug 2021 16:44:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58f6ae00-fce5-4a76-072c-08d9619e584c X-MS-TrafficTypeDiagnostic: PH0PR11MB4935: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cPjwmjgjB+GJrUx51/PUcHLipxIu42MSCd6tDKf6SIzTrUANzYNfEQc9F2+gsCEwsKCUSWEInpIAf9QD1SHGFjcbVq8omfpoasexVOeKPaNlIYQFe00NQkngplX39SX/j9dWFVYbxAiw6rcvO4fVEZHj+Skxub3NboHGT0K+F9T+Z4cr/HQKIggRsUqFPuaOQsTCJuHy6cmU5G6OGJMC7ivfyOZZPM4Zm+NyFUreal2EoXTez4/yVn4BD3aBGYWqb7u7jpWQLiN97y10qMeaWKW7WrWT8bLTzWc7PBfUt5uDEaJJOYapTpjuFw6P8YVJQa/3bKkR0cNYkLPgsy2QMotQHgLo+Bi03O+WFmjmmuwRzrJWOsyl7Au8Kgb9L0PRiwWTiTRtX/E7Ggr2lSCUxtoXrWwbOpV5aI3LKlyZ/s9QoTUB7vNMwPxdf09jbAijwtw5FKlbwXw/m0It5tA/vuLLo2hdORBYc+pQhnpPw8jrNKNqwusd8yjqQ6B+K0WkhSL1Wd+3nJg9zakPA9JCtbx4GBa6dsoUSZCvzPOBn+a2xnfaf+Lt+LKSWNY5IV60flSdLbJUZQLsBB/N+Ibd//T15b+ZTMs/y8mTRdd9JbceFTqy/29KEXDJJOuA2M/e+HPNeVaq2w7HEet8G7GsoJE6oBTI/BAj3p4mTCwvrTcvSndf2n2ZoVrH3J4EWv41W8KvjKojqYQxANyVvlOzHA== 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:(4636009)(396003)(39860400002)(346002)(376002)(136003)(366004)(6486002)(38100700002)(2616005)(44832011)(6916009)(36756003)(8676002)(31696002)(26005)(956004)(186003)(4326008)(478600001)(66946007)(66476007)(66556008)(2906002)(31686004)(54906003)(53546011)(86362001)(316002)(8936002)(16576012)(6666004)(5660300002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZTVrZkhJMjVVK0g0UElhWDB3R0J1elBWaXpDL2xjYnFwWFdSZ0lwNGtZbGlj?= =?utf-8?B?c3NVeEY2V0dwM1hvckJJUDZrWnVYZndKZEF2eWlqWG15K3ptbTRIWkJ4MVhE?= =?utf-8?B?bFpmcnV3NG01akdKS1NEZjRDODFBeDA3S2MwYW9BT0tvME03MmJCQjI0MEJi?= =?utf-8?B?Y1Y4ZDZONGJkV1o3clFrM1FINSt2MXRISVZpb2ZOdkZUd214TXoxWEljdkZo?= =?utf-8?B?WExkSkduYWVVKytBdngwZzNNKzhCdkdYV2JTNlZNMWxHMkwyTEprWWxKZEM0?= =?utf-8?B?WDdMN09BVUp0YlIzTHhjMW90YWVma2liUVRYQjlQYkhXVVpjK1AwZkJraTFi?= =?utf-8?B?RzRHY1MwRlJBSHJpemVvdjJmK3JPZ1VCTU92S3BYbmVubzRUL3QraUhnUW00?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9yOGU3MVhWL2NRVFdw?= =?utf-8?B?NVpheld6Y3kzQ1JHSm1vQkpocXRoeUNtN3VDV1EvK3J2WXo4VWN1dnRiRUt5?= =?utf-8?B?ZENCQ3JyYURrTVRLUUdNbXJNa1VueGV2NzNjdHFVZUVGR0p2dWQ3eTZkL1c0?= =?utf-8?B?cHd0ZGNBQmpsUEhEVUdLT1NNL0svN2lIYVlDR1BUbGwvUGdtRnEwamVjWC9h?= =?utf-8?B?UzRFV3hUVEFpVitrcW5Bd2VYZVpPWnR4TlI2cEdqdWhlUGJhU0UxR2d6UnRH?= =?utf-8?B?NytmSE9sU1ZENFBZRHh0ZXdzbmlXdVF6VlVxdGE3eitsTm1xaisvRVdWYkhO?= =?utf-8?B?dnBRZUVqdVpuYnQ2Y3ZNUy93bHFNcytVaHdCWHQwZW1sQmpjbVRpOS9ELzE3?= =?utf-8?B?ck54NHlKWlZmWWNWUUtzMjdkeGdpOS9FZkRuOUViU2M4ZnhhcnZBSHJEd3Zh?= =?utf-8?Q?XDyR3/19cCo2emPWok2OUeeTvFuvu7+IiBoIEpT?= X-MS-Exchange-CrossTenant-Network-Message-Id: 58f6ae00-fce5-4a76-072c-08d9619e584c X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2021 16:44:56.4885 (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: 42q/3bLCUeU4MF3iYuNHZp11VIOF+meBWlA4coY68m4LwP8oDNhGMzFETaoBqpXN7cM4z5baUcMm5HjTwzrIPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4935 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 2/2] net: added macro to extract MAC address bytes 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 Sender: "dev" On 8/17/2021 4:25 PM, Stephen Hemminger wrote: > On Tue, 17 Aug 2021 09:11:17 +0100 > Ferruh Yigit wrote: > >> On 8/17/2021 12:03 AM, Stephen Hemminger wrote: >>> On Mon, 16 Aug 2021 15:27:28 +0530 >>> Aman Singh wrote: >>> >>>> Added macros to simplify print of MAC address. >>>> The six bytes of a MAC address are extracted in >>>> a macro here, to improve code readablity. >>>> >>>> Signed-off-by: Aman Singh >>>> Reviewed-by: Ferruh Yigit >>>> --- >>>> The change in the document will be done in seperate patch. >>>> To ensure document has direct reference of the code as shown in >>>> commit 413c75c33c40 ("doc: show how to include code in guides"). >>> >>> NAK >>> The DPDK already has rte_ether_format_addr() >>> why does so much code not use it? >>> >> >> 'rte_ether_format_addr()' formats string to a buffer, but most of the times the >> need is just to log and having a buffer for it is unnecessary. >> >> Both macros look useful to me. > > Yes, but it would be good if same format was used everywhere. > Agree, and 'RTE_ETHER_ADDR_PRT_FMT' macro helps to unify the format without forcing to create the buffer. We can use 'RTE_ETHER_ADDR_PRT_FMT' in the 'rte_ether_format_addr()' to unify all output, the downside is it may change the output of the API, which may cause trouble for some customers. Other option is define 'RTE_ETHER_ADDR_PRT_FMT' as whatever 'rte_ether_format_addr()' has, to not cause a change in the API, what do you think?