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 5F1E1A0A0A; Thu, 20 May 2021 16:28:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC64840143; Thu, 20 May 2021 16:28:49 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id CF74040041 for ; Thu, 20 May 2021 16:28:48 +0200 (CEST) IronPort-SDR: F7ZVxYL4JXHxvZHU4i0uLhr1r0twHeA0gsE0wEDLWyQHOSsXAYy7VMFolykrdfTAu9lcA0v0H5 MuN/rzzM2eBg== X-IronPort-AV: E=McAfee;i="6200,9189,9989"; a="265151171" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="265151171" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 07:28:47 -0700 IronPort-SDR: 0H5Dg5N0/sIw1Yo2Solok/QD8bi5tKj7xXy1oSDKeU4Y2LRCGPA+Giw+YVzdhHXVjnSxRXBF9n AaTgIBkFFmAw== X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="433918740" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.241.8]) ([10.213.241.8]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 07:28:45 -0700 To: Dmitry Kozlyuk , Stephen Hemminger Cc: dev@dpdk.org, Pallavi Kadam , Dmitry Malloy , Narcisa Ana Maria Vasile , Ray Kinsella , Neil Horman References: <20210303225121.16146-1-dmitry.kozliuk@gmail.com> <20210303155422.6bead163@hermes.local> <20210304100929.7bfacbbe@sovereign> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Thu, 20 May 2021 15:28:44 +0100 MIME-Version: 1.0 In-Reply-To: <20210304100929.7bfacbbe@sovereign> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] doc: announce renaming of rte_ether_hdr fields 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 3/4/2021 7:09 AM, Dmitry Kozlyuk wrote: > 2021-03-03 15:54, Stephen Hemminger: >>> + >>> +* net: ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure >>> + will be renamed to ``src_addr`` and ``dst_addr`` respectively in DPDK 20.11 >>> + in order to avoid conflict with Windows Sockets headers. >> >> If those fields were a problem now, there might be others in future. > > One I can think of is `min` and `max` macros from `windows.h`: they are used > as field names in `rte_compressdev.h` and `rte_cryptodev.h` (and more than > once have they been worked around in PMD code, see i40e and ice patches). > Do you prefer a single notice for all such conflicts we can identify now? > >> Don't use src_addr and dst_addr because those are already used in rte_ipv4_hdr. > Why src_addr being used in rte_ipv4_hdr is a problem? > Not sure what DPDK policy is: `rte_ipv4/6_hdr` use completely custom names, > while `rte_arp_hdr` uses traditional names with `arp_` prefix. > Coming from C++, I chose the former approach, but it's not a strong opinion. > I am now aware of a DPDK policy for it, but +1 to former approach. >> Linux and FreeBSD use: >> >> struct ether_header >> { >> uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ >> uint8_t ether_shost[ETH_ALEN]; /* source ether addr */ >> uint16_t ether_type; /* packet type ID field */ >> } __attribute__ ((__packed__)); >> >> So why not ether_dhost/ether_shost? > > Works for me, let's see what others think. >