From owner-freebsd-net@FreeBSD.ORG Tue Nov 4 14:37:50 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C190390 for ; Tue, 4 Nov 2014 14:37:50 +0000 (UTC) Received: from mail-wi0-x242.google.com (mail-wi0-x242.google.com [IPv6:2a00:1450:400c:c05::242]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA653C0F for ; Tue, 4 Nov 2014 14:37:49 +0000 (UTC) Received: by mail-wi0-f194.google.com with SMTP id ex7so3375815wid.9 for ; Tue, 04 Nov 2014 06:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=gQbgQ0U9FhVBEL2Pn6dHvsPuLj7CU7uW3EmkQh5gcx0=; b=cWfyiUu35YGpHufLqbBD6d3z8o7LD9Au8EgUi3hfVTadS63lIHXQToXwCA7xd+LL3M DpTFGS/G6mU6WgMUrmD1WT4PmSF+l9YtYTkaEuwTFy62BxSytx1BVzvox6L2q80gL0CJ GWCkQcfaAs66SMSIVeYLpX+jwbdrFj36as4rUfReOxdWPem4jovde+31OqQmnNagdYmW jzYTNZbqmBRnd8lLTvOQrataeIdM7OB4M7KzGDPfzahGRJeSx2CAYg1f2vaVuvfkT+tW f7/hOWKiz2ScFyxTjlSQqltQ54y/MV8KZ7nj4dMR0kJ9YRCjoXAWRDAmXCzflovXh3TJ +Faw== MIME-Version: 1.0 X-Received: by 10.180.107.136 with SMTP id hc8mr24093662wib.78.1415111868139; Tue, 04 Nov 2014 06:37:48 -0800 (PST) Received: by 10.217.92.7 with HTTP; Tue, 4 Nov 2014 06:37:48 -0800 (PST) In-Reply-To: References: Date: Tue, 4 Nov 2014 12:37:48 -0200 Message-ID: Subject: Re: netmap-ipfw on em0 em1 From: Evandro Nunes To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2014 14:37:50 -0000 btw, I am generating traffic via pkt-gen which I can see os received on the other side: # /usr/src/tools/tools/netmap/netmap-7e9e5e7602f5/examples/pkt-gen -i em1 -f tx -l 60 -d 172.16.250.10 643.417060 main [1649] interface is em1 643.417344 extract_ip_range [287] range is 10.0.0.1:0 to 10.0.0.1:0 643.417386 extract_ip_range [287] range is 172.16.250.10:0 to 172.16.250.10:0 643.433773 main [1840] mapped 334980KB at 0x801800000 Sending on netmap:em1: 1 queues, 1 threads and 1 cpus. 10.0.0.1 -> 172.16.250.10 (00:00:00:00:00:00 -> ff:ff:ff:ff:ff:ff) 643.433885 main [1924] Sending 512 packets every 0.000000000 s 643.433895 main [1926] Wait 2 secs for phy reset 645.434799 main [1928] Ready... 645.435012 nm_open [456] overriding ifname em1 ringid 0x0 flags 0x1 645.435315 sender_body [1014] start, fd 4 main_fd 3 646.100734 sender_body [1083] drop copy 646.436332 main_thread [1446] 149811 pps (149967 pkts in 1001041 usec) 647.437206 main_thread [1446] 148782 pps (148912 pkts in 1000875 usec) 648.438209 main_thread [1446] 148795 pps (148944 pkts in 1001002 usec) 649.439233 main_thread [1446] 50812 pps (50864 pkts in 1001024 usec) Sent 498687 packets, 60 bytes each, in 3.35 seconds. Speed: 148.81 Kpps Bandwidth: 71.43 Mbps (raw 100.00 Mbps) anyway ipfw does not seem to see this netmap-aware traffic: # ipfw/ipfw show connected to 127.0.0.1:5555 nalloc 2248 nbytes 112 ptr 0x0 00100 0 0 count ip from any to any 65535 0 0 allow ip from any to any while it's still running: # ps wauxw | grep ipfw root 40820 0.4 0.0 14648 1744 2 R 12:32PM 0:04.95 ./kipfw em1 em2 lo0 root 40886 0.0 0.0 14708 1552 2 DL+ 12:34PM 0:00.00 grep ipfw I am using latest netmap and netmap-ipfw source code, not the code from freebsd base system. everywhere I see examples, on readme files, luigi's papers and videos, it's related to vale interfaces, but what I want is to use it in phisical NIC not a vale NIC any further help is much appreciated thank you in advance On Tue, Nov 4, 2014 at 11:56 AM, Evandro Nunes wrote: > hello, > I am trying to do some basic stateless filtering with netmap-ipfw. > > what i have running is: > > ./kipfw em1 em2 lo0 > > and when i do ipfw/ipfw show: > > ipfw/ipfw show > connected to 127.0.0.1:5555 > nalloc 2248 nbytes 136 ptr 0x0 > 00100 0 0 allow ip from any to any via lo0 > 65535 0 0 allow ip from any to any > > it's not counting any packet, including loopback > > i have seem people using something similar but with ix(4) driver, what I > am doing wrong? >