From owner-freebsd-net@freebsd.org Thu May 25 15:56:09 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 69B2CD82E61 for ; Thu, 25 May 2017 15:56:09 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (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 288881F80 for ; Thu, 25 May 2017 15:56:09 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x236.google.com with SMTP id l18so285170232oig.2 for ; Thu, 25 May 2017 08:56:09 -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=7WFNBRDwnKDt+gUoSScvWe6DkINoUMbSo54dfok2Q50=; b=kHz4BBWQ/hZ1d/mAYbmmVqlx7r/PBVHTY0ZL07MnosvUuebPSD7lRQr/P655OFwgrj LlJdmP9/3mMWET8bhurGarBJY5hjdiO8DMQ4Bj1mkZI6C9iGQmYaGS3+HhB5WmLEyAe3 frLN6vVCLZmYTUVSwhT4W3/0xQiE/GN1PJ+MrUE0Hj9lrepOKMze1M/bEF7jRhJqkRXu FaBk+/qcPtm+/2athMuGdYmMOJnO+flM5w9hb0oO4Te+2z9IAJgQztmkVvrRlTWx6M5T tx3ftM5rsWvUEIYcmgEgrNEXE7L3fnQeJGmwRfKVA9ygByChjdVXYDeICJTpys0lZSCu gQ/A== 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=7WFNBRDwnKDt+gUoSScvWe6DkINoUMbSo54dfok2Q50=; b=SLKcDpQqso0wtL44M0a23t88CbzqyCgvbFHkM0fLcRGV2YfSsOpuoH/gnhBfmZ0BIr BqXKd+hildEboURdWorNOQy5QtZyVxM1EmKvBKr2osXe+ysUW5NQGr+JV+aRAKTtmgow NuNYXUqe5AWEPYrRIMA5LQfKwdXK5Q2MxelknJOA+uBZJXDUHambKyN4L+yrXQQK/pN8 S2trasFubSFdRaSflA7+GIlOUMbpTf1hU1ay1sGqqR9qlDmNaUzfRQrECvw9rxmYeGm6 CbnfeFO3H/iRCnAHtqLQ1zABqjxdrn7cg6svr8ZHBBtFyp2iS4ag570Vrc+QamWdIw5T vr1g== X-Gm-Message-State: AODbwcCjMKSL0yuIG0tfLMZ3wj7aV7AKaIQyMLh/kaVTmPX0E1fW8T2Z vSUhm7/2cLqt+DVoU7Fy8GhwpjbEaQ== X-Received: by 10.202.205.196 with SMTP id d187mr20537280oig.6.1495727768324; Thu, 25 May 2017 08:56:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.17.59 with HTTP; Thu, 25 May 2017 08:56:07 -0700 (PDT) In-Reply-To: <5926F9F9.4040706@omnilan.de> References: <58CBCD7A.8060301@omnilan.de> <58CC23F5.7060507@omnilan.de> <58CFA394.8070901@omnilan.de> <5926EE96.1010000@omnilan.de> <5926F9F9.4040706@omnilan.de> From: Vincenzo Maffione Date: Thu, 25 May 2017 17:56:07 +0200 Message-ID: Subject: Re: [panic] netmap(4) and if_lagg(4) To: Harry Schmalzbauer Cc: freebsd-net Content-Type: multipart/mixed; boundary="001a1134f8464ff56705505b427e" 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: Thu, 25 May 2017 15:56:09 -0000 --001a1134f8464ff56705505b427e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I see the bug is in FreeBSD 11. I attached the simple patch to fix it. Can someone commit the patch to 11/stable? Harry: You should be able to workaround the bug by setting # sysctl dev.netmap.generic_rings=3D1 And yes, if_lagg(4) doesn't have native netmap support, like all the meta-drivers (e.g. vlan, tunnels, etc.). Point is that you should implement link aggregation in your application (in user-space). Cheers, Vincenzo 2017-05-25 17:36 GMT+02:00 Harry Schmalzbauer : > Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 25.05.2017 17:31 (localt= ime): > > Hi, > > This is a (silly) bug that is not present anymore in the upstream cod= e > > https://github.com/luigirizzo/netmap/blob/master/sys/dev/ > netmap/netmap_freebsd.c#L410-L417 > > that is txq and rxq for generic adapter cannot be 0. > > > > So I would say the problem is outdated code in the FreeBSD version you > are > > using. Which version you are using exactly? Maybe we can try to push a > fix. > > Thanks for the quick reply! > This panic was with r318629 (stable/11 =3D FreeBSD 11.1-PRERELEASE) > > You mentioned "generic adapter": Does this mean native-netmap support > get's lost when if_lagg(4) is in game after if_igb(4)? > > Thanks, > > -harry > > > --=20 Vincenzo Maffione --001a1134f8464ff56705505b427e Content-Type: text/x-patch; charset="US-ASCII"; name="11-stable-fix-netmap-generic-bug.patch" Content-Disposition: attachment; filename="11-stable-fix-netmap-generic-bug.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j34ligm90 LS0tIGYxLmMJMjAxNy0wNS0yNSAxNzo0NjozNi45NDg4NzEzMDUgKzAyMDAKKysrIGYuYwkyMDE3 LTA1LTI1IDE3OjQ2OjAxLjU0MjIwMzA1NCArMDIwMApAQCAtMjczLDkgKzI3MywxMCBAQCBnZW5l cmljX2ZpbmRfbnVtX2Rlc2Moc3RydWN0IGlmbmV0ICppZnAsCiB2b2lkCiBnZW5lcmljX2ZpbmRf bnVtX3F1ZXVlcyhzdHJ1Y3QgaWZuZXQgKmlmcCwgdV9pbnQgKnR4cSwgdV9pbnQgKnJ4cSkKIHsK LQlEKCJjYWxsZWQsIGluIHR4cSAlZCByeHEgJWQiLCAqdHhxLCAqcnhxKTsKLQkqdHhxID0gbmV0 bWFwX2dlbmVyaWNfcmluZ3M7Ci0JKnJ4cSA9IG5ldG1hcF9nZW5lcmljX3JpbmdzOworCXVfaW50 IG51bV9yaW5ncyA9IG5ldG1hcF9nZW5lcmljX3JpbmdzID8gbmV0bWFwX2dlbmVyaWNfcmluZ3Mg OiAxOworCisJKnR4cSA9IG51bV9yaW5nczsKKwkqcnhxID0gbnVtX3JpbmdzOwogfQogCiAK --001a1134f8464ff56705505b427e--