From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0506FA00BE; Wed, 8 Jul 2020 03:10:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFF3E1DA00; Wed, 8 Jul 2020 03:10:03 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 6B04D1D9FD for ; Wed, 8 Jul 2020 03:10:02 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id q4so16501710lji.2 for ; Tue, 07 Jul 2020 18:10:02 -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=TazgmbUTH9ZADYJJm+larE2n2UotouSlmIE6Mug/PCE=; b=Gv96OVsfUcZ9JY6QWMtRwsXB7w5b0Y3e8+oxuJiejxWsIiPs8TtaUQxMMCuBNumRX9 1ErOi1+oyYSNjLH7ucbJQzkC1nAhxb2XcupebUaXRvulukc5ONx0BUxO/d6sCfkljZB6 y/yniuVI0Jj2HIhFYlgClDiF7v6TH6wMuLqh6r6nRkYqmrWTrebLuLBnOfYDYY+gzfkF 42SdY+n6MaWp8/Lncwx3OLthhrEz7v6q0HPrVyisk2OA4W3ENcqdLgpfadZE6uZj4wgV cJW2M5c6wHeonMR9XrTSzvm18PpdeaSXOF8aJTyFdo78LjHSmehU0HtRhEkIbIt8Bxc5 0myw== 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=TazgmbUTH9ZADYJJm+larE2n2UotouSlmIE6Mug/PCE=; b=ApfDALabSIG7nPL5mcU+lC4vy1Y0HLmLKb8esjmdmjuS6TqXFduhngUGAmv0bcaV0m dV3fzzCIBQf+W6Y5n36dryeHtx+U8uNKmd1EaJbKZnFT5cDfPwh9cL72xJ9tqwjRm4z4 JdCEHuDVOB/pTm4H9g5sRAL4rHZq/vP7L9k1TaCgbRCR0/S8ECB3Nxazn/kW/rJAnXyR RdTTzNNarULIaYKBy5k0H0nLaVWqX2A+X66PsLLJu4jhOoWUh5bEnAj0ZcDzr4jU0wOD 0rS6OKE8slNCUaX0xxH8+J1jHsYRcODPzgsymcLI0hledOfr3MXIi3L31PYRvMhExACz eM4g== X-Gm-Message-State: AOAM532h5zsReRkXi6cmbl2KBnf9zLPRNdeiYttYS04OjHueGwCkgoSa kqumE6kv8zbbKeBDFkXYWq8= X-Google-Smtp-Source: ABdhPJxKALBvrLb6og4uivRvTSTk683pQBzLUqCY2XU3meNmmqxFsC2xDTu/Qhw+kxecYAkxKxsJhg== X-Received: by 2002:a2e:2242:: with SMTP id i63mr33759595lji.370.1594170601817; Tue, 07 Jul 2020 18:10:01 -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 y26sm517644ljm.46.2020.07.07.18.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 18:10:00 -0700 (PDT) Date: Wed, 8 Jul 2020 04:09:59 +0300 From: Dmitry Kozlyuk To: Tal Shnaiderman Cc: Ranjit Menon , Fady Bader , "dev@dpdk.org" , Dmitry Malloy , Narcisa Ana Maria Vasile , Thomas Monjalon , Olivier Matz Message-ID: <20200708040959.0fdbfbd2@sovereign> In-Reply-To: <20200630025620.241e6d54@sovereign> References: <20200620210511.13134-1-dmitry.kozliuk@gmail.com> <20200620210511.13134-7-dmitry.kozliuk@gmail.com> <8b908479-d64c-495d-3a69-de561f2608e8@intel.com> <20200629104239.7c0d3d68@sovereign> <20200630025620.241e6d54@sovereign> X-Mailer: Claws Mail 3.17.4 (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] [PATCH 6/7] cmdline: support Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Tue, 30 Jun 2020 02:56:20 +0300, Dmitry Kozlyuk wrote: > On Mon, 29 Jun 2020 08:12:51 +0000, Tal Shnaiderman wrote: > > > From: Dmitry Kozlyuk > > > Subject: Re: [dpdk-dev] [PATCH 6/7] cmdline: support Windows > > > > > > On Sun, 28 Jun 2020 23:23:11 -0700, Ranjit Menon wrote: [snip] > > > > The issue is that UINT8, UINT16, INT32, INT64 etc. are reserved types > > > > in Windows headers for integer types. We found that it is easier to > > > > change the enum in cmdline_parse_num.h than try to play with the > > > > include order of headers. AFAIK, the enums were only used to determine > > > > the type in a series of switch() statements in librte_cmdline, so we > > > > simply renamed the enums. Not sure, if that will be acceptable here. > > > > > > +1 for renaming enum values. It's not a problem of librte_cmdline itself > > > +but a > > > problem of its consumption on Windows, however renaming enum values > > > doesn't break ABI and winn make librte_cmdline API "namespaced". > > > [snip] > > > > test_pmd redefine BOOLEAN and PATTERN in the index enum, I'm not sure how many more conflicts we will face because of this huge include. > > > > Also, DPDK applications will inherit it unknowingly, not sure if this is common for windows libraries. > > I never hit these particular conflicts, but you're right that there will be > more, e.g. I remember particularly nasty clashes in failsafe PMD, unrelated > to cmdline token names. Still, I'd go for renaming, with or without additional steps to hide . Although I wouldn't include it in this series: renaming will touch numerous places and require much more reviewers. > We could take the same approach as with networking headers: copy required > declarations instead of including them from SDK. Here's a list of what > pthread.h uses: While this will resolve the issue for DPDK code, applications using DPDK headers can easily hit it by including on their own. On the other hand, they can always split translation units and I don't know how practical it is to use system and DPDK networking headers at the same time. -- Dmitry Kozlyuk