From owner-freebsd-net@FreeBSD.ORG Sun Nov 9 02:13:20 2014 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ACE06C4 for ; Sun, 9 Nov 2014 02:13:20 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (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 D2D09DDF for ; Sun, 9 Nov 2014 02:13:19 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id l18so6610052wgh.10 for ; Sat, 08 Nov 2014 18:13:17 -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 :cc:content-type; bh=b6r/6jPUguzyZBr3Kbr/jv+2fQ28CfuWor3tc1FiyCU=; b=gPlZnCDKvpbYNFQNrmgul8TjVP4wtinH0S+jInNECA7AIu6esEYjuYlI/FqbQKSS/S 1/IzPG4Dc1XAH+fdrwJ6Mrc92fwGMTp2/k5WwGzRG02PZCC37kEYj0dF1xgWeHU0Q2SL HzznydI/FbkEVblkHjO1yifxRsCUc/gsdbL675vkloqd9SuXsidDx+mn9Qf9agyzffz0 XUngYHKXFmZcP1rBXfw8u4SYXb+tQ2ga5ikNdPZ8B7rzfRPmiZZWw5M5nE94wgIkXyIf Qtq2BRAQVYFO/DF/LX+27dPo+eRfS67y3T15pCJLF5KefB5MPA6+7FVGl6Pa6ob43kvb fyCA== MIME-Version: 1.0 X-Received: by 10.180.14.165 with SMTP id q5mr18658852wic.0.1415499197089; Sat, 08 Nov 2014 18:13:17 -0800 (PST) Received: by 10.217.92.7 with HTTP; Sat, 8 Nov 2014 18:13:17 -0800 (PST) In-Reply-To: References: Date: Sun, 9 Nov 2014 00:13:17 -0200 Message-ID: Subject: Re: netmap-ipfw on em0 em1 From: Evandro Nunes To: Mahnaz Talebi Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-net@freebsd.org" 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: Sun, 09 Nov 2014 02:13:20 -0000 On Sat, Nov 8, 2014 at 5:26 AM, Mahnaz Talebi wrote: > Hi Evandro. > I've tested netmap-ipfw on real NICs. > Use " > > ./kipfw -i netmap:em0 -i netmap:em1 > " to run netmap-ipfw on em0 and em1. ipfw works as a bridge and copy > incoming packets to em0 to em1 if they pass defined rules (and vice versa, > from em1 to em0). > If you still have problem with ipfw-netmap, please send your scenario for > testing it. > dear mahaza, thank you for your suggestion still didn't work, in fact the syntax you mentioned returns an error that later turns out working just like if I had used ./kipfw netmap:em1 netmap:em2, see the output: *** Global Sysctl Table entries = 41, total size = 2144 *** [ 706.224574] session.c:do_server [541] +++ listening tcp 127.0.0.1:5555 [ 706.224645] netmap_io.c:netmap_add_port [310] opening netmap device -i [ 706.224666] netmap_io.c:netmap_add_port [320] error opening -i [ 706.224681] netmap_io.c:netmap_add_port [310] opening netmap device netmap:em1 [ 706.240897] netmap_io.c:netmap_add_port [326] --- mem_id 1 [ 706.240938] netmap_io.c:netmap_add_port [329] create sess 0x801449070 my_netmap_port 0x801429580 [ 706.240953] netmap_io.c:netmap_add_port [310] opening netmap device -i [ 706.240964] netmap_io.c:netmap_add_port [320] error opening -i [ 706.240976] netmap_io.c:netmap_add_port [310] opening netmap device netmap:em2 [ 706.257132] netmap_io.c:netmap_add_port [326] --- mem_id 1 [ 706.257175] netmap_io.c:netmap_add_port [329] create sess 0x8014490a0 my_netmap_port 0x801429800 [ 706.257187] netmap_io.c:netmap_add_port [342] 0x801429800 em2 1 <-> 0x801429580 em1 1 SWAP [ 706.257455] missing.c:callout_run [378] running 0x61e9d0 due at 1 now 168 [ 706.257480] session.c:mainloop [624] callouts 1 skipped 0 [ 707.000201] session.c:mainloop [624] callouts 3213 skipped 0 [ 708.000200] session.c:mainloop [624] callouts 7563 skipped 0 [ 709.000079] session.c:mainloop [624] callouts 11896 skipped 0 [ 710.000044] session.c:mainloop [624] callouts 16232 skipped 0 [ 711.000065] session.c:mainloop [624] callouts 20567 skipped 0 so -i opt is considered a netmap port which is unable to be open and in the end em2 and em1 and bridged, as it seems to be like on the line: [ 706.257187] netmap_io.c:netmap_add_port [342] 0x801429800 em2 1 <-> 0x801429580 em1 1 SWAP so it's the same as ./kipfw netmap:em1 netmap:em2. and therefore still have the same problem, packets count but I am completely out of communication on both NICs. my scenario is: (Machine-A)<-->Machine-B<--->(MachineC) Machine-A: em0 172.16.251.3/24 Machine-B: em1: 172.16.251.1/24 em2: 172.16.252.1/24 10.0-STABLE w/ latest netmap-ipfw and netmap code from google code repository Machine-C: em0 172.16.252.3/24 without kipfw hooked, Machine-A and Machine-C reach each other. but if ./kipfw netmap:em1 netmap:em2 is used, it turns I am completely out of communication on both em1 and em2 NICs. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >