From owner-freebsd-net@freebsd.org Wed Nov 22 09:25:11 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 C2806DE5F6A for ; Wed, 22 Nov 2017 09:25:11 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (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 7973E739DA for ; Wed, 22 Nov 2017 09:25:11 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-qt0-x22e.google.com with SMTP id h42so22843320qtk.11 for ; Wed, 22 Nov 2017 01:25:11 -0800 (PST) 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=RPVmdcPWchSDMn4kbT77aYkhMyvTRobBSxI5//VQ+ic=; b=sn2+bJNYP7vUAMIkHgdCKzqkpMyVmYBoQk2cKRUyq57XrhPD/rD8yUZRFycZsD3f6G 3Q3Lzrkfxhjhwl3hdaZ3cEqIisVOewImvLekc8kX+K/4pVCFSrAUlZwsimkcCv+kCrDp EP6BkXfIFTwib38Eb8K72UFOTr6w+K2m2u+TGHKgaWb4ocOd2Tq7OzAMffRy5NTmk5Ic YG79Ya+RcYfCTcHqKyes2EKqjHNv2oj81gNcdeKu2dQwKql3rCkWGfcgrFIUQF9r96so 6kYothAV3cvKiaNsIf/5QmQd5tqTl4ie9wF96N5BXEiAsFVYDztBXzgySqa1YnXyfIXE jGSQ== 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=RPVmdcPWchSDMn4kbT77aYkhMyvTRobBSxI5//VQ+ic=; b=CPUPwV9IxxUWePG7gmJveFSLQFEnMugYHsCIdOD/09Pb7G75lHf58RGGzkiLYD7AnM ZS6t0dZhgFEjbL4vi03jZdYUVXo3AXmxhxudiyyvWiDfivNUMu7oq2/FAUYSNQuN3zvr 12lhPR75Ie+eJAxRTyajiP4xrWE8YzHNuztiTZ7xN/aKCzTyDEaV2+GqEkswkUt2eaDf sXQu7LJmgmzGr+GgfRd+ntpC3Mk5RoKa0NZsZoj9BJ0I0zBNQ1EXR6cW6Ul052PvTNi9 UJ81YOh7by+2fDtZGH5E2wUioywhuTvGOsGJ/c1ONWpH3GXyQxdx4LMm55a6hygyVoS2 1SBA== X-Gm-Message-State: AJaThX5m5tv7Tw5WqaFbbbPnqujK7UP9/6jSgb2l/4/MZBtxQ5C9a7Io 4hPC5u03ot7NQOAa3Vl+JWiBoLz+OZEjoB4wZ+4= X-Google-Smtp-Source: AGs4zMaU2Lw5UOZNCLBcL584wdgS7+dy2huMVSFPqx6a+8hnplk4vIlUWEJXuF4A29/0aT8g5h2KL8z3Zyqqy4U97ao= X-Received: by 10.200.35.90 with SMTP id b26mr31380184qtb.324.1511342710383; Wed, 22 Nov 2017 01:25:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.174.25 with HTTP; Wed, 22 Nov 2017 01:25:09 -0800 (PST) In-Reply-To: <5A154102.10007@omnilan.de> References: <5A0F14CD.3040407@omnilan.de> <5A149107.9060507@omnilan.de> <5A1537B3.9030603@omnilan.de> <5A154102.10007@omnilan.de> From: Vincenzo Maffione Date: Wed, 22 Nov 2017 10:25:09 +0100 Message-ID: Subject: Re: netmap/vale periodic deadlock To: Harry Schmalzbauer Cc: "freebsd-net@freebsd.org" , Giuseppe Lettieri Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 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, 22 Nov 2017 09:25:11 -0000 Hi, $ bridge -h for usage. Yes, bridge is just a simple example program, and stays in foreground. Probably using daemon(8) you can turn it into a daemon. Cheers, Vincenzo 2017-11-22 10:18 GMT+01:00 Harry Schmalzbauer : > Bez=C3=BCglich Harry Schmalzbauer's Nachricht vom 22.11.2017 09:39 (loca= ltime): > > Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 22.11.2017 09:04 (loca= ltime): > >> > >> 2017-11-21 21:48 GMT+01:00 Harry Schmalzbauer >> >: > >> > >> Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 21.11.2017 09:39 > >> (localtime): > >> =E2=80=A6 > >> > > >> > If this is the case, although you are allowed to do that, I don'= t > think > >> > it's a convenient way to use netmap. > >> > Since VLAN interfaces like vlan0 do not have (and cannot have) > native > >> > netmap support, you are falling back to emulated netmap adapters > (which > >> > are probably buggy on FreeBSD, specially when combined with VALE= ). > >> > Apart from bugs I think that with this setup you can't get decen= t > >> > performance that would justify using netmap rather than the > standard > >> > kernel bridge and TAP devices. > >> > >> Hello, > >> > >> lockup happened earlier than expected. > >> This time 'vale-ctl' still reported (-l) the configuration. > >> One guest, using if_vtnet(4)-virtio-net#vale2:korso, showed: > >> dmz: watchdog timeout on queue 0 > >> (dmz is the renamed if_vtnet(4)) > >> > >> I could attach tcpdump to the uplink interface and also to all vla= n > >> children. > >> Complete silence everywhere. So it seems the nic stopped processi= ng > >> anything. > >> > >> Do you think that symptom could be caused by my special vale > >> integration, so that bugs in netmap emulation could crash the NIC? > >> Or is it unlikely that this is related. > >> > >> I hadn't prepared a debug kernel for the host, so the machine > rebooted > >> without again. > >> I think I'll have to start with replacing vale first, to narrow do= wn > >> possible causes. Today I was lucky, the lockup happend after > business > >> hours, but I won't rely on that. > >> At least I know if I really need to look for a debug netmap kernel= , > or > >> possibly there's something else... > >> > >> Thanks, > >> > >> -harry > >> > >> > >> > >> I can't really say anything without a stack trace or meaningful logs. > >> There is a thing that you may do to see if the bug comes out of a bad > >> interaction between > >> emulated netmap and VALE. > >> Instead of attaching the vlan interfaces to VALE you can connect VALE = to > >> the vlan interface > >> through the "bridge" program. In this way nothing changes from the > >> functional point of view, > >> but you are not attaching anymore the VLAN interface to VALE (and you > >> are using an additional process). > >> > >> So instead of > >> > >> # vale-ctl vale0:vlan0 > >> > >> you would have > >> > >> # bridge netmap:vlan0 vale0:vv # "vv" can be anything > > Hello Vincenzo, > > > > thank you very much for that interesting hint. > > I prepared a netgraph setup yesterday evening, but I'll try your > > suggestion first. Unfortunately I don't have time to prepare a debug > > Since this doesn't need a reboot and I'm in adventure mood, I just tried > it at runtime. > Unfortunately I can't find bridge documentation besides the source code. > It doesn't detach from terminal here: > bridge built Oct 8 2017 > 12:59:57 > > 060.359974 main [244] ------- zerocopy NOT > supported > > 060.359987 main [251] Wait 4 secs for link to come up... > 064.365872 main [255] Ready to go, nic1_egn 0x0/1 <-> vale4:nic1egn > 0x0/1. > > 068.084364 main [306] poll timeout [0] ev 1 0 rx 0@33 tx 1022, [1] ev 1 > 0 rx 0@34 tx > 1023 > 072.565559 main [306] poll timeout [0] ev 1 0 rx 0@34 tx 1022, [1] ev 1 > 0 rx 0@35 tx 1023 > =E2=80=A6 > > In general, things are working. > > Is bridge staing in the foreground by design? > > Thanks, > > -harry > --=20 Vincenzo Maffione