DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header
@ 2015-11-06 11:52 Bruce Richardson
  2015-11-06 12:25 ` Adrien Mazarguil
  0 siblings, 1 reply; 24+ messages in thread
From: Bruce Richardson @ 2015-11-06 11:52 UTC (permalink / raw)
  To: Adrien Mazarguil, dev

+Adrien on To: line

Email user/client fail on original. :-(

----- Forwarded message from Bruce Richardson <bruce.richardson@intel.com> -----

Date: Fri, 6 Nov 2015 11:49:05 +0000
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>, Thomas Monjalon <thomas.monjalon@6wind.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header
User-Agent: Mutt/1.5.23 (2014-03-12)

On Thu, Nov 05, 2015 at 04:09:18PM +0100, Adrien Mazarguil wrote:
> Bruce is asking for a consensus about -pedantic, whether we want to do the
> extra effort to support it in DPDK. Since I like checking for -pedantic
> errors, it's enabled for mlx4 and mlx5 when compiling these drivers in
> debugging mode. There is currently no established rule in DPDK against this.
> 
> I'm arguing that most C headers (C compiler, libc, most libraries, even the
> Linux kernel in uapi to an extent) provide standards compliant includes
> because they cannot predict or force particular compilation flags on
> user applications.
> 
> If we consider DPDK as a system wide library, I think we should do it as
> well in all installed header files. If we choose not to, then we must
> document that our code is not standard, -pedantic is unsupported and I'll
> have to drop it from mlx4 and mlx5.
> 
> -- 
> Adrien Mazarguil
> 6WIND

Hi Adrien,

I'm trying to dig into this a bit more now, and try out using a static inline
function, but I'm having trouble getting DPDK to compile with the mlx drivers
turned on in the config. I'm trying to follow the instructions here:
http://dpdk.org/doc/guides/nics/mlx4.html, but it's not clearly called out what
requirements are for compilation vs requirements for running the PMD.

I'm running Fedora 23, and installed the libibverbs-devel package, but when I
compile I get the following error:

== Build drivers/net/mlx4
  CC mlx4.o
  /home/bruce/ethdev-cleanup/drivers/net/mlx4/mlx4.c: In function ‘txq_cleanup’:
  /home/bruce/ethdev-cleanup/drivers/net/mlx4/mlx4.c:886:37: error: storage size of ‘params’ isn’t known
    struct ibv_exp_release_intf_params params;
                                       ^
compilation terminated due to -Wfatal-errors.

Any suggestions on the fix for this?

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 0/4] ethdev: minor cleanup
@ 2015-09-09 15:09 Bruce Richardson
  2015-11-03 12:00 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
  0 siblings, 1 reply; 24+ messages in thread
From: Bruce Richardson @ 2015-09-09 15:09 UTC (permalink / raw)
  To: dev

This patchset performs two cleanups:
1. Four functions in ethdev.c which were enabled for debug only have been
  merged into their inlined header-file counterparts. This change required that
  a number of macros be renamed and moved to the header file too. The macro changes
  are in patches 1 & 2, and the elimination of the separate debug fns are in patch 3.
2. Checks for valid function pointers are added to the API calls for reading
  the descriptor ring count, and checking for a valid descriptor. This is because
  these functions are not implemented by most drivers, and so it's far safer to
  have the check.

---

V2 Changes:
* Rebased to latest DPDK codebase
* Changed type from uint32_t to int for the count function, on the basis of
feedback received.

Bruce Richardson (4):
  ethdev: rename macros to have RTE_ETH prefix
  ethdev: move error checking macros to header
  ethdev: remove duplicated debug functions
  ethdev: check driver support for functions

 lib/librte_ether/rte_ethdev.c | 674 ++++++++++++++++++------------------------
 lib/librte_ether/rte_ethdev.h | 121 ++++++--
 2 files changed, 375 insertions(+), 420 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-11-11 10:52 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06 11:52 [dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header Bruce Richardson
2015-11-06 12:25 ` Adrien Mazarguil
2015-11-06 14:39   ` Richardson, Bruce
2015-11-06 14:54     ` Adrien Mazarguil
2015-11-06 15:30       ` Richardson, Bruce
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09 15:09 [dpdk-dev] [PATCH v2 0/4] ethdev: minor cleanup Bruce Richardson
2015-11-03 12:00 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2015-11-03 12:00   ` [dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header Bruce Richardson
2015-11-04  1:19     ` Thomas Monjalon
2015-11-04 10:24       ` Adrien Mazarguil
2015-11-04 14:10         ` Bruce Richardson
2015-11-04 15:25           ` Adrien Mazarguil
2015-11-04 18:39         ` Stephen Hemminger
2015-11-05 15:09           ` Adrien Mazarguil
2015-11-05 15:17             ` Bruce Richardson
2015-11-06 11:49             ` Bruce Richardson
2015-11-06 17:10             ` Bruce Richardson
2015-11-06 17:22               ` Bruce Richardson
2015-11-09 13:39                 ` Adrien Mazarguil
2015-11-09 13:50                   ` Adrien Mazarguil
2015-11-09 14:02                   ` Richardson, Bruce
2015-11-10 10:31                     ` Declan Doherty
2015-11-10 16:08                     ` Adrien Mazarguil
2015-11-10 16:21                       ` Richardson, Bruce
2015-11-10 17:12                         ` Adrien Mazarguil
2015-11-11 10:51                           ` Bruce Richardson

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