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 D5F21A0535; Tue, 4 Feb 2020 15:52:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3F1E1C1D3; Tue, 4 Feb 2020 15:52:34 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by dpdk.org (Postfix) with ESMTP id 604D61C1CC for ; Tue, 4 Feb 2020 15:52:33 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id a9so4011696wmj.3 for ; Tue, 04 Feb 2020 06:52:33 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=iNxU2RCIK4JUjKw6CBu/lo/Dh6yoZgqdmlRIvcuk52U=; b=xrRMlISczpR4MIWrUdjbtMGLxJRrJYCre4WnGETg4R+n/6VI8JUjxH60GZnwf98Epp Uq1fY3OmqFj9jsSrCju7WqpnIJz6/ds4QcmrTSN/HOkbGiNb+2tMk/sbJLqY7gUAcWiu mhmEgrbZJLbE+4dGNNwFmzIaOb4+aoNsrPygFBIOsJbr3sprEyCp1ugLKDsp2xrG6dHk 35iXo01E1I1HJFH7vHlfPw/3ctyeuE9Y+9JjlYNxaE02QXsW1WYJ7KUyatVwnSCC7PIa e7Cw0uOmKuw6E1gdlA0xFViQf0PcODMIP+o/VWp4iS2hmtJ4Cf3n/lJaoAPqhaIXNgy0 S2gw== 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:mime-version :content-transfer-encoding; bh=iNxU2RCIK4JUjKw6CBu/lo/Dh6yoZgqdmlRIvcuk52U=; b=cnuEg2MM02BI1zGGcU6iA2uBBp17mspBKpSM/Db+K5AceWEJBu4EOZL7eU6toTYWqu 6R/yl+Pzz6vdEdEOuS7rgg2T/x4wX985vXOI6riflwsYwRxhXWXog99A4SzRXPxdUWf+ W0WcvfEkJpaMi+MOWPuIPg/fK8Svv99oGBms/HipM1osnEV486WAN0EZpaT80cvu3cbz Jm8DSkPSX8o44Cv0BMvDaxpvcUh//AdCGBZb4aKuvAnhS24qcdHiCrXgtRRe9Bk7RuxH H1OV59LB6aCRLuSBteXWjDkJ8Zwpw+tNgkiLe8hDI0WRLvhcNqWLp3q18NuPJsqzEAZj N3Mg== X-Gm-Message-State: APjAAAXTBxoPTD9+pwmnZ3fqn/7oZ/IKMBWZ3YZ8VCMMMPdLniGOdGOc kj1uRXsxMvwCgZiS1gH2u/oHZA== X-Google-Smtp-Source: APXvYqxCxwD9Xp7/T8+KYFKrWmKnZSuGsuWAgo1deYwfx+96d91N0GpLMCyNB2cmgO4U5CVRsw3XJg== X-Received: by 2002:a7b:ce98:: with SMTP id q24mr6039196wmj.41.1580827952933; Tue, 04 Feb 2020 06:52:32 -0800 (PST) Received: from shemminger-XPS-13-9360 ([212.187.182.162]) by smtp.gmail.com with ESMTPSA id d204sm4062348wmd.30.2020.02.04.06.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:52:32 -0800 (PST) Date: Tue, 4 Feb 2020 06:52:29 -0800 From: Stephen Hemminger To: Konstantin Ananyev Cc: dev@dpdk.org Message-ID: <20200204065229.0e8a85f7@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] BUG: eBPF missing BPF_ABS 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" As I mentioned in my FOSDEM talk the current DPDK eBPF handling is not usable for packet filters. I have ported the classic BPF to eBPF code and the generated code is not usable by DPDK. The problem is that DPDK eBPF does not implement all the opcodes. BPF_ABS is not implemented and must be. It is in the Linux kernel. PCAP filter string: ip dst fosdem.org cBPF program (6 insns): L0: 28 00 00 00 0c 00 00 00 ldh [12] L1: 15 00 00 03 00 08 00 00 jeq #0x800, L2, L5 L2: 20 00 00 00 1e 00 00 00 ld [30] L3: 15 00 00 01 8c 16 16 1f jeq #0x1f16168c, L4, L5 L4: 06 00 00 00 ff ff ff ff ret #0xffffffff L5: 06 00 00 00 00 00 00 00 ret #0x0 eBPF program (11 insns): L0: af 00 00 00 00 00 00 00 xor r0, r0 L1: af 77 00 00 00 00 00 00 xor r7, r7 L2: bf 16 00 00 00 00 00 00 mov r6, r1 L3: 28 70 00 00 0c 00 00 00 ldh r0, [12] L4: 55 00 04 00 00 08 00 00 jne r0, #0x800, L9 L5: 20 70 00 00 1e 00 00 00 ldw r0, [30] L6: 55 00 02 00 8c 16 16 1f jne r0, #0x1f16168c, L9 L7: b4 00 00 00 01 00 00 00 mov32 r0, #0x1 L8: 95 00 00 00 00 00 00 00 exit L9: b4 00 00 00 02 00 00 00 mov32 r0, #0x2 L10: 95 00 00 00 00 00 00 00 exit validate: invalid opcode at pc: 3 validate: invalid opcode at pc: 5 rte_bpf_load failed: Invalid argument