From patchwork Thu Apr 14 18:33:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 12085 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5CF21475E; Thu, 14 Apr 2016 20:34:07 +0200 (CEST) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 340AB475D for ; Thu, 14 Apr 2016 20:34:06 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id v188so708966wme.1 for ; Thu, 14 Apr 2016 11:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+ZsP48+gR11tOdrjFDz8fE2ZO+WMfkucDeYaqb1fmXA=; b=VSRZoes9+CwM5RECqaCURE/Qi4A7H6L9hRhZyvT6zf6vb7InBPRfBPBHnlDX0iDzLu Kjg8/A1dpHcu03WvXc+TECIEbLtDe286DmEtGTKpvfexSOnNk6KjXPEnVShY5XLH/em9 2glaLCFIghTyOas87HDUonozpSeRnkKZ23OIVxtiOTBv1iGSIVou305qZYHjNuvOOeOH fIDuKwa2xYe9PNisb3v4eC3WlKFoZv+QjqeOGDdJbsfv7By6MIh8PIDWy20LstI956OH MngTYodu04NoMamogxqhs6UD7uIl5vQSb7yQkmQYTSoBvO0ZStwcK2lbOYwI4D89cUQk lHJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+ZsP48+gR11tOdrjFDz8fE2ZO+WMfkucDeYaqb1fmXA=; b=NdjkOqNviiHtNpuj5vcqrHrko7EblVszwxVrr0n4mwGBpU87I//lyFCBPCa8CVOycQ aJtLQcAYWHVYRPLdurs64EocDaOq2Z1/QKFrpfL8xZeacnvVLItUIpjWxwEZ0L/JFepw 4pJUaT7WxxZCncksTf9HokMp6Re8Z9yFg4sRIfllomXPpY8C0SS+C81riCpCrgrN1bO8 G8IA2OEQLq8CiYo5oeWek302FFnr9n8aLTUtfmhlcXhnxEUvEI6bssOo76NWzLRgmCyy oPEBll0MbhPCB8At6PTaFXEvIs+jTy57TqiqTKAkRgVD4VfEjd76Obnq3J65D2YP/0bg rNOA== X-Gm-Message-State: AOPr4FUCSDfU4orV2yOljcXGFBo6Z4IHnF+FuXLPVw+yPoKcfBGZGPqMT04K6Ayq+WsfOxRI X-Received: by 10.194.227.1 with SMTP id rw1mr17194113wjc.62.1460658845967; Thu, 14 Apr 2016 11:34:05 -0700 (PDT) Received: from XPS13.localdomain (245.111.75.86.rev.sfr.net. [86.75.111.245]) by smtp.gmail.com with ESMTPSA id 20sm7821143wmv.4.2016.04.14.11.34.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2016 11:34:05 -0700 (PDT) From: Thomas Monjalon To: roy.fan.zhang@intel.com Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, jasvinder.singh@intel.com Date: Thu, 14 Apr 2016 20:33:54 +0200 Message-Id: <1460658834-10737-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] port: bump ABI for pcap file support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Support of PCAP file has been added to rte_port in release 16.04 as NEXT_ABI. It is in the standard ABI of the release 16.07. Signed-off-by: Thomas Monjalon Acked-by: Cristian Dumitrescu --- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_16_07.rst | 5 ++++- examples/ip_pipeline/init.c | 4 ---- lib/librte_port/Makefile | 2 +- lib/librte_port/rte_port_source_sink.c | 14 -------------- lib/librte_port/rte_port_source_sink.h | 3 --- 6 files changed, 5 insertions(+), 28 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 327fc2b..a3fdbb1 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -79,11 +79,6 @@ Deprecation Notices modification of the API of rte_mempool_obj_iter(), implying a breakage of the ABI. -* ABI changes are planned for struct rte_port_source_params in order to - support PCAP file reading feature. The release 16.04 contains this ABI - change wrapped by RTE_NEXT_ABI macro. Release 16.07 will contain this - change, and no backwards compatibility is planned. - * A librte_vhost public structures refactor is planned for DPDK 16.07 that requires both ABI and API change. The proposed refactor would expose DPDK vhost dev to applications as diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index 701e827..001888f 100644 --- a/doc/guides/rel_notes/release_16_07.rst +++ b/doc/guides/rel_notes/release_16_07.rst @@ -94,6 +94,9 @@ ABI Changes the previous releases and made in this release. Use fixed width quotes for ``rte_function_names`` or ``rte_struct_names``. Use the past tense. +* The ``rte_port_source_params`` structure has new fields to support PCAP file. + It was already in release 16.04 with ``RTE_NEXT_ABI`` flag. + Shared Library Versions ----------------------- @@ -123,7 +126,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_pipeline.so.3 librte_pmd_bond.so.1 librte_pmd_ring.so.2 - librte_port.so.2 + + librte_port.so.3 librte_power.so.1 librte_reorder.so.1 librte_ring.so.1 diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index 83422e8..02351f6 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -1221,8 +1221,6 @@ static void app_pipeline_params_get(struct app_params *app, out->type = PIPELINE_PORT_IN_SOURCE; out->params.source.mempool = app->mempool[mempool_id]; out->burst_size = app->source_params[in->id].burst; - -#ifdef RTE_NEXT_ABI if (app->source_params[in->id].file_name != NULL) { out->params.source.file_name = strdup( @@ -1237,8 +1235,6 @@ static void app_pipeline_params_get(struct app_params *app, app->source_params[in->id]. n_bytes_per_pkt; } -#endif - break; default: break; diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile index 2c0ccbe..d4de5af 100644 --- a/lib/librte_port/Makefile +++ b/lib/librte_port/Makefile @@ -44,7 +44,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_port_version.map -LIBABIVER := 2 +LIBABIVER := 3 # # all source are stored in SRCS-y diff --git a/lib/librte_port/rte_port_source_sink.c b/lib/librte_port/rte_port_source_sink.c index 056c975..4cad710 100644 --- a/lib/librte_port/rte_port_source_sink.c +++ b/lib/librte_port/rte_port_source_sink.c @@ -38,17 +38,11 @@ #include #include -#ifdef RTE_NEXT_ABI - #ifdef RTE_PORT_PCAP #include #include #endif -#else -#undef RTE_PORT_PCAP -#endif - #include "rte_port_source_sink.h" /* @@ -81,8 +75,6 @@ struct rte_port_source { uint32_t pkt_index; }; -#ifdef RTE_NEXT_ABI - #ifdef RTE_PORT_PCAP static int @@ -232,8 +224,6 @@ error_exit: #endif /* RTE_PORT_PCAP */ -#endif /* RTE_NEXT_ABI */ - static void * rte_port_source_create(void *params, int socket_id) { @@ -258,8 +248,6 @@ rte_port_source_create(void *params, int socket_id) /* Initialization */ port->mempool = (struct rte_mempool *) p->mempool; -#ifdef RTE_NEXT_ABI - if (p->file_name) { int status = PCAP_SOURCE_LOAD(port, p->file_name, p->n_bytes_per_pkt, socket_id); @@ -270,8 +258,6 @@ rte_port_source_create(void *params, int socket_id) } } -#endif - return port; } diff --git a/lib/librte_port/rte_port_source_sink.h b/lib/librte_port/rte_port_source_sink.h index 917abe4..4db8a8a 100644 --- a/lib/librte_port/rte_port_source_sink.h +++ b/lib/librte_port/rte_port_source_sink.h @@ -53,7 +53,6 @@ extern "C" { struct rte_port_source_params { /** Pre-initialized buffer pool */ struct rte_mempool *mempool; -#ifdef RTE_NEXT_ABI /** The full path of the pcap file to read packets from */ char *file_name; @@ -62,8 +61,6 @@ struct rte_port_source_params { * if it is bigger than packet size, the generated packets * will contain the whole packet */ uint32_t n_bytes_per_pkt; - -#endif }; /** source port operations */