From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [RFC PATCH 5/5] test: add few eBPF samples Date: Tue, 3 Apr 2018 03:56:31 +0530 Message-ID: <20180402222630.GA1501@jerin> 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> <2601191342CEEE43887BDE71AB977258A0AB693D@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "'dev@dpdk.org'" To: "Ananyev, Konstantin" Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0064.outbound.protection.outlook.com [104.47.33.64]) by dpdk.org (Postfix) with ESMTP id 4C1D71B3CA for ; Tue, 3 Apr 2018 00:26:53 +0200 (CEST) Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB977258A0AB693D@irsmsx105.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Fri, 30 Mar 2018 17:42:22 +0000 > From: "Ananyev, Konstantin" > To: 'Jerin Jacob' > CC: "'dev@dpdk.org'" > Subject: RE: [dpdk-dev] [RFC PATCH 5/5] test: add few eBPF samples > > 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. > > > > That would be ideal. > > I made a snippet just to avoid compiler errors for bpf target. > > Will try to address it in next version. > > > > I looked at it a bit more and it seems that it wouldn't be that straightforward 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 macros definitions into a separate > file (rte_mbuf_common.h or so). I think, rte_mbuf_common.h should be the way to go. IMO, KNI also benefited with that. I guess, There is NO ABI change if we move the generic stuff to rte_mbuf_common.h. But if you think, it is quite controversial change then we could postpone to next release.(Only my worry is that, once it is postponed it may not happen). I am fine with either way. > Though it is quite controversial change and I think it is better to postpone it till a separate patch and > probably next release. > So for now I left a snipper test/bpf/mbuf.h in place. > Konstantin