From owner-freebsd-net@FreeBSD.ORG Thu Aug 29 15:28:49 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51FDDBCF; Thu, 29 Aug 2013 15:28:49 +0000 (UTC) (envelope-from rmind@netbsd.org) Received: from mail.netbsd.org (mail.NetBSD.org [IPv6:2001:4f8:3:7::25]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D468208E; Thu, 29 Aug 2013 15:28:49 +0000 (UTC) Received: from ws (localhost [IPv6:::1]) by mail.netbsd.org (Postfix) with SMTP id 9AC9514A14E; Thu, 29 Aug 2013 15:28:47 +0000 (UTC) Date: Thu, 29 Aug 2013 16:28:32 +0100 From: Mindaugas Rasiukevicius To: Adrian Chadd Subject: Re: BPF_MISC+BPF_COP and BPF_COPX In-Reply-To: References: <20130804191310.2FFBB14A152@mail.netbsd.org> <9813E50B-C557-4FE1-BADF-A2CFFCBB8BD7@felyko.com> <20130804195538.C87A614A135@mail.netbsd.org> <20130804225434.87A9C14A152@mail.netbsd.org> X-Mailer: mail(1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20130829152847.9AC9514A14E@mail.netbsd.org> Cc: tech-net@netbsd.org, guy@alum.mit.edu, freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:28:49 -0000 Hi, Adrian Chadd wrote: > >> > It provides us a capability to offload more complex packet > >> > processing. My primary user would be NPF in NetBSD, e.g. one of the > >> > operations is to lookup an IP address in a table/ipset. > > > > I would like to coordinate the reservation of BPF opcodes though. > > That's a good idea. I have no problem with that. > I have added these to the NetBSD tree: #define BPF_MISCOP(code) ((code) & 0xf8) #define BPF_TAX 0x00 +#define BPF_COP 0x20 +#define BPF_COPX 0x40 #define BPF_TXA 0x80 Would you like to reserve them in FreeBSD as well? Thanks. -- Mindaugas