From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 146E57CAF for ; Fri, 30 Mar 2018 19:42:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2018 10:42:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,382,1517904000"; d="scan'208";a="28313545" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga007.fm.intel.com with ESMTP; 30 Mar 2018 10:42:24 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.216]) by IRSMSX107.ger.corp.intel.com ([169.254.10.157]) with mapi id 14.03.0319.002; Fri, 30 Mar 2018 18:42:23 +0100 From: "Ananyev, Konstantin" To: 'Jerin Jacob' CC: "'dev@dpdk.org'" Thread-Topic: [dpdk-dev] [RFC PATCH 5/5] test: add few eBPF samples Thread-Index: AQHTtn1It00ZaBqkW0GLUm3bRLBo1qPOOrYAgABEv4CAGq524A== Date: Fri, 30 Mar 2018 17:42:22 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258A0AB693D@irsmsx105.ger.corp.intel.com> References: <1520472602-1483-1-git-send-email-konstantin.ananyev@intel.com> <1520472602-1483-6-git-send-email-konstantin.ananyev@intel.com> <20180313140155.GC564@jerin> <2601191342CEEE43887BDE71AB9772589E28F57F@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772589E28F57F@irsmsx105.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTk0ODYzZWQtOWM3Ny00ZWExLTllN2EtYjhhNzRlMTU1MmJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlFHaEtYd1NRa1dueitDTUwzMFNsQ280bXJ2TnQ2QjUwNUxVbk1VWGJCUkk9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH 5/5] test: add few eBPF samples 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: Fri, 30 Mar 2018 17:42:27 -0000 Hi Jerin, > > > Add few simple eBPF programs as an example. > > > > > > Signed-off-by: Konstantin Ananyev > > > diff --git a/test/bpf/mbuf.h b/test/bpf/mbuf.h > > > new file mode 100644 > > > index 000000000..aeef6339d > > > --- /dev/null > > > +++ b/test/bpf/mbuf.h > > > @@ -0,0 +1,556 @@ > > > +/* SPDX-License-Identifier: BSD-3-Clause > > > + * Copyright(c) 2010-2014 Intel Corporation. > > > + * Copyright 2014 6WIND S.A. > > > + */ > > > + > > > +/* > > > + * Snipper from dpdk.org rte_mbuf.h. > > > + * used to provide BPF programs information about rte_mbuf layout. > > > + */ > > > + > > > +#ifndef _MBUF_H_ > > > +#define _MBUF_H_ > > > + > > > +#include > > > +#include > > > +#include > > > > Is it worth to keep an copy of mbuf for standalone purpose? > > Since clang is already supported, I think, if someone need mbuf then > > they can include DPDK headers. Just thinking in maintainability > > perspective. >=20 > That would be ideal. > I made a snippet just to avoid compiler errors for bpf target. > Will try to address it in next version. >=20 I looked at it a bit more and it seems that it wouldn't be that straightfor= ward as I thought. There are things not supported by bpf target (thread local-storage and simd= related definitions) inside include chain. So to fix it some changes in our core include files might be needed . The simplest way would probably be to move struct rte_mbuf and related macr= os definitions into a separate file (rte_mbuf_common.h or so). Though it is quite controversial change and I think it is better to postpon= e it till a separate patch and probably next release. So for now I left a snipper test/bpf/mbuf.h in place. Konstantin