From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A997EA2F6B for ; Tue, 8 Oct 2019 05:53:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D07161BFB8; Tue, 8 Oct 2019 05:53:09 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id A29181BF2B for ; Tue, 8 Oct 2019 05:53:07 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id b19so33616351iob.4 for ; Mon, 07 Oct 2019 20:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rqirqxXk4h6QKDqI4Y4a0RZFDZ80FEF0Z3P+rXMXuTU=; b=XCP9PeSSEdS2kyitANI7NhcEG4uAfcFTrc5sP0+GG/2rnpyHaOntiFFMwRkykiaESg ztjnsr5BuhJWOFXvH649s+szRKE4OB8OUfCrBBB40ueHcWEx61zvnKae8hsA8rUvexnm obGx2s7vkRX35aXYs960ueD8arEVLARO6U3MY1Hfoxp3dbnfEM/JMWKcFC9+9uKlFq5V uq7gjBfvS3gGCmnQKPdSj9lSlxShG6XABMQZHucQpFijPUW489i+TBBm+Z6piGHXr3KR EYZ8Z0VZ+pogvVBcjpf24fDKo1HDJHRlJ10nOoXmT5vCN48qxYsauk+ByTYNkil3I4Df 1SbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rqirqxXk4h6QKDqI4Y4a0RZFDZ80FEF0Z3P+rXMXuTU=; b=NG/wUrgVIQRCsQRui9+Bu2BYysCvrLg0KcEmDRRGWR8xS2ukd1kFBigSPIM7pG/eqL sbKfqULMVMb1WXX+3hqlHH4psXQRZvbk5MQmWsVIb/y4KbPaR/ob8UjiLwV9ascdUxhF V5q+Yp41Xw7ryCzF83OTnOMdQR4vXxe6KJOdBiYe5M+ZbLywjVBnqK4Iqhm6Nda82dQg 49H4gttqufH3GvoRfTefyM0OJBSC9OVQqiuI6w3QhchJZyh/cNCRybmMb4qAMMokKF0D cq2R+Dqob98jjUC05IuUYSwSRrdCk3agx4zXiBPLdcBYZQExWCPKBZnEYiH6fJhMJPkf UZ2g== X-Gm-Message-State: APjAAAUyynyigfOs0Yl2/ejIl0an2Mohvy+RSi/harLKi0+jU6DILz0U d8jJk4Zc53igwR1XfhAkzQkmSLkSlb3r3PuV3VWsYRU7 X-Google-Smtp-Source: APXvYqzP7bxI8vmG+DRWCg2KOj0vnN9PUHwefYg/KGD9U4mEIC+NtIGYSrhGhtv6pvDMEXh6fnXfCbfMZu7om+0rPgg= X-Received: by 2002:a92:bbd2:: with SMTP id x79mr33771682ilk.162.1570506786631; Mon, 07 Oct 2019 20:53:06 -0700 (PDT) MIME-Version: 1.0 References: <20191007165232.14535-1-stephen@networkplumber.org> <20191007165232.14535-6-stephen@networkplumber.org> <20191007103343.6d199594@hermes.lan> <20191007144543.46666c2d@hermes.lan> In-Reply-To: <20191007144543.46666c2d@hermes.lan> From: Jerin Jacob Date: Tue, 8 Oct 2019 09:17:08 +0530 Message-ID: To: Stephen Hemminger Cc: dpdk-dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC 5/8] pdump: add classic BPF filtering 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 8 Oct, 2019, 3:15 AM Stephen Hemminger, wrote: > On Tue, 8 Oct 2019 01:03:17 +0530 > Jerin Jacob wrote: > > > On Mon, 7 Oct, 2019, 11:03 PM Stephen Hemminger, < > stephen@networkplumber.org> > > wrote: > > > > > On Mon, 7 Oct 2019 22:37:43 +0530 > > > Jerin Jacob wrote: > > > > > > > On Mon, 7 Oct, 2019, 10:23 PM Stephen Hemminger, < > > > stephen@networkplumber.org> > > > > wrote: > > > > > > > > > Simple classic BPF interpreter based off of libpcap. > > > > > > > > > > This is a copy of the BPF interpreter from libpcap which is > > > > > modified to handle mbuf meta data. The existing pcap_offline_filter > > > > > does not expose a way to match VLAN tags. Copying the BPF > interpreter > > > > > also means that rte_pdump still does not have a hard dependency > > > > > on libpcap. > > > > > > > > > > > > > Why not use DPDK's librte_bpf library? Rather implementing cBPF > > > > interpreter. Currently it supports eBPF which is super set of > cBPF.if is > > > > this features very specific to cBPF, we clould simply implement > cBPF > > > using > > > > eBPF or implement a new cBPF program type. That scheme could leverage > > > > existing JIT infrastructure also. Using JIT will improve filtering > > > > performance. > > > > > > > > > > > > > > > > > > > > Because pcap library generates cBPF in its string to BPF compiler. > > > Translating cBPF to eBPF is non trivial. > > > > > > > Then at least cBPF interpreter should move to librte_bpf. We can hook to > > JIT if required in future. > > The opcodes for cBPF and eBPF are not compatiable. > Yeah. I am saying to add new program type in bpf library of cBPF. Obviously pdump is not the correct place for cBPF interpreter. Moving to rte_libbpf library would help to enable other applications or libraries to use cBPF bpf program class.