From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/4] lib/librte_port: add PCAP file support to source port Date: Mon, 07 Mar 2016 12:17:34 +0100 Message-ID: <8203471.f1i4Yl96V2@xps13> References: <1455707490-13826-1-git-send-email-roy.fan.zhang@intel.com> <1455707490-13826-2-git-send-email-roy.fan.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Fan Zhang Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 7A7622C66 for ; Mon, 7 Mar 2016 12:19:11 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id n186so80806260wmn.1 for ; Mon, 07 Mar 2016 03:19:11 -0800 (PST) In-Reply-To: <1455707490-13826-2-git-send-email-roy.fan.zhang@intel.com> 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" 2016-02-17 11:11, Fan Zhang: > --- a/lib/librte_port/rte_port_source_sink.h > +++ b/lib/librte_port/rte_port_source_sink.h > @@ -53,6 +53,13 @@ extern "C" { > struct rte_port_source_params { > /** Pre-initialized buffer pool */ > struct rte_mempool *mempool; > + /** The full path of the pcap file to read packets from */ > + char *file_name; > + /** The number of bytes to be read from each packet in the > + * pcap file. If this value is 0, the whole packet is read; > + * if it is bigger than packet size, the generated packets > + * will contain the whole packet */ > + uint32_t n_bytes_per_pkt; > }; If this struct is used in a table, changing its size will break the ABI. More generally, are you sure of the benefits of exposing a configuration structure in the API? [...] > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -111,6 +111,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lxenstore > _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lgxio > # QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes > _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lcrypto > +_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap Please move this line upper before PMD_PCAP.