From owner-freebsd-net@freebsd.org Fri Mar 17 17:51:50 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778B8D10D1A for ; Fri, 17 Mar 2017 17:51:50 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-ot0-x22f.google.com (mail-ot0-x22f.google.com [IPv6:2607:f8b0:4003:c0f::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C091124E for ; Fri, 17 Mar 2017 17:51:50 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-ot0-x22f.google.com with SMTP id x37so99811891ota.2 for ; Fri, 17 Mar 2017 10:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ce7ZaZLH3/B59pnczxPuinF2S0otTM2NtZRH5O8rqow=; b=utO76/tqRuXBPjR3H4BIVQXNM+YGnbTxkcTQO52m2zx9/ksglEpAfiX7d8y4Wp/r7o 7zvBlLMzE3R1OP+xwbR0QcsrMjCzDLwjqUlhQx1gyexMSqGjx/mVhBbneLGXCjV8FdL7 pI0l6Pwa5/y/0/svvZpE4GQnG69f2izUxFCoN7ldpcjjMrJlK9RpzsdS9SdtxRvbM9MG Bg3qJO3cXq+q8f6t8DLknALytivTeEfhZKTWf1SbfeTPokvwg3EbXGN4erIIb4/ThLuj WW8FsETrKjAqtt7F756IKOX9S7aoPrjnfLLzQDHls5zH7cwjX1yrV1Cu5TMzKC8q6ygn hIbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ce7ZaZLH3/B59pnczxPuinF2S0otTM2NtZRH5O8rqow=; b=KjqgHJfVSTFSnRCUt98sdaK4Q+jO2g0GDsqs9C4wsQb78qkMjppSny+CvZEXC8zdTy RyKmH+uGlX5AEafFk0HZv0ZHKxBnZC/mUTt7oyPi8UqF4sNw0WMDoeRzENzMFZKEpELA bzvkr6uXT1uUpJj7C4OVdP/k7ow2u9jY56F7tBkXFWhslGnuyihMlANqjhuVed0czDuo HFkXJUAYdLozLl/7ISLk9XBA7RmqACqa83b0fADUJ5aPcXEBF9LtcWRssgZ8l4rk+5ys Fjk4Hmbr9zU8WBCY7u4/t2z/oZDNatEIvJldIuoY3zQbk1CjhG58p6I6Uqph39oj8bGC 6i+Q== X-Gm-Message-State: AFeK/H237kmBZVBy+aWG464LZZv7WLxkusTu5NLTtvWyKDMhYY0cT7VROZI8GiuGzFBuBVU3kuiNeYEgKexKeQ== X-Received: by 10.157.23.241 with SMTP id j104mr967395otj.238.1489773109526; Fri, 17 Mar 2017 10:51:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.50.45 with HTTP; Fri, 17 Mar 2017 10:51:49 -0700 (PDT) In-Reply-To: <58CBBF7A.8050604@omnilan.de> References: <58CBA727.3040108@omnilan.de> <58CBBF7A.8050604@omnilan.de> From: Vincenzo Maffione Date: Fri, 17 Mar 2017 18:51:49 +0100 Message-ID: Subject: Re: Are ./valte-ctl and ./bridge friends or competitors? To: Harry Schmalzbauer Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 17:51:50 -0000 Hi, ./bridge is a netmap application that implements a simple forwarder between two netmap ports (given as input arguments). I don't see any way to use that to let two bhyve VMs work together. It's an example application that shows you how fast a netmap application can be in forwarding packets between two NICs, when there is no "business logic". ./vale-ctl is a control tool to attach network interfaces to a VALE L2 switch. If the switch does not exists yet, it is created. So vale-ctl is not a netmap application. Then, the bhyve VM typically attaches to the VALE switch using a vale port, e.g. "vale0:guest1" in your example. The VALE port has the same role as the tap(4) in the traditional if_bridge-based way to connect VMs. When using your physical NICs with netmap, you need to disable the offloadings because netmap is not able to program the NIC to perform these offloadings. This is a design decision that has been taken to preserve simplicity and efficiency. The promiscuous mode is necessary to accept the ethernet frames with MACs corresponding to the VM virtual interfaces (virtio-net a.k.a. vtnet). Actually, there is pending work on bhyve and netmap, that is going to be merged soon, available at https://github.com/vmaffione/freebsd/ in branch ptnet-head. If you are interested, here there is some information https://wiki.freebsd.org/DevSummit/201609?action=3DAttachFile&do=3Dview&tar= get=3D20160923-freebsd-summit-ptnet.pdf together with bhyve cmdlines. Cheers, Vincenzo 2017-03-17 11:50 GMT+01:00 Harry Schmalzbauer : > Bez=C3=BCglich Harry Schmalzbauer's Nachricht vom 17.03.2017 10:06 (loca= ltime): > > Hello, > > > > I'm still having problems understanding netmap(4) and would highly > > appreciate brief help. > > > > I'm running stable/11. I'd like to replace if_bridge(4) with netmap(4)= , > > because virtio-net chops jumbu frames > > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215737) and > > if_bridge(4) requires members to have the same mtu. > > > > I'm creating vmnet0 (tap(4)) and vale0 with an physical (keeping host > > stack usage) port: > > ifconfig create vmnet0 > > ./vale-ctl -h vale0:igb0 > > ./vale-ctl -a vale0:vmnet0 > > which results in > > bdg_ctl [149] bridge:0 port:0 vale0:vlegn > > bdg_ctl [149] bridge:0 port:1 vale0:vlegn^ > > bdg_ctl [149] bridge:0 port:2 vale0:vmnet0 > > The above is wrong regarding bhyve(8) usage. > For the records, and please correct me somone if I'm wrong: > > byhve(8) has some kind of native netmap(4) implementation, so one > mustn't use if_tap(4) (vmnet), but simply a vale name (e.g. 'bhyve =E2=80= =A6 -s > 5,virtio-net,vale0:guest1 =E2=80=A6' instead of '=E2=80=A6 -s 5,e1000,vmn= et0 =E2=80=A6') > > The physical interface connected to the vale switch must be put into > promisc mode! > > No idea about the need to disable any offloading functions, since I > don't know how it's implemented=E2=80=A6 > > Thanks, > > -harry > > P.S.: Still don't understand the basic difference between ./bridge and > ./vale-ctl > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > --=20 Vincenzo Maffione