From owner-freebsd-net@FreeBSD.ORG Mon May 5 08:15:37 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 B75CB4AA for ; Mon, 5 May 2014 08:15:37 +0000 (UTC) Received: from mail-oa0-x244.google.com (mail-oa0-x244.google.com [IPv6:2607:f8b0:4003:c02::244]) (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 7FC541CCA for ; Mon, 5 May 2014 08:15:37 +0000 (UTC) Received: by mail-oa0-f68.google.com with SMTP id i7so860066oag.11 for ; Mon, 05 May 2014 01:15:36 -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=kwuVqMS9fUQssL+5EQJBg6o3Qe28pzKxfviLXhwqZAQ=; b=S532MMOYxMatm0X6t5fJJzP2LeglwST4Oz8fKAHZDGpQecZ3YBY6t4Wyvnnm+7tPrG YbHU2+/USY17gukTexlaNZ12oydgqOrpEBLdOBsNucVx1NgZd0F2qdvxDDqVZ2NqDyjj WMuFdiO2HNgX4GsCthX0u+NfHwuVI+d9BjfvzyhFo1yoo861TzicplsYmwrJiw9nLky2 y74YYpmIOEtOrHO/I0/FgdvtN21u4CwLgxUwS7u2mszJizGeavmqNHUDtSXHKPt1wBaJ WyE4cLrbfBmBVGflCXXmtBr1HCiV9Xf3HvCoIYLZ5aGIo74uNhWqQPnmT7Kq3X2ZSmZB aHrA== MIME-Version: 1.0 X-Received: by 10.182.225.163 with SMTP id rl3mr273689obc.79.1399277736802; Mon, 05 May 2014 01:15:36 -0700 (PDT) Received: by 10.76.101.18 with HTTP; Mon, 5 May 2014 01:15:36 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 May 2014 16:15:36 +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.18 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 08:15:37 -0000 solved I changed Ubuntu to CentOS 6.5 and use kernel 3.4.88 then netmap/vale works OK...(but this time brctl & ping cannot work...well that's off-topic) 2014-05-04 14:18 GMT+08:00 upyzl : > 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? >> > >