DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Pallavi Kadam <pallavi.kadam@intel.com>,
	Dmitry Malloy <dmitrym@microsoft.com>,
	Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH] doc: announce renaming of rte_ether_hdr fields
Date: Thu, 20 May 2021 15:28:44 +0100	[thread overview]
Message-ID: <a72fe953-51b2-cea9-0801-2657dfeb2170@intel.com> (raw)
In-Reply-To: <20210304100929.7bfacbbe@sovereign>

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.
> 


  reply	other threads:[~2021-05-20 14:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 22:51 Dmitry Kozlyuk
2021-03-03 23:54 ` Stephen Hemminger
2021-03-04  7:09   ` Dmitry Kozlyuk
2021-05-20 14:28     ` Ferruh Yigit [this message]
2021-03-10 23:54 ` [dpdk-dev] [PATCH v2] doc: announce API changes for Windows compatibility Dmitry Kozlyuk
2021-03-11 16:19   ` John Alexander
2021-03-11 17:01     ` Dmitry Kozlyuk
2021-03-11 17:08       ` Tyler Retzlaff
2021-03-16 10:37   ` Thomas Monjalon
2021-05-20 18:42   ` [dpdk-dev] [PATCH v3] " Dmitry Kozlyuk
2021-05-20 18:59     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-05-20 19:31       ` Dmitry Kozlyuk
2021-05-20 20:17         ` Akhil Goyal
2021-06-09 15:52           ` Dmitry Kozlyuk
2021-06-23 15:14             ` Dmitry Kozlyuk
2021-06-17 14:27           ` Tyler Retzlaff
2021-07-21 19:55     ` [dpdk-dev] " Dmitry Kozlyuk
2021-07-21 19:55       ` [dpdk-dev] [PATCH v4] " Dmitry Kozlyuk
2021-08-02 12:13         ` Thomas Monjalon
2021-08-02 12:45           ` [dpdk-dev] [EXT] " Akhil Goyal
2021-08-02 13:00             ` Dmitry Kozlyuk
2021-08-02 13:48               ` Akhil Goyal
2021-08-02 14:57                 ` Tal Shnaiderman
2021-08-02 17:46                 ` Thomas Monjalon
2021-05-20 14:24 ` [dpdk-dev] [PATCH] doc: announce renaming of rte_ether_hdr fields Ferruh Yigit
2021-05-20 15:06   ` Dmitry Kozlyuk
2021-05-20 15:27     ` Ferruh Yigit
2021-05-20 15:50       ` Dmitry Kozlyuk
2021-05-20 16:04         ` Ferruh Yigit
2021-05-20 16:16           ` Dmitry Kozlyuk
2021-05-20 16:25             ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a72fe953-51b2-cea9-0801-2657dfeb2170@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=mdr@ashroe.eu \
    --cc=navasile@linux.microsoft.com \
    --cc=nhorman@tuxdriver.com \
    --cc=pallavi.kadam@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).