From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0121.outbound.protection.outlook.com [104.47.1.121]) by dpdk.org (Postfix) with ESMTP id 46C551B4F9 for ; Wed, 20 Jun 2018 20:06:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cgstowernetworks.onmicrosoft.com; s=selector1-cgstowernetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ta7mRtbVnhzAT9W31dqTA6YLIGXaKXvzuJlUFIc1i+k=; b=KO1pY7QAObA6DwMkGxZM2zr8aCAt0Q8gBdP5uV2xqOpMMf7kbPp4KKDDQm87CvhH4ky9bv0fT+pnZXeiPYLugmVkmPQkJ5O6IkUw8E3kHpOck9fuHv/rUtLMWbc2J9ZWEcglOz5+P6GBce2/cEwaEP4TsnZft21ap/DN1kvvuR4= Received: from HE1PR0901MB1436.eurprd09.prod.outlook.com (10.168.97.8) by HE1PR0901MB1610.eurprd09.prod.outlook.com (10.168.92.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Wed, 20 Jun 2018 18:06:55 +0000 Received: from HE1PR0901MB1436.eurprd09.prod.outlook.com ([fe80::2449:315d:dba9:f0e]) by HE1PR0901MB1436.eurprd09.prod.outlook.com ([fe80::2449:315d:dba9:f0e%10]) with mapi id 15.20.0863.016; Wed, 20 Jun 2018 18:06:55 +0000 From: Ido Goshen To: Ferruh Yigit CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 2/2] net/pcap: duplicate code consolidation Thread-Index: AQHUB9sopNcp5/y5RUukOKSiEHzfbKRpa/0AgAACPYA= Date: Wed, 20 Jun 2018 18:06:55 +0000 Message-ID: References: <1529419046-95906-1-git-send-email-ido@cgstowernetworks.com> <1529419046-95906-2-git-send-email-ido@cgstowernetworks.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [81.218.57.230] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0901MB1610; 7:5zcIYwoCI3s/0ixIxf0H75xqiuF1KVKjvBePyJq8mLfBXHxfaFYgOq52wYzUSeIevxizHjiS8B9hqA0l95MmF0syHtLP803H6BTxvHH6Mlfyk5yR8vv6vn9yn1wCe7t17alVh58dqQMRsmhQZ4qVc5Yk/eciEdm4gSXhl+8e1kan5UZkUQsubZXP06YJDj50+k1HR/4bRMWk+PsA7xL5Haiw1AzB98d1tO15vRPVbfSpXKXTRrPikR0J35h275O3 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 90fc8ca5-2d46-45d0-9c48-08d5d6d89bcd x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:HE1PR0901MB1610; x-ms-traffictypediagnostic: HE1PR0901MB1610: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ido@cgstowernetworks.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0901MB1610; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0901MB1610; x-forefront-prvs: 070912876F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(39840400004)(346002)(39380400002)(366004)(199004)(189003)(13464003)(26005)(99286004)(105586002)(305945005)(2906002)(3280700002)(25786009)(316002)(229853002)(8936002)(81156014)(81166006)(7736002)(3846002)(102836004)(6116002)(2900100001)(8676002)(53546011)(6506007)(76176011)(6436002)(7696005)(74316002)(186003)(55016002)(66066001)(5250100002)(4326008)(33656002)(5660300001)(6916009)(72206003)(446003)(476003)(11346002)(486006)(106356001)(478600001)(6246003)(53936002)(97736004)(14454004)(68736007)(3660700001)(9686003)(86362001)(80792005); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0901MB1610; H:HE1PR0901MB1436.eurprd09.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cgstowernetworks.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Kh0Zbelm2ygCo97JOqe8uJlfhMZHr5CLIsdx89pl28bfKTt+rOb1XpQJr0x16Q4DByZlSK4pmgOEgpK95khcIGNXOmTLUzSAdzFruRJcOqLkU+l3c8h1y/R/J3q2v4DMAlBk/w10QxpVrF2G1euVWXV5gwcza1OK4vMLZxsRMqXhgx23N3pQj1AAlxNkIsFJcmNRv6VM2TpMyH/WEo/2PwKJEv4nxTp28VNt2l9sMvIuZg7kwEiEMGcdFZxpwl8ROPq5YCA9t3u8Vz2fe23aiqoPa4HqQDS7p4vum8+HtOIbax2+3k6TQJkabe6qvhjNsZLfqjl3H5QziYLRWsiKBA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: cgstowernetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90fc8ca5-2d46-45d0-9c48-08d5d6d89bcd X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2018 18:06:55.6084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fc9e9498-07e8-4b82-b4cf-365bba23cbbf X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0901MB1610 X-Mailman-Approved-At: Thu, 21 Jun 2018 22:58:35 +0200 Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/pcap: duplicate code consolidation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 18:06:58 -0000 QWx0aG91Z2ggdGhlcmUncyBubyBmdW5jdGlvbmFsIG5lZWQgZm9yIHRoZW0gSSBjb25zaWRlcmVk IGtlZXBpbmcgaXQgZm9yIG1haW50YWluYWJpbGl0eSByZWFzb25zOg0KMS4gS2VlcCB0aGUgY2Fs bCBmbG93IG1vcmUgYWxpZ25lZCB3aXRoIHBjYXAgKGZpbGUpIHRoYXQgaGFzIHNlcGFyYXRlZCBv cGVuX3J4X3BjYXAoKS9vcGVuX3R4X3BjYXAoKQ0KMi4gSWYgaW4gZnV0dXJlIHRoZXJlJ2xsIHJp c2UgYSBuZWVkIGZvciBkaWZmZXJlbnQgZnVuY3Rpb25hbGl0eSBiZXR3ZWVuIHJ4IGFuZCB0eCB0 aGVuIGl0IHdpbGwgYmUgYSBnb29kIHBsYWNlIHRvIGhvb2sgaXQgaW4uIA0KZS5nLiBpZiB3ZSds bCB3YW50IHRvIGZvcmNlIFBDQVBfRF9JTi9PVVQgZm9yIHJ4X2lmYWNlL3R4X2lmYWNlIGFzIHlv dSBzdWdnZXN0ZWQgdGhlbiBpdCBjYW4gZ28gaW4gdGhvc2UgZnVuY3Rpb25zIA0KKEknZCBsaWtl IHRvIGdvIGJhY2sgdG8gdGhhdCBkaXJlY3Rpb24gaXNzdWUgYWZ0ZXIgdGhpcyBmaXggaXMgZG9u ZSkNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IEZlcnJ1aCBZaWdpdCA8ZmVy cnVoLnlpZ2l0QGludGVsLmNvbT4gDQpTZW50OiBXZWRuZXNkYXksIEp1bmUgMjAsIDIwMTggODo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