From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id CEF01B0A5 for ; Wed, 28 May 2014 19:32:53 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 28 May 2014 10:32:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,929,1392192000"; d="scan'208";a="438160187" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by azsmga001.ch.intel.com with ESMTP; 28 May 2014 10:32:49 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s4SHWmG9004030; Wed, 28 May 2014 18:32:48 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s4SHWmoU031661; Wed, 28 May 2014 18:32:48 +0100 Received: (from aburakov@localhost) by sivswdev02.ir.intel.com with id s4SHWmKd031657; Wed, 28 May 2014 18:32:48 +0100 From: Anatoly Burakov To: dev@dpdk.org Date: Wed, 28 May 2014 18:32:35 +0100 Message-Id: <5d2edc102760954bf177f80255f837341bc207f0.1401298292.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 01/13] ip_frag: Moving fragmentation/reassembly headers into a separate library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 17:32:55 -0000 Signed-off-by: Anatoly Burakov --- config/common_bsdapp | 5 +++ config/common_linuxapp | 5 +++ examples/ip_reassembly/main.c | 2 +- examples/ipv4_frag/main.c | 2 +- lib/Makefile | 1 + lib/librte_ip_frag/Makefile | 42 ++++++++++++++++++++++ .../librte_ip_frag}/ipv4_frag_tbl.h | 0 .../librte_ip_frag/rte_ip_frag.h | 0 .../librte_ip_frag/rte_ipv4_rsmbl.h | 0 9 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 lib/librte_ip_frag/Makefile rename {examples/ip_reassembly => lib/librte_ip_frag}/ipv4_frag_tbl.h (100%) rename examples/ipv4_frag/rte_ipv4_frag.h => lib/librte_ip_frag/rte_ip_frag.h (100%) rename examples/ip_reassembly/ipv4_rsmbl.h => lib/librte_ip_frag/rte_ipv4_rsmbl.h (100%) diff --git a/config/common_bsdapp b/config/common_bsdapp index 2cc7b80..d30802e 100644 --- a/config/common_bsdapp +++ b/config/common_bsdapp @@ -258,6 +258,11 @@ CONFIG_RTE_MAX_LCORE_FREQS=64 CONFIG_RTE_LIBRTE_NET=y # +# Compile librte_net +# +CONFIG_RTE_LIBRTE_IP_FRAG=y + +# # Compile librte_meter # CONFIG_RTE_LIBRTE_METER=y diff --git a/config/common_linuxapp b/config/common_linuxapp index 62619c6..074d961 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -285,6 +285,11 @@ CONFIG_RTE_MAX_LCORE_FREQS=64 CONFIG_RTE_LIBRTE_NET=y # +# Compile librte_net +# +CONFIG_RTE_LIBRTE_IP_FRAG=y + +# # Compile librte_meter # CONFIG_RTE_LIBRTE_METER=y diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index bafa8d9..42ade5c 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -94,7 +94,7 @@ #define MAX_PKT_BURST 32 -#include "ipv4_rsmbl.h" +#include "rte_ipv4_rsmbl.h" #ifndef IPv6_BYTES #define IPv6_BYTES_FMT "%02x%02x:%02x%02x:%02x%02x:%02x%02x:"\ diff --git a/examples/ipv4_frag/main.c b/examples/ipv4_frag/main.c index 329f2ce..3c2c960 100644 --- a/examples/ipv4_frag/main.c +++ b/examples/ipv4_frag/main.c @@ -71,7 +71,7 @@ #include #include -#include "rte_ipv4_frag.h" +#include "rte_ip_frag.h" #include "main.h" #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1 diff --git a/lib/Makefile b/lib/Makefile index b92b392..99f60d0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -55,6 +55,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched DIRS-$(CONFIG_RTE_LIBRTE_ACL) += librte_acl DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs +DIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += librte_ip_frag ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile new file mode 100644 index 0000000..3054c1f --- /dev/null +++ b/lib/librte_ip_frag/Makefile @@ -0,0 +1,42 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# install this header file +SYMLINK-$(CONFIG_RTE_LIBRTE_IP_FRAG)-include += rte_ip_frag.h +SYMLINK-$(CONFIG_RTE_LIBRTE_IP_FRAG)-include += ipv4_frag_tbl.h +SYMLINK-$(CONFIG_RTE_LIBRTE_IP_FRAG)-include += rte_ipv4_rsmbl.h + +# this library depends on rte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_mempool lib/librte_ether + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/examples/ip_reassembly/ipv4_frag_tbl.h b/lib/librte_ip_frag/ipv4_frag_tbl.h similarity index 100% rename from examples/ip_reassembly/ipv4_frag_tbl.h rename to lib/librte_ip_frag/ipv4_frag_tbl.h diff --git a/examples/ipv4_frag/rte_ipv4_frag.h b/lib/librte_ip_frag/rte_ip_frag.h similarity index 100% rename from examples/ipv4_frag/rte_ipv4_frag.h rename to lib/librte_ip_frag/rte_ip_frag.h diff --git a/examples/ip_reassembly/ipv4_rsmbl.h b/lib/librte_ip_frag/rte_ipv4_rsmbl.h similarity index 100% rename from examples/ip_reassembly/ipv4_rsmbl.h rename to lib/librte_ip_frag/rte_ipv4_rsmbl.h -- 1.8.1.4