From owner-freebsd-net@FreeBSD.ORG Sat Oct 19 15:28:56 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E985A199 for ; Sat, 19 Oct 2013 15:28:55 +0000 (UTC) (envelope-from raitech@gmail.com) Received: from mail-pd0-x22b.google.com (mail-pd0-x22b.google.com [IPv6:2607:f8b0:400e:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C41AA2FBD for ; Sat, 19 Oct 2013 15:28:55 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id z10so6230634pdj.2 for ; Sat, 19 Oct 2013 08:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=roUb9nEI5mTaDHAzzXntLDToyZzyVEkG/uYC6owSDcA=; b=A7gjFhMqXgRstxpQJRY8l2wVya8rQRIumF4S2DV2aPouVo8aTh02bg0OcIQE1sGJHv dmSZyZM3zJyymEidSJHIhwOy25ToODic+fp7taUweE0bQasbV7AssWm7yUWjg5wLDW2E o5BEjBgywXUBHy1XHJpI4nK+HQA3gtf1Cis6Jk1yXy3P4e/MuPJwAqDG348Ow7jlNGAK y4r7FLInay+hnwVHCXbtBWzOJDt4P6wHPW29orzBoT1p71v/VPuHm6+dDVDDuJbC0Dhf 7dp3ltEUPjxG6jNHHnbMf05kIS76QVjDN5ogiqoRg6N6vUotdgkUTPv0+2w7eR7l3mXO Memw== X-Received: by 10.66.170.168 with SMTP id an8mr9194021pac.58.1382196535256; Sat, 19 Oct 2013 08:28:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.101.70 with HTTP; Sat, 19 Oct 2013 08:28:35 -0700 (PDT) In-Reply-To: References: From: Raimundo Santos Date: Sat, 19 Oct 2013 12:28:35 -0300 Message-ID: Subject: Re: Netmap and in-kernel IPFW interactions! To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Sat, 19 Oct 2013 15:28:56 -0000 On 19 October 2013 06:00, h bagade wrote: > Hi Everybody, > > Hello! > I have compiled my kernel with support of netmap without any changes on > ipfw. Afterwards, I defined ipfw rules and surprisingly they worked!! > > Being netmap-ed your kernel doesn't mean you are really using it. If your data continue to take normal paths, ie, do not touch netmap, it will be there to the in kernel classifier take care. > Before my experiment on ipfw, I'd thought because packets are reached to > userspace directly by means of netmap, so in-kernel ipfw won't be able to > check them in between?! > > You must open the netmap device and interact with it, no more, no less. As the OPERATION section of netmap(4) states: netmap clients must first open the open("/dev/netmap") If your NIC driver doesn't support netmap, you end up with the normal path to frames and packets. > Could anyone clarify me how in-kernel tools are able to work even after > netmap is used? > So, to clarify you, you must clarify us: how are you *using* it, actually? Best Regards, Raimundo Santos