From b25c2a8c692df133ef9817adae197e009fa5c021 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Mon, 3 Oct 2016 10:38:45 +0200 Subject: [PATCH] net: introduce net library Previously, librte_net only contained header files. Add a C file (empty for now) and generate a library. It will contain network helpers like checksum calculation, software packet type parser, ... Signed-off-by: Olivier Matz --- MAINTAINERS | 1 + lib/librte_net/Makefile | 11 ++++++++++- lib/librte_net/rte_net.c | 0 lib/librte_net/rte_net_version.map | 3 +++ mk/rte.app.mk | 1 + mk/rte.lib.mk | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 lib/librte_net/rte_net.c create mode 100644 lib/librte_net/rte_net_version.map diff --git a/MAINTAINERS b/MAINTAINERS index cd8d1674c9..8f5fa824dd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -451,6 +451,7 @@ Packet processing ----------------- Network headers +M: Olivier Matz F: lib/librte_net/ IP fragmentation & reassembly diff --git a/lib/librte_net/Makefile b/lib/librte_net/Makefile index fc332ff6c9..a6be7ae391 100644 --- a/lib/librte_net/Makefile +++ b/lib/librte_net/Makefile @@ -31,10 +31,19 @@ include $(RTE_SDK)/mk/rte.vars.mk +LIB = librte_net.a + CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +EXPORT_MAP := rte_net_version.map +LIBABIVER := 1 + +SRCS-$(CONFIG_RTE_LIBRTE_NET) := rte_net.c + # install includes SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include := rte_ip.h rte_tcp.h rte_udp.h rte_sctp.h rte_icmp.h rte_arp.h rte_ether.h +DEPDIRS-$(CONFIG_RTE_LIBRTE_NET) += lib/librte_eal lib/librte_mempool +DEPDIRS-$(CONFIG_RTE_LIBRTE_NET) += lib/librte_mbuf -include $(RTE_SDK)/mk/rte.install.mk +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/librte_net/rte_net_version.map b/lib/librte_net/rte_net_version.map new file mode 100644 index 0000000000..cc5829e30b --- /dev/null +++ b/lib/librte_net/rte_net_version.map @@ -0,0 +1,3 @@ +DPDK_16.11 { + local: *; +}; diff --git a/mk/rte.app.mk b/mk/rte.app.mk index ac50a210ce..72c2fe7303 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -90,6 +90,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf +_LDLIBS-$(CONFIG_RTE_LIBRTE_NET) += -lrte_net _LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lethdev _LDLIBS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += -lrte_cryptodev _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 830f81a653..7b96fd41fd 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -79,7 +79,7 @@ endif # Translate DEPDIRS-y into LDLIBS # Ignore (sub)directory dependencies which do not provide an actual library -_IGNORE_DIRS = lib/librte_eal/% lib/librte_net lib/librte_compat +_IGNORE_DIRS = lib/librte_eal/% lib/librte_compat _DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS-y)) _LDDIRS = $(subst librte_ether,libethdev,$(_DEPDIRS)) LDLIBS += $(subst lib/lib,-l,$(_LDDIRS)) -- 2.20.1