From owner-freebsd-net@FreeBSD.ORG Sun May 4 06:18:51 2014 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 ESMTPS id DF9BE625 for ; Sun, 4 May 2014 06:18:51 +0000 (UTC) Received: from mail-oa0-x243.google.com (mail-oa0-x243.google.com [IPv6:2607:f8b0:4003:c02::243]) (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 A8506131A for ; Sun, 4 May 2014 06:18:51 +0000 (UTC) Received: by mail-oa0-f67.google.com with SMTP id m1so1335532oag.2 for ; Sat, 03 May 2014 23:18:51 -0700 (PDT) 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=PNY34tiiixPd6807V2Hy6CMnUUlwU0RTxBP/3p/nGOA=; b=kUbJnICyhfDZNolC8ahQgVnPK3Lrr9MK6s//bNkYvNKWXofAr+Vt1uKCKcN47QaOlD OzLRpClL8Ax8p6BVs85mNrvn5SHmPN4p1kNdHYtUUL3vNHey76tB3tcfpN8MLoxk1o/M MrLZqJAYAlR8Le5N3LUzdHlMhAkX8oNuT3eQ6io2wAKIkUG26NctzalG278MDFFJWLjC z3SgWwPn7NGp1MROaF6nWII1m+Wv8WHve4+Oy4jEBJ2d23G5sFe71EI4e5hcqx0gZeIM QZ6u03Yt01Ny82iAKFohoorjh9zz2C36keXBi2GuLoOp1HTZbsIGvgfFy6wf4yIlqG/A XUAA== MIME-Version: 1.0 X-Received: by 10.182.128.36 with SMTP id nl4mr58519obb.63.1399184331020; Sat, 03 May 2014 23:18:51 -0700 (PDT) Received: by 10.76.101.18 with HTTP; Sat, 3 May 2014 23:18:50 -0700 (PDT) In-Reply-To: References: Date: Sun, 4 May 2014 14:18:50 +0800 Message-ID: Subject: Re: netmap: how to bridge 2 eth? From: upyzl To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 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, 04 May 2014 06:18:51 -0000 add: tried ./vale-ctl -h vale0:eth0 ./vale-ctl -h vale0:eth1 and pinging get error: May 4 22:02:01 ubuntu kernel: [ 854.827834] 121.198610 [ 425] netmap_update_config configuration changed (but fine) May 4 22:02:01 ubuntu kernel: [ 854.828080] 121.198860 [1456] netmap_set_ringid deprecated API, old ringid 0x0 -> ringid 0 reg 1 May 4 22:02:01 ubuntu kernel: [ 854.828330] 121.199111 [1049] netmap_mem_global_config reconfiguring May 4 22:02:14 ubuntu kernel: [ 868.034578] 134.402766 [ 425] netmap_update_config configuration changed (but fine) May 4 22:02:14 ubuntu kernel: [ 868.034818] 134.403019 [1456] netmap_set_ringid deprecated API, old ringid 0x0 -> ringid 0 reg 1 May 4 22:02:44 ubuntu kernel: [ 897.779633] 164.142010 [1298] nm_txsync_prologue eth0 TX1 kring error: hwcur 0 rcur 0 hwtail 511 cur 1 tail 511 May 4 22:02:44 ubuntu kernel: [ 897.780009] 164.142403 [1298] nm_txsync_prologue eth1 TX0 kring error: hwcur 0 rcur 0 hwtail 511 cur 0 tail 511 May 4 22:02:44 ubuntu kernel: [ 897.780284] 164.142679 [1373] nm_rxsync_prologue kring error: hwcur 0 rcur 0 hwtail 0 head 512 cur 0 tail 0 May 4 22:02:44 ubuntu kernel: [ 897.780563] 164.142944 [1549] netmap_vp_rxsync_locked ouch dangerous reset!!! May 4 22:02:44 ubuntu kernel: [ 897.780782] 164.143178 [1398] netmap_ring_reinit called for vale0:eth1 May 4 22:02:44 ubuntu kernel: [ 897.780969] 164.143365 [1423] netmap_ring_reinit total 1 errors May 4 22:02:44 ubuntu kernel: [ 897.781145] 164.143541 [1427] netmap_ring_reinit vale0:eth1 RX0 reinit, cur 0 -> 0 tail 0 -> 0 May 4 22:02:44 ubuntu kernel: [ 897.781393] 164.143789 [1298] nm_txsync_prologue eth1 TX0 kring error: hwcur 0 rcur 0 hwtail 511 cur 1 tail 511 May 4 22:02:44 ubuntu kernel: [ 897.781664] 164.144060 [1373] nm_rxsync_prologue kring error: hwcur 0 rcur 1 hwtail 1 head 512 cur 1 tail 1 May 4 22:02:44 ubuntu kernel: [ 897.781947] 164.144343 [1549] netmap_vp_rxsync_locked ouch dangerous reset!!! May 4 22:02:44 ubuntu kernel: [ 897.782165] 164.144561 [1398] netmap_ring_reinit called for vale0:eth1 May 4 22:02:44 ubuntu kernel: [ 897.782355] 164.144751 [1423] netmap_ring_reinit total 1 errors May 4 22:02:44 ubuntu kernel: [ 897.782533] 164.144929 [1427] netmap_ring_reinit vale0:eth1 RX0 reinit, cur 1 -> 0 tail 1 -> 1 May 4 22:02:44 ubuntu kernel: [ 897.782783] 164.145178 [1298] nm_txsync_prologue eth1 TX1 kring error: hwcur 0 rcur 0 hwtail 511 cur 1 tail 511 May 4 22:02:45 ubuntu kernel: [ 898.776184] 165.138378 [1298] nm_txsync_prologue eth1 TX0 kring error: hwcur 0 rcur 0 hwtail 511 cur 1 tail 511 May 4 22:02:45 ubuntu kernel: [ 898.776493] 165.138694 [1373] nm_rxsync_prologue kring error: hwcur 0 rcur 1 hwtail 1 head 512 cur 1 tail 1 May 4 22:02:45 ubuntu kernel: [ 898.776765] 165.138966 [1549] netmap_vp_rxsync_locked ouch dangerous reset!!! May 4 22:02:45 ubuntu kernel: [ 898.776987] 165.139189 [1398] netmap_ring_reinit called for vale0:eth1 May 4 22:02:45 ubuntu kernel: [ 898.777177] 165.139379 [1423] netmap_ring_reinit total 1 errors May 4 22:02:45 ubuntu kernel: [ 898.777357] 165.139558 [1427] netmap_ring_reinit vale0:eth1 RX0 reinit, cur 1 -> 0 tail 1 -> 1 May 4 22:02:45 ubuntu kernel: [ 898.777624] 165.139825 [1298] nm_txsync_prologue eth1 TX0 kring error: hwcur 0 rcur 0 hwtail 511 cur 2 tail 511 May 4 22:02:45 ubuntu kernel: [ 898.777896] 165.140097 [1373] nm_rxsync_prologue kring error: hwcur 0 rcur 2 hwtail 2 head 512 cur 2 tail 2 May 4 22:02:45 ubuntu kernel: [ 898.778159] 165.140361 [1549] netmap_vp_rxsync_locked ouch dangerous reset!!! then finally kernel panic/crash... 2014-05-03 14:44 GMT+08:00 upyzl : > Hi all > > I'm doing to implement a simple openflow-based software switch(not same as > OVS, much simpler to OVS) > and I choose netmap for the network framework > > Now I try to do a simplest thing: > > there's 3 VMs, all are Ubuntu 12.04.4 x64 > 2 act as hosts, other 1 act as switch > > topo: [host1] eth0 ----- eth0 [switch] eth1 ----- eth0 [host2] > > I want to bridge switch's eth0ð1 (like "brctl" in linux), then host1 > ping host2 > > the problem is, how to bridge using netmap? > > I tried example "bridge" in netmap project(git clone > https://code.google.com/p/netmap/): > ./bridge -i netmap:eth0 -i netmap:eth1 > then host1 ping to host2 > but pinging result is "Destination Host Unreachable" (if using brctl, > pinging is fine) > > Then I tried vale-ctl > but i dont know how to use it... > e.g. > ./vale-ctl -a eth0 > show > "eth0: Invalid argument" > > could anyone help me? >