DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org,
	Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
	Omar Cardona <ocardona@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	Ranjit Menon <ranjit.menon@intel.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: Re: [dpdk-dev] [PATCH] eal/windows: refine public interface
Date: Tue, 04 Feb 2020 23:00:39 +0100	[thread overview]
Message-ID: <2019930.Icojqenx9y@xps> (raw)
In-Reply-To: <20200131052421.33525-1-dmitry.kozliuk@gmail.com>

31/01/2020 06:24, Dmitry Kozlyuk:
> The goal of rte_os.h is to mitigate OS differences for EAL users.
> In Windows EAL, rte_os.h did excessive things:

That's an interesting point of view.
The idea of rte_os.h was to hide OS-specifics, so the DPDK applications
have no Windows-specific header to include for using DPDK.
The secondary goal is to avoid Windows-specific includes in DPDK libs
and drivers.

I agree bloating rte_os.h is a concern.
If you can achieve the initial goal (no specific include in apps, libs
and drivers) while reducing rte_os.h, I think it is good.


> 1. It included platform SDK headers (windows.h, etc). Those files are
>    huge, require specific inclusion order, and are generally unused by
>    the code including rte_os.h. Declarations from platform SDK may
>    break otherwise platform-independent code, e.g. min, max, ERROR.
> 
> 2. It included pthread.h, which is clearly not always required.
> 
> 3. It defined functions private to Windows EAL.
> 
> Reorganize Windows EAL includes in the following way:
> 
> 1. Create rte_windows.h to properly import Windows-specific facilities.
>    Primary users are bus drivers, tests, and external applications.
> 
> 2. Remove platform SDK includes from rte_os.h to make it portable.

This file is compiled only on Windows.
What do you mean with "portable"?

>    Copy necessary definitions to avoid including those headers.
> 
> 3. Remove pthread.h include from rte_os.h.
> 
> 4. Move declarations private to Windows EAL into eal_windows.h.
> 
> Fixes: 428eb983 ("eal: add OS specific header file")

nit: blank line missing here

> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>



  reply	other threads:[~2020-02-04 22:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31  5:24 Dmitry Kozlyuk
2020-02-04 22:00 ` Thomas Monjalon [this message]
2020-02-04 23:08   ` Dmitry Kozlyuk

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=2019930.Icojqenx9y@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@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).