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 B881EA2F6B for ; Mon, 7 Oct 2019 23:45:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5CDB1C06A; Mon, 7 Oct 2019 23:45:53 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 2F4401C067 for ; Mon, 7 Oct 2019 23:45:52 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id p30so6929774pgl.2 for ; Mon, 07 Oct 2019 14:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tJsoWr8T0T8mOyMoyXBgPO9xhN7L+KmDP2evy2j75Bo=; b=dgRK/+WwsTnD4/vPWy9keY2SQaLtEXuGYfhSoimVUpeMP35t5p0liFfMctPQEc0L7w gXicMzZdGge18xDoZhcpJFBlswYNgqTWG8bZeoBqD6Q3kQpqLOWREFhMX0Arl9J7kub4 c/DnB0/9x+iOQIMsjbHSrc8hbL7euCJ9KtEXGZHi8GW24ByQ+fqLwKEbM1NXTnkCpuLT Cu1ovNQjojgJ3PLIIuT4Js42Zm6UfeVjNP51RRu2MMx8/yTsf+3Ux2PAY4uc0kH3NdiC Ee7LSQg9+WyNiGHCNR03TQ/4VktNHw0TuzDwLbWUCJUZgc7/v8iQwEUZyY3U7uQgD0lK G0Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tJsoWr8T0T8mOyMoyXBgPO9xhN7L+KmDP2evy2j75Bo=; b=sdhJIDERQoTSvOVisz5WDqQ0k1TyNVK3Irveygt2NHXKr8ba2EmeijONl15cjT6D4s 9Ah/aDOXEiZXRGzUDTNfa8sL9PxuW9qxiefP9VN9koco/Fu+AXdPAQNCZDahNIwhp7LJ snvJaFAbizpO68y0FjIehJvRU5EOoJEMpOmxRf+of9XXtulnZfJ1SYWjtrSmwynXvMW6 7ZqsF6PfhwhtAR2INY/jYpo66vFOVwgEG4qrJNAte1P/0WUhqseJGwFH0xshr+DzA0WG rI6bWPwxQ2FsebvWHBtDpHTdhTC60vbyTT7Wc95/pmiJLSdBAnd+qInmzwaf6lJb2SAD JjcQ== X-Gm-Message-State: APjAAAXr8mVWl2KJNNlaq2w0unWwqz5Vr/rvok6eV+5vLH6gE+5cVfNp 9XsRxhSGU2zjV9JUf68VHx+pUw== X-Google-Smtp-Source: APXvYqzMKmvqQ9b1ov8ZFGIWeHbl/ly6Tv5Cx4y1pDDHaC73qqLiGcBsgOPI4wXWGRaBGJsFJrsW9Q== X-Received: by 2002:a63:5a18:: with SMTP id o24mr4082133pgb.216.1570484751016; Mon, 07 Oct 2019 14:45:51 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q3sm15462075pgj.54.2019.10.07.14.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 14:45:50 -0700 (PDT) Date: Mon, 7 Oct 2019 14:45:43 -0700 From: Stephen Hemminger To: Jerin Jacob Cc: dpdk-dev Message-ID: <20191007144543.46666c2d@hermes.lan> In-Reply-To: References: <20191007165232.14535-1-stephen@networkplumber.org> <20191007165232.14535-6-stephen@networkplumber.org> <20191007103343.6d199594@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 01:03:17 +0530 Jerin Jacob wrote: > 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. The opcodes for cBPF and eBPF are not compatiable.