DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
	 Declan Doherty <declan.doherty@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	 Akhil Goyal <akhil.goyal@nxp.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	 Fan Zhang <roy.fan.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config
Date: Fri, 13 Nov 2020 16:41:52 +0100	[thread overview]
Message-ID: <CAJFAV8wP3ggTJAAeVsqWu6bhDE4NwsDPEhOZ8MUeMP9b8qWtLQ@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8zbH_DVpdXMFXTK7r6W-6Vg012jpr=0xkLBupXVSf5RZA@mail.gmail.com>

On Fri, Nov 13, 2020 at 3:15 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Nov 13, 2020 at 2:53 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > > +NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
> > > +ifeq ($(NEED_CRYPTO_SCHEDULER), 1)
> >
> > Sorry for the last-minute comment, but I wonder for this check if we can do
> > better by adding into each makefile something like:
> >
> > CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
> >
> > Then we can easily do multiple checks for vars as needed using findstring,
> > e.g.
> >
> > ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),)
> > $(info No crypto scheduler found)
> > else
> > ...
> > endif
> >
> > Whatever approach we use here, I'd like applicable across all makefiles for
> > consistency, and shelling out per-value seems wasteful. Pulling all macro
> > values also allows checks for architecture and instruction set levels too,
> > if so desired.

--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -23,9 +23,15 @@ PKGCONF ?= pkg-config

 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)

+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
        $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)

I'll send a v3 later.


-- 
David Marchand


  reply	other threads:[~2020-11-13 15:42 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 15:12 [dpdk-dev] [PATCH 00/10] Examples compilation fixes David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 01/10] examples/fips_validation: fix build with pkg-config David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 02/10] examples/ipsec-gw: " David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 03/10] examples/kni: " David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 04/10] examples/l2fwd-crypto: " David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 05/10] examples/l3fwd-graph: fix static build David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 06/10] examples/ntb: fix clean target David Marchand
2020-11-12  1:30   ` Li, Xiaoyun
2020-11-10 15:12 ` [dpdk-dev] [PATCH 07/10] examples/vhost_blk: fix build with pkg-config David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 08/10] examples/rxtx_callbacks: " David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 09/10] devtools: compile all examples " David Marchand
2020-11-10 16:02   ` Bruce Richardson
2020-11-10 17:18   ` Bruce Richardson
2020-11-10 17:27     ` David Marchand
2020-11-10 15:12 ` [dpdk-dev] [PATCH 10/10] examples: restore trace point David Marchand
2020-11-10 16:04 ` [dpdk-dev] [PATCH 00/10] Examples compilation fixes Bruce Richardson
2020-11-13 12:24 ` [dpdk-dev] [PATCH v2 00/11] " David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 01/11] examples/fips_validation: fix build with pkg-config David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 02/11] examples/ipsec-gw: " David Marchand
2020-11-16  4:16     ` [dpdk-dev] [EXT] " Anoob Joseph
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 03/11] examples/kni: " David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: " David Marchand
2020-11-13 13:53     ` Bruce Richardson
2020-11-13 14:15       ` David Marchand
2020-11-13 15:41         ` David Marchand [this message]
2020-11-13 16:08           ` Bruce Richardson
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 05/11] examples/l3fwd-graph: fix static build David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 06/11] examples/ntb: fix clean target David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 07/11] examples/performance-thread: fix build with pkg-config David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 08/11] examples/vhost_blk: " David Marchand
2020-11-13 13:00     ` Maxime Coquelin
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 09/11] examples/rxtx_callbacks: " David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 10/11] examples: restore trace point David Marchand
2020-11-13 12:24   ` [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config David Marchand
2020-11-13 12:37     ` David Marchand
2020-11-13 14:06     ` Bruce Richardson
2020-11-13 14:14       ` David Marchand
2020-11-13 14:24         ` Bruce Richardson
2020-11-14  9:05 ` [dpdk-dev] [PATCH v3 00/11] Examples compilation fixes David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 01/11] examples/fips_validation: fix build with pkg-config David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 02/11] examples/ipsec-gw: " David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 03/11] examples/kni: " David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 04/11] examples/l2fwd-crypto: " David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 05/11] examples/l3fwd-graph: fix static build David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 06/11] examples/l3fwd-graph: fix pkg-config usage David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 07/11] examples/ntb: fix clean target David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 08/11] examples/performance-thread: fix build with pkg-config David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 09/11] examples/vhost_blk: " David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 10/11] examples/rxtx_callbacks: " David Marchand
2020-11-14  9:05   ` [dpdk-dev] [PATCH v3 11/11] examples: restore trace point David Marchand
2020-11-15 14:37   ` [dpdk-dev] [PATCH v3 00/11] Examples compilation fixes Thomas Monjalon

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=CAJFAV8wP3ggTJAAeVsqWu6bhDE4NwsDPEhOZ8MUeMP9b8qWtLQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=akhil.goyal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=thomas@monjalon.net \
    /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).