[dpdk-dev] [PATCH v3 10/11] config: Enable BNX2X driver build by default

Rasesh Mody rasesh.mody at qlogic.com
Thu Dec 3 03:54:54 CET 2015


> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, December 02, 2015 5:30 PM
>
> 2015-12-03 00:54, Rasesh Mody:
> > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > > Sent: Tuesday, November 24, 2015 6:26 AM
> > >
> > > We still have a compilation error when zlib.h is missing.
> > > Please keep it disabled until we have a solution (probably a "configure"
> > > script).
> >
> > Just to clarify - are you planning to have a generic ./configure script that
> would address external dependencies like zlib or are you proposing that we
> provide the configure script specific to bnx2x PMD?
>
> There will be a configure script in the next release.
> It will handle every dependencies.

Ok, thanks!

>
> > Another option could be to not to include "bnx2x" if zlib.h header is not
> found by having a check in drivers/net/Makefile?
>
> How do you find zlib.h?
> It seems to be a job for gcc in a configure script.

I was thinking of something like this...

diff --git a/dpdk-2.1.0/drivers/net/Makefile b/dpdk-2.1.0/drivers/net/Makefile
index 5ebf963..25f3767 100644
--- a/dpdk-2.1.0/drivers/net/Makefile
+++ b/dpdk-2.1.0/drivers/net/Makefile
@@ -32,7 +32,13 @@
 include $(RTE_SDK)/mk/rte.vars.mk

 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
-DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x
+ZLIB_VERNUM := $(shell if [ -f /usr/include/zlib.h ]; then grep ZLIB_VERNUM /usr/include/zlib.h | cut -d" " -f3; fi)
+ifneq ($(ZLIB_VERNUM),)
+  ZLIB_VERNUM_GE_1252 := $(shell (($(ZLIB_VERNUM) >= 0x1252)) || echo $?)
+  ifneq ($(ZLIB_VERNUM_GE_1252)), 1)
+    DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x
+  endif
+endif
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding
 DIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe
 DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000

Also a similar check in mk/rte.app.mk.

Is this something we can live with till we have the configure script?

________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.


More information about the dev mailing list