From owner-freebsd-net@freebsd.org Wed Jun 7 21:04:17 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 D1835D7D394 for ; Wed, 7 Jun 2017 21:04:17 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (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 9251783762 for ; Wed, 7 Jun 2017 21:04:17 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x232.google.com with SMTP id p7so10917423oif.2 for ; Wed, 07 Jun 2017 14:04:17 -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=7YAFoI9F4+/wbCSNYRhY+rE/eQ9JtZfmobjxVMTAji4=; b=gyjFGiiu8yYRXE6k7bc2AMTqMQqgnImLhuqizIfYa1jSjGKGWxCtH4PGV7n8Qh0CaG HFVcQsdsIKkup2w1danjDdpexOAp756TyxrvWPK0n0lRKcDD7bzIUyVjw9g+Q9+xNhj2 SmaItTxJ3Szdx/p11IYtLcote0D3SWpFuiv3jpspgQsN8pYUdziC9WB2lleHON+oYgX7 eqhIBgsdD7SiatcVkkQ8mwuhI2qzS2BZuzsJ+qRV662cGYVaHdJeqO9qPdBojAVIeI13 6vNAR/ZHPNu7vTH5NzT2yFhLDlKFC6tXCUdQWGjo0paL/GReHwkRpkQglYIcCnapS78N v8dw== 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=7YAFoI9F4+/wbCSNYRhY+rE/eQ9JtZfmobjxVMTAji4=; b=WmqDuUz0N3KuJWiOspAOpH0nz+M1XVCPPvPGOKSwQGSGDH5i6OXDjEc3mNGh0WbLHi faRIgkRx/QC2ZwYAktVGrXnZfwJ6KmC9cKs5xTsO+Flgx1Ui8sgebsijBehTElQ7q6fa SG0YhYfR+oq0ANN0NaCGOshp72yd5vkiQtrTP7j3pnPnTudxXN5BlUKxjJa557Oilf+u BFL+DxOc8TiIAmsfiquXpzdBtLI2rQuo7tY4qmHsnvWQyvfuCjXEjcWsjBOpJ0SBKn9P pSCmFos/XqCRtRcBrXsVB/3xKItxFV6UJwjN4NSHZLouM8sN4/gz/vKj9mDxKKbIm5wL 5rpQ== X-Gm-Message-State: AODbwcB0sirETkPO8JnigF+f/KqUa+6143hRGn/hsQU7moW037N1IQkV 4EFKNb+2pPb7aurfMe3l1AV66k1wMA== X-Received: by 10.202.50.213 with SMTP id y204mr18852709oiy.164.1496869456862; Wed, 07 Jun 2017 14:04:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.17.49 with HTTP; Wed, 7 Jun 2017 14:04:16 -0700 (PDT) In-Reply-To: <59367CF5.9080101@omnilan.de> References: <5926FFDB.7040900@omnilan.de> <592F20A0.4020702@omnilan.de> <592FC60A.1030308@omnilan.de> <5935A20A.6040000@omnilan.de> <59367CF5.9080101@omnilan.de> From: Vincenzo Maffione Date: Wed, 7 Jun 2017 23:04:16 +0200 Message-ID: Subject: Re: ovs-netmap forgotten? To: Harry Schmalzbauer Cc: freebsd-net 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: Wed, 07 Jun 2017 21:04:17 -0000 You can play with NIC interrupt coalescing settings to keep them under control (I don't know how in FreeBSD, but in Linux you would do that with e.g. "ethtool -C rx-usecs 100"). As written in the last line of netmap(4), you must disable all the offloadings when playing with netmap physical ports. By the way, there is a person working on adding some offloading support to netmap, but this is still in progress and it is not even in the netmap github yet. Cheers, Vincenzo 2017-06-06 11:59 GMT+02:00 Harry Schmalzbauer : > Bez=C3=BCglich Harry Schmalzbauer's Nachricht vom 05.06.2017 20:25 (loca= ltime): > > Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 05.06.2017 16:06 (loca= ltime): > > > =E2=80=A6 > > First quick test shows you're right and this tiny diff solves a decent > > share of my (ESXi-replacing) problems: > > > > --- src/sys/net/if_vlan.c.orig 2017-06-05 17:39:27.770574000 +0200 > > +++ src/sys/net/if_vlan.c 2017-06-05 17:39:21.550278000 +0200 > > @@ -1234,7 +1234,7 @@ > > if_inc_counter(ifv->ifv_ifp, IFCOUNTER_IPACKETS, 1); > > > > /* Pass it back through the parent's input routine. */ > > - (*ifp->if_input)(ifv->ifv_ifp, m); > > + (*ifv->ifv_ifp->if_input)(ifv->ifv_ifp, m); > > } > > > > static int > > > > Will do real-world tests tommorrow. > > To share my observations: > > Attaching if_vlan(4) to vale(4) works with the above modification, as > long as vlanhwtag is _not_ disabled, at least with igb(4) and (em4). > Having other offloadings enabled or disabled (regardless if it's on > parent or vlan-clone) doesn't matter, disabling vlanhwtag on the parent > leads to congested parent if there's mor etraffic than console... I > haven't done any tracking if it's caused by TCP windows scaling e.g. nor > tried to ask the code, because I do want vlanhwtagging enabled and > that's what works so far :-) > This is also true for if_vlan(4) interfaces which have if_lagg(0) as > parent, and also for both types of vale(4) attaching, hoststack-detached > (-a) or hoststack-attached (-h). > So far very nice :-) > > But there's a interrupt multiplication noticeable (at the host). > > My simple NFS-copying test causes ~10ki/s at one igb(4) queue when > invoked on the host, with mtu 1500. > Same invocation in the guest, with vlan-vale setup, causes 30ki/s > average (with high discrepancy, 20-40k). > > Might it be possible that if_vlan(4) influences interrupt moderation > capabilities? > > Vincenzo, thanks for your answers to my questions, which I read during > writing of this - stripping them here. > > -harry > --=20 Vincenzo Maffione