From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D238E2C4A for ; Tue, 8 Mar 2016 09:36:38 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 08 Mar 2016 00:36:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,556,1449561600"; d="scan'208";a="61917086" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga004.fm.intel.com with ESMTP; 08 Mar 2016 00:36:36 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 8 Mar 2016 08:36:36 +0000 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.13]) by irsmsx155.ger.corp.intel.com ([169.254.14.201]) with mapi id 14.03.0248.002; Tue, 8 Mar 2016 08:36:35 +0000 From: "Dumitrescu, Cristian" To: Thomas Monjalon , "Zhang, Roy Fan" Thread-Topic: [dpdk-dev] [PATCH v2 1/4] lib/librte_port: add PCAP file support to source port Thread-Index: AQHReGMvOVRTjRoKGEmXHhQWwzFI1p9PNcng Date: Tue, 8 Mar 2016 08:36:35 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D8912647968D3E@IRSMSX108.ger.corp.intel.com> References: <1455707490-13826-1-git-send-email-roy.fan.zhang@intel.com> <1455707490-13826-2-git-send-email-roy.fan.zhang@intel.com> <8203471.f1i4Yl96V2@xps13> In-Reply-To: <8203471.f1i4Yl96V2@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODBlOWRhODktNTBmMi00ZTA4LTgyMTUtNThmYmQ3Yjc0OGVhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik4rMGNwcVJaOEVPYjhIbVdlcDFQRXNCUEs4RVwvZkF5S3NoRGxQbFRweHdRPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 1/4] lib/librte_port: add PCAP file support to source port 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: Tue, 08 Mar 2016 08:36:39 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, March 7, 2016 11:18 AM > To: Zhang, Roy Fan > Cc: dev@dpdk.org; Panu Matilainen ; Dumitrescu, > Cristian > Subject: Re: [dpdk-dev] [PATCH v2 1/4] lib/librte_port: add PCAP file sup= port > to source port >=20 > 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; > > }; >=20 > If this struct is used in a table, changing its size will break the ABI. This structure is already present in the API of the source port in file lib= rte_port/rte_port_source_sink.h, this patch is simply adding two new fields= at the end of it. I think we accepted adding parameters at the end of the = API parameter structures in other parts of DPDK without considering them AB= I breakages? Per Panu's previous comment, this structure is indeed used within an array = of unions in the ip_pipeline application, but (1) it is very unlikely a "re= gular" user application will use it this same way; and (2) somebody using t= he ip_pipeline application will upgrade both the library and the applicatio= n at the same time. If you guys still think this is breaking the ABI, please let us know asap a= nd we'll go with your suggestion. > More generally, are you sure of the benefits of exposing a configuration > structure in the API? This is not an internal (implementation side) structure, it is the external= (API side) structure with the parameters required from the user for creati= ng this object, I am not sure I understand your comment? >=20 > [...] > > --- a/mk/rte.app.mk > > +++ b/mk/rte.app.mk > > @@ -111,6 +111,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) > +=3D -lxenstore > > _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) +=3D -lgxio > > # QAT PMD has a dependency on libcrypto (from openssl) for calculating > HMAC precomputes > > _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) +=3D -lcrypto > > +_LDLIBS-$(CONFIG_RTE_PORT_PCAP) +=3D -lpcap >=20 > Please move this line upper before PMD_PCAP.