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 78AF7A2EEB for ; Mon, 7 Oct 2019 21:33:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38B471C0B1; Mon, 7 Oct 2019 21:33:58 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 176541C0AF for ; Mon, 7 Oct 2019 21:33:56 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id v2so31212602iob.10 for ; Mon, 07 Oct 2019 12:33:56 -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=Jueub/aUhxM8Et1Ak562PRPs3HPOzL7GAPMWrsspKAg=; b=Qk9AijdXKdQJX4ipjVVIXGTUBzwNL7Dcv6XHiZnbGx58ZYWhHyJ66fL8QTFXklY8AY W+a5VOh8XM3pzomoFi2nNreKVSNls4iE6gyRuV+HSBXE+hnmKw5Wsb3SjOSW5S/yPmyn hDeaIb9GjM7l/khOkehmecQQt+qtm6hwkfZgaPhAPL17OpxFceK2TREuNgZQ2PDIHS1i yOi0oO/Yic2veJ6voMVKsLlwwKNKsdEng1Us/LYwI7C2WC6JHU1njIMACWrNEa1E984p TGyJ5a9qbeF6iRGZ0N6aeX097+8mSlhWhw6M8RdytVcfUj2SaBYrIYIMPc4pTAVQS6PR 3SHg== 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=Jueub/aUhxM8Et1Ak562PRPs3HPOzL7GAPMWrsspKAg=; b=MnXC5V0GE1/vEvScz6YOtF+R3fvLyikWhW/OZVUQpvVqldGNKSlp+VDEUsJrNJBa7C /vPeypS7VCZ+9OP0G/BSC63xha4++YmGkMNi/TI0lt5nfWNftGhuYsdpO9c41zV3tJvi 96UuxFRxYSSjQNYxjL/RjLeURrAow1Xlg1O41F5mAZpSKpbBZC0CCjgEDYZOl93ptNEG 4xRROlnmwsRd9hmCh7/VmGsZ4ymXFk5bZeOZraf9stJtcbOr+2OOAPOYuf6u7MlJFmes +O0S3XGQR5O5Ksl+ueQcVrhWPFzyLfERfATaSwvGM8T1KZ1jvmr3vRn7rElIcTj2zWT7 WBtQ== X-Gm-Message-State: APjAAAVnYZFTsvFFVapfHl1R89deeX/CTI43yNC2MkstbxUoxfoCiGHz YjOS6hhSgYPqHBQtaAnRGBAzAkAei8CxDsgOeUJqqPIz X-Google-Smtp-Source: APXvYqx/rx5LSxKqXhiW49L+ccNfLF6d+3R/yzMIClSzu23//0g37iba2eUOwZIykNGnXrujNBj1fJnYksDwULkQjDg= X-Received: by 2002:a02:c8cd:: with SMTP id q13mr28371602jao.133.1570476835196; Mon, 07 Oct 2019 12:33:55 -0700 (PDT) MIME-Version: 1.0 References: <20191007165232.14535-1-stephen@networkplumber.org> <20191007165232.14535-6-stephen@networkplumber.org> <20191007103343.6d199594@hermes.lan> In-Reply-To: <20191007103343.6d199594@hermes.lan> From: Jerin Jacob Date: Tue, 8 Oct 2019 01:03:17 +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 Mon, 7 Oct, 2019, 11:03 PM Stephen Hemminger, 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.