DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Olivier Matz <olivier.matz@6wind.com>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net: introduce big and little endian types
Date: Tue, 6 Dec 2016 14:06:32 +0000	[thread overview]
Message-ID: <FD0A575A-810C-43C0-A06B-08B90BBCA17E@intel.com> (raw)
In-Reply-To: <20161205120603.GL21794@autoinstall.dev.6wind.com>


> On Dec 5, 2016, at 6:06 AM, Nélio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> On Mon, Dec 05, 2016 at 10:09:05AM +0000, Ananyev, Konstantin wrote:
>> Hi Neilo,
>> 
>>> 
>>> This commit introduces new rte_{le,be}{16,32,64}_t types and updates
>>> rte_{le,be,cpu}_to_{le,be,cpu}_*() and network header structures
>>> accordingly.
>>> 
>>> Specific big/little endian types avoid uncertainty and conversion mistakes.
>>> 
>>> No ABI change since these are simply typedefs to the original types.
>> 
>> It seems like quite a lot of changes...
>> Could you probably explain what will be the benefit in return?
>> Konstantin
> 
> Hi Konstantin,
> 
> The benefit is to provide documented byte ordering for data types
> software is manipulating to determine when network to CPU (or CPU to
> network) conversion must be performed.

Why can we not just document the variables with doxygen as to the BE or LE expected type. Adding a new type is not going to solve the problem of someone using it incorrectly. In the function header doc it should state the expected type.

Adding yet another type is just going to confuse people as some drivers or code may never get changed. Also some drivers are common to many other systems, which means we would have to move the typedefs over to those systems like Linux and FreeBSD for the common sections.

> 
> Regards,
> 
> -- 
> Nélio Laranjeiro
> 6WIND

Regards,
Keith


  parent reply	other threads:[~2016-12-06 14:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 15:04 Nelio Laranjeiro
2016-12-05 10:09 ` Ananyev, Konstantin
2016-12-05 12:06   ` Nélio Laranjeiro
2016-12-06 11:23     ` Ananyev, Konstantin
2016-12-06 11:55       ` Bruce Richardson
2016-12-06 12:41         ` Ananyev, Konstantin
2016-12-06 13:34           ` Bruce Richardson
2016-12-06 14:45             ` Ananyev, Konstantin
2016-12-06 14:56               ` Wiles, Keith
2016-12-06 15:34                 ` Morten Brørup
2016-12-06 16:28                   ` Nélio Laranjeiro
2016-12-06 16:31                     ` Wiles, Keith
2016-12-06 16:36                       ` Richardson, Bruce
2016-12-06 17:00                     ` Ananyev, Konstantin
2016-12-06 17:29                       ` Neil Horman
2016-12-06 13:14         ` Nélio Laranjeiro
2016-12-06 13:30           ` Bruce Richardson
2016-12-06 14:06     ` Wiles, Keith [this message]
2016-12-08  9:30 ` Nélio Laranjeiro
2016-12-08 13:59   ` Wiles, Keith
2016-12-08 16:06     ` Thomas Monjalon
2016-12-08 15:07   ` Neil Horman
2016-12-08 15:10     ` Ananyev, Konstantin

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=FD0A575A-810C-43C0-A06B-08B90BBCA17E@intel.com \
    --to=keith.wiles@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=olivier.matz@6wind.com \
    --cc=wenzhuo.lu@intel.com \
    /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).