From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 83892A0C41;
	Wed, 23 Jun 2021 17:14:14 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 03EA94003F;
	Wed, 23 Jun 2021 17:14:14 +0200 (CEST)
Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com
 [209.85.167.48]) by mails.dpdk.org (Postfix) with ESMTP id 32D8C4003E
 for <dev@dpdk.org>; Wed, 23 Jun 2021 17:14:13 +0200 (CEST)
Received: by mail-lf1-f48.google.com with SMTP id h15so4632603lfv.12
 for <dev@dpdk.org>; Wed, 23 Jun 2021 08:14:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=Pyx/FsMTkpip6tDTsRuKRcXYFwu7HlFBbaXsUbiz/Tw=;
 b=KNyafVxdoTaEbv+YiQTrsz6JGMRWQkWKNkTzzm06LRMPaOrkAcQjGghz2ASeUhtGeo
 jgEkiOdnmI9Km+POQMWoOZ6Lb1XkBlC1BFju1JYfYIAHnxZ4Dfx88/0LM/ACgKQfp4Zz
 MFdpj1ptLgofgJCxu8f8po6W9xB3FjRRX4mtr04bKD+JhQMnMzYqL3hbMEpiHiXLu7ez
 tasJgGEQxWhed3jzf+Mrd5LGw4N6AWiGQA7Rf4T+8YDgd5wFHC30gwxnGH2AqOmdHFnL
 8OTyVxdiC7x368Yvc7PmRoq1G/keSNfufoY7KpVZYYKrsPGLXr+IpckGqEAtZ5IPcuiv
 s4JA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=Pyx/FsMTkpip6tDTsRuKRcXYFwu7HlFBbaXsUbiz/Tw=;
 b=fUFWe8MkMSJaKhuIJvedlEYRcZyUAEspH/g9d6MgCFisd3OgtlU1JzcbqTR4BSkc2X
 hog8crlRlAsDtj+D9TWXRR48BVKu5yNs3fZlqb/X26MBWv2eHKG4B4eBv1NPzqfJumm1
 mUAhqz2nAZoWKHBcKuzot4+HIFo0NgGvw7r7xMvENIImTOdn5et/4lTKWhN16QKTh0VY
 Jc7NZcxjqLyvz7QpHQ15uN7VZD9+KWqtI3awN2DNNK07l8VvfnJwhxg+dW5n9qp83dXO
 rOSl2QsosjjWhxDqWiuuMQTq9t24c6tJfZm3s74fEcOIbzirqtCOQzS6oz1Zt5XygX7+
 K2dQ==
X-Gm-Message-State: AOAM530Rs1lGuMuznAbbdc6ySX5rmUuo4+z5I+q4vqpdOmpVFqkMQoFB
 tUmqXiTZYWlbd4ck8vkEB7M=
X-Google-Smtp-Source: ABdhPJyddaZHyYyxedeMF16AgH9KvxjYBJEfuHVid55DpVENIEWd1l32Nd7X+Of0c+NENuZ/8eHsnw==
X-Received: by 2002:ac2:5e7a:: with SMTP id a26mr79043lfr.352.1624461252700;
 Wed, 23 Jun 2021 08:14:12 -0700 (PDT)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id r8sm23384lfc.90.2021.06.23.08.14.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 23 Jun 2021 08:14:12 -0700 (PDT)
Date: Wed, 23 Jun 2021 18:14:10 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Akhil Goyal <gakhil@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@intel.com>,
 Fiona Trahe <fiona.trahe@intel.com>, Ashish Gupta <ashishg@marvell.com>,
 Khoa To <khot@microsoft.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman
 <nhorman@tuxdriver.com>, Thomas Monjalon <thomas@monjalon.net>,
 "bruce.richardson@intel.com" <bruce.richardson@intel.com>, Konstantin
 Ananyev <konstantin.ananyev@intel.com>, Jerin Jacob Kollanukkaran
 <jerinj@marvell.com>, "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
Message-ID: <20210623181410.03bda7f0@sovereign>
In-Reply-To: <20210609185212.4786eca3@sovereign>
References: <20210310235421.23259-1-dmitry.kozliuk@gmail.com>
 <20210520184254.16790-1-dmitry.kozliuk@gmail.com>
 <MW2PR18MB228479D4EAC246E6BC47883BD82A9@MW2PR18MB2284.namprd18.prod.outlook.com>
 <20210520223140.6bef6046@sovereign>
 <MW2PR18MB228451B945591C14A48D5727D82A9@MW2PR18MB2284.namprd18.prod.outlook.com>
 <20210609185212.4786eca3@sovereign>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [EXT] [PATCH v3] doc: announce API changes for
 Windows compatibility
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

2021-06-09 18:52 (UTC+0300), Dmitry Kozlyuk:
> 2021-05-20 20:17 (UTC+0000), Akhil Goyal:
> > > 
> > > 2021-05-20 18:59 (UTC+0000), Akhil Goyal:    
> > > > > Windows system headers define `s_addr`, `min`, and `max` macros which
> > > > > break structure definitions containing fields with one of these names.
> > > > > Undefining those macros would break consumer code that relies on    
> > > them.    
> > > > >    
> > > >
> > > > From the commit message the requirement for changing the structure    
> > > definitions    
> > > > Is not clear. Please note that 'min' - 'max' are not macros. These are    
> > > variables of a    
> > > > structure which should not break any other structure/Macro in windows.    
> > > 
> > > Err, yes, that's what the commit message says.
> > > Structure fields of course break nothing; they are broken by Windows
> > > macros.
> > > Would this make more sense?
> > > 
> > > 
> > > 	Windows headers define `s_addr`, `min`, and `max` as macros.
> > > 	If DPDK headers are included after Windows ones, DPDK structure
> > > 	definitions containing fields with these names get broken.
> > > 	If DPDK headers undefined these macros, it could break consumer
> > > code
> > > 	relying on these macros. It is proposed to rename structure fields
> > > 	in DPDK, because Win32 headers are more widely used and harder
> > > to fix.    
> > 
> > Yes it makes more sense now. But ideally it should be fixed in windows.
> > This may be just one such issue, there may be many more.
> > Will this also mean that nobody can define a local variable 'min'?
> > Is this acceptable?  
> 
> Only in public headers. There happens to be one such, rte_lru_x86.h.
> 
> > Any macro definition in a subsystem should have a prefix to denote that,
> > Just like in DPDK 'RTE_' is added.
> > Macros with generic names should be avoided so that we do not get into
> > these issues.
> > 
> > Adding more people for comments. I don't have a good feeling about
> > this change.  
> 
> Friendly ping to everyone Akhil cc'ed.
> As far as I understand, if we want to fix it in 21.11,
> deprecation notice should make it into 21.08.

Friendly ping v2.
Hopefully Tyler's answer will help with the decision.