From owner-freebsd-net@freebsd.org Sun Nov 27 19:40:55 2016 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 046F8C596DA for ; Sun, 27 Nov 2016 19:40:55 +0000 (UTC) (envelope-from michael.j.knap@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::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 B4E23D6B for ; Sun, 27 Nov 2016 19:40:54 +0000 (UTC) (envelope-from michael.j.knap@gmail.com) Received: by mail-qk0-x232.google.com with SMTP id x190so121297360qkb.0 for ; Sun, 27 Nov 2016 11:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=iekxDbtSJmGMdViPuATstA5kG5kAUf/Cx7y1GKofi8w=; b=Ur+GlDwX229EYYyeBjnjyhVScwH/wWuSpN+1PSttvnzlX/kE3xDi/a/jPcc1ZU2Hus 1I82JYA5VoQDkSaHPEepAUGTK8sXSgWLN2sLMugnaf7OQPwsXWYSAFoYmQKDyfBRY6DH gzCAd4DuLcFQMo8g8aqFoWly1eTxPNpBqvqSrON0y7o61OkrceZpZNOb1R83fAwEugu7 ZZYYaoSQysU8X+lPZqd2f0NWrBZBX5PNttMKZk0Z7CBRORygxUUyF6vI0SaVbf5somPk imUm+3kfAyejzIIqkgjfjur//FzYTLSRaGWcDH8Kg72cwaYSy0Lkuj6krCkYH+6cKYqi nOEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=iekxDbtSJmGMdViPuATstA5kG5kAUf/Cx7y1GKofi8w=; b=QQTZjVPFsDr1dYM7tdMOgqEbTcVrrjLOgOSNDUm7k7JVgK5ZuGkQDpm5OK/NKxz56S 6dgCtJqGBh7ikz13GAZj6k/2WOx9qqlXRpjNKPZrksrnKWGe3UHX1vwpttC03sMnqZZQ UE/v/URWB/TSAqVTXuBICAGQqTbYl1vheI55d5C6PRd4TAeSjrsmjxn/D0XnvdObnJTr 6Qgristk9I60CbRl03GMAa4R1ybA2N4wInUaM4UtPAB5EvNOlNw/LbFxIom5pVDZEn3l vRF/Utfwi+k6ipu9H4VeWnOB/a1R9h+G70p5VqEz9INotubfHPkBRvQu2fw45v4/7NVy HXJg== X-Gm-Message-State: AKaTC014M7IpM6i5SsEw9S3BwdHJJ1Nl61lwEudHYrueMLOom9jxlZUrZpLJLL4lphZTjFeOuyP1v57JCAZX0A== X-Received: by 10.55.17.206 with SMTP id 75mr14565445qkr.10.1480275653706; Sun, 27 Nov 2016 11:40:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.95.112 with HTTP; Sun, 27 Nov 2016 11:40:53 -0800 (PST) From: Michael Knap Date: Sun, 27 Nov 2016 13:40:53 -0600 Message-ID: Subject: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Sun, 27 Nov 2016 19:40:55 -0000 Preface: I've been a long-time linux user, and I am enjoying the BSD experience. For the following scenario, I have reproduced these results with 3 or more cables which are known to be good. Using FreeBSD 10.3 Stable : FreeBSD 10.3-STABLE #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 UTC 2016 root@gauntlet :/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd64 Also, this isn't a NIC, per se, as it is onboard, but I will call it a NIC or card or whatever. Using em driver, though I don't know how to determine a driver version (if there is such a thing). Basically, the card will not push gigabit, though it will work with 100BaseTX. However, there seems to be more than just that as the chip-set is advertised as a gigabit Ethernet controller. When connected to a 100BaseTX switch, everything is good. Leaving it in autodetect mode, and connecting to a 1000baseTX switch (with good CAT6 cable), the card's link state oscillates from link up and link down: Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:41 freenas kernel: em0: link state changed to UP Nov 27 13:07:41 freenas kernel: em0: link state changed to UP Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:55 freenas kernel: em0: link state changed to UP Nov 27 13:07:55 freenas kernel: em0: link state changed to UP Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:58 freenas kernel: em0: link state changed to UP Nov 27 13:07:58 freenas kernel: em0: link state changed to UP Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN Nov 27 13:08:01 freenas kernel: em0: link state changed to UP Nov 27 13:08:01 freenas kernel: em0: link state changed to UP Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN If I issue ifconfig em0 media 100baseTX mediaopt full-duplex, then I have no carrier. Also, ifconfig em0 media 1000baseT gives no carrier. However, if I ifconfig em0 media 10baseT, then I can get an active link. Interestingly, man em(4) does not claim to support this chipset, though it seems that this chipset was once supported in either e1000 or igb for older freeBSD versions? Now, at least from the driver's POV, I should be able to handle gigabit, as ifconfig -m em0 em0: flags=8c02 metric 0 mtu 1500 options=4219b capabilities=5399b ether 00:25:11:59:d4:be inet 10.42.0.111 netmask 0xffffff00 broadcast 10.42.0.255 nd6 options=9 media: Ethernet 10baseT/UTP (10baseT/UTP ) status: active supported media: media autoselect media 1000baseT media 1000baseT mediaopt full-duplex media 100baseTX mediaopt full-duplex media 100baseTX media 10baseT/UTP mediaopt full-duplex media 10baseT/UTP However when connected to gigabit switch, any explicit declaration of media fails except for 10baseT, even the autoselect declaration fails with no carrier. But remember, 100baseTX works out of the box on a 100Mbit switch. So, those more experienced, can you shed some light on what is happening? I'm especially interested in the man em(4) result even though the chipset has been supported in the past, and intel does provide drivers for this chipset, though I'm not sure if I could compile them or not. BTW, my switches are only consumer grade, unmanaged. Is that where I'm stuck? Thanks for such an awesome license, operating system, and community. From owner-freebsd-net@freebsd.org Sun Nov 27 20:41:19 2016 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 93A01C597F7 for ; Sun, 27 Nov 2016 20:41:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83A741F4B for ; Sun, 27 Nov 2016 20:41:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uARKfJeN045391 for ; Sun, 27 Nov 2016 20:41:19 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 214832] if_pflog subrulenr incorrectly set Date: Sun, 27 Nov 2016 20:41:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: sbruno@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sun, 27 Nov 2016 20:41:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214832 Sean Bruno changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bz@FreeBSD.org, | |kp@freebsd.org, | |sbruno@FreeBSD.org --- Comment #2 from Sean Bruno --- Adding folks who have done stuff/things in pf --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Sun Nov 27 21:01:03 2016 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 07CAFC59F5D for ; Sun, 27 Nov 2016 21:01:03 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2767DF6 for ; Sun, 27 Nov 2016 21:01:02 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uARL010v079702 for ; Sun, 27 Nov 2016 21:01:02 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201611272101.uARL010v079702@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-net@FreeBSD.org Subject: Problem reports for freebsd-net@FreeBSD.org that need special attention Date: Sun, 27 Nov 2016 21:01:02 +0000 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: Sun, 27 Nov 2016 21:01:03 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- In Progress | 203422 | mpd/ppoe not working with re(4) with revision 285 In Progress | 206581 | bxe_ioctl_nvram handler is faulty New | 204438 | setsockopt() handling of kern.ipc.maxsockbuf limi New | 205592 | TCP processing in IPSec causes kernel panic New | 206053 | kqueue support code of netmap causes panic Open | 193452 | Dell PowerEdge 210 II -- Kernel panic bce (broadc Open | 194485 | Userland cannot add IPv6 prefix routes Open | 194515 | Fatal Trap 12 Kernel with vimage Open | 199136 | [if_tap] Added down_on_close sysctl variable to t Open | 206544 | sendmsg(2) (sendto(2) too?) can fail with EINVAL; Open | 211031 | [panic] in ng_uncallout when argument is NULL Open | 211962 | bxe driver queue soft hangs and flooding tx_soft_ Open | 212018 | Enable IPSEC_NAT_T in GENERIC kernel configuratio 13 problems total for which you should take action. From owner-freebsd-net@freebsd.org Mon Nov 28 01:50:26 2016 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 3F714C58E75 for ; Mon, 28 Nov 2016 01:50:26 +0000 (UTC) (envelope-from frankd@frank-d.info) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19397654E9 for ; Mon, 28 Nov 2016 01:50:25 +0000 (UTC) (envelope-from frankd@frank-d.info) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1480297818650242.91968671420955; Sun, 27 Nov 2016 17:50:18 -0800 (PST) Date: Sun, 27 Nov 2016 17:50:18 -0800 From: Frank DiMitri To: "" Message-Id: <158a8a02a14.11c57878d202623.4266299996694963357@frank-d.info> In-Reply-To: Subject: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x MIME-Version: 1.0 X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: Mon, 28 Nov 2016 01:50:26 -0000 Mellanox has no driver for cards earlier than ConnectX4 available for FreeBSD 11.x at the moment. What I have right now is a quick hack to get the 2.1.6 driver for 10.1 to compile and work under 11.0. It needs some polishing, but it does work. I didn't do anything for the InfiniBand side, only the Ethernet/core. https://github.com/fdimitri/Mellanox-OFED-ConnectX-FreeBSD11 For anyone looking to run these cards under FreeBSD 11.0, this should work at the least in the interim. The only non-functional part under 11.0-release-p1 are the counters available through sysctl (hw.mlxenX.stat) for packet sizes ie in_gt_1548. Hopefully this is the right place to send this. Is there a reason the OFED drivers aren't in-tree? They are dual-licensed under GPL and BSD. Thanks, Frank DiMitri From owner-freebsd-net@freebsd.org Mon Nov 28 06:00:37 2016 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 5C3B5C512F6 for ; Mon, 28 Nov 2016 06:00:37 +0000 (UTC) (envelope-from menyy@mellanox.com) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0084.outbound.protection.outlook.com [104.47.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ABC210BC for ; Mon, 28 Nov 2016 06:00:35 +0000 (UTC) (envelope-from menyy@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lkGHT2m5Ywp1/uYVPomdFGTOEPFnwg2p08ZmMMvJ3Ic=; b=xaYnvcfjIguVlw/1+l+KNefkJo2M8pmmis1r+nQcWxAIRTqE2OcCLrPSQXXMdUtyBxrv7QyaiaB9+bl4qn9fASLQokOzeE6durXAVTdCyBe8zZEBlpJVjhMhRRpa/cY9OhP6b75R2FhlCEOEVwzLNRgHzYGzSY878Gm19qPmdF8= Received: from DB5PR05MB1765.eurprd05.prod.outlook.com (10.165.7.23) by DB5PR05MB1765.eurprd05.prod.outlook.com (10.165.7.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Mon, 28 Nov 2016 06:00:26 +0000 Received: from DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) by DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) with mapi id 15.01.0747.013; Mon, 28 Nov 2016 06:00:26 +0000 From: Meny Yossefi To: "freebsd-net@freebsd.org" CC: freebsd-drivers Subject: RE: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Thread-Topic: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Thread-Index: AQHSSRnQXhuIFh5pwkGDJE5Ij9BZUaDtoW28gABDENA= Date: Mon, 28 Nov 2016 06:00:26 +0000 Message-ID: References: <158a8a02a14.11c57878d202623.4266299996694963357@frank-d.info> <9465895c92a747589c6e343aabc38a54@AM5PR0502MB2916.eurprd05.prod.outlook.com> In-Reply-To: <9465895c92a747589c6e343aabc38a54@AM5PR0502MB2916.eurprd05.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=menyy@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-office365-filtering-correlation-id: a2610c8e-a34b-4a5b-6929-08d41753d9b0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR05MB1765; x-microsoft-exchange-diagnostics: 1; DB5PR05MB1765; 7:YYMceqKvkjCEvxF5U9g0FcN9U+4KUX8/6fWsYwrmefHxFn42U7lhnDcH/gCRG2fTdS16GRwfHPLyYLNLI0VxKXJVMojKPBsOg3c7n0zRaoVQst47w792Y7pAn7K/Dtd1zZwKqfsaHJDUUnXZYT2rJ4XEfheqsIaIO3wvh1VMy/Vwpiw1class32mCmtW8kYkrUzhhfuh3l4cpbVkKDg23BTTM6YFXItQ0R1OeO0ZaB1slP7fnTWiol2pHm0RP+QZXsKPRmhRyhFWArkc+Rc6STHX2GcN8x3foKvZSBKNr3jPffYwTYTTKOIlH0PBTN4OIDpPp2LHWN3YHzLGCcl9wL/Iz0knv4HN6P75d2frSXYjwOVL8XACDc8Yan2PRWLyTn0Sk1CwSPd0GRCvkZL7WyuugSlQQuyu/PtqnQqvHTuBkICPeoo10ahdWTR5r762PmXu1WZ8TwA7hBjFHLo0IA== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(75325880899374)(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6060326)(6040361)(6045199)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(6061324)(20161123560025)(20161123555025)(20161123564025)(20161123562025); SRVR:DB5PR05MB1765; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1765; x-forefront-prvs: 01401330D1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916002)(199003)(377454003)(189002)(450100001)(122556002)(4326007)(9326002)(790700001)(102836003)(6116002)(3846002)(5630700001)(8676002)(81156014)(3660700001)(76576001)(2501003)(33656002)(3280700002)(5640700001)(81166006)(8936002)(101416001)(76176999)(50986999)(54356999)(9686002)(68736007)(105586002)(2906002)(77096006)(4001430100002)(39450400002)(39380400001)(106116001)(106356001)(39410400001)(2351001)(229853002)(39400400001)(38730400001)(6506003)(606004)(7906003)(7846002)(7736002)(5660300001)(2900100001)(74316002)(7696004)(110136003)(97736004)(189998001)(92566002)(2950100002)(6916009)(107886002)(86362001)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1765; H:DB5PR05MB1765.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2016 06:00:26.7093 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1765 Content-Type: text/plain; charset="us-ascii" 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: Mon, 28 Nov 2016 06:00:37 -0000 Hi, Not sure how did you reach that conclusion. We have an updated 11.x inbox driver for ConnectX-3 under /sys/ofed/ Eth: /sys/ofed/drivers/net/mlx4 InfiniBand: /sys/ofed/drivers/infiniband/.. We have recently (12-CURRENT) moved the ConnectX-3 driver to /sys/dev We'll be happy to assist in case you have more questions. -Meny ________________________________________ From: owner-freebsd-net@freebsd.orgOn Behalf OfFrank DiMitri Sent: Monday, November 28, 2016 1:50:18 AM (UTC+00:00) Monrovia, Reykjavik To: freebsd-net@freebsd.org Subject: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Mellanox has no driver for cards earlier than ConnectX4 available for FreeB= SD 11.x at the moment. What I have right now is a quick hack to get the 2.1.6 driver for 10.1 to c= ompile and work under 11.0. It needs some polishing, but it does work. I di= dn't do anything for the InfiniBand side, only the Ethernet/core. https://github.com/fdimitri/Mellanox-OFED-ConnectX-FreeBSD11 For anyone looking to run these cards under FreeBSD 11.0, this should work = at the least in the interim. The only non-functional part under 11.0-releas= e-p1 are the counters available through sysctl (hw.mlxenX.stat) for packet = sizes ie in_gt_1548. Hopefully this is the right place to send this. Is there a reason the OFED drivers aren't in-tree? They are dual-licensed u= nder GPL and BSD. Thanks, Frank DiMitri _______________________________________________ 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" From owner-freebsd-net@freebsd.org Mon Nov 28 06:11:46 2016 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 4D859C5184A for ; Mon, 28 Nov 2016 06:11:46 +0000 (UTC) (envelope-from frankd@frank-d.info) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35D5519AC for ; Mon, 28 Nov 2016 06:11:45 +0000 (UTC) (envelope-from frankd@frank-d.info) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1480313417460491.8606290735262; Sun, 27 Nov 2016 22:10:17 -0800 (PST) Date: Sun, 27 Nov 2016 22:10:17 -0800 From: Frank DiMitri To: "Meny Yossefi" Cc: "freebsd-net@freebsd.org" , "freebsd-drivers" Message-Id: <158a98e2ee9.e28b1c99215641.6054804446440545025@frank-d.info> In-Reply-To: References: <158a8a02a14.11c57878d202623.4266299996694963357@frank-d.info> <9465895c92a747589c6e343aabc38a54@AM5PR0502MB2916.eurprd05.prod.outlook.com> Subject: RE: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x MIME-Version: 1.0 X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: Mon, 28 Nov 2016 06:11:46 -0000 Meny, Amazingly enough I completely missed that, and nobody was able to point me to them. I was unaware of any in-tree Mellanox drivers. My (embarrassing) mistake, glad to see they're in the kernel by default. Thanks! ---- On Sun, 27 Nov 2016 22:00:26 -0800 Meny Yossefi <menyy@mellanox.com> wrote ---- Hi, Not sure how did you reach that conclusion. We have an updated 11.x inbox driver for ConnectX-3 under /sys/ofed/ Eth: /sys/ofed/drivers/net/mlx4 InfiniBand: /sys/ofed/drivers/infiniband/.. We have recently (12-CURRENT) moved the ConnectX-3 driver to /sys/dev We'll be happy to assist in case you have more questions. -Meny ________________________________________ From: owner-freebsd-net@freebsd.orgOn<mailto:owner-freebsd-net@freebsd.orgOn> Behalf OfFrank DiMitri Sent: Monday, November 28, 2016 1:50:18 AM (UTC+00:00) Monrovia, Reykjavik To: freebsd-net@freebsd.org<mailto:freebsd-net@freebsd.org> Subject: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Mellanox has no driver for cards earlier than ConnectX4 available for FreeBSD 11.x at the moment. What I have right now is a quick hack to get the 2.1.6 driver for 10.1 to compile and work under 11.0. It needs some polishing, but it does work. I didn't do anything for the InfiniBand side, only the Ethernet/core. https://github.com/fdimitri/Mellanox-OFED-ConnectX-FreeBSD11 For anyone looking to run these cards under FreeBSD 11.0, this should work at the least in the interim. The only non-functional part under 11.0-release-p1 are the counters available through sysctl (hw.mlxenX.stat) for packet sizes ie in_gt_1548. Hopefully this is the right place to send this. Is there a reason the OFED drivers aren't in-tree? They are dual-licensed under GPL and BSD. Thanks, Frank DiMitri _______________________________________________ freebsd-net@freebsd.org<mailto: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<mailto:freebsd-net-unsubscribe@freebsd.org>" _______________________________________________ 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" From owner-freebsd-net@freebsd.org Mon Nov 28 09:07:55 2016 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 1BC2FC5877A for ; Mon, 28 Nov 2016 09:07:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5511621 for ; Mon, 28 Nov 2016 09:07:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAS97sPZ034437 for ; Mon, 28 Nov 2016 09:07:54 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 213237] ndis does not create network interface Date: Mon, 28 Nov 2016 09:07:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RC1 X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 09:07:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213237 --- Comment #2 from ota@j.email.ne.jp --- (In reply to Andriy Voskoboinyk from comment #1) $ sysctl net.wlan.devices net.wlan.devices: ndis0 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 09:10:44 2016 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 896ACC58826 for ; Mon, 28 Nov 2016 09:10:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7980D1718 for ; Mon, 28 Nov 2016 09:10:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAS9AieN055580 for ; Mon, 28 Nov 2016 09:10:44 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 213237] ndis does not create network interface Date: Mon, 28 Nov 2016 09:10:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RC1 X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 09:10:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213237 --- Comment #3 from ota@j.email.ne.jp --- It looks rev 286410 (due to compile error, I tested with 286416) is when a problem started. With rev 286416, kldload crashes the system. With 11.0-RELEASE, kernel doesn't crash but ndis does not function. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 09:19:09 2016 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 B7DCFC58C69 for ; Mon, 28 Nov 2016 09:19:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7CAA1E28 for ; Mon, 28 Nov 2016 09:19:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAS9J93x051880 for ; Mon, 28 Nov 2016 09:19:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 213237] ndis does not create network interface Date: Mon, 28 Nov 2016 09:19:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RC1 X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 09:19:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213237 --- Comment #4 from ota@j.email.ne.jp --- On 11.0-RELEASE, I also see pci-one error as following today. ndis print is= the same as last time. I reran ndisgen and tried. $ kldload ./bcmwl5_sys3.ko pci1: at device 0.0 (no driver attached) ndis0: mem 0x57100000-0x57103fff irq 16 = at device 0.0 on pci1 ndis0: NDIS API version: 5.1 I had booted 10.2-RELEASE and ndis didn't have issues. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 09:26:03 2016 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 CBF82C58F82 for ; Mon, 28 Nov 2016 09:26:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB7FC12AC for ; Mon, 28 Nov 2016 09:26:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAS9Q35l070149 for ; Mon, 28 Nov 2016 09:26:03 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 213237] ndis does not create network interface Date: Mon, 28 Nov 2016 09:26:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RC1 X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 09:26:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213237 --- Comment #5 from ota@j.email.ne.jp --- 11.0-RELEASE output, typed by hand. $ pciconf -lv ... ndis@pci0:1:0:0: class=3D0x028000 card=3D0xe01b105b chip=3D0x431514e4 re= v=3D0x01 hdr=3D0x00 vendor =3D 'Broadcom Corporation' device =3D 'BCM4312 802.11b/g LP-PHY' class =3D netowork --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 12:46:59 2016 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 1A666C5875F for ; Mon, 28 Nov 2016 12:46:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0E01EAE for ; Mon, 28 Nov 2016 12:46:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uASCkwgp063486 for ; Mon, 28 Nov 2016 12:46:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208343] [em] wake on lan not working with Intel I219 V2 Date: Mon, 28 Nov 2016 12:46:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: IntelNetworking X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: madpilot@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 12:46:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208343 --- Comment #29 from Guido Falsi --- Hi, Since I submitted this bug I'm asking what is the policy for accounting it = as fixed? The bug I reported has been fixed in r308643, so my opinion is this bug rep= ort could be closed as fixed. Should I close it, or wait for a src committer to close it? Should I wait f= or the MFC or the other commenters to report back? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 12:54:00 2016 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 CD495C58B8B for ; Mon, 28 Nov 2016 12:54:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC856164F for ; Mon, 28 Nov 2016 12:54:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uASCs0AM081057 for ; Mon, 28 Nov 2016 12:54:00 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 208343] [em] wake on lan not working with Intel I219 V2 Date: Mon, 28 Nov 2016 12:54:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: IntelNetworking X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: sbruno@FreeBSD.org X-Bugzilla-Flags: mfc-stable10? mfc-stable11? X-Bugzilla-Changed-Fields: flagtypes.name assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 12:54:00 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208343 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |mfc-stable10?, | |mfc-stable11? Assignee|freebsd-net@FreeBSD.org |sbruno@FreeBSD.org --- Comment #30 from Kubilay Kocak --- (In reply to Guido Falsi from comment #29) 1) Assign to committer resolving (sbruno) Note: Committers should assign themselves as early as possible and reference PR: in commit log messages. 2) Set mfc-stableX flags to ? (means request/ask for mfc) Committer resolving will either: a) Set + upon MFC to that branch, or b) Set - with comment outlining why not (unnecessary, breaks kbi, etc) --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Mon Nov 28 20:48:52 2016 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 DDB6BC59426 for ; Mon, 28 Nov 2016 20:48:52 +0000 (UTC) (envelope-from menyy@mellanox.com) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0074.outbound.protection.outlook.com [104.47.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45C761FA0 for ; Mon, 28 Nov 2016 20:48:51 +0000 (UTC) (envelope-from menyy@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=e6EEXOtLBJMrUXTtDcoREGkdi3yu+vfJUFD1e1eQalg=; b=sgHdhCleQMV0y+ntrAAp9C/I1gWeA7yCQRTMLYPz+soAjiwmxo6gAb9Ky2Y6ByXKLl+Rv1eLkb4a6FaVQU5TonY/46TytqkBzhevlf2cp5IaI9SP3bvReOA2Xm/NIamhi46jnVCspq9mFeHAl+ljqJf21OAJQqQgIrBm3gnOvHA= Received: from DB5PR05MB1765.eurprd05.prod.outlook.com (10.165.7.23) by DB5PR05MB1768.eurprd05.prod.outlook.com (10.165.7.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.10; Mon, 28 Nov 2016 19:13:21 +0000 Received: from DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) by DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) with mapi id 15.01.0747.013; Mon, 28 Nov 2016 19:13:21 +0000 From: Meny Yossefi To: "freebsd-net@FreeBSD.org" Subject: RE: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Thread-Topic: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Thread-Index: AQHSSRnQXhuIFh5pwkGDJE5Ij9BZUaDtoW28gABDENCAAAV9gIAAAHlJgADZ3RA= Date: Mon, 28 Nov 2016 19:13:21 +0000 Message-ID: References: <158a8a02a14.11c57878d202623.4266299996694963357@frank-d.info> <9465895c92a747589c6e343aabc38a54@AM5PR0502MB2916.eurprd05.prod.outlook.com> , <158a98e2ee9.e28b1c99215641.6054804446440545025@frank-d.info> <622a5c2030cd4b4e95ccd818bbb23397@AM5PR0502MB2916.eurprd05.prod.outlook.com> In-Reply-To: <622a5c2030cd4b4e95ccd818bbb23397@AM5PR0502MB2916.eurprd05.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=menyy@mellanox.com; x-originating-ip: [79.177.49.31] x-ms-office365-filtering-correlation-id: 60437cd6-7911-4926-b4d1-08d417c29e63 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR05MB1768; x-microsoft-exchange-diagnostics: 1; DB5PR05MB1768; 7:wpcAtBW+6UB9KNmskZAz7WI4QXdOtebuKv/pKmWD6x5wKsbhPY/oST2xc3D/0qmzMzDLmTRcrRqqgoUdhWAfIl9IjSICnVd/l72siKfSPOdS53U7I+/zPjJSKWW5+GmMiCIQG5Klc92wAd92hMDumHj2gmqMiAq+tEjkFV2q0OtTA6hQfRCQAMq4ga3jJmFiQV9T4YKn39QDtl42rVw7vZlea5BpeKAuRwg9vD2/xO0WiXqlojNkM79gTJZlAhHAJSppaFBZeWUhbi/6h6+88wY1B13J3q1qWVmInnaj2SQg/18WWYtWDF8sQoJezblCBZVzljkzwE2Mu7jPAGKSXgoZFLkpPYBCLky+rkGOsqDx25A/4nhIOTYVKouv7+PNUF/I7JOYImF2YCEqxAyslXaVIaKu6g/qwBqfJFTEmghrMmFFwR+QGyB9ONoPG3Tq3QoTEV3elRJTlYgwnGCblA== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(75325880899374); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6045199)(6060326)(6040361)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(6061324)(20161123560025)(20161123558021)(20161123555025)(20161123564025)(20161123562025); SRVR:DB5PR05MB1768; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1768; x-forefront-prvs: 01401330D1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(189002)(377454003)(199003)(13464003)(7846002)(66066001)(7736002)(74316002)(54356999)(50986999)(76176999)(101416001)(106116001)(229853002)(305945005)(5660300001)(33656002)(106356001)(2906002)(105586002)(102836003)(2351001)(93886004)(2900100001)(8936002)(3900700001)(97736004)(68736007)(6116002)(5640700001)(107886002)(189998001)(3846002)(6506003)(38730400001)(122556002)(92566002)(9686002)(76576001)(450100001)(86362001)(110136003)(3660700001)(8676002)(3280700002)(6916009)(81156014)(39450400002)(81166006)(7696004)(2950100002)(39400400001)(2501003)(77096006)(39380400001)(39410400001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1768; H:DB5PR05MB1765.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2016 19:13:21.1959 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1768 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: Mon, 28 Nov 2016 20:48:53 -0000 NP :-) Let us know if you need further assistance.=20 -Meny -----Original Message----- From: freebsd-commits-tracker=20 Sent: Monday, November 28, 2016 8:12 AM To: Mark Bloch ; Meny Yossefi ; Yuv= al Bason Subject: FW: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x ________________________________________ From: owner-freebsd-net@freebsd.orgOn Behalf OfFrank DiMitri Sent: Monday, November 28, 2016 6:10:17 AM (UTC+00:00) Monrovia, Reykjavik To: Meny Yossefi Cc: freebsd-net@freebsd.org; freebsd-drivers Subject: RE: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Meny, Amazingly enough I completely missed that, and nobody was able to point me = to them. I was unaware of any in-tree Mellanox drivers. My (embarrassing) mistake, glad to see they're in the kernel by default. Thanks! ---- On Sun, 27 Nov 2016 22:00:26 -0800 Meny Yossefi <menyy@mellanox.com= > wrote ---- Hi, Not sure how did you reach that conclusion. We have an updated 11.x inbox driver for ConnectX-3 under /sys/ofed/ Eth: /sys/ofed/drivers/net/mlx4 InfiniBand: /sys/ofed/drivers/infiniband/.. We have recently (12-CURRENT) moved the ConnectX-3 driver to /sys/dev We'll be happy to assist in case you have more questions. -Meny ________________________________________ From: owner-freebsd-net@freebsd.orgOn<mailto:owner-freebsd-net@freebsd.o= rgOn> Behalf OfFrank DiMitri Sent: Monday, November 28, 2016 1:50:18 AM (UTC+00:00) Monrovia, Reykjavik To: freebsd-net@freebsd.org<mailto:freebsd-net@freebsd.org> Subject: Mellanox ConnectX/X2/X3 OFED module for FreeBSD 11.x Mellanox has no driver for cards earlier than ConnectX4 available for FreeB= SD 11.x at the moment. What I have right now is a quick hack to get the 2.1.6 driver for 10.1 to c= ompile and work under 11.0. It needs some polishing, but it does work. I di= dn't do anything for the InfiniBand side, only the Ethernet/core. https://github.com/fdimitri/Mellanox-OFED-ConnectX-FreeBSD11 For anyone looking to run these cards under FreeBSD 11.0, this should work = at the least in the interim. The only non-functional part under 11.0-releas= e-p1 are the counters available through sysctl (hw.mlxenX.stat) for packet = sizes ie in_gt_1548. Hopefully this is the right place to send this. Is there a reason the OFED drivers aren't in-tree? They are dual-licensed u= nder GPL and BSD. Thanks, Frank DiMitri _______________________________________________ freebsd-net@freebsd.org<mailto: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<ma= ilto:freebsd-net-unsubscribe@freebsd.org>" _______________________________________________ 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" _______________________________________________ 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" From owner-freebsd-net@freebsd.org Mon Nov 28 22:15:44 2016 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 CC9E5C5A01E for ; Mon, 28 Nov 2016 22:15:44 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id BEC8C12EE; Mon, 28 Nov 2016 22:15:44 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 2ECFF17EC7; Mon, 28 Nov 2016 14:10:33 -0800 (PST) Date: Mon, 28 Nov 2016 14:10:33 -0800 From: hiren panchasara To: Jakub Palider Cc: freebsd-net@freebsd.org, karels@FreeBSD.org, glebius@FreeBSD.org Subject: Re: FLOWTABLE aka TCP route caching panic Message-ID: <20161128221033.GM55731@strugglingcoder.info> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oiL9LJXJsdjS5rzq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Mon, 28 Nov 2016 22:15:44 -0000 --oiL9LJXJsdjS5rzq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable + Mike and Gleb who may provide some help/pointers. On 11/25/16 at 04:33P, Jakub Palider wrote: > Hi, > I have found that last month (19 Oct) the problem appeared on this list, > and to my experience it persists, both on VM and bare metal installation > (HEAD from yesterday). I looks that enabling FLOWTABLE option is the only > source of this fault happening. It appears on our setup in 80% cases with= in > one hour from boot up. > From our debugging, it is caused by lock on DESTROYED lock. Did you find a > solution to this problem? >=20 > Regards, > Jakub > _______________________________________________ > 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" --oiL9LJXJsdjS5rzq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYPKtRXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lRbgIAJnIakyPSi6Q79giminTp8JI MQWKyLVaYYH1ytXcMYpFslba/KMnG0pixqCiHdUj/t9uTNwcCp+0K1sBblXn5P8V NX6W+8xoWoXo3cAlIvdElNhmUXWdBn72z3ssAPZViGVxUmPKfWXq/U1BNSSIdFhA z9/o9tbgDmRgOSyXp+AemjGT8n2l0Qo4EhXhgwVUzrTzJYHI4KaBUHo0HuPRzCpT 1PmhzJ1ApJOb9LhyGVtbQcJj+llYSdER8V84QSGHhcdYXhayao0DogMmZx98VMI3 6diH8wxeoyYNj45GPNmo3TuLf47Zw4SDTpo7f13/87zeH2WYs6QPCp5Ioof5Rlo= =J73A -----END PGP SIGNATURE----- --oiL9LJXJsdjS5rzq-- From owner-freebsd-net@freebsd.org Mon Nov 28 22:20:49 2016 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 4FF89C5A15E for ; Mon, 28 Nov 2016 22:20:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF7E16FC for ; Mon, 28 Nov 2016 22:20:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uASMKmNs002587 for ; Mon, 28 Nov 2016 22:20:49 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 214913] SO_KEEPALIVE does not work? Date: Mon, 28 Nov 2016 22:20:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 28 Nov 2016 22:20:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214913 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- CC|freebsd-amd64@FreeBSD.org | Assignee|freebsd-bugs@FreeBSD.org |freebsd-net@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Tue Nov 29 00:55:00 2016 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 68A36C5A112 for ; Tue, 29 Nov 2016 00:55:00 +0000 (UTC) (envelope-from navada@usc.edu) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 465A21376 for ; Tue, 29 Nov 2016 00:55:00 +0000 (UTC) (envelope-from navada@usc.edu) Received: by mailman.ysv.freebsd.org (Postfix) id 42D04C5A111; Tue, 29 Nov 2016 00:55:00 +0000 (UTC) Delivered-To: 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 4271AC5A10F for ; Tue, 29 Nov 2016 00:55:00 +0000 (UTC) (envelope-from navada@usc.edu) Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) (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 1C5221375 for ; Tue, 29 Nov 2016 00:54:59 +0000 (UTC) (envelope-from navada@usc.edu) Received: by mail-pf0-x234.google.com with SMTP id i88so27784979pfk.2 for ; Mon, 28 Nov 2016 16:54:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usc-edu.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:message-id:date:to; bh=xleQ4+CHmUFnaOsw37zYPEd9GwxDmvdse8Mp5bT9pBs=; b=vApmUXY/K7k6k0gAAWBOJysmR0ynKZ1D499JoJmXEFajlXkH/hp/ImFOrnbfcMBBuJ ElJ4o7Z1zRnwBdnTtYDYCZ7zFtaddcYk6wOfpamjuBAwdOk4j3pQ1MSy/GkPw/He8R96 QD2BXFUhkZM7asKaZUxTwbe0CvsqZtEk6sfi7DL8FbcFHs2T8/yz9q4v2pL04xDjoRU4 LoVe7Vf+KEWUPn5BXhK17uzbfMzg6bSA1bYDdvD9KDezBdwGMTZfv5I1k0ESDF22JF1x 1FPMucnK85gC3loA7F/tQXInsWtvlVtkq7Ln5lgET/HxHM2QgR8JZ+muyuPImu5iZU5v POJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=xleQ4+CHmUFnaOsw37zYPEd9GwxDmvdse8Mp5bT9pBs=; b=hIzqrNneXF/4yXq4Op5HsdfUeHNKKjo5F8rT01eJEzC5ruNvZeZwdO9paWjCAVJuq1 7SJoSXzVRB7mTTot1zVBa/TrLEjbngnJ5NlwaiyJf5DsO+rGuzI7X19jnj+HCsODc8yL 3x+3R5uy2mrSnIXR7e6xlac4AkQS29VTdJva+LGtLsTymPudS1kWGef8DRCDuTb2xXIQ YxVyXmw3G2BLDghj+1oxT+hpuslHvV4KYRtnKnL9P03F4Bsqb9eimexUWhja4Q3WsMnl t9M820iYOJv1UG9MQDqxXcd6Snu+omhP8VxWVJRN8lHVMqlzkVrbijyj1HrEUge+pLBK er+A== X-Gm-Message-State: AKaTC02RC7CSbJ0Ifx06DtP8CeXJq6qcjar5Nx8iltybAgWqEWrCTh+JZmFshlRTfDKXympo X-Received: by 10.84.175.234 with SMTP id t97mr55834912plb.145.1480380899273; Mon, 28 Nov 2016 16:54:59 -0800 (PST) Received: from guest-wireless-207-151-063-168.usc.edu (guest-wireless-207-151-063-168.usc.edu. [207.151.63.168]) by smtp.gmail.com with ESMTPSA id f132sm73616485pfa.72.2016.11.28.16.54.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 16:54:58 -0800 (PST) From: Harsha Navada Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: RE: Requesting help in Netmap build on Linux Ubuntu-12.04 Message-Id: <061FA295-11CD-4C46-8556-2B47C6F7CC32@usc.edu> Date: Mon, 28 Nov 2016 16:54:58 -0800 To: net@freebsd.org X-Mailer: Apple Mail (2.3251) 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: Tue, 29 Nov 2016 00:55:00 -0000 Hello , I=E2=80=99m new to netmap where I=E2=80=99m trying to insert netmap.ko = module after compiling my kernel and I=E2=80=99m shown with the = following error: netmap: Unknown symbol split_page (err 0) Here are the steps and different methods I followed:=20 I. Compile Kernel 3.2.0 1. My Ubuntu 12.04 machine has a kernel version 3.2.0-90-generic, so i = got the linux source by: sudo apt-get source linux-source-3.2.0 2. Then i work on trying to compile the kernel a. sudo make menuconfig =E2=80=94 Keep default config b. sudo sed -i s/CONFIG_RTS5139=3Dm/CONFIG_RTS5139=3Dn/ .config = - to avoid compilation errors c. sudo make clean d. sudo make -j10 e. sudo make bzImage f. sudo make modules g.sudo make modules_install h. sudo make install i. sudo update-grub2 j. sudo reboot.=20 2 b. On checking kernel version using name -r , this is the kernel = version - 3.2.79 3. Then i download the netmap-master branch from git and upload it to my = machine , cannot use git clone as it doesn=E2=80=99t support external = connections. 4.Unzipping the bundle and switch to LINUX folder to run ./configure 5. Here i received errors where netmap-master/LINUX/drivers/ext-patch = couldn=E2=80=99t be downloaded due to failure to connect. 6. I downloaded these drivers and placed them in that path. 7. I received a warning telling cannot find complete kernel sources, = which i referenced later as=20 ./configure =E2=80=94kernel-sources =3D = /lib/modules/linux-source-(uname -r)/build 8. Then after clearing all warning and errors, the generated netmap.ko = file I try to insert , which gives me the error netmap: Unknown symbol split_page (err 0) II. Avoid kernel compliation 1. Then i download the netmap-master branch from git and upload it to my = machine , cannot use git clone as it doesn=E2=80=99t support external = connections. 2.Unzipping the bundle and switch to LINUX folder to run ./configure 3. Here i received errors where netmap-master/LINUX/drivers/ext-patch = couldn=E2=80=99t be downloaded due to failure to connect. 4. I downloaded these drivers and placed them in that path. 5. I received a warning telling cannot find complete kernel sources, = which i referenced later as=20 ./configure =E2=80=94kernel-sources =3D = /lib/modules/linux-source-(uname -r)/build 6. Then after clearing all warning and errors, the generated netmap.ko = file I try to insert , which gives me the error netmap: Unknown symbol split_page (err 0) III. Tried switching to FreeBSD Cannot download the FreeBSD 10.2 image due to security reasons = mentioned in git / wget.=20 I=E2=80=99m totally stuck for the past 2 weeks and would appreciate help = on this.=20 Thanks=20 H From owner-freebsd-net@freebsd.org Tue Nov 29 03:10:10 2016 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 DABCCC5A5A5 for ; Tue, 29 Nov 2016 03:10:10 +0000 (UTC) (envelope-from navada@usc.edu) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B5623164D for ; Tue, 29 Nov 2016 03:10:10 +0000 (UTC) (envelope-from navada@usc.edu) Received: by mailman.ysv.freebsd.org (Postfix) id B48A0C5A5A3; Tue, 29 Nov 2016 03:10:10 +0000 (UTC) Delivered-To: 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 B3F3FC5A5A0 for ; Tue, 29 Nov 2016 03:10:10 +0000 (UTC) (envelope-from navada@usc.edu) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (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 88BA8164B for ; Tue, 29 Nov 2016 03:10:10 +0000 (UTC) (envelope-from navada@usc.edu) Received: by mail-pf0-x241.google.com with SMTP id c4so7381189pfb.3 for ; Mon, 28 Nov 2016 19:10:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usc-edu.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=/+pHgSP8e/MHprGe6iblNdf6p+Rodh7Ohm/QGDXtCbs=; b=S1XnPFlFtRAlI/prg3IZadvufgG6ySTOeOINKhaTvnYcB5uLzXivtPbAFmeS3SBdak 5Gu47R/NN/9XWErc7ueWHcU5Y22GyomDVvXj7uVKOgjKgObdeYquWdT79vyY2gF7Ofn+ BDOh1ZFYmH+bvhXima0kQJZ58QzcbxdJ7B5fadiisz42wdMaiaahS4S3w8xzHryOJYZz +4xByuukWM/X17hyotWanralh+kY1JB1x3AOQqW4kzgbm3D6FoiZNyNz0BYkYYdWM+uB ZFkbDJQnWTPXEEj+TGrPV1SDLLTlf6S3+HUfiWzZ2XI63o+gSOqv7/JBdmFWwL7uWf5d O4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=/+pHgSP8e/MHprGe6iblNdf6p+Rodh7Ohm/QGDXtCbs=; b=JF/JlmZhDkf2v3xBnpNPGsve9wRjk2aexeyMUe8ui3KQ2Qv2Z9jZFcI0MIORmsIEmY 0l/7syM/4eN/yv9mrch3/f0QqAtbLp6eqP4yMRsyknxuw9o2531DPumHFW7ihz52qlpS 959HVd8a2I+OCNFmwxqep4ZYvZCUCPe9nm4nSeY3bSBe9h7x09y5YZkcTJpdJmmI4O01 p3xi6/h2vd336YofsHKDAZucGyClLEAtwv/B6qypQB2HxAXQIePGDA0esyOqg3N9ThH2 glht4jliCAaj5lMTrNaILbbmtJFN8+JIhYNjPl3ktOqL4fYEMz6VoCmA4Li76AqxC9J+ Cr0A== X-Gm-Message-State: AKaTC00zF4v1C/CusEkpcNV4+3Vrpgrt4guXnPHZ4j6gZpYUEbzyXlgKSVoiC7oKS53L1qIl X-Received: by 10.98.166.70 with SMTP id t67mr25478483pfe.132.1480389009374; Mon, 28 Nov 2016 19:10:09 -0800 (PST) Received: from guest-wireless-207-151-063-168.usc.edu (guest-wireless-207-151-063-168.usc.edu. [207.151.63.168]) by smtp.gmail.com with ESMTPSA id f23sm90266456pff.59.2016.11.28.19.10.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 19:10:08 -0800 (PST) From: Harsha Navada Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Requesting help in Netmap build on Linux Ubuntu-12.04 Date: Mon, 28 Nov 2016 19:10:07 -0800 References: <061FA295-11CD-4C46-8556-2B47C6F7CC32@usc.edu> To: net@freebsd.org In-Reply-To: <061FA295-11CD-4C46-8556-2B47C6F7CC32@usc.edu> Message-Id: X-Mailer: Apple Mail (2.3251) 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: Tue, 29 Nov 2016 03:10:11 -0000 Follow up mail with Linux 2.6.32 kernel and netmap =E2=80=94 Here's another try with linux 2.6.32 for Ubuntu 10.04 that I'm trying: I = get different errors where make doesn't seem to work. I might be doing = some unspeakable errors but I would like to get this running as quickly = as possible. Code RED: sc558bl@rtr1:/tmp/netmap-master/LINUX$ ./configure = --kernel-sources=3D/tmp/linux-2.6.32/ = --kernel-dir=3D/lib/modules/2.6.32/build ********************************** NOTE = ********************************** *** We are trying to download the original sources for driver *** i40e using the following command: *** wget -nc = https://sourceforge.net/projects/e1000/files/i40e%20stable/1.5.23/i40e-1.5= .23.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ *** If this fails, please download the above file and put it *** in /tmp/netmap-master/LINUX/ext-drivers/, then run configure again. File `/tmp/netmap-master/LINUX/ext-drivers/i40e-1.5.23.tar.gz' already = there; not retrieving. ********************************** WARNING = ********************************** *** CONFIG_I40E not set in /lib/modules/2.6.32/build/.config, skipping = i40e ********************************** NOTE = ********************************** *** We are trying to download the original sources for driver *** ixgbevf using the following command: *** wget -nc = https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/3.2.2/ixgbev= f-3.2.2.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ *** If this fails, please download the above file and put it *** in /tmp/netmap-master/LINUX/ext-drivers/, then run configure again. File `/tmp/netmap-master/LINUX/ext-drivers/ixgbevf-3.2.2.tar.gz' already = there; not retrieving. ********************************** WARNING = ********************************** *** CONFIG_IXGBEVF not set in /lib/modules/2.6.32/build/.config, = skipping ixgbevf ********************************** NOTE = ********************************** *** We are trying to download the original sources for driver *** ixgbe using the following command: *** wget -nc = https://sourceforge.net/projects/e1000/files/ixgbe%20stable/4.4.6/ixgbe-4.= 4.6.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ *** If this fails, please download the above file and put it *** in /tmp/netmap-master/LINUX/ext-drivers/, then run configure again. File `/tmp/netmap-master/LINUX/ext-drivers/ixgbe-4.4.6.tar.gz' already = there; not retrieving. ********************************** NOTE = ********************************** *** We are trying to download the original sources for driver *** igb using the following command: *** wget -nc = https://sourceforge.net/projects/e1000/files/igb%20stable/5.3.5.3/igb-5.3.= 5.3.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ *** If this fails, please download the above file and put it *** in /tmp/netmap-master/LINUX/ext-drivers/, then run configure again. File `/tmp/netmap-master/LINUX/ext-drivers/igb-5.3.5.3.tar.gz' already = there; not retrieving. ********************************** NOTE = ********************************** *** We are trying to download the original sources for driver *** e1000e using the following command: *** wget -nc = https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.3.5/e1000e-= 3.3.5.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ *** If this fails, please download the above file and put it *** in /tmp/netmap-master/LINUX/ext-drivers/, then run configure again. File `/tmp/netmap-master/LINUX/ext-drivers/e1000e-3.3.5.tar.gz' already = there; not retrieving. ********************************** WARNING = ********************************** *** 'forcedeth.c': no applicable patch found and no override provided. *** Disabling driver. ********************************** WARNING = ********************************** *** 'virtio_net.c': no applicable patch found and no override provided. *** Disabling driver. ********************************** NOTE = ********************************** *** Now running compile tests to adapt the code to your *** kernel version. Please wait. kernel directory /lib/modules/2.6.32/build kernel sources /tmp/linux-2.6.32 linux version 20620 [2.6.32] module file netmap.ko subsystems generic monitor pipe vale apps vale-ctl nmreplay tlem lb bridge pkt-gen native drivers ixgbe igb e1000e e1000 veth.c r8169.c Contents of the drivers.mak file: Note: only drivers for which both the @src and = the @patch variable are set may be used in native = mode (assuming we can actually patch the sources). Other NICs will be accessed using the generic driver, at reduced performance. ######################################## # configure generated values # ######################################## ixgbe@conf :=3D CONFIG_IXGBE ixgbe@src :=3D tar xf = /tmp/netmap-master/LINUX/ext-drivers/ixgbe-4.4.6.tar.gz && mv = ixgbe-4.4.6/src ixgbe ixgbe@patch :=3D patches/intel--ixgbe--4.4.6 igb@conf :=3D CONFIG_IGB igb@src :=3D tar xf = /tmp/netmap-master/LINUX/ext-drivers/igb-5.3.5.3.tar.gz && mv = igb-5.3.5.3/src igb igb@patch :=3D patches/intel--igb--5.3.5.3 e1000e@conf :=3D CONFIG_E1000E e1000e@src :=3D tar xf = /tmp/netmap-master/LINUX/ext-drivers/e1000e-3.3.5.tar.gz && mv = e1000e-3.3.5/src e1000e e1000e@patch :=3D patches/intel--e1000e--3.3.5 e1000@conf :=3D CONFIG_E1000 e1000@src :=3D cp -Rp /tmp/linux-2.6.32/drivers/net/e1000 e1000 e1000@patch :=3D patches/vanilla--e1000--20620--31200 veth.c@conf :=3D CONFIG_VETH veth.c@src :=3D cp -Rp /tmp/linux-2.6.32/drivers/net/veth.c veth.c veth.c@patch :=3D patches/vanilla--veth.c--20620--30900 r8169.c@conf :=3D CONFIG_R8169 r8169.c@src :=3D cp -Rp /tmp/linux-2.6.32/drivers/net/r8169.c r8169.c r8169.c@patch :=3D patches/vanilla--r8169.c--20620--20625 sc558bl@rtr1:/tmp/netmap-master/LINUX$ make wget -nc = https://sourceforge.net/projects/e1000/files/ixgbe%20stable/4.4.6/ixgbe-4.= 4.6.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ File `/tmp/netmap-master/LINUX/ext-drivers/ixgbe-4.4.6.tar.gz' already = there; not retrieving. tar xf /tmp/netmap-master/LINUX/ext-drivers/ixgbe-4.4.6.tar.gz && mv = ixgbe-4.4.6/src ixgbe patch --posix --quiet --force -p1 < patches/intel--ixgbe--4.4.6; touch get-ixgbe wget -nc = https://sourceforge.net/projects/e1000/files/igb%20stable/5.3.5.3/igb-5.3.= 5.3.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ File `/tmp/netmap-master/LINUX/ext-drivers/igb-5.3.5.3.tar.gz' already = there; not retrieving. tar xf /tmp/netmap-master/LINUX/ext-drivers/igb-5.3.5.3.tar.gz && mv = igb-5.3.5.3/src igb patch --posix --quiet --force -p1 < patches/intel--igb--5.3.5.3; touch get-igb wget -nc = https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.3.5/e1000e-= 3.3.5.tar.gz = -P /tmp/netmap-master/LINUX/ext-drivers/ File `/tmp/netmap-master/LINUX/ext-drivers/e1000e-3.3.5.tar.gz' already = there; not retrieving. tar xf /tmp/netmap-master/LINUX/ext-drivers/e1000e-3.3.5.tar.gz && mv = e1000e-3.3.5/src e1000e patch --posix --quiet --force -p1 < patches/intel--e1000e--3.3.5; touch get-e1000e make -C /lib/modules/2.6.32/build M=3D/tmp/netmap-master/LINUX = EXTRA_CFLAGS=3D'-I/tmp/netmap-master/LINUX -I/tmp/netmap-master/LINUX = -I/tmp/netmap-master/LINUX/../sys -I/tmp/netmap-master/LINUX/../sys/dev = -DCONFIG_NETMAP -Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC = -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE' = modules CONFIG_NETMAP=3Dm CONFIG_R8169=3Dm CONFIG_VETH=3Dm = CONFIG_E1000=3Dm O_DRIVERS=3D"e1000/ r8169.o veth.o" = NETMAP_DRIVER_SUFFIX=3D make[1]: Entering directory `/tmp/linux-2.6.32' WARNING: Symbol version dump /tmp/linux-2.6.32/Module.symvers is missing; modules will have no dependencies and modversions. CC [M] /tmp/netmap-master/LINUX/netmap_mem2.o CC [M] /tmp/netmap-master/LINUX/netmap_mbq.o CC [M] /tmp/netmap-master/LINUX/netmap_vale.o /tmp/netmap-master/LINUX/../sys/dev/netmap/netmap_vale.c: In function = =E2=80=98netmap_bdg_learning=E2=80=99: /tmp/netmap-master/LINUX/../sys/dev/netmap/netmap_vale.c:1600: warning: = integer constant is too large for =E2=80=98long=E2=80=99 type At top level: cc1: warning: unrecognized command line option = "-Wno-unused-but-set-variable" CC [M] /tmp/netmap-master/LINUX/netmap_offloadings.o CC [M] /tmp/netmap-master/LINUX/netmap_pipe.o CC [M] /tmp/netmap-master/LINUX/netmap_monitor.o CC [M] /tmp/netmap-master/LINUX/netmap_generic.o CC [M] /tmp/netmap-master/LINUX/netmap_common.o CC [M] /tmp/netmap-master/LINUX/netmap_linux.o /tmp/netmap-master/LINUX/netmap_linux.c:400:2: warning: #warning "Packet = reception with emulated (generic) mode not supported for this kernel = version" /tmp/netmap-master/LINUX/netmap_linux.c:400:2: warning: #warning "Packet = reception with emulated (generic) mode not supported for this kernel = version" LD [M] /tmp/netmap-master/LINUX/netmap.o CC [M] /tmp/netmap-master/LINUX/r8169.o CC [M] /tmp/netmap-master/LINUX/veth.o CC [M] /tmp/netmap-master/LINUX/e1000/e1000_main.o LD [M] /tmp/netmap-master/LINUX/e1000/e1000.o Building modules, stage 2. MODPOST 4 modules LD [M] /tmp/netmap-master/LINUX/e1000/e1000.ko CC /tmp/netmap-master/LINUX/netmap.mod.o LD [M] /tmp/netmap-master/LINUX/netmap.ko CC /tmp/netmap-master/LINUX/r8169.mod.o LD [M] /tmp/netmap-master/LINUX/r8169.ko CC /tmp/netmap-master/LINUX/veth.mod.o LD [M] /tmp/netmap-master/LINUX/veth.ko make[1]: Leaving directory /tmp/linux-2.6.32' if [ -d ixgbe ] && [ -e = Module.symvers ]; then cp Module.symvers ixgbe; fi make -C ixgbe = EXTRA_CFLAGS=3D"-I/tmp/netmap-master/LINUX -I/tmp/netmap-master/LINUX = -I/tmp/netmap-master/LINUX/../sys -I/tmp/netmap-master/LINUX/../sys/dev = -DCONFIG_NETMAP -Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC = -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE" = NETMAP_DRIVER_SUFFIX=3D KSRC=3D/lib/modules/2.6.32/build make[1]: = Entering directory/tmp/netmap-master/LINUX/ixgbe' make[2]: Entering directory `/tmp/linux-2.6.32' WARNING: Symbol version dump /tmp/linux-2.6.32/Module.symvers is missing; modules will have no dependencies and modversions. CC [M] /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.o In file included from /tmp/netmap-master/LINUX/ixgbe_netmap_linux.h:39, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.c:726: /tmp/netmap-master/LINUX/bsd_glue.h:124:1: warning: "usleep_range" = redefined In file included from /tmp/netmap-master/LINUX/ixgbe/ixgbe_osdep.h:38, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_type.h:66, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_dcb.h:28, from /tmp/netmap-master/LINUX/ixgbe/ixgbe.h:45, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.c:52: /tmp/netmap-master/LINUX/ixgbe/kcompat.h:3363:1: warning: this is the = location of the previous definition In file included from /tmp/netmap-master/LINUX/ixgbe_netmap_linux.h:39, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.c:726: /tmp/netmap-master/LINUX/bsd_glue.h:143:1: warning: = "netdev_notifier_info_to_dev" redefined In file included from /tmp/netmap-master/LINUX/ixgbe/ixgbe_osdep.h:38, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_type.h:66, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_dcb.h:28, from /tmp/netmap-master/LINUX/ixgbe/ixgbe.h:45, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.c:52: /tmp/netmap-master/LINUX/ixgbe/kcompat.h:4381:1: warning: this is the = location of the previous definition In file included from /tmp/netmap-master/LINUX/ixgbe_netmap_linux.h:39, from /tmp/netmap-master/LINUX/ixgbe/ixgbe_main.c:726: /tmp/netmap-master/LINUX/bsd_glue.h:147: error: redefinition of = =E2=80=98_kc_skb_frag_size=E2=80=99 /tmp/netmap-master/LINUX/ixgbe/kcompat.h:3739: note: previous definition = of =E2=80=98_kc_skb_frag_size=E2=80=99 was here /tmp/netmap-master/LINUX/bsd_glue.h:152: error: redefinition of = =E2=80=98_kc_skb_frag_address=E2=80=99 /tmp/netmap-master/LINUX/ixgbe/kcompat.h:3763: note: previous definition = of =E2=80=98_kc_skb_frag_address=E2=80=99 was here /tmp/netmap-master/LINUX/bsd_glue.h:157: error: redefinition of = =E2=80=98_kc_skb_checksum_start_offset=E2=80=99 /tmp/netmap-master/LINUX/ixgbe/kcompat.h:3493: note: previous definition = of =E2=80=98_kc_skb_checksum_start_offset=E2=80=99 was here cc1: warning: unrecognized command line option = "-Wno-unused-but-set-variable" make[3]: *** [/tmp/netmap-master/LINUX/ixgbe/ixgbe_main.o] Error 1 make[2]: *** [module/tmp/netmap-master/LINUX/ixgbe] Error 2 make[2]: Leaving directory /tmp/linux-2.6.32' make[1]: *** [default] = Error 2 make[1]: Leaving directory/tmp/netmap-master/LINUX/ixgbe' make: *** [build-ixgbe] Error 2 drwxr-xr-x 3 sc558bl USC558L 4.0K 2016-11-28 19:00 ixgbe sc558bl@rtr1:/tmp/netmap-master/LINUX$ ls -lrth | grep netmap -rw-r--r-- 1 sc558bl USC558L 20K 2016-11-23 02:58 virtio_netmap.h -rw-r--r-- 1 sc558bl USC558L 6.5K 2016-11-23 02:58 veth_netmap.h -rwxr-xr-x 1 sc558bl USC558L 1.6K 2016-11-23 02:58 netmap_set_adapter.sh -rw-r--r-- 1 sc558bl USC558L 40K 2016-11-23 02:58 netmap_ptnet.c -rw-r--r-- 1 sc558bl USC558L 4.4K 2016-11-23 02:58 netmap.mak.in -rw-r--r-- 1 sc558bl USC558L 53K 2016-11-23 02:58 netmap_linux.c -rw-r--r-- 1 sc558bl USC558L 20K 2016-11-23 02:58 ixgbe_netmap_linux.h -rw-r--r-- 1 sc558bl USC558L 9.2K 2016-11-23 02:58 if_re_netmap_linux.h -rw-r--r-- 1 sc558bl USC558L 12K 2016-11-23 02:58 if_igb_netmap.h -rw-r--r-- 1 sc558bl USC558L 9.8K 2016-11-23 02:58 if_e1000_netmap.h -rw-r--r-- 1 sc558bl USC558L 11K 2016-11-23 02:58 if_e1000e_netmap.h -rw-r--r-- 1 sc558bl USC558L 17K 2016-11-23 02:58 i40e_netmap_linux.h -rw-r--r-- 1 sc558bl USC558L 12K 2016-11-23 02:58 forcedeth_netmap.h lrwxrwxrwx 1 sc558bl USC558L 38 2016-11-28 18:56 patches -> = /tmp/netmap-master/LINUX/final-patches lrwxrwxrwx 1 sc558bl USC558L 39 2016-11-28 18:56 GNUmakefile -> = /tmp/netmap-master/LINUX/../GNUmakefile -rw-r--r-- 1 sc558bl USC558L 4.5K 2016-11-28 19:00 netmap.mak drwxr-xr-x 10 sc558bl USC558L 4.0K 2016-11-28 19:00 netmap-tmpdir -rw-r--r-- 1 sc558bl USC558L 1.1K 2016-11-28 19:00 netmap_linux_config.h -rw-r--r-- 1 sc558bl USC558L 216K 2016-11-28 19:00 netmap_mem2.o -rw-r--r-- 1 sc558bl USC558L 145K 2016-11-28 19:00 netmap_mbq.o -rw-r--r-- 1 sc558bl USC558L 234K 2016-11-28 19:00 netmap_vale.o -rw-r--r-- 1 sc558bl USC558L 173K 2016-11-28 19:00 netmap_pipe.o -rw-r--r-- 1 sc558bl USC558L 163K 2016-11-28 19:00 netmap_offloadings.o -rw-r--r-- 1 sc558bl USC558L 174K 2016-11-28 19:00 netmap_monitor.o -rw-r--r-- 1 sc558bl USC558L 174K 2016-11-28 19:00 netmap_generic.o -rw-r--r-- 1 sc558bl USC558L 250K 2016-11-28 19:00 netmap_common.o -rw-r--r-- 1 sc558bl USC558L 1.8M 2016-11-28 19:00 netmap.o -rw-r--r-- 1 sc558bl USC558L 245K 2016-11-28 19:00 netmap_linux.o -rw-r--r-- 1 sc558bl USC558L 37K 2016-11-28 19:00 netmap.mod.o -rw-r--r-- 1 sc558bl USC558L 602 2016-11-28 19:00 netmap.mod.c -rw-r--r-- 1 sc558bl USC558L 1.8M 2016-11-28 19:00 netmap.ko sc558bl@rtr1:/tmp/netmap-master/LINUX$ dmesg | tail [ 141.456135] e1000e: eth0 NIC Link is Down [ 143.456909] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow = Control: None [ 150.908064] eth0: no IPv6 routers present [ 1065.480088] e1000e 0000:04:00.1: PCI INT B disabled [ 1065.544079] e1000e 0000:04:00.0: PCI INT A disabled [ 1065.625066] e1000e 0000:03:00.1: PCI INT B disabled [ 1066.144056] e1000e 0000:03:00.0: PCI INT A disabled [ 1138.077603] netmap: no symbol version for module_layout [ 1435.387913] netmap: no symbol version for module_layout [ 1439.776021] netmap: no symbol version for module_layout sc558bl@rtr1:/tmp/netmap-master/LINUX$ I would like to add that I'm trying to insert netmap patch for e1000e = driver before which I have to install netmap.ko module. > On Nov 28, 2016, at 4:54 PM, Harsha Navada wrote: >=20 > Hello , >=20 > I=E2=80=99m new to netmap where I=E2=80=99m trying to insert netmap.ko = module after compiling my kernel and I=E2=80=99m shown with the = following error: >=20 > netmap: Unknown symbol split_page (err 0) >=20 > Here are the steps and different methods I followed:=20 >=20 > I. Compile Kernel 3.2.0 >=20 > 1. My Ubuntu 12.04 machine has a kernel version 3.2.0-90-generic, so i = got the linux source by: > sudo apt-get source linux-source-3.2.0 > 2. Then i work on trying to compile the kernel > a. sudo make menuconfig =E2=80=94 Keep default config > b. sudo sed -i s/CONFIG_RTS5139=3Dm/CONFIG_RTS5139=3Dn/ .config = - to avoid compilation errors > c. sudo make clean > d. sudo make -j10 > e. sudo make bzImage > f. sudo make modules > g.sudo make modules_install > h. sudo make install > i. sudo update-grub2 > j. sudo reboot.=20 > 2 b. On checking kernel version using name -r , this is the kernel = version - 3.2.79 >=20 > 3. Then i download the netmap-master branch from git and upload it to = my machine , cannot use git clone as it doesn=E2=80=99t support external = connections. > 4.Unzipping the bundle and switch to LINUX folder to run ./configure > 5. Here i received errors where netmap-master/LINUX/drivers/ext-patch = couldn=E2=80=99t be downloaded due to failure to connect. > 6. I downloaded these drivers and placed them in that path. > 7. I received a warning telling cannot find complete kernel sources, = which i referenced later as=20 > ./configure =E2=80=94kernel-sources =3D = /lib/modules/linux-source-(uname -r)/build > 8. Then after clearing all warning and errors, the generated netmap.ko = file I try to insert , which gives me the error > netmap: Unknown symbol split_page (err 0) >=20 > II. Avoid kernel compliation > 1. Then i download the netmap-master branch from git and upload it to = my machine , cannot use git clone as it doesn=E2=80=99t support external = connections. > 2.Unzipping the bundle and switch to LINUX folder to run ./configure > 3. Here i received errors where netmap-master/LINUX/drivers/ext-patch = couldn=E2=80=99t be downloaded due to failure to connect. > 4. I downloaded these drivers and placed them in that path. > 5. I received a warning telling cannot find complete kernel sources, = which i referenced later as=20 > ./configure =E2=80=94kernel-sources =3D = /lib/modules/linux-source-(uname -r)/build > 6. Then after clearing all warning and errors, the generated netmap.ko = file I try to insert , which gives me the error > netmap: Unknown symbol split_page (err 0) >=20 > III. Tried switching to FreeBSD > Cannot download the FreeBSD 10.2 image due to security reasons = mentioned in git / wget.=20 >=20 > I=E2=80=99m totally stuck for the past 2 weeks and would appreciate = help on this.=20 >=20 > Thanks=20 > H >=20 From owner-freebsd-net@freebsd.org Tue Nov 29 10:56:19 2016 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 3BD58C5932D for ; Tue, 29 Nov 2016 10:56:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BDE31247 for ; Tue, 29 Nov 2016 10:56:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uATAuHhT072913 for ; Tue, 29 Nov 2016 10:56:19 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 214913] SO_KEEPALIVE does not work? Date: Tue, 29 Nov 2016 10:56:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: ae@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 29 Nov 2016 10:56:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214913 Andrey V. Elsukov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ae@FreeBSD.org --- Comment #1 from Andrey V. Elsukov --- SO_KEEPALIVE option doesn't mean that your connection will live forever. It only enables keepalive probes. These probes are carried out to determine th= at your connection is still alive. Note, not for keeping it alive. In FreeBSD by default net.inet.tcp.always_keepalive variable configured to assume SO_KEEPALIVE on all TCP connections. But first keepalive probe will = be made only after 2 hours of idle state. This is controlled by net.inet.tcp.keepidle variable. Just have tested keepalive probes with lowered idle time to 65 seconds on FreeBSD 12.0. All works as expected. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Tue Nov 29 11:27:00 2016 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 83E7FC4B3D5 for ; Tue, 29 Nov 2016 11:27:00 +0000 (UTC) (envelope-from Steven@stream-technologies.com) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0073.outbound.protection.outlook.com [104.47.1.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B37A417BE for ; Tue, 29 Nov 2016 11:26:59 +0000 (UTC) (envelope-from Steven@stream-technologies.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamtechnologiesuk.onmicrosoft.com; s=selector1-streamtechnologies-com01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8OrJ+g/5to+tXXHXUvAVQhLuPLDiE6eY9wRlEHDxFdw=; b=qDSYB0sX4mMMUXtm/3xGtuOaMqwYfrH44gICFA5GOJA072dpBZlrwMg1RxvwENEWGd6zPOpdsV+tPY6aVd4SiVyT6EbgVV51WkSKO/ldUFReA+QYYYw73Ed1RGFmGzS3flSFFPpsGZgcCnYuJZ9A7A8eqI2CC+H4IXYX0YCyiKQ= Received: from DB5PR07MB1685.eurprd07.prod.outlook.com (10.166.13.14) by DB5PR07MB1687.eurprd07.prod.outlook.com (10.166.13.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.5; Tue, 29 Nov 2016 11:26:50 +0000 Received: from DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) by DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) with mapi id 15.01.0761.009; Tue, 29 Nov 2016 11:26:50 +0000 From: Steven Crangle To: Vincenzo Maffione CC: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Thread-Topic: Looking for some help with netmap/bhyve Thread-Index: AQHSRKuiOapzmKvhI0y8Pcsl7N08/KDmPxuAgAmeBLQ= Date: Tue, 29 Nov 2016 11:26:50 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steven@stream-technologies.com; x-originating-ip: [212.20.240.118] x-ms-office365-filtering-correlation-id: d7934d21-a836-48bc-0731-08d4184a9cd2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR07MB1687; x-microsoft-exchange-diagnostics: 1; DB5PR07MB1687; 7:3GGSE+bWQjFO9AR5zWbH1HNAG7HIJ+QIUsbDtuclc7YQ0XAoZuQGJDbarx69XUKJUivEzDravcKPFWdIeXJY6UvH/1WgeBcps8jWkFzPbpgN496MzAvfXtzMFjj3Z9dRmYAiZsmaDZNof1mePVWWNphKxS83XWAHZwCb6CDPqr90PCHTxDs6A+ErpszoVFD6w+IvKRD2Ma1pUBsFpSA6nc3Gp1r9tFMJAhaIG9ovGGZXlplx3uWTzQnsOeKiPKOsrVs1OH0AY6m/NIsk1wmNdWozETNkfer622ZgYsbsjNZTQqp8XjqaJQHvnMc3pilpJ5v19FApWYdalkwbxMUCP6cQ/NBsvbawKjvfBqcdyBCFMKhl6N0BDrHi7sExikaXXZjO8l06NoQLaJOncNhXq7/aAdXkrcOTDPOuhGAadnwE72Ymx7L12U8S2WPR1rKFM1AZlg+ftX7/DCtji4T84Q== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(166708455590820)(203790808753936)(266611908612381)(75325880899374)(83272782819144); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6060326)(6045199)(6040361)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6061324)(6041248)(20161123555025)(2016111802025)(20161123560025)(20161123564025)(20161123562025)(6043046); SRVR:DB5PR07MB1687; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1687; x-forefront-prvs: 01415BB535 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916002)(52314003)(43784003)(377424004)(189002)(199003)(575784001)(4001150100001)(80792005)(97736004)(101416001)(76176999)(54356999)(189998001)(6116002)(50986999)(102836003)(3846002)(99936001)(66066001)(33656002)(16601075003)(606004)(6506003)(229853002)(39450400002)(5890100001)(122556002)(9686002)(76576001)(77096006)(7906003)(19273905006)(81156014)(7736002)(8936002)(7696004)(81166006)(110136003)(5660300001)(39410400001)(39400400001)(8676002)(68736007)(2900100001)(74316002)(105586002)(106116001)(39380400001)(3280700002)(2950100002)(6916009)(7846002)(106356001)(2906002)(86362001)(39060400001)(3660700001)(4326007)(38730400001)(92566002)(19627405001)(7099028)(16866105001)(473944003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR07MB1687; H:DB5PR07MB1685.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: stream-technologies.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/mixed; boundary="_004_DB5PR07MB168582129D05D52878D3DCE59B8D0DB5PR07MB1685eurp_" MIME-Version: 1.0 X-OriginatorOrg: stream-technologies.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2016 11:26:50.2107 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 720fa073-5781-43bf-bc14-7bef2603ed21 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1687 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: Tue, 29 Nov 2016 11:27:00 -0000 --_004_DB5PR07MB168582129D05D52878D3DCE59B8D0DB5PR07MB1685eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Vincenzo! Thank you so much for your help! With your instructions I've managed to get= a set of bhyves up and running with netmap working properly within them! I= chose to go with the recent version of head instead of 10.3. I will also = try and build a version on 11.0 if I get chance! I will make sure and ask any further questions on the github page for netma= p, but while I'm emailing, I've attached a text file containing a few kerne= l page fault errors I've ran into. They don't happen repeatedly. They seem = to just happen randomly if I try to shut the process down and possibly catc= h netmap in an incorrect state! Figured they might be useful to you. If I f= igure out what the error is myself I will try and help out! And thanks again for your help! Kind Regards ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione Sent: 23 November 2016 08:33:11 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve 2016-11-22 11:31 GMT+01:00 Steven Crangle >: Hi, I've recently been trying to boot up several bhyves so that I can test netm= ap communication between instances. The problem is, no matter what configur= ation I try, the guest vm running in bhyve completely hangs and becomes unu= sable as soon as a packet hits the netmap interface. When testing with pkt-= gen, the TX side successfully starts sending packets, but the RX side will = reliable freeze with the only option being killing the bhyve process. The bhyve command used for the above test was: bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er1vol -s 3,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 4,virtio-net,tap4= -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er2vol -s 3,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 4,virtio-net,tap5= -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 For this test the host OS was FreeBSD-11.0-p3 and the guest OS was FreeBSD-= 11.0-p3. After failing to get this solution working, I pulled down the source from t= he following url and installed it on the host box: https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ I then ran the following commands to try and bring up the machines using th= e ptnetmap interface (the guest still running 11.0p3) : bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper1vol -s 2:0,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper2vol -s 2:0,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 With the above commands the vm's fail to boot with the following message: ptnet_init: failed to get ptnetmap Output in /var/log/messages seems to just show the ptnetmap driver allocati= ng one RX/TX ring for each vm, while bringing the device up, the device the= n goes down and the above error is seen in the console. Is there something I'm doing wrong with regards to running netmap or ptnetm= ap within a bhyve? Any pointers in the right direction will be much appreci= ated! Kind Regards Steven Hi Steven, The code you are looking at is the final code released by my gsoc 2016 pr= oject at the end of August 2016. However, I've been working on that for a w= hile after the gsoc, so that code is not updated anymore. My modification b= asically involves two subsystems: netmap and bhyve. The updates to netmap are already available in HEAD. The updates to bhyve a= re not yet upstream, as we are in the process to review that with the bhyve= maintainers. Anyway, you need two sources to get the latest code: 1) https://github.com/luigirizzo/netmap for the latest netmap code, that yo= u could also compile as an external kernel module. 2) https://github.com/vmaffione/freebsd to get the updates to bhyve (and vm= m.ko). You can use this as the host system. There are two branches here: pt= net-10.3, and ptnet-head. My original code was developed under FreeBSD 10.3= , so a first possibility is to try this as the host system (using the ptnet= -10.3 branch). The other branch (ptnet-head) contains a porting of the work= to a recent version of HEAD. I would be very glad if you could test the co= de also on FreeBSD 11. We support two combinations of bhyve networking with netmap: (A) virtio-net + netmap: that is something like "-s 2:0,virtio-net,vale0:= 0" in the bhyve command line. (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev -s 2= :2,ptnet,vale0:0" in the bhyve command line. so you may want to try A first (netmap backend in user-space, slower) and t= hen B (netmap backend in kernel-space, faster). Sorry about the confusion on the code repositories, I'll try also to update= the wiki page (and/or the gsoc svn repo) to reflect these updates. It's pe= rfectly ok for me to discuss these issues here in the ML, however for more = detailed/low-level discussion and support about problems you are running in= to, feel free to open Github issues here https://github.com/luigirizzo/netm= ap. Cheers, Vincenzo ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com _______________________________________________ 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" -- Vincenzo Maffione --_004_DB5PR07MB168582129D05D52878D3DCE59B8D0DB5PR07MB1685eurp_ Content-Type: text/plain; name="kernel_stacktraces.txt" Content-Description: kernel_stacktraces.txt Content-Disposition: attachment; filename="kernel_stacktraces.txt"; size=1049; creation-date="Tue, 29 Nov 2016 11:25:17 GMT"; modification-date="Tue, 29 Nov 2016 11:25:17 GMT" Content-Transfer-Encoding: base64 CkZhdGFsIHRyYXAgMTI6IHBhZ2UgZmF1bHQgd2hpbGUgaW4ga2VybmVsIG1vZGUKY3B1aWQgPSAw OyBhcGljIGlkID0gMDAKZmF1bHQgdmlydHVhbCBhZGRyZXNzCT0gMHgwCmZhdWx0IGNvZGUJCT0g c3VwZXJ2aXNvciByZWFkIGluc3RydWN0aW9uLCBwYWdlIG5vdCBwcmVzZW50Cmluc3RydWN0aW9u IHBvaW50ZXIJPSAweDIwOjB4MApzdGFjayBwb2ludGVyCSAgICAgICAgPSAweDI4OjB4ZmZmZmZl MDFhNGQ2ZDkzOApmcmFtZSBwb2ludGVyCSAgICAgICAgPSAweDI4OjB4ZmZmZmZlMDFhNGQ2ZDk2 MApjb2RlIHNlZ21lbnQJCT0gYmFzZSAweDAsIGxpbWl0IDB4ZmZmZmYsIHR5cGUgMHgxYgoJCQk9 IERQTCAwLCBwcmVzIDEsIGxvbmcgMSwgZGVmMzIgMCwgZ3JhbiAxCnByb2Nlc3NvciBlZmxhZ3MJ PSBpbnRlcnJ1cHQgZW5hYmxlZCwgcmVzdW1lLCBJT1BMID0gMApjdXJyZW50IHByb2Nlc3MJCT0g MTIgKHN3aTQ6IGNsb2NrICgwKSkKWyB0aHJlYWQgcGlkIDEyIHRpZCAxMDAwMDUgXQpTdG9wcGVk IGF0ICAgICAgMAoKCkZhdGFsIHRyYXAgMTI6IHBhZ2UgZmF1bHQgd2hpbGUgaW4ga2VybmVsIG1v ZGUKY3B1aWQgPSAwOyBhcGljIGlkID0gMDAKZmF1bHQgdmlydHVhbCBhZGRyZXNzCT0gMHgwCmZh dWx0IGNvZGUJCT0gc3VwZXJ2aXNvciByZWFkIGluc3RydWN0aW9uLCBwYWdlIG5vdCBwcmVzZW50 Cmluc3RydWN0aW9uIHBvaW50ZXIJPSAweDIwOjB4MApzdGFjayBwb2ludGVyCSAgICAgICAgPSAw eDA6MHhmZmZmZmUwMWE0ZDZkOTM4CmZyYW1lIHBvaW50ZXIJICAgICAgICA9IDB4MDoweGZmZmZm ZTAxYTRkNmQ5NjAKY29kZSBzZWdtZW50CQk9IGJhc2UgMHgwLCBsaW1pdCAweGZmZmZmLCB0eXBl IDB4MWIKCQkJPSBEUEwgMCwgcHJlcyAxLCBsb25nIDEsIGRlZjMyIDAsIGdyYW4gMQpwcm9jZXNz b3IgZWZsYWdzCT0gaW50ZXJydXB0IGVuYWJsZWQsIHJlc3VtZSwgSU9QTCA9IDAKY3VycmVudCBw cm9jZXNzCQk9IDEyIChzd2k0OiBjbG9jayAoMCkpClsgdGhyZWFkIHBpZCAxMiB0aWQgMTAwMDA1 IF0KU3RvcHBlZCBhdCAgICAgIDAKCgo= --_004_DB5PR07MB168582129D05D52878D3DCE59B8D0DB5PR07MB1685eurp_-- From owner-freebsd-net@freebsd.org Tue Nov 29 11:52:20 2016 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 7348EC4BCDB for ; Tue, 29 Nov 2016 11:52:20 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (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 362DE1445 for ; Tue, 29 Nov 2016 11:52:20 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x243.google.com with SMTP id m75so17956652oig.1 for ; Tue, 29 Nov 2016 03:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=56yqKksT0KQlBr39BlHqdnTiIDBG4QkFWkU7EHIdEiI=; b=F5vH1nxISKOCvrV/0dqyiD9qbzMk+Y1EazoZkMBzhKwaFNpn+SdrUexoezOnGQb5KV lqcKecpL1ZzN03m1vSI1AOnFMDRngd4BUuqBpXZpA6EMwFCcvlLlW1VAiPhoE3SJ2skP 0/ezFKycu2pTIGNuUvwBQ2rQf1RxPRHaHeuagnURWvSEGfot9uPQMAHFouKXfpHmMqAW k8vQ+eAJvNvsjRFyttILzN2X3hp+nV0+FNyyX9hSwvH628SRqd2BqkWXHbWv1Hbc49ZU 7TQ4jJIEAJBhhSgwjMRWQcUu2jiyiagnZVgcOLREhMNzaGzdQEPo+Kmn22z8JJpzcMUy sk3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=56yqKksT0KQlBr39BlHqdnTiIDBG4QkFWkU7EHIdEiI=; b=m8dRrULBaKI49AV08ksdRkOhOPc3ZYEP7wIA9oLbIQ78ecJyHa2t3Y4Nj2BhktI9Z+ jOr3B/W2Fkpq0dR9u/ACd5B4Ak2sDltvMa/S5cuSHAtFMiFirls2g2Rql02wRkkhUNhE dhiWvQX6zLYGnbXlGMoEtxzSRuiP3dR7QOVJoeIHhXPJgdtyMeXpe0LGsE36WR4zn8Kq XSDU65g7g3N2HOD/7rBxb/E0pWHD2Ud8nIhv9G1zZZfcOkq1HEl9n2gnsYv3ol3VJfGO wGq66vNd1PbzjCc4doZQ0yITJ+UVv7baibZis3KOoQ3EdQff04lvfenHOA9hKjeS7S1a Aoyw== X-Gm-Message-State: AKaTC017DqYCRLxJkFUwVx9cCF2oQEVR09RfY+ukMk/AuskQiJMvWHEcYChNxv06Ajd8A4SzrHGDqScbR5n4yw== X-Received: by 10.202.67.7 with SMTP id q7mr13192606oia.103.1480420339130; Tue, 29 Nov 2016 03:52:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.200 with HTTP; Tue, 29 Nov 2016 03:52:18 -0800 (PST) In-Reply-To: References: From: Vincenzo Maffione Date: Tue, 29 Nov 2016 12:52:18 +0100 Message-ID: Subject: Re: Looking for some help with netmap/bhyve To: Steven Crangle Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 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: Tue, 29 Nov 2016 11:52:20 -0000 Hi Steven, Thanks for your testing this in HEAD, good news to know that it works ok! I think there is not going to be much difference between HEAD and 11.0, because in the end bhyve code didn't really change (for the parts I touched), and you need to use the latest netmap version (github) anyway, irrespective of whether you are testing on 10.3, 11.0, head, etc. In other words, you would be testing approximately the same code. Anyway, if you happen to test 11.0 by chance please let me know. What kind of tests did you perform? netmap applications (e.g. pkt-gen), or netperf/iperf standard TCP/IP tools? Could you please share the performance number you got for configurations (A) and (B) (or just the one you tried)? I think it is useful to compare your results with the ones I collected here (see the performance evaluation section): https://wiki.freebsd.org/DevSummit/201609?action=AttachFile&do=view&target=20160923-freebsd-summit-ptnet.pdf Regarding the crashes, thanks for reporting, I would be nice if you could describe in more detail how you trigger them (with some higher likelyhood); also, compiling the kernel with debug symbols should help in understanding which part of the code is involved in the crash. Cheers, Vincenzo 2016-11-29 12:26 GMT+01:00 Steven Crangle : > Hi Vincenzo! > > > Thank you so much for your help! With your instructions I've managed to > get a set of bhyves up and running with netmap working properly within > them! I chose to go with the recent version of head instead of 10.3. I > will also try and build a version on 11.0 if I get chance! > > > I will make sure and ask any further questions on the github page for > netmap, but while I'm emailing, I've attached a text file containing a few > kernel page fault errors I've ran into. They don't happen repeatedly. They > seem to just happen randomly if I try to shut the process down and possibly > catch netmap in an incorrect state! Figured they might be useful to you. If > I figure out what the error is myself I will try and help out! > > > And thanks again for your help! > > > Kind Regards > > > > > > > > ------------------------------ > > > > [image: Stream Logo] > > > > > > *Steven Crangle* > > Systems Developer | Stream Technologies | Glasgow, UK > > [image: http://www.stream-technologies.com/img/phone.png] > > +44 (0)844 800 8520 > > | > > [image: http://www.stream-technologies.com/img/mouse.png] > > www.stream-technologies.com > > > > > > ------------------------------ > *From:* Vincenzo Maffione > *Sent:* 23 November 2016 08:33:11 > *To:* Steven Crangle > *Cc:* FreeBSD Net > *Subject:* Re: Looking for some help with netmap/bhyve > > > > 2016-11-22 11:31 GMT+01:00 Steven Crangle > : > >> >> Hi, >> >> >> I've recently been trying to boot up several bhyves so that I can test >> netmap communication between instances. The problem is, no matter what >> configuration I try, the guest vm running in bhyve completely hangs and >> becomes unusable as soon as a packet hits the netmap interface. When >> testing with pkt-gen, the TX side successfully starts sending packets, but >> the RX side will reliable freeze with the only option being killing the >> bhyve process. >> >> >> The bhyve command used for the above test was: >> >> >> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/viper1vol >> -s 3,virtio-net,tap0,mac=00:01:23:45:67:83 -s 4,virtio-net,tap4 -l >> com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/viper2vol >> -s 3,virtio-net,tap1,mac=00:01:23:45:67:84 -s 4,virtio-net,tap5 -l >> com1,/dev/nmdm1A -A -H -P -m 6g viper2 >> >> For this test the host OS was FreeBSD-11.0-p3 and the guest OS was >> FreeBSD-11.0-p3. >> >> After failing to get this solution working, I pulled down the source from >> the following url and installed it on the host box: >> >> https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ >> >> I then ran the following commands to try and bring up the machines using >> the ptnetmap interface (the guest still running 11.0p3) : >> >> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/viper1vol >> -s 2:0,virtio-net,tap0,mac=00:01:23:45:67:83 -s 2:1,ptnetmap-memdev -s >> 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/viper2vol >> -s 2:0,virtio-net,tap1,mac=00:01:23:45:67:84 -s 2:1,ptnetmap-memdev -s >> 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 >> >> With the above commands the vm's fail to boot with the following message: >> >> ptnet_init: failed to get ptnetmap >> >> Output in /var/log/messages seems to just show the ptnetmap driver >> allocating one RX/TX ring for each vm, while bringing the device up, the >> device then goes down and the above error is seen in the console. >> >> Is there something I'm doing wrong with regards to running netmap or >> ptnetmap within a bhyve? Any pointers in the right direction will be much >> appreciated! >> >> Kind Regards >> >> Steven >> >> > Hi Steven, > > The code you are looking at is the final code released by my gsoc 2016 > project at the end of August 2016. However, I've been working on that for a > while after the gsoc, so that code is not updated anymore. My modification > basically involves two subsystems: netmap and bhyve. > > The updates to netmap are already available in HEAD. The updates to bhyve > are not yet upstream, as we are in the process to review that with the > bhyve maintainers. > > Anyway, you need two sources to get the latest code: > 1) https://github.com/luigirizzo/netmap for the latest netmap code, that > you could also compile as an external kernel module. > 2) https://github.com/vmaffione/freebsd to get the updates to bhyve (and > vmm.ko). You can use this as the host system. There are two branches here: > ptnet-10.3, and ptnet-head. My original code was developed under FreeBSD > 10.3, so a first possibility is to try this as the host system (using the > ptnet-10.3 branch). The other branch (ptnet-head) contains a porting of the > work to a recent version of HEAD. I would be very glad if you could test > the code also on FreeBSD 11. > > We support two combinations of bhyve networking with netmap: > > (A) virtio-net + netmap: that is something like "-s > 2:0,virtio-net,vale0:0" in the bhyve command line. > (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev -s > 2:2,ptnet,vale0:0" in the bhyve command line. > > so you may want to try A first (netmap backend in user-space, slower) and > then B (netmap backend in kernel-space, faster). > > Sorry about the confusion on the code repositories, I'll try also to > update the wiki page (and/or the gsoc svn repo) to reflect these updates. > It's perfectly ok for me to discuss these issues here in the ML, however > for more detailed/low-level discussion and support about problems you are > running into, feel free to open Github issues here > https://github.com/luigirizzo/netmap. > > Cheers, > Vincenzo > > > >> >> >> >> >> >> >> >> ________________________________ >> >> >> >> [Stream Logo] >> >> >> >> >> >> >> >> >> Steven Crangle >> >> >> Systems Developer | Stream Technologies | Glasgow, UK >> >> >> [http://www.stream-technologies.com/img/phone.png] >> >> >> +44 (0)844 800 8520 >> >> >> | >> >> >> [http://www.stream-technologies.com/img/mouse.png] >> >> >> www.stream-technologies.com >> >> >> >> >> >> >> _______________________________________________ >> 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" >> > > > > -- > Vincenzo Maffione > -- Vincenzo Maffione From owner-freebsd-net@freebsd.org Tue Nov 29 18:17:55 2016 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 D8B69C5C980 for ; Tue, 29 Nov 2016 18:17:55 +0000 (UTC) (envelope-from Steven@stream-technologies.com) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0049.outbound.protection.outlook.com [104.47.0.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8FF112F8 for ; Tue, 29 Nov 2016 18:17:54 +0000 (UTC) (envelope-from Steven@stream-technologies.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamtechnologiesuk.onmicrosoft.com; s=selector1-streamtechnologies-com01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vVmM2XJYZTvs3vg3deT0MAa1DNXKg/snQn7gqsO5omQ=; b=Q2tMtV+7NiQZ8zYveJUrHKNMXa0i4VWrt8/2SPJ7TRHUMnnHEFo16dRQFA15li5e/4piIClhiHnw+F50CUqFaa3uJkav0oF8QKPULZdVn+BfflOoEXDU7oZgSUd1eOBbnKIx3WJcdra/QGPiPZTBA2H8F0C0BgiNq4jPzE5zwPk= Received: from DB5PR07MB1685.eurprd07.prod.outlook.com (10.166.13.14) by DB5PR07MB1685.eurprd07.prod.outlook.com (10.166.13.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.5; Tue, 29 Nov 2016 15:44:01 +0000 Received: from DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) by DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) with mapi id 15.01.0761.009; Tue, 29 Nov 2016 15:44:01 +0000 From: Steven Crangle To: Vincenzo Maffione CC: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Thread-Topic: Looking for some help with netmap/bhyve Thread-Index: AQHSRKuiOapzmKvhI0y8Pcsl7N08/KDmPxuAgAmeBLSAAAebAIAAJnrz Date: Tue, 29 Nov 2016 15:44:00 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steven@stream-technologies.com; x-originating-ip: [212.20.240.118] x-ms-office365-filtering-correlation-id: 70ba034b-ae79-4e50-0bd9-08d4186e8a42 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR07MB1685; x-microsoft-exchange-diagnostics: 1; DB5PR07MB1685; 7:zktX2SGbovP/fabzgVlMZ02UDOk4/+0WhIgAa6bxDHB4dPWqLP2KKvaUseK13V/T6RpSbBPlneDpapc9or6V975Wm8cOzbDvW1E+RkuGpL2dg5sjkxr+EoKwSP4qLKqIZE6dOpY45zuWn16RFU2gEI0ZQITkPc5KGWtarGtj6OOWsBYRJ+suY5Ac6s8sTYpf/UpZAf0hixuCaHZgP9Tn+ptInDeX1ywglcirLODXagS8GNkG95g5yjnkr3BvYuLk7CIl5sS4dOqBOrhyL7I1NFN28xsVQKjPIIy8tInz6QHsd3pqwIdg8KKh3/1c/ZG4oExe6rXWp9rmYBSO1/OBHEmAnrq3XhWI9IbxPVctPm+N2Jg9Y53ktS+Inn0kfFWiexBnYMzDNNouh03aWRaxGWTPhGiYRHmpnTpE97cIwOMtrAogeGRQSi8ikYlVLPiP6ooFQHk94nZwto5GagQTTQ== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(278428928389397)(166708455590820)(203790808753936)(266611908612381)(75325880899374)(211171220733660)(83272782819144); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040361)(6045199)(6060326)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6061324)(6041248)(2016111802025)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6043046); SRVR:DB5PR07MB1685; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1685; x-forefront-prvs: 01415BB535 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916002)(189002)(199003)(377424004)(52314003)(43784003)(110136003)(4326007)(38730400001)(8936002)(3846002)(39060400001)(606004)(2906002)(3660700001)(5890100001)(6916009)(68736007)(3280700002)(5660300001)(101416001)(7696004)(229853002)(6506003)(105586002)(189998001)(33656002)(39380400001)(39410400001)(39450400002)(9686002)(106116001)(77096006)(39400400001)(6116002)(102836003)(2950100002)(97736004)(80792005)(4001150100001)(106356001)(81156014)(54356999)(76576001)(16601075003)(2900100001)(122556002)(76176999)(50986999)(7736002)(86362001)(575784001)(81166006)(93886004)(66066001)(7906003)(8676002)(7846002)(19273905006)(19627405001)(74316002)(92566002)(7099028)(16866105001)(473944003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR07MB1685; H:DB5PR07MB1685.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: stream-technologies.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: stream-technologies.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2016 15:44:00.9264 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 720fa073-5781-43bf-bc14-7bef2603ed21 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1685 Content-Type: text/plain; charset="us-ascii" 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: Tue, 29 Nov 2016 18:17:55 -0000 Hi Vincenzo, No problem! We've decided that we will try testing with 11.0 too, as it wou= ld help us to have our test system locked to a specific version like 11.0 a= nd can hopefully help you with testing too. We'll compile netmap from sourc= e as advised, but I was wondering what steps we would take in order to port= the changes to bhyve/ptnetmap from HEAD into 11.0? I've currently only tested with pkt-gen as our bhyve instances are pretty m= inimal right now, below are a few samples of the speeds seen in each of the= different configurations: Using netmap on top of standard tap devices with no vale: vm1: 197.259100 main_thread [2325] 30.977 Kpps (32.435 Kpkts 15.569 Mbps in = 1047062 usec) 1.93 avg_batch 826 min_space 203.306126 main_thread [2325] 32.149 Kpps (32.411 Kpkts 15.557 Mbps in = 1008156 usec) 1.88 avg_batch 866 min_space 204.313055 main_thread [2325] 33.095 Kpps (33.324 Kpkts 15.996 Mbps in = 1006929 usec) 1.98 avg_batch 911 min_space vm2: 245.397418 main_thread [2325] 31.422 Kpps (33.262 Kpkts 15.966 Mbps in = 1058559 usec) 313.79 avg_batch 99999 min_space 246.429810 main_thread [2325] 31.254 Kpps (32.266 Kpkts 15.488 Mbps in = 1032392 usec) 319.47 avg_batch 99999 min_space 251.621436 main_thread [2325] 31.606 Kpps (33.329 Kpkts 15.998 Mbps in = 1054531 usec) 314.42 avg_batch 99999 min_space After then trying to switch to the netmap in userspace/netmap in kernel spa= ce with ptnetmap, I realised I made a silly mistake and built from head ins= tead of the branch ptnet-head... haha So I'm currently doing a quick rebuil= d on the correct branch and will report back with the results from pkt-gen = using just vale, and also with the new ptnetmap changes! Kind Regards ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione Sent: 29 November 2016 11:52:18 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Hi Steven, Thanks for your testing this in HEAD, good news to know that it works ok! I think there is not going to be much difference between HEAD and 11.0, bec= ause in the end bhyve code didn't really change (for the parts I touched), = and you need to use the latest netmap version (github) anyway, irrespective= of whether you are testing on 10.3, 11.0, head, etc. In other words, you w= ould be testing approximately the same code. Anyway, if you happen to test = 11.0 by chance please let me know. What kind of tests did you perform? netmap applications (e.g. pkt-gen), or = netperf/iperf standard TCP/IP tools? Could you please share the performance number you got for configurations (A= ) and (B) (or just the one you tried)? I think it is useful to compare your results with the ones I collected here= (see the performance evaluation section): https://wiki.freebsd.org/DevSummit/201609?action=3DAttachFile&do=3Dview&tar= get=3D20160923-freebsd-summit-ptnet.pdf Regarding the crashes, thanks for reporting, I would be nice if you could d= escribe in more detail how you trigger them (with some higher likelyhood); = also, compiling the kernel with debug symbols should help in understanding = which part of the code is involved in the crash. Cheers, Vincenzo 2016-11-29 12:26 GMT+01:00 Steven Crangle >: Hi Vincenzo! Thank you so much for your help! With your instructions I've managed to get= a set of bhyves up and running with netmap working properly within them! I= chose to go with the recent version of head instead of 10.3. I will also = try and build a version on 11.0 if I get chance! I will make sure and ask any further questions on the github page for netma= p, but while I'm emailing, I've attached a text file containing a few kerne= l page fault errors I've ran into. They don't happen repeatedly. They seem = to just happen randomly if I try to shut the process down and possibly catc= h netmap in an incorrect state! Figured they might be useful to you. If I f= igure out what the error is myself I will try and help out! And thanks again for your help! Kind Regards ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione > Sent: 23 November 2016 08:33:11 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve 2016-11-22 11:31 GMT+01:00 Steven Crangle >: Hi, I've recently been trying to boot up several bhyves so that I can test netm= ap communication between instances. The problem is, no matter what configur= ation I try, the guest vm running in bhyve completely hangs and becomes unu= sable as soon as a packet hits the netmap interface. When testing with pkt-= gen, the TX side successfully starts sending packets, but the RX side will = reliable freeze with the only option being killing the bhyve process. The bhyve command used for the above test was: bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er1vol -s 3,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 4,virtio-net,tap4= -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er2vol -s 3,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 4,virtio-net,tap5= -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 For this test the host OS was FreeBSD-11.0-p3 and the guest OS was FreeBSD-= 11.0-p3. After failing to get this solution working, I pulled down the source from t= he following url and installed it on the host box: https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ I then ran the following commands to try and bring up the machines using th= e ptnetmap interface (the guest still running 11.0p3) : bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper1vol -s 2:0,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper2vol -s 2:0,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 With the above commands the vm's fail to boot with the following message: ptnet_init: failed to get ptnetmap Output in /var/log/messages seems to just show the ptnetmap driver allocati= ng one RX/TX ring for each vm, while bringing the device up, the device the= n goes down and the above error is seen in the console. Is there something I'm doing wrong with regards to running netmap or ptnetm= ap within a bhyve? Any pointers in the right direction will be much appreci= ated! Kind Regards Steven Hi Steven, The code you are looking at is the final code released by my gsoc 2016 pr= oject at the end of August 2016. However, I've been working on that for a w= hile after the gsoc, so that code is not updated anymore. My modification b= asically involves two subsystems: netmap and bhyve. The updates to netmap are already available in HEAD. The updates to bhyve a= re not yet upstream, as we are in the process to review that with the bhyve= maintainers. Anyway, you need two sources to get the latest code: 1) https://github.com/luigirizzo/netmap for the latest netmap code, that yo= u could also compile as an external kernel module. 2) https://github.com/vmaffione/freebsd to get the updates to bhyve (and vm= m.ko). You can use this as the host system. There are two branches here: pt= net-10.3, and ptnet-head. My original code was developed under FreeBSD 10.3= , so a first possibility is to try this as the host system (using the ptnet= -10.3 branch). The other branch (ptnet-head) contains a porting of the work= to a recent version of HEAD. I would be very glad if you could test the co= de also on FreeBSD 11. We support two combinations of bhyve networking with netmap: (A) virtio-net + netmap: that is something like "-s 2:0,virtio-net,vale0:= 0" in the bhyve command line. (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev -s 2= :2,ptnet,vale0:0" in the bhyve command line. so you may want to try A first (netmap backend in user-space, slower) and t= hen B (netmap backend in kernel-space, faster). Sorry about the confusion on the code repositories, I'll try also to update= the wiki page (and/or the gsoc svn repo) to reflect these updates. It's pe= rfectly ok for me to discuss these issues here in the ML, however for more = detailed/low-level discussion and support about problems you are running in= to, feel free to open Github issues here https://github.com/luigirizzo/netm= ap. Cheers, Vincenzo ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com _______________________________________________ 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" -- Vincenzo Maffione -- Vincenzo Maffione From owner-freebsd-net@freebsd.org Tue Nov 29 18:42:06 2016 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 85A38C5CF27 for ; Tue, 29 Nov 2016 18:42:06 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (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 4737D11DF for ; Tue, 29 Nov 2016 18:42:06 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id b126so201355526oia.2 for ; Tue, 29 Nov 2016 10:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l9o8+EIhnQWP0bAeJsYoKLXoHQF1dHJzvyZ2KhtABS8=; b=iIoJ9geKmnUnxgfO4VuxlcYu9rYRxC4wV4xugt5kRo8I+GkwbxyKtNsZ9M51IYNKRH P48sE3igmGUuTPUfOw20hvwSerZhunjY5Ge8YwPx+Lxt5nvTREod9/hem/s5lxto/TQQ mrKjCvn63Ok1jAiFD1recUHneGqJMZYJ8eBn1EYgnMZZs5E/j9E9kfts6OJOKn7NNS4v fLBsOHmIRGywF0FLJByU6Pbm0qeZOyz4EI72DOgTW6hk47IHgu/79hflyzFq1eSCJ+2O YI+X4qy4sj5XXsH+HhG5FvUksb8FNkEwnQ1kCMaLv8oilyeILtUSIgs6esK7Dttn5Dct rAMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l9o8+EIhnQWP0bAeJsYoKLXoHQF1dHJzvyZ2KhtABS8=; b=bKhz4zUQKEqPfQwQcti9zQl5PhsSCUpuEBsU3EtMssiRpWF0U4nC8ZkeylMbar0jNm FytmaiwXCVnpnzMqi10tPsFuqTM/JAiE7heJcfDynRom/D5vCcWwyRFri3x2NJRMqcZA 69Nwv3oRwXqJMa9rvlU+tcHd7jBEP7xy3fM6IgP4SFehmR7id7YMDhqF0/eb+GctQsGX fKyFg7PsT/hmCts5CL+SYyHFAS0ISjVTu/vXYCvV5q1moGqQLAWMEY4yK7cvIMQwwUYx u93yiatSbshu1kXx0/O7Wz/kf2TcAW0eroL+k5rI8/gM59trUg4E3wFPtsRT4iJ6WGSw pfcg== X-Gm-Message-State: AKaTC00lk7l89J+T74tcT8n0+Es4ZKNDHTVWijVkq/IqbhvMqSxUc8OIx1lfd9+v9iozJJ1T9uDjSMkrc2eBsQ== X-Received: by 10.202.213.138 with SMTP id m132mr16110792oig.104.1480444925414; Tue, 29 Nov 2016 10:42:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.200 with HTTP; Tue, 29 Nov 2016 10:42:04 -0800 (PST) In-Reply-To: References: From: Vincenzo Maffione Date: Tue, 29 Nov 2016 19:42:04 +0100 Message-ID: Subject: Re: Looking for some help with netmap/bhyve To: Steven Crangle Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 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: Tue, 29 Nov 2016 18:42:06 -0000 Hi Steven, 2016-11-29 16:44 GMT+01:00 Steven Crangle : > > Hi Vincenzo, > > > No problem! We've decided that we will try testing with 11.0 too, as it > would help us to have our test system locked to a specific version like > 11.0 and can hopefully help you with testing too. We'll compile netmap from > source as advised, but I was wondering what steps we would take in order to > port the changes to bhyve/ptnetmap from HEAD into 11.0? > I think you can get the patch containing my modifications to HEAD for bhyve+vmm.ko+libvmmapi, that you can extract with the following command in my freebsd git repository $ git diff 9e10acc0303003d8733a546bca60f242b7b0aa64 ptnet-head lib/libvmmapi/ sys/amd64/ sys/modules/vmm/ usr.sbin/bhyve and apply that patch in your 11.0 FreeBSD tree. > > I've currently only tested with pkt-gen as our bhyve instances are pretty > minimal right now, below are a few samples of the speeds seen in each of > the different configurations: > which configurations? > > Using netmap on top of standard tap devices with no vale: > > > vm1: > 197.259100 main_thread [2325] 30.977 Kpps (32.435 Kpkts 15.569 Mbps in > 1047062 usec) 1.93 avg_batch 826 min_space > 203.306126 main_thread [2325] 32.149 Kpps (32.411 Kpkts 15.557 Mbps in > 1008156 usec) 1.88 avg_batch 866 min_space > 204.313055 main_thread [2325] 33.095 Kpps (33.324 Kpkts 15.996 Mbps in > 1006929 usec) 1.98 avg_batch 911 min_space > vm2: > 245.397418 main_thread [2325] 31.422 Kpps (33.262 Kpkts 15.966 Mbps in > 1058559 usec) 313.79 avg_batch 99999 min_space > 246.429810 main_thread [2325] 31.254 Kpps (32.266 Kpkts 15.488 Mbps in > 1032392 usec) 319.47 avg_batch 99999 min_space > 251.621436 main_thread [2325] 31.606 Kpps (33.329 Kpkts 15.998 Mbps in > 1054531 usec) 314.42 avg_batch 99999 min_space > Be aware that you typically want to use netmap both in the VM and in the host (to use VALE and ptnet). Here you are probably using netmap just in the VM. Performance are however extremely low. When using netmap in both guest and host, with ptnet, you should be able to get at least 10-30 Mpps from vm1 to vm2. > > After then trying to switch to the netmap in userspace/netmap in kernel > space with ptnetmap, I realised I made a silly mistake and built from head > instead of the branch ptnet-head... haha So I'm currently doing a quick > rebuild on the correct branch and will report back with the results from > pkt-gen using just vale, and also with the new ptnetmap changes! > Ok, also consider that you can use the patch I indicated above against HEAD. Cheers, Vincenzo > > > Kind Regards > > > > > > > > ------------------------------ > > > > [image: Stream Logo] > > > > > > *Steven Crangle* > > Systems Developer | Stream Technologies | Glasgow, UK > > [image: http://www.stream-technologies.com/img/phone.png] > > +44 (0)844 800 8520 > > | > > [image: http://www.stream-technologies.com/img/mouse.png] > > www.stream-technologies.com > > > > > > ------------------------------ > *From:* Vincenzo Maffione > *Sent:* 29 November 2016 11:52:18 > > *To:* Steven Crangle > *Cc:* FreeBSD Net > *Subject:* Re: Looking for some help with netmap/bhyve > > Hi Steven, > Thanks for your testing this in HEAD, good news to know that it works ok! > > I think there is not going to be much difference between HEAD and 11.0, > because in the end bhyve code didn't really change (for the parts I > touched), and you need to use the latest netmap version (github) anyway, > irrespective of whether you are testing on 10.3, 11.0, head, etc. In other > words, you would be testing approximately the same code. Anyway, if you > happen to test 11.0 by chance please let me know. > > What kind of tests did you perform? netmap applications (e.g. pkt-gen), or > netperf/iperf standard TCP/IP tools? > Could you please share the performance number you got for configurations > (A) and (B) (or just the one you tried)? > > I think it is useful to compare your results with the ones I collected > here (see the performance evaluation section): > > https://wiki.freebsd.org/DevSummit/201609?action= > AttachFile&do=view&target=20160923-freebsd-summit-ptnet.pdf > > Regarding the crashes, thanks for reporting, I would be nice if you could > describe in more detail how you trigger them (with some higher likelyhood); > also, compiling the kernel with debug symbols should help in understanding > which part of the code is involved in the crash. > > Cheers, > Vincenzo > > > 2016-11-29 12:26 GMT+01:00 Steven Crangle > : > >> Hi Vincenzo! >> >> >> Thank you so much for your help! With your instructions I've managed to >> get a set of bhyves up and running with netmap working properly within >> them! I chose to go with the recent version of head instead of 10.3. I >> will also try and build a version on 11.0 if I get chance! >> >> >> I will make sure and ask any further questions on the github page for >> netmap, but while I'm emailing, I've attached a text file containing a few >> kernel page fault errors I've ran into. They don't happen repeatedly. They >> seem to just happen randomly if I try to shut the process down and possibly >> catch netmap in an incorrect state! Figured they might be useful to you. If >> I figure out what the error is myself I will try and help out! >> >> >> And thanks again for your help! >> >> >> Kind Regards >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> [image: Stream Logo] >> >> >> >> >> >> *Steven Crangle* >> >> Systems Developer | Stream Technologies | Glasgow, UK >> >> [image: http://www.stream-technologies.com/img/phone.png] >> >> +44 (0)844 800 8520 >> >> | >> >> [image: http://www.stream-technologies.com/img/mouse.png] >> >> www.stream-technologies.com >> >> >> >> >> >> ------------------------------ >> *From:* Vincenzo Maffione >> *Sent:* 23 November 2016 08:33:11 >> *To:* Steven Crangle >> *Cc:* FreeBSD Net >> *Subject:* Re: Looking for some help with netmap/bhyve >> >> >> >> 2016-11-22 11:31 GMT+01:00 Steven Crangle > >: >> >>> >>> Hi, >>> >>> >>> I've recently been trying to boot up several bhyves so that I can test >>> netmap communication between instances. The problem is, no matter what >>> configuration I try, the guest vm running in bhyve completely hangs and >>> becomes unusable as soon as a packet hits the netmap interface. When >>> testing with pkt-gen, the TX side successfully starts sending packets, but >>> the RX side will reliable freeze with the only option being killing the >>> bhyve process. >>> >>> >>> The bhyve command used for the above test was: >>> >>> >>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/viper1vol >>> -s 3,virtio-net,tap0,mac=00:01:23:45:67:83 -s 4,virtio-net,tap4 -l >>> com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/viper2vol >>> -s 3,virtio-net,tap1,mac=00:01:23:45:67:84 -s 4,virtio-net,tap5 -l >>> com1,/dev/nmdm1A -A -H -P -m 6g viper2 >>> >>> For this test the host OS was FreeBSD-11.0-p3 and the guest OS was >>> FreeBSD-11.0-p3. >>> >>> After failing to get this solution working, I pulled down the source >>> from the following url and installed it on the host box: >>> >>> https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ >>> >>> I then ran the following commands to try and bring up the machines using >>> the ptnetmap interface (the guest still running 11.0p3) : >>> >>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/viper1vol >>> -s 2:0,virtio-net,tap0,mac=00:01:23:45:67:83 -s 2:1,ptnetmap-memdev >>> -s 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/viper2vol >>> -s 2:0,virtio-net,tap1,mac=00:01:23:45:67:84 -s 2:1,ptnetmap-memdev >>> -s 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 >>> >>> With the above commands the vm's fail to boot with the following message: >>> >>> ptnet_init: failed to get ptnetmap >>> >>> Output in /var/log/messages seems to just show the ptnetmap driver >>> allocating one RX/TX ring for each vm, while bringing the device up, the >>> device then goes down and the above error is seen in the console. >>> >>> Is there something I'm doing wrong with regards to running netmap or >>> ptnetmap within a bhyve? Any pointers in the right direction will be much >>> appreciated! >>> >>> Kind Regards >>> >>> Steven >>> >>> >> Hi Steven, >> >> The code you are looking at is the final code released by my gsoc 2016 >> project at the end of August 2016. However, I've been working on that for a >> while after the gsoc, so that code is not updated anymore. My modification >> basically involves two subsystems: netmap and bhyve. >> >> The updates to netmap are already available in HEAD. The updates to bhyve >> are not yet upstream, as we are in the process to review that with the >> bhyve maintainers. >> >> Anyway, you need two sources to get the latest code: >> 1) https://github.com/luigirizzo/netmap for the latest netmap code, that >> you could also compile as an external kernel module. >> 2) https://github.com/vmaffione/freebsd to get the updates to bhyve (and >> vmm.ko). You can use this as the host system. There are two branches here: >> ptnet-10.3, and ptnet-head. My original code was developed under FreeBSD >> 10.3, so a first possibility is to try this as the host system (using the >> ptnet-10.3 branch). The other branch (ptnet-head) contains a porting of the >> work to a recent version of HEAD. I would be very glad if you could test >> the code also on FreeBSD 11. >> >> We support two combinations of bhyve networking with netmap: >> >> (A) virtio-net + netmap: that is something like "-s >> 2:0,virtio-net,vale0:0" in the bhyve command line. >> (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev -s >> 2:2,ptnet,vale0:0" in the bhyve command line. >> >> so you may want to try A first (netmap backend in user-space, slower) and >> then B (netmap backend in kernel-space, faster). >> >> Sorry about the confusion on the code repositories, I'll try also to >> update the wiki page (and/or the gsoc svn repo) to reflect these updates. >> It's perfectly ok for me to discuss these issues here in the ML, however >> for more detailed/low-level discussion and support about problems you are >> running into, feel free to open Github issues here >> https://github.com/luigirizzo/netmap. >> >> Cheers, >> Vincenzo >> >> >> >>> >>> >>> >>> >>> >>> >>> >>> ________________________________ >>> >>> >>> >>> [Stream Logo] >>> >>> >>> >>> >>> >>> >>> >>> >>> Steven Crangle >>> >>> >>> Systems Developer | Stream Technologies | Glasgow, UK >>> >>> >>> [http://www.stream-technologies.com/img/phone.png] >>> >>> >>> +44 (0)844 800 8520 >>> >>> >>> | >>> >>> >>> [http://www.stream-technologies.com/img/mouse.png] >>> >>> >>> www.stream-technologies.com >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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" >>> >> >> >> >> -- >> Vincenzo Maffione >> > > > > -- > Vincenzo Maffione > -- Vincenzo Maffione From owner-freebsd-net@freebsd.org Tue Nov 29 19:05:12 2016 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 4B852C5C7AD for ; Tue, 29 Nov 2016 19:05:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 35DCD1891; Tue, 29 Nov 2016 19:05:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id uATJ5AZx051425 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Nov 2016 11:05:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id uATJ5A3V051424; Tue, 29 Nov 2016 11:05:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Nov 2016 11:05:09 -0800 From: Gleb Smirnoff To: hiren panchasara Cc: Jakub Palider , freebsd-net@freebsd.org, karels@FreeBSD.org Subject: Re: FLOWTABLE aka TCP route caching panic Message-ID: <20161129190509.GO27748@FreeBSD.org> References: <20161128221033.GM55731@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128221033.GM55731@strugglingcoder.info> User-Agent: Mutt/1.7.0 (2016-08-17) 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: Tue, 29 Nov 2016 19:05:12 -0000 On Mon, Nov 28, 2016 at 02:10:33PM -0800, hiren panchasara wrote: h> > Hi, h> > I have found that last month (19 Oct) the problem appeared on this list, h> > and to my experience it persists, both on VM and bare metal installation h> > (HEAD from yesterday). I looks that enabling FLOWTABLE option is the only h> > source of this fault happening. It appears on our setup in 80% cases within h> > one hour from boot up. h> > From our debugging, it is caused by lock on DESTROYED lock. Did you find a h> > solution to this problem? Not yet. I'm pretty sure that reverting my r307234 will fix your crashes. However, I still believe that r307234 is a proper way of fixing things, not r300854 which just plugged the problem in the nearest place to the crash. But as we all see r307234 is definitely missing some code path, which still allows for stale route to be referenced. -- Totus tuus, Glebius. From owner-freebsd-net@freebsd.org Tue Nov 29 22:08:37 2016 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 7DF84C5CA13 for ; Tue, 29 Nov 2016 22:08:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62B7A15FB for ; Tue, 29 Nov 2016 22:08:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uATM8b77044560 for ; Tue, 29 Nov 2016 22:08:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 191700] [carp] [bridge] CARP does not work on interface which belongs to a bridge Date: Tue, 29 Nov 2016 22:08:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: girgen@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 29 Nov 2016 22:08:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D191700 Palle Girgensohn changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |girgen@FreeBSD.org --- Comment #2 from Palle Girgensohn --- Is this still a problem? Is it related to 200319? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Tue Nov 29 22:14:16 2016 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 90A19C5CC16 for ; Tue, 29 Nov 2016 22:14:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8042619F8 for ; Tue, 29 Nov 2016 22:14:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uATMEGd9066293 for ; Tue, 29 Nov 2016 22:14:16 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Tue, 29 Nov 2016 22:14:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: girgen@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 29 Nov 2016 22:14:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 Palle Girgensohn changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |girgen@FreeBSD.org --- Comment #4 from Palle Girgensohn --- (In reply to dam from comment #3) Any progress with getting consensus? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Wed Nov 30 08:50:58 2016 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 2726BC5DDD5 for ; Wed, 30 Nov 2016 08:50:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16D0119AB for ; Wed, 30 Nov 2016 08:50:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAU8ovvV079219 for ; Wed, 30 Nov 2016 08:50:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Wed, 30 Nov 2016 08:50:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dam@my.gd X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 30 Nov 2016 08:50:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 --- Comment #5 from dam@my.gd --- (In reply to Palle Girgensohn from comment #4) Hello Palle, Ah there may have been a small misunderstanding here. My statement was more meant as a "the patch is made by a novice to RC and network.subr, likely needs review/consensus from devs". It didn't mean I was going to seek consensus -from the MLs for example- . I thought someone from net@ would take the ticket, review the patch and ens= ure it doesn't introduce any regression. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Wed Nov 30 08:56:35 2016 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 47160C5DF76 for ; Wed, 30 Nov 2016 08:56:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36D6D1D94 for ; Wed, 30 Nov 2016 08:56:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAU8uYhh091053 for ; Wed, 30 Nov 2016 08:56:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Wed, 30 Nov 2016 08:56:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: girgen@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 30 Nov 2016 08:56:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 --- Comment #6 from Palle Girgensohn --- Ah, OK. Good. So, hopefully someone will nurture this patch then. Any taker= s? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Wed Nov 30 10:13:11 2016 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 264DEC5D96F for ; Wed, 30 Nov 2016 10:13:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F0D17A4 for ; Wed, 30 Nov 2016 10:13:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uAUADAJX072311 for ; Wed, 30 Nov 2016 10:13:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Wed, 30 Nov 2016 10:13:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: easy, needs-qa, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: mfc-stable9? mfc-stable10? mfc-stable11? X-Bugzilla-Changed-Fields: keywords flagtypes.name bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 30 Nov 2016 10:13:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easy, needs-qa, patch Flags| |mfc-stable9?, | |mfc-stable10?, | |mfc-stable11? Status|New |Open --- Comment #7 from Kubilay Kocak --- (In reply to dam from comment #3) Presumably testing shows that both syntaxes now result in the correct (expected) behaviour. Can you confirm? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Wed Nov 30 21:59:27 2016 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 CC696C5E23B for ; Wed, 30 Nov 2016 21:59:27 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id AC50A1DB4 for ; Wed, 30 Nov 2016 21:59:27 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 6C5B634449; Wed, 30 Nov 2016 21:59:27 +0000 (UTC) Date: Wed, 30 Nov 2016 21:59:27 +0000 To: freebsd-net@freebsd.org From: "rstone (Ryan Stone)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFg/S78= MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 21:59:27 -0000 cnN0b25lIGFkZGVkIGEgc3Vic2NyaWJlcjogZnJlZWJzZC1uZXQtbGlzdC4KClJFVklTSU9OIERF VEFJTAogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9EODY4NQoKRU1BSUwgUFJFRkVSRU5D RVMKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvc2V0dGluZ3MvcGFuZWwvZW1haWxwcmVm ZXJlbmNlcy8KClRvOiByc3RvbmUKQ2M6IGZyZWVic2QtbmV0LWxpc3QsIGVtYXN0ZQo= From owner-freebsd-net@freebsd.org Wed Nov 30 22:04:19 2016 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 8768DC5E5CA for ; Wed, 30 Nov 2016 22:04:19 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 64BF6188A for ; Wed, 30 Nov 2016 22:04:19 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 23C37348F4; Wed, 30 Nov 2016 22:04:19 +0000 (UTC) Date: Wed, 30 Nov 2016 22:04:19 +0000 To: freebsd-net@freebsd.org From: "hselasky (Hans Petter Selasky)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFg/TOM= MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 22:04:19 -0000 aHNlbGFza3kgYWRkZWQgaW5saW5lIGNvbW1lbnRzLgoKSU5MSU5FIENPTU1FTlRTCgo+IGJ1Zl9y aW5nLmg6NzEKPiArCWlmIChici0+YnJfY29uc19oZWFkICE9IGJyLT5icl9wcm9kX2hlYWQpIHsK PiArCQlmb3IgKGkgPSBici0+YnJfY29uc19oZWFkICsgMTsgaSAhPSBici0+YnJfcHJvZF9oZWFk Owo+ICsJCSAgICBpID0gKChpICsgMSkgJiBici0+YnJfY29uc19tYXNrKSkKCnNob3VsZCAiYnIt PmJyX2NvbnNfaGVhZCArIDEiIGJlIG1hc2tlZCBieSBici0+YnJfY29uc19tYXNrID8/CgpSRVZJ U0lPTiBERVRBSUwKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDg2ODUKCkVNQUlMIFBS RUZFUkVOQ0VTCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL3NldHRpbmdzL3BhbmVsL2Vt YWlscHJlZmVyZW5jZXMvCgpUbzogcnN0b25lCkNjOiBoc2VsYXNreSwgZnJlZWJzZC1uZXQtbGlz dCwgZW1hc3RlCg== From owner-freebsd-net@freebsd.org Wed Nov 30 23:41:40 2016 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 BECA2C5EBAB for ; Wed, 30 Nov 2016 23:41:40 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 792E614E3 for ; Wed, 30 Nov 2016 23:41:40 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 38DCF33BC4; Wed, 30 Nov 2016 23:41:40 +0000 (UTC) Date: Wed, 30 Nov 2016 23:41:40 +0000 To: freebsd-net@freebsd.org From: "rstone (Ryan Stone)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: <26d1d780466ab064b7bd6bb0041f94be@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFg/Y7Q= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_26d1d780466ab064b7bd6bb0041f94be" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 23:41:40 -0000 --b1_26d1d780466ab064b7bd6bb0041f94be Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 cnN0b25lIHVwZGF0ZWQgdGhpcyByZXZpc2lvbiB0byBEaWZmIDIyNjMzLgpyc3RvbmUgYWRkZWQg YSBjb21tZW50LgoKCiAgRW5zdXJlIHdlIGRvbid0IHdhbGsgb2ZmIH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nJfcmluZ1tpXSA9PSBidWYpCisJCQkJcGFuaWMoImJ1Zj0lcCBhbHJlYWR5IGVucXVldWUgYXQg JWQgcHJvZD0lZCBjb25zPSVkIiwKKwkJCQkgICAgYnVmLCBpLCBici0+YnJfcHJvZF90YWlsLCBi ci0+YnJfY29uc190YWlsKTsKKwl9CiAjZW5kaWYJCiAJY3JpdGljYWxfZW50ZXIoKTsKIAlkbyB7 CgoKCkVNQUlMIFBSRUZFUkVOQ0VTCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL3NldHRp bmdzL3BhbmVsL2VtYWlscHJlZmVyZW5jZXMvCgpUbzogcnN0b25lCkNjOiBoc2VsYXNreSwgZnJl ZWJzZC1uZXQtbGlzdCwgZW1hc3RlCg== --b1_26d1d780466ab064b7bd6bb0041f94be Content-Type: text/x-patch; charset=utf-8; name="D8685.22633.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D8685.22633.patch" ZGlmZiAtLWdpdCBhL3N5cy9zeXMvYnVmX3JpbmcuaCBiL3N5cy9zeXMvYnVmX3JpbmcuaAotLS0g YS9zeXMvc3lzL2J1Zl9yaW5nLmgKKysrIGIvc3lzL3N5cy9idWZfcmluZy5oCkBAIC02NywxMSAr NjcsMTMgQEAKIAl1aW50MzJfdCBwcm9kX2hlYWQsIHByb2RfbmV4dCwgY29uc190YWlsOwogI2lm ZGVmIERFQlVHX0JVRlJJTkcKIAlpbnQgaTsKLQlmb3IgKGkgPSBici0+YnJfY29uc19oZWFkOyBp ICE9IGJyLT5icl9wcm9kX2hlYWQ7Ci0JICAgICBpID0gKChpICsgMSkgJiBici0+YnJfY29uc19t YXNrKSkKLQkJaWYoYnItPmJyX3JpbmdbaV0gPT0gYnVmKQotCQkJcGFuaWMoImJ1Zj0lcCBhbHJl YWR5IGVucXVldWUgYXQgJWQgcHJvZD0lZCBjb25zPSVkIiwKLQkJCSAgICBidWYsIGksIGJyLT5i cl9wcm9kX3RhaWwsIGJyLT5icl9jb25zX3RhaWwpOworCWlmIChici0+YnJfY29uc19oZWFkICE9 IGJyLT5icl9wcm9kX2hlYWQpIHsKKwkJZm9yIChpID0gKGJyLT5icl9jb25zX2hlYWQgKyAxKSAm IGJyLT5icl9jb25zX21hc2s7IGkgIT0gYnItPmJyX3Byb2RfaGVhZDsKKwkJICAgIGkgPSAoKGkg KyAxKSAmIGJyLT5icl9jb25zX21hc2spKQorCQkJaWYoYnItPmJyX3JpbmdbaV0gPT0gYnVmKQor CQkJCXBhbmljKCJidWY9JXAgYWxyZWFkeSBlbnF1ZXVlIGF0ICVkIHByb2Q9JWQgY29ucz0lZCIs CisJCQkJICAgIGJ1ZiwgaSwgYnItPmJyX3Byb2RfdGFpbCwgYnItPmJyX2NvbnNfdGFpbCk7CisJ fQogI2VuZGlmCQogCWNyaXRpY2FsX2VudGVyKCk7CiAJZG8gewoK --b1_26d1d780466ab064b7bd6bb0041f94be-- From owner-freebsd-net@freebsd.org Wed Nov 30 23:42:26 2016 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 298F6C5ED0D for ; Wed, 30 Nov 2016 23:42:26 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 088A5165C for ; Wed, 30 Nov 2016 23:42:26 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id BDFF933D78; Wed, 30 Nov 2016 23:42:25 +0000 (UTC) Date: Wed, 30 Nov 2016 23:42:25 +0000 To: freebsd-net@freebsd.org From: "rstone (Ryan Stone)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: <2f6c8087c004c67d3091cb6cd51f81ea@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFg/Y+E= MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 23:42:26 -0000 cnN0b25lIG1hcmtlZCBhbiBpbmxpbmUgY29tbWVudCBhcyBkb25lLgpyc3RvbmUgYWRkZWQgaW5s aW5lIGNvbW1lbnRzLgoKSU5MSU5FIENPTU1FTlRTCgo+IGhzZWxhc2t5IHdyb3RlIGluIGJ1Zl9y aW5nLmg6NzEKPiBzaG91bGQgImJyLT5icl9jb25zX2hlYWQgKyAxIiBiZSBtYXNrZWQgYnkgYnIt PmJyX2NvbnNfbWFzayA/PwoKQWJzb2x1dGVseSBjb3JyZWN0LiAgTmljZSBjYXRjaCwgdGhhbmsg eW91CgpSRVZJU0lPTiBERVRBSUwKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDg2ODUK CkVNQUlMIFBSRUZFUkVOQ0VTCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL3NldHRpbmdz L3BhbmVsL2VtYWlscHJlZmVyZW5jZXMvCgpUbzogcnN0b25lCkNjOiBoc2VsYXNreSwgZnJlZWJz ZC1uZXQtbGlzdCwgZW1hc3RlCg== From owner-freebsd-net@freebsd.org Thu Dec 1 04:37:16 2016 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 E0EB6C5F704 for ; Thu, 1 Dec 2016 04:37:16 +0000 (UTC) (envelope-from bounce-33521_HTML-358827075-55025-7292140-246@bounce.s7.exacttarget.com) Received: from df70.mta.exacttarget.com (df70.mta.exacttarget.com [13.111.2.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A904112EE for ; Thu, 1 Dec 2016 04:37:16 +0000 (UTC) (envelope-from bounce-33521_HTML-358827075-55025-7292140-246@bounce.s7.exacttarget.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=200608; d=breakbulk.com; h=Message-ID:Date:Subject:From:Reply-To:To:MIME-Version:Content-Type:List-Unsubscribe:List-ID; i=promero@breakbulk.com; bh=uQro+/aAMl9ORk6e3eOi5ojIIiE=; b=Uq8D6WHAcUnyKsm4mw9/vNYxzGwJsc2WjK2OvLVtv+5VdvzlaaE8MI4qwa2snMK5hY4m0GJ2d2pj /xO4u7yNB2XM/AkvZjsCXOACWBORT0iBovWPT3ltPoumvjsO0OT4AbUDaqyYLBPjlzYzg6osagwo dOw/5Ula645N6/yfi7M= Received: by df70.mta.exacttarget.com id h7ukga163hsf for ; Thu, 1 Dec 2016 04:37:23 +0000 (envelope-from ) X-Virus-Scanned: amavisd-new at orionsmtp-213.s7.exacttarget.com Message-ID: <2374c315-897d-4812-b138-745d5ef42f69@atl1s07mta841.xt.local> Date: Wed, 30 Nov 2016 22:37:15 -0600 Subject: Get Alerts for =?utf-8?Q?Asia=E2=80=99s?= Largest Event for Project Cargo & Breakbulk Industry From: Patrick Romero Reply-To: promero@breakbulk.com To: freebsd-net@freebsd.org MIME-Version: 1.0 X-Report-Abuse-To: abuse@pd25.com X-CSA-Complaints: whitelistcomplaints@eco.de x-job: 7292140_55025 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: Thu, 01 Dec 2016 04:37:17 -0000 Breakbulk China, Asia's largest exhibition and conference for the project c= argo and breakbulk industry, 13-16 March in Shanghai=2E Email not displaying correctly? View it in your browser http://go=2Epardot=2Ecom/webmail/272542/109867/c9fe= a37a3d9c14526b3540841abac1402a07b1ab828bb5c50c8e9fbc93bc8d22=2E Logistics is complicated=2E Finding new business doesn't have to be=2E The movement of project cargo and breakbulk goods involves complex logistic= s, months and even years of planning and multi-million dollar contracts=2E = Yours is a complicated job and in this tight economy, finding new business = is a top priority=2E We can help=2E >From 13-16 March 2017, Asia=E2=80=99s largest exhibition and conference for= the project cargo and breakbulk industry will bring together 6,000 industr= y professionals, 200 exhibitors and more than 300 shippers at Breakbulk Chi= na in Shanghai=2E Hear from shippers, forwarders and specialized transport providers, as well= as astute analysts, as they share their experiences and identify areas of = opportunity for new business and development=2E With a full exhibition hall= , you will be able to fill the 2 days with appointments that meet your busi= ness objectives=2E Find out more about exhibitors, sponsors, speakers and VIP Shippers=2E Sign Up for Alerts - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-28-= 92b/d8x/109867 Facebook - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5z6/d8z/10= 9867 Twitter - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5z8/d92/109= 867 LinkedIn - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5zb/d94/10= 9867 YouTube - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5zd/d96/109= 867 SoundCloud - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5zg/d98/= 109867 Instagram - http://go=2Epardot=2Ecom/e/272542/l-272542-2016-11-23-5zj/d9b/1= 09867 Copyright =C2=A9 2016, all rights reserved=2E Our mailing address is: Breakbulk Events & Media 2 Penn Plaza 12th Floor Newark, NJ 07105 unsubscribe from all emails http://go=2Epardot=2Ecom/unsubscribe/u/272542/c9fea37a3d9c14526b3540841abac= 1402a07b1ab828bb5c50c8e9fbc93bc8d22/109867 =20=20 From owner-freebsd-net@freebsd.org Thu Dec 1 08:23:52 2016 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 6670CC60CB9 for ; Thu, 1 Dec 2016 08:23:52 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 44ECB11EE for ; Thu, 1 Dec 2016 08:23:52 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 04A7A1373; Thu, 1 Dec 2016 08:23:52 +0000 (UTC) Date: Thu, 1 Dec 2016 08:23:52 +0000 To: freebsd-net@freebsd.org From: "hselasky (Hans Petter Selasky)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: <63cf8b5815300199d51e9cecba9aad0e@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFg/3hg= MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 08:23:52 -0000 aHNlbGFza3kgYWNjZXB0ZWQgdGhpcyByZXZpc2lvbi4KaHNlbGFza3kgYWRkZWQgYSByZXZpZXdl cjogaHNlbGFza3kuCmhzZWxhc2t5IGFkZGVkIGEgY29tbWVudC4KVGhpcyByZXZpc2lvbiBoYXMg YSBwb3NpdGl2ZSByZXZpZXcuCgoKICBMb29rcyBnb29kIHRvIG1lLgoKUkVWSVNJT04gREVUQUlM CiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL0Q4Njg1CgpFTUFJTCBQUkVGRVJFTkNFUwog IGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9zZXR0aW5ncy9wYW5lbC9lbWFpbHByZWZlcmVu Y2VzLwoKVG86IHJzdG9uZSwgaHNlbGFza3kKQ2M6IGhzZWxhc2t5LCBmcmVlYnNkLW5ldC1saXN0 LCBlbWFzdGUK From owner-freebsd-net@freebsd.org Thu Dec 1 09:09:56 2016 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 69119C6060D for ; Thu, 1 Dec 2016 09:09:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5822D154A for ; Thu, 1 Dec 2016 09:09:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB199t2v096026 for ; Thu, 1 Dec 2016 09:09:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Thu, 01 Dec 2016 09:09:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: easy, needs-qa, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dam@my.gd X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: mfc-stable9? mfc-stable10? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 01 Dec 2016 09:09:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 --- Comment #8 from dam@my.gd --- (In reply to Kubilay Kocak from comment #7) svnup'ing 10-STABLE now, applying patch, and getting back to you. I'm afraid our company has neither 9.x nor 11.x available for testing again= st these branches though. Anyone in a position to test against these ? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Dec 1 16:11:16 2016 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 17DA0C6070B for ; Thu, 1 Dec 2016 16:11:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F116C1146 for ; Thu, 1 Dec 2016 16:11:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB1GBFBS009868 for ; Thu, 1 Dec 2016 16:11:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 202510] [CARP] advertisements sourced from CARP IP cause double MASTER situations Date: Thu, 01 Dec 2016 16:11:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: easy, needs-qa, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dam@my.gd X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: mfc-stable9? mfc-stable10? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 01 Dec 2016 16:11:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D202510 --- Comment #9 from dam@my.gd --- (In reply to Kubilay Kocak from comment #7) Confirming behaviour on 10-STABLE (r309356) with my provided patch. patch =3D=3D root@bsd10:/usr/src/etc # patch < /tmp/network.subr.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- network.subr.orig 2015-08-24 14:10:15.188579000 +0000 |+++ network.subr.patched 2015-08-24 14:10:22.298347000 +0000 -------------------------- File to patch: network.subr Patching file network.subr using Plan A... Hunk #1 succeeded at 1091. Hunk #2 succeeded at 1144. done rc.conf =3D=3D ifconfig_vtnet0=3D"inet 46.[snip].253/25 -rxcsum -txcsum -tso -vlanhwtso -vlanhwcsum -vlanhwtag up" ipv4_addrs_vtnet0=3D"1.1.1.1/32" ifconfig_vtnet0_alias0=3D"1.1.1.2/32" ifconfig_vtnet0_alias1=3D"vhid 101 pass test advskew 50 1.1.1.3/32" ifconfig =3D=3D root@bsd10:~ # ifconfig vtnet0: flags=3D8943 metric= 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6804a8 ether f2:53:d5:fc:49:8a inet 46.[snip].253 netmask 0xffffff80 broadcast 46.182.42.255=20 inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1=20 inet 1.1.1.2 netmask 0xffffffff broadcast 1.1.1.2=20 inet 1.1.1.3 netmask 0xffffffff broadcast 1.1.1.3 vhid 101=20 nd6 options=3D29 media: Ethernet 10Gbase-T status: active carp: MASTER vhid 101 advbase 1 advskew 50 tcpdump =3D=3D root@bsd10:~ # tcpdump -ni vtnet0 vrrp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on vtnet0, link-type EN10MB (Ethernet), capture size 65535 bytes 16:04:27.942147 IP 46.[snip].253 > 224.0.0.18: VRRPv2, Advertisement, vrid = 101, prio 50, authtype none, intvl 1s, length 36 16:04:29.156181 IP 46.[snip].253 > 224.0.0.18: VRRPv2, Advertisement, vrid = 101, prio 50, authtype none, intvl 1s, length 36 16:04:30.358144 IP 46.[snip].253 > 224.0.0.18: VRRPv2, Advertisement, vrid = 101, prio 50, authtype none, intvl 1s, length 36 ^---- sourced with physical IP despite the use of ipv4_addrs_vtnet0 Can anyone confirm 9 and 11 branches ? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Thu Dec 1 17:53:10 2016 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 9D0F7C61473 for ; Thu, 1 Dec 2016 17:53:10 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D8B21AFC for ; Thu, 1 Dec 2016 17:53:09 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (97-123-24-15.albq.qwest.net [97.123.24.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id AEC2F19289A for ; Thu, 1 Dec 2016 17:53:08 +0000 (UTC) Subject: Re: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT To: freebsd-net@freebsd.org References: From: Sean Bruno Message-ID: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> Date: Thu, 1 Dec 2016 10:53:04 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PFOCGjnjAi1KG6vQUNom3O89XpU5GrkQb" 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, 01 Dec 2016 17:53:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PFOCGjnjAi1KG6vQUNom3O89XpU5GrkQb Content-Type: multipart/mixed; boundary="4pboO0tTiRdMGiP3bvgc6qU9xQ1x0GLH6"; protected-headers="v1" From: Sean Bruno To: freebsd-net@freebsd.org Message-ID: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> Subject: Re: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT References: In-Reply-To: --4pboO0tTiRdMGiP3bvgc6qU9xQ1x0GLH6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 11/27/16 12:40, Michael Knap wrote: > Preface: I've been a long-time linux user, and I am enjoying the BSD > experience. For the following scenario, I have reproduced these results= > with 3 or more cables which are known to be good. >=20 > Using FreeBSD 10.3 Stable : > FreeBSD 10.3-STABLE #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:2= 5 > UTC 2016 root@gauntlet > :/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.a= md64 >=20 > Also, this isn't a NIC, per se, as it is onboard, but I will call it a = NIC > or card or whatever. >=20 > Using em driver, though I don't know how to determine a driver version = (if > there is such a thing). >=20 > Basically, the card will not push gigabit, though it will work with > 100BaseTX. However, there seems to be more than just that as the chip-s= et > is advertised as a gigabit Ethernet controller. >=20 > When connected to a 100BaseTX switch, everything is good. Leaving it in= > autodetect mode, and connecting to a 1000baseTX switch (with good CAT6 > cable), the card's link state oscillates from link up and link down: >=20 > Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:41 freenas kernel: em0: link state changed to UP > Nov 27 13:07:41 freenas kernel: em0: link state changed to UP > Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:55 freenas kernel: em0: link state changed to UP > Nov 27 13:07:55 freenas kernel: em0: link state changed to UP > Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:58 freenas kernel: em0: link state changed to UP > Nov 27 13:07:58 freenas kernel: em0: link state changed to UP > Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN > Nov 27 13:08:01 freenas kernel: em0: link state changed to UP > Nov 27 13:08:01 freenas kernel: em0: link state changed to UP > Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN > Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN >=20 > If I issue ifconfig em0 media 100baseTX mediaopt full-duplex, then I h= ave > no carrier. > Also, ifconfig em0 media 1000baseT gives no carrier. > However, if I ifconfig em0 media 10baseT, then I can get an active link= =2E >=20 > Interestingly, man em(4) does not claim to support this chipset, though= it > seems that this chipset was once supported in either e1000 or igb for o= lder > freeBSD versions? >=20 > Now, at least from the driver's POV, I should be able to handle gigabit= , as >=20 > ifconfig -m em0 > em0: flags=3D8c02 metric 0 mtu 150= 0 > options=3D4219b > capabilities=3D5399b > ether 00:25:11:59:d4:be > inet 10.42.0.111 netmask 0xffffff00 broadcast 10.42.0.255 > nd6 options=3D9 > media: Ethernet 10baseT/UTP (10baseT/UTP ) > status: active > supported media: > media autoselect > media 1000baseT > media 1000baseT mediaopt full-duplex > media 100baseTX mediaopt full-duplex > media 100baseTX > media 10baseT/UTP mediaopt full-duplex > media 10baseT/UTP >=20 > However when connected to gigabit switch, any explicit declaration of m= edia > fails except for 10baseT, even the autoselect declaration fails with no= > carrier. >=20 > But remember, 100baseTX works out of the box on a 100Mbit switch. >=20 > So, those more experienced, can you shed some light on what is happenin= g? > I'm especially interested in the man em(4) result even though the chips= et > has been supported in the past, and intel does provide drivers for this= > chipset, though I'm not sure if I could compile them or not. BTW, my > switches are only consumer grade, unmanaged. Is that where I'm stuck? >=20 > Thanks for such an awesome license, operating system, and community. > _______________________________________________ Just so I know which device this specifically is, can you post "pciconf -lvbc" to a pastebin or dpaste type site so we can review which driver this should be using. Linux seems to use igb(4) for this instead of em(4= ). sean --4pboO0tTiRdMGiP3bvgc6qU9xQ1x0GLH6-- --PFOCGjnjAi1KG6vQUNom3O89XpU5GrkQb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQF8BAEBCgBmBQJYQGOAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kz74IAK6IOD9D4gy/3DIQUPj0S4z7 SiCk53QF0SSoITCSptF1XibqvlPGAYdJnHKtZe4l+mKYs5gDZx+9WVVdzWV8rYqw BukK4OC4qepdvl+7XuFib+cHSy64XCoAEs/NLk8is/2kx7xcpLceWXLsE59cmHOP +JJ35h/E4nx3YP0BOo6Mij0cThDARskep9f4YBruou9D5OeUwACdATvWmFnCle2E 7d6PNcSoEsHpdflQIPNs48HCGtZ+OamoSv4hL4nv+Cr3EMsInvNw1GFltUiG2GDH sZgGaDZ3oJSNF6qet2aryS0F/kbA2tqxOYMdv6I2a5UqlFdmKy5rHRYV5kw5lJM= =IIen -----END PGP SIGNATURE----- --PFOCGjnjAi1KG6vQUNom3O89XpU5GrkQb-- From owner-freebsd-net@freebsd.org Thu Dec 1 20:08:23 2016 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 CCB72C61412 for ; Thu, 1 Dec 2016 20:08:23 +0000 (UTC) (envelope-from jeffrey.e.pieper@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ORSMGA102.jf.intel.com", Issuer "Intel External Issuing CA 6A" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7B9147A; Thu, 1 Dec 2016 20:08:23 +0000 (UTC) (envelope-from jeffrey.e.pieper@intel.com) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 01 Dec 2016 12:07:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,726,1477983600"; d="scan'208";a="12333394" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga002.jf.intel.com with ESMTP; 01 Dec 2016 12:07:14 -0800 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 1 Dec 2016 12:07:14 -0800 Received: from orsmsx111.amr.corp.intel.com ([169.254.12.190]) by ORSMSX162.amr.corp.intel.com ([10.22.240.85]) with mapi id 14.03.0248.002; Thu, 1 Dec 2016 12:07:09 -0800 From: "Pieper, Jeffrey E" To: Sean Bruno , "freebsd-net@freebsd.org" Subject: RE: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT Thread-Topic: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT Thread-Index: AQHSS/vQj5igiKbtkUqEOjpdei6LvKDzhGig Date: Thu, 1 Dec 2016 20:07:08 +0000 Message-ID: <2A35EA60C3C77D438915767F458D656883995CC2@ORSMSX111.amr.corp.intel.com> References: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> In-Reply-To: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWRjNzk1YzgtNjQ1OC00MTRlLWI4MzctYjRmMjAxYTI3YTUyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkIyRXhIZCtid1dGNklPZlp3T1g2andRS290bUFZM2VOZEdrdXY1QkxSdDQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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, 01 Dec 2016 20:08:23 -0000 -----Original Message----- From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-net@freebsd.org] = On Behalf Of Sean Bruno Sent: Thursday, December 01, 2016 9:53 AM To: freebsd-net@freebsd.org Subject: Re: Intel 82567V-2 using em driver, no carrier or constant link-st= ate changes with 1000BaseT On 11/27/16 12:40, Michael Knap wrote: > Preface: I've been a long-time linux user, and I am enjoying the BSD > experience. For the following scenario, I have reproduced these results > with 3 or more cables which are known to be good. >=20 > Using FreeBSD 10.3 Stable : > FreeBSD 10.3-STABLE #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 > UTC 2016 root@gauntlet > :/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd= 64 >=20 > Also, this isn't a NIC, per se, as it is onboard, but I will call it a NI= C > or card or whatever. >=20 > Using em driver, though I don't know how to determine a driver version (i= f > there is such a thing). >=20 > Basically, the card will not push gigabit, though it will work with > 100BaseTX. However, there seems to be more than just that as the chip-set > is advertised as a gigabit Ethernet controller. >=20 > When connected to a 100BaseTX switch, everything is good. Leaving it in > autodetect mode, and connecting to a 1000baseTX switch (with good CAT6 > cable), the card's link state oscillates from link up and link down: >=20 > Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:38 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:41 freenas kernel: em0: link state changed to UP > Nov 27 13:07:41 freenas kernel: em0: link state changed to UP > Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:41 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:55 freenas kernel: em0: link state changed to UP > Nov 27 13:07:55 freenas kernel: em0: link state changed to UP > Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:56 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:58 freenas kernel: em0: link state changed to UP > Nov 27 13:07:58 freenas kernel: em0: link state changed to UP > Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN > Nov 27 13:07:59 freenas kernel: em0: link state changed to DOWN > Nov 27 13:08:01 freenas kernel: em0: link state changed to UP > Nov 27 13:08:01 freenas kernel: em0: link state changed to UP > Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN > Nov 27 13:08:02 freenas kernel: em0: link state changed to DOWN >=20 > If I issue ifconfig em0 media 100baseTX mediaopt full-duplex, then I hav= e > no carrier. > Also, ifconfig em0 media 1000baseT gives no carrier. > However, if I ifconfig em0 media 10baseT, then I can get an active link. >=20 > Interestingly, man em(4) does not claim to support this chipset, though i= t > seems that this chipset was once supported in either e1000 or igb for old= er > freeBSD versions? >=20 > Now, at least from the driver's POV, I should be able to handle gigabit, = as >=20 > ifconfig -m em0 > em0: flags=3D8c02 metric 0 mtu 1500 > options=3D4219b > capabilities=3D5399b > ether 00:25:11:59:d4:be > inet 10.42.0.111 netmask 0xffffff00 broadcast 10.42.0.255 > nd6 options=3D9 > media: Ethernet 10baseT/UTP (10baseT/UTP ) > status: active > supported media: > media autoselect > media 1000baseT > media 1000baseT mediaopt full-duplex > media 100baseTX mediaopt full-duplex > media 100baseTX > media 10baseT/UTP mediaopt full-duplex > media 10baseT/UTP >=20 > However when connected to gigabit switch, any explicit declaration of med= ia > fails except for 10baseT, even the autoselect declaration fails with no > carrier. >=20 > But remember, 100baseTX works out of the box on a 100Mbit switch. >=20 > So, those more experienced, can you shed some light on what is happening? > I'm especially interested in the man em(4) result even though the chipset > has been supported in the past, and intel does provide drivers for this > chipset, though I'm not sure if I could compile them or not. BTW, my > switches are only consumer grade, unmanaged. Is that where I'm stuck? >=20 > Thanks for such an awesome license, operating system, and community. > _______________________________________________ >Just so I know which device this specifically is, can you post "pciconf >-lvbc" to a pastebin or dpaste type site so we can review which driver >this should be using. Linux seems to use igb(4) for this instead of em(4)= . > >sean Sean, This is a client (em) part, and should be 10CE (Boazman/Boulder Creek). Jeff From owner-freebsd-net@freebsd.org Thu Dec 1 21:08:51 2016 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 3BAF6C61294 for ; Thu, 1 Dec 2016 21:08:51 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id F209B1474 for ; Thu, 1 Dec 2016 21:08:50 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id B140315A2; Thu, 1 Dec 2016 21:08:50 +0000 (UTC) Date: Thu, 1 Dec 2016 21:08:50 +0000 To: freebsd-net@freebsd.org From: "rstone (Ryan Stone)" Reply-to: D8685+325+e4f2116f95066c9b@reviews.freebsd.org Subject: [Differential] D8685: Fix a false positive in a buf_ring assert Message-ID: <23e98bd4e5fac48d220a1f5375bb3309@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , Thread-Topic: D8685: Fix a false positive in a buf_ring assert X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MDEzOTI4NDRhNGFhM2E4ZDMxNzFmNTdkMjdlIFhAkWI= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_23e98bd4e5fac48d220a1f5375bb3309" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 21:08:51 -0000 --b1_23e98bd4e5fac48d220a1f5375bb3309 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 VGhpcyByZXZpc2lvbiB3YXMgYXV0b21hdGljYWxseSB1cGRhdGVkIHRvIHJlZmxlY3QgdGhlIGNv bW1pdHRlZCBjaGFuZ2VzLgpyc3RvbmUgbWFya2VkIGFuIGlubGluZSBjb21tZW50IGFzIGRvbmUu CkNsb3NlZCBieSBjb21taXQgclMzMDkzNzI6IEZpeCBhIGZhbHNlIHBvc2l0aXZlIGluIGEgYnVm X3JpbmcgYXNzZXJ0IChhdXRob3JlZCBieSByc3RvbmUpLgoKQ0hBTkdFRCBQUklPUiBUTyBDT01N SVQKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDg2ODU/dnM9MjI2MzMmaWQ9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+ YnJfcHJvZF9oZWFkOworCQkgICAgaSA9ICgoaSArIDEpICYgYnItPmJyX2NvbnNfbWFzaykpCisJ CQlpZihici0+YnJfcmluZ1tpXSA9PSBidWYpCisJCQkJcGFuaWMoImJ1Zj0lcCBhbHJlYWR5IGVu cXVldWUgYXQgJWQgcHJvZD0lZCBjb25zPSVkIiwKKwkJCQkgICAgYnVmLCBpLCBici0+YnJfcHJv ZF90YWlsLCBici0+YnJfY29uc190YWlsKTsKKwl9CiAjZW5kaWYJCiAJY3JpdGljYWxfZW50ZXIo KTsKIAlkbyB7CgoKCkVNQUlMIFBSRUZFUkVOQ0VTCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qu b3JnL3NldHRpbmdzL3BhbmVsL2VtYWlscHJlZmVyZW5jZXMvCgpUbzogcnN0b25lLCBoc2VsYXNr eQpDYzogaHNlbGFza3ksIGZyZWVic2QtbmV0LWxpc3QsIGVtYXN0ZQo= --b1_23e98bd4e5fac48d220a1f5375bb3309 Content-Type: text/x-patch; charset=utf-8; name="D8685.22651.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D8685.22651.patch" ZGlmZiAtLWdpdCBhL2hlYWQvc3lzL3N5cy9idWZfcmluZy5oIGIvaGVhZC9zeXMvc3lzL2J1Zl9y aW5nLmgKLS0tIGEvaGVhZC9zeXMvc3lzL2J1Zl9yaW5nLmgKKysrIGIvaGVhZC9zeXMvc3lzL2J1 Zl9yaW5nLmgKQEAgLTY3LDExICs2NywxMyBAQAogCXVpbnQzMl90IHByb2RfaGVhZCwgcHJvZF9u ZXh0LCBjb25zX3RhaWw7CiAjaWZkZWYgREVCVUdfQlVGUklORwogCWludCBpOwotCWZvciAoaSA9 IGJyLT5icl9jb25zX2hlYWQ7IGkgIT0gYnItPmJyX3Byb2RfaGVhZDsKLQkgICAgIGkgPSAoKGkg KyAxKSAmIGJyLT5icl9jb25zX21hc2spKQotCQlpZihici0+YnJfcmluZ1tpXSA9PSBidWYpCi0J CQlwYW5pYygiYnVmPSVwIGFscmVhZHkgZW5xdWV1ZSBhdCAlZCBwcm9kPSVkIGNvbnM9JWQiLAot CQkJICAgIGJ1ZiwgaSwgYnItPmJyX3Byb2RfdGFpbCwgYnItPmJyX2NvbnNfdGFpbCk7CisJaWYg KGJyLT5icl9jb25zX2hlYWQgIT0gYnItPmJyX3Byb2RfaGVhZCkgeworCQlmb3IgKGkgPSAoYnIt PmJyX2NvbnNfaGVhZCArIDEpICYgYnItPmJyX2NvbnNfbWFzazsgaSAhPSBici0+YnJfcHJvZF9o ZWFkOworCQkgICAgaSA9ICgoaSArIDEpICYgYnItPmJyX2NvbnNfbWFzaykpCisJCQlpZihici0+ YnJfcmluZ1tpXSA9PSBidWYpCisJCQkJcGFuaWMoImJ1Zj0lcCBhbHJlYWR5IGVucXVldWUgYXQg JWQgcHJvZD0lZCBjb25zPSVkIiwKKwkJCQkgICAgYnVmLCBpLCBici0+YnJfcHJvZF90YWlsLCBi ci0+YnJfY29uc190YWlsKTsKKwl9CiAjZW5kaWYJCiAJY3JpdGljYWxfZW50ZXIoKTsKIAlkbyB7 Cgo= --b1_23e98bd4e5fac48d220a1f5375bb3309-- From owner-freebsd-net@freebsd.org Thu Dec 1 23:56:00 2016 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 BBE92C6246E; Thu, 1 Dec 2016 23:56:00 +0000 (UTC) (envelope-from jordancaraballo87@gmail.com) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) (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 6E23C175B; Thu, 1 Dec 2016 23:55:57 +0000 (UTC) (envelope-from jordancaraballo87@gmail.com) Received: by mail-qk0-x241.google.com with SMTP id x190so28498601qkb.0; Thu, 01 Dec 2016 15:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=qjaNJl1tNUlvHHPfgb6DniaPFb0SeNfUaHLVG4mocFM=; b=W7MVe7/JGx3+Ww+vElPNIOBEa+1q4XsNRUkfBUtMYKI2AybK9sKlYCwiG2q5m8+Nnq 6HrVYfXd1TcMtrr9cZLWHX8LY2doKmH+55FqAYeswqdsiwlk29GSeB0VOd0f0Dp6KFuB qcYF4Xa19L+ZD8hfjc0zEMK6tPXNtKSpksTFytTm6qGU0f4cpebYpaYwNkY9kCFep6le iqEzlXa7P0bUyRGVPqJd9/ajSGf6qp9J/U3kbIgGnpSIXiOz6bjpDVxdxSWpvzM3caN9 Ujth4gBevxtGBZsvDJpirmFrohsY4td3BXECRxRysP1yAay52EW5EecIkNO7KPvTzzaX BZGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=qjaNJl1tNUlvHHPfgb6DniaPFb0SeNfUaHLVG4mocFM=; b=NeFm0S2xBNw/4DcIxLgdXzJbH0rzt/A1yxzSIskJQ3fMjp+byiIS3QiB0ogncwMi38 abgxjaX5+yGfUYSIZbWM7PBUA2/xB83JT7hkiiGK5BirxUusxq8oEox+ZghfjYn5pB+G 8IVtdn7qeezuI2IlCtzvU+RiU1fqs4CmX1XPaO32zwBvFe823nwVlcJHrCjSD/Umsmdv MCcgot0BqxbnirzY+EMn1q9UTJfGEJ1G00v5VZWiSGyAC/hehJJZ/ZIS0rdS8yk5cI8f 8dDLkURGaoi36PHKAF+ozusFTKRb0WkDj0DVJlC5XJ0JIhJXoNxi8URWLktBRUkJm+aZ bkYg== X-Gm-Message-State: AKaTC00Q3yjMss+vj364rtdOalsl4KR26aC5cWc16UaiHO/pmNSZiTDhNEADrDfqM+C32Q== X-Received: by 10.55.116.135 with SMTP id p129mr40035180qkc.54.1480636556636; Thu, 01 Dec 2016 15:55:56 -0800 (PST) Received: from [192.168.1.5] (pool-96-241-162-208.washdc.fios.verizon.net. [96.241.162.208]) by smtp.gmail.com with ESMTPSA id 30sm1323246qth.14.2016.12.01.15.55.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 15:55:55 -0800 (PST) To: freebsd-net@freebsd.org, freebsd-hpc@freebsd.org, freebsd-performance@freebsd.org From: Jordan Caraballo Subject: netmap, netmap-fwd, and how many M packets-per-second? Message-ID: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> Date: Thu, 1 Dec 2016 19:55:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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, 01 Dec 2016 23:56:00 -0000 Feedback and/or tips and tricks more than welcome. We are trying to process huge amounts of small (64 bytes) pps through a router. So far results have not been as we expected. We have tested FreeBSD 10.3, 11.0, 11.0-STABLE, and 12.0-CURRENT with and without netmap. Based on netmap documentation we were expecting about 5.0M pps; alongside with the routing improvements from the freebsd routing proposal a total of 12.0M. Server Description: Dell PowerEdge R530 with 2 Intel(R) Xeon(R) E5­2695 CPU's, 18 cores per cpu. Equipped with a Chelsio T-580-CR dual port in an 8x slot. BIOS tweaks: Hyperthreading (or Logical Processors) is turned off. Current results are shown below. Additional configurations can be given upon request. Test Environment: 5 clients and 5 servers - 4 Dell C6100 and 2 Dell R420; each one equipped with 10G NICS (4 intel 8259X and 6 with mellanox connectx2). Script that execute the following on each host. #!/usr/local/bin/bash # Iterate through ports and start tests for ((i=1;i<=PORTS;i++)); do PORT=$(($PORT+1)) iperf3 -c 172.16.2.$IP -u -b10000m -i 0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & #iperf3 -c 172.16.2.$IP -i0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & done # FreeBSD 10.3 - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 1.9M 0 1.3M 194M 540k 0 57M 0 0 2.1M 0 1.5M 216M 556k 0 58M 0 0 1.8M 0 1.3M 192M 553k 0 58M 0 0 1.7M 0 1.1M 174M 542k 0 57M 0 0 1.9M 0 1.4M 204M 537k 0 56M 0 0 1.6M 0 1.1M 171M 550k 0 58M 0 0 1.6M 0 1.1M 173M 546k 0 57M 0 0 1.7M 0 1.1M 176M 564k 0 59M 0 0 2.0M 0 1.5M 212M 543k 0 57M 0 0 2.1M 0 1.5M 219M 557k 0 58M 0 0 1.9M 0 1.4M 205M 547k 0 57M 0 0 1.7M 0 1.2M 179M 553k 0 58M 0 0 # FreeBSD 11.0 - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 3.1M 0 1.8M 326M 1.3M 0 134M 0 0 2.6M 0 1.5M 269M 1.1M 0 116M 0 0 2.7M 0 1.5M 285M 1.2M 0 127M 0 0 2.4M 0 1.3M 257M 1.1M 0 119M 0 0 2.7M 0 1.5M 287M 1.3M 0 134M 0 0 2.5M 0 1.3M 262M 1.2M 0 127M 0 0 2.1M 0 1.1M 224M 1.0M 0 108M 0 0 2.7M 0 1.4M 285M 1.4M 0 143M 0 0 2.6M 0 1.3M 272M 1.3M 0 136M 0 0 2.5M 0 1.4M 265M 1.1M 0 120M 0 0 # FreeBSD 11.0-STABLE - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 1.9M 0 849k 195M 1.0M 0 107M 0 0 1.9M 0 854k 196M 1.0M 0 106M 0 0 1.9M 0 851k 196M 1.0M 0 107M 0 0 1.9M 0 851k 196M 1.0M 0 107M 0 0 1.9M 0 851k 196M 1.0M 0 107M 0 0 1.9M 0 852k 196M 1.0M 0 107M 0 0 1.9M 0 847k 195M 1.0M 0 107M 0 0 1.9M 0 836k 195M 1.0M 0 107M 0 0 1.9M 0 843k 195M 1.0M 0 107M 0 0 # FreeBSD 12.0-CURRENT - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 1.1M 259 0 115M 1.1M 0 115M 0 0 1.2M 273 0 124M 1.2M 0 124M 0 0 1.1M 200 0 112M 1.1M 0 112M 0 0 1.2M 290 0 122M 1.2M 0 122M 0 0 1.0M 132 0 107M 1.0M 0 107M 0 0 1.1M 303 0 118M 1.1M 0 118M 0 0 1.1M 278 0 112M 1.1M 0 112M 0 0 1.2M 243 0 122M 1.2M 0 122M 0 0 1.1M 168 0 112M 1.1M 0 112M 0 0 1.1M 161 0 112M 1.1M 0 112M 0 0 # FreeBSD 12.0-CURRENT + Netmap - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 1.4M 10 0 144M 1.4M 0 144M 0 0 1.5M 6 0 159M 1.5M 0 159M 0 0 1.4M 5 0 144M 1.4M 0 144M 0 0 1.5M 14 0 158M 1.5M 0 158M 0 0 1.4M 5 0 151M 1.4M 0 151M 0 0 1.4M 10 0 152M 1.4M 0 152M 0 0 1.4M 12 0 148M 1.4M 0 148M 0 0 1.5M 9 0 155M 1.5M 0 155M 0 0 1.4M 23 0 151M 1.4M 0 151M 0 0 1.4M 11 0 151M 1.4M 0 151M 0 0 # FreeBSD 12.0-CURRENT + Netmap + Tuning - 4 streams to 80 ports from each client (5) input (Total) output packets errs idrops bytes packets errs bytes colls drops 1.4M 15 0 145M 1.4M 0 145M 0 0 1.5M 18 0 157M 1.5M 0 157M 0 0 1.5M 10 0 156M 1.5M 0 156M 0 0 1.5M 15 0 154M 1.5M 0 154M 0 0 1.4M 13 0 146M 1.4M 0 146M 0 0 1.5M 15 0 156M 1.5M 0 156M 0 0 1.5M 9 0 155M 1.5M 0 155M 0 0 1.5M 13 0 153M 1.5M 0 153M 0 0 1.4M 14 0 145M 1.4M 0 145M 0 0 1.4M 17 0 151M 1.4M 0 151M 0 0 From owner-freebsd-net@freebsd.org Fri Dec 2 00:54:27 2016 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 027E3C60653 for ; Fri, 2 Dec 2016 00:54:26 +0000 (UTC) (envelope-from jim@netgate.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (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 BDF6E14E1 for ; Fri, 2 Dec 2016 00:54:26 +0000 (UTC) (envelope-from jim@netgate.com) Received: by mail-io0-x234.google.com with SMTP id j65so456176131iof.0 for ; Thu, 01 Dec 2016 16:54:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ADIs/vdA9OH10oR4poiOsXNs2L3YYn87HbUSXPzlUUE=; b=EFO6Xt68N92re2Dn4SAXU1mTelZR2hfYuSkHl/Ra5co51jmRdVFILeNcJuPw7YTCA0 4W4356kaXOB0RAxGQbHs/wypYYOihqxvQD/1FPNiDwzbAr+QSm6NNQTS9pMnBx+RnwbE znuRpg729mlYNnwYxLyz+Mdg/N2WKCIHIB3qo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ADIs/vdA9OH10oR4poiOsXNs2L3YYn87HbUSXPzlUUE=; b=HkpiMhO9k9zh7tspwrML9B+YA3I3QeiPuX2/5hxC5jIe9Jgrw2q2g7b9tUJIRHoUwX caGC8tvO8oTxzEkPPqckp6OaFW/LfkK9Lv/oCBGpNcicg207KMU7eg4WwxW6XhrFe4Cg oYPfRm4ID5KcR3DfIBUD69thpQ+oTfu1anP7tl/qmHdx1XszQ7A6XLqv4FLnITnRT3B9 h5ek8E8uyTxghtq0hMvAjF0viKS4z4cAs487ukHRqvWJ7FAqhrXkm/+ztz4pKrKXAsW6 KtnHeySxwksNZL6QtNCVn7uSFsI+q5+dmNaijMi3fjxqcxMa2fHQvRQnZGUfPBXVp+sA xlOw== X-Gm-Message-State: AKaTC02+NE/ql/32+QOaVjeIhW8S1s+EbFT78Yfb4CzwDMScYxr4WuZMSALxNwkHKxA0WQoQGXaHcedPJDbloBiY X-Received: by 10.36.190.6 with SMTP id i6mr483424itf.37.1480640065901; Thu, 01 Dec 2016 16:54:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.32.4 with HTTP; Thu, 1 Dec 2016 16:54:25 -0800 (PST) In-Reply-To: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> References: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> From: Jim Thompson Date: Thu, 1 Dec 2016 18:54:25 -0600 Message-ID: Subject: Re: netmap, netmap-fwd, and how many M packets-per-second? To: Jordan Caraballo 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, 02 Dec 2016 00:54:27 -0000 (I'm not subscribed to -hpc or -performance, so I've trimmed the recipients.) You're running iperf3 on an Ivy Bridge Xeon at 2.4GHz. -N (--no-delay) only applies to TCP, it disables Nagle's algorithm, so it doesn't apply for "-u" (--udp). In any case, iperf3 still attempts to use large enough frames to be able to fill the bandwidth limit (you've requested 'b10000m' =3D 10Gbps) with a minimum number of packets. It does this by writing as much data as will fit in the sockbuf (if it gets back EWOULDBLOCK) in a loop. https://github.com/esnet/iperf/blob/099244ec686b620393e9845478a554b1c7ca5c8= b/src/net.c#L251 A full sized ethernet frame is 1538 bytes on the wire (without any 802.1q tags). 1,000,000,000 b/s / (1,538 B * 8 b/B) =3D=3D 81,274 pps 10G is 812,743pps 40G is 3,250,975pps and you're quite near this (3.2Mpps) with the FreeBSD 11.0 setup. Are you sure you're not running a WITNESS/DEBUG kernel on 12-CURRENT? The (version of) netmap-fwd you have is (still) single-threaded, so you get one core. You probably also don't have the hw cksum offload parts for netmap that we did. You're seeing about 1.5Mpps and at 1538 byte frames (on the wire) that's around 18.5Gbps. try pkt_gen, it will generate the small frames you seek. Cheers, Jim On Thu, Dec 1, 2016 at 5:55 PM, Jordan Caraballo < jordancaraballo87@gmail.com> wrote: > Feedback and/or tips and tricks more than welcome. > > We are trying to process huge amounts of small (64 bytes) pps through a > router. So far results have not been as we expected. We have tested > FreeBSD 10.3, 11.0, 11.0-STABLE, and 12.0-CURRENT with and without > netmap. Based on netmap documentation we were expecting about 5.0M pps; > alongside with the routing improvements from the freebsd routing > proposal a total of 12.0M. > > Server Description: > > Dell PowerEdge R530 with 2 Intel(R) Xeon(R) E5=C2=AD2695 CPU's, 18 cores = per > cpu. Equipped with a Chelsio T-580-CR dual port in an 8x slot. > > BIOS tweaks: > > Hyperthreading (or Logical Processors) is turned off. > > Current results are shown below. Additional configurations can be given > upon request. > > Test Environment: > 5 clients and 5 servers - 4 Dell C6100 and 2 Dell R420; each one > equipped with 10G NICS (4 intel 8259X and 6 with mellanox connectx2). > > Script that execute the following on each host. > > #!/usr/local/bin/bash > # Iterate through ports and start tests > for ((i=3D1;i<=3DPORTS;i++)); do > PORT=3D$(($PORT+1)) > iperf3 -c 172.16.2.$IP -u -b10000m -i 0 -N -l$PKT -t$TIME -P$STREAMS > -p$PORT & > #iperf3 -c 172.16.2.$IP -i0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & > done > > # FreeBSD 10.3 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 1.3M 194M 540k 0 57M 0 0 > 2.1M 0 1.5M 216M 556k 0 58M 0 0 > 1.8M 0 1.3M 192M 553k 0 58M 0 0 > 1.7M 0 1.1M 174M 542k 0 57M 0 0 > 1.9M 0 1.4M 204M 537k 0 56M 0 0 > 1.6M 0 1.1M 171M 550k 0 58M 0 0 > 1.6M 0 1.1M 173M 546k 0 57M 0 0 > 1.7M 0 1.1M 176M 564k 0 59M 0 0 > 2.0M 0 1.5M 212M 543k 0 57M 0 0 > 2.1M 0 1.5M 219M 557k 0 58M 0 0 > 1.9M 0 1.4M 205M 547k 0 57M 0 0 > 1.7M 0 1.2M 179M 553k 0 58M 0 0 > > # FreeBSD 11.0 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 3.1M 0 1.8M 326M 1.3M 0 134M 0 0 > 2.6M 0 1.5M 269M 1.1M 0 116M 0 0 > 2.7M 0 1.5M 285M 1.2M 0 127M 0 0 > 2.4M 0 1.3M 257M 1.1M 0 119M 0 0 > 2.7M 0 1.5M 287M 1.3M 0 134M 0 0 > 2.5M 0 1.3M 262M 1.2M 0 127M 0 0 > 2.1M 0 1.1M 224M 1.0M 0 108M 0 0 > 2.7M 0 1.4M 285M 1.4M 0 143M 0 0 > 2.6M 0 1.3M 272M 1.3M 0 136M 0 0 > 2.5M 0 1.4M 265M 1.1M 0 120M 0 0 > # FreeBSD 11.0-STABLE - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 849k 195M 1.0M 0 107M 0 0 > 1.9M 0 854k 196M 1.0M 0 106M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 852k 196M 1.0M 0 107M 0 0 > 1.9M 0 847k 195M 1.0M 0 107M 0 0 > 1.9M 0 836k 195M 1.0M 0 107M 0 0 > 1.9M 0 843k 195M 1.0M 0 107M 0 0 > # FreeBSD 12.0-CURRENT - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.1M 259 0 115M 1.1M 0 115M 0 0 > 1.2M 273 0 124M 1.2M 0 124M 0 0 > 1.1M 200 0 112M 1.1M 0 112M 0 0 > 1.2M 290 0 122M 1.2M 0 122M 0 0 > 1.0M 132 0 107M 1.0M 0 107M 0 0 > 1.1M 303 0 118M 1.1M 0 118M 0 0 > 1.1M 278 0 112M 1.1M 0 112M 0 0 > 1.2M 243 0 122M 1.2M 0 122M 0 0 > 1.1M 168 0 112M 1.1M 0 112M 0 0 > 1.1M 161 0 112M 1.1M 0 112M 0 0 > # FreeBSD 12.0-CURRENT + Netmap - 4 streams to 80 ports from each client > (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 10 0 144M 1.4M 0 144M 0 0 > 1.5M 6 0 159M 1.5M 0 159M 0 0 > 1.4M 5 0 144M 1.4M 0 144M 0 0 > 1.5M 14 0 158M 1.5M 0 158M 0 0 > 1.4M 5 0 151M 1.4M 0 151M 0 0 > 1.4M 10 0 152M 1.4M 0 152M 0 0 > 1.4M 12 0 148M 1.4M 0 148M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.4M 23 0 151M 1.4M 0 151M 0 0 > 1.4M 11 0 151M 1.4M 0 151M 0 0 > # FreeBSD 12.0-CURRENT + Netmap + Tuning - 4 streams to 80 ports from > each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 15 0 145M 1.4M 0 145M 0 0 > 1.5M 18 0 157M 1.5M 0 157M 0 0 > 1.5M 10 0 156M 1.5M 0 156M 0 0 > 1.5M 15 0 154M 1.5M 0 154M 0 0 > 1.4M 13 0 146M 1.4M 0 146M 0 0 > 1.5M 15 0 156M 1.5M 0 156M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.5M 13 0 153M 1.5M 0 153M 0 0 > 1.4M 14 0 145M 1.4M 0 145M 0 0 > 1.4M 17 0 151M 1.4M 0 151M 0 0 > > _______________________________________________ > 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" From owner-freebsd-net@freebsd.org Fri Dec 2 01:00:08 2016 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 A6D9DC607E8; Fri, 2 Dec 2016 01:00:08 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) (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 1CF651649; Fri, 2 Dec 2016 01:00:08 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-lf0-x243.google.com with SMTP id p100so20624877lfg.2; Thu, 01 Dec 2016 17:00:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MDxyQiSYQFdmFFoNBZfre7b611ahJL++XZefXqGXG5A=; b=DGkYmLGy5yWW+mBF1+M6g4UB2dfrVCloRXfdWSLws26fVfGJjjW1x2c96I3Ub5nqw9 Hh5YdFzBjZZ7y2u+amwlvlS6KrscvP2KUlfo8+gkTHLv+oYM5pzFbJjyJYTKehsq+5yV reHVsdvlbIkXc/1wFkRp5+aUErX1rzLprwbhrHACStLjm2xqo23uh+wI5L1o9HEUFV+y 3jnDmktUSKQw6a7Jcd9enBcnu3HICebB4ci9xc+cHHAJ1zCjyC3DMm67UQPx/NuQu+ti w5dGdUcIcKDqkL0YPt7qHZy5AWkDQCYnfubNkDLY+9ijFLUzAGITXzT8YFfHyQZ/e4U7 7ZXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MDxyQiSYQFdmFFoNBZfre7b611ahJL++XZefXqGXG5A=; b=Io8ravib8V2naRdjb3j+FP99uuthJI68oiBYNWQudV1Tr1lgn7upiiTHUdq1/H6uSX A7tVX1Vz6OLsETW57KMD4BJpWeI1PytocwKkVbhKmCIcgxgxsUtCeuwFbxD2BhnT3OFa a8pQgudAJvKOHcOMPVCfpyFf7qsLxvNJuqwDoPs6n7AWdauA6ylcRC4A2zHETeIvLGo1 Bth2jYLtuQdf4cM+qtci9uTFBR/54G5WBsmvE4RQUBZViPQSnZgTXbNCSNUu5TFdE3v4 qnxXUeivPgEOUf5u9ECjJtahX3HsPdIiEYhduS7mLTVA3jY7OSclF50WLgWA2QsrJTo6 Uq5w== X-Gm-Message-State: AKaTC03t1eSeBex/QyXI5/CIkxIBnsYLzhYwyea7vdz2gyUwzQ761hH/ms/x8Tp3pdN/4OucV49/v1eOmtCmow== X-Received: by 10.25.130.149 with SMTP id e143mr15864736lfd.87.1480640406254; Thu, 01 Dec 2016 17:00:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.208.141 with HTTP; Thu, 1 Dec 2016 17:00:05 -0800 (PST) In-Reply-To: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> References: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> From: Navdeep Parhar Date: Thu, 1 Dec 2016 17:00:05 -0800 Message-ID: Subject: Re: netmap, netmap-fwd, and how many M packets-per-second? To: Jordan Caraballo Cc: "freebsd-net@freebsd.org" , freebsd-hpc@freebsd.org, freebsd-performance@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, 02 Dec 2016 01:00:08 -0000 How have you configured netmap-fwd? If you provide details on how the router or firewall is setup I can try similar experiments here. On Thu, Dec 1, 2016 at 3:55 PM, Jordan Caraballo wrote: > Feedback and/or tips and tricks more than welcome. > > We are trying to process huge amounts of small (64 bytes) pps through a > router. So far results have not been as we expected. We have tested > FreeBSD 10.3, 11.0, 11.0-STABLE, and 12.0-CURRENT with and without > netmap. Based on netmap documentation we were expecting about 5.0M pps; > alongside with the routing improvements from the freebsd routing > proposal a total of 12.0M. > > Server Description: > > Dell PowerEdge R530 with 2 Intel(R) Xeon(R) E5=C2=AD2695 CPU's, 18 cores = per > cpu. Equipped with a Chelsio T-580-CR dual port in an 8x slot. > > BIOS tweaks: > > Hyperthreading (or Logical Processors) is turned off. > > Current results are shown below. Additional configurations can be given > upon request. > > Test Environment: > 5 clients and 5 servers - 4 Dell C6100 and 2 Dell R420; each one > equipped with 10G NICS (4 intel 8259X and 6 with mellanox connectx2). > > Script that execute the following on each host. > > #!/usr/local/bin/bash > # Iterate through ports and start tests > for ((i=3D1;i<=3DPORTS;i++)); do > PORT=3D$(($PORT+1)) > iperf3 -c 172.16.2.$IP -u -b10000m -i 0 -N -l$PKT -t$TIME -P$STREAMS > -p$PORT & > #iperf3 -c 172.16.2.$IP -i0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & > done > > # FreeBSD 10.3 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 1.3M 194M 540k 0 57M 0 0 > 2.1M 0 1.5M 216M 556k 0 58M 0 0 > 1.8M 0 1.3M 192M 553k 0 58M 0 0 > 1.7M 0 1.1M 174M 542k 0 57M 0 0 > 1.9M 0 1.4M 204M 537k 0 56M 0 0 > 1.6M 0 1.1M 171M 550k 0 58M 0 0 > 1.6M 0 1.1M 173M 546k 0 57M 0 0 > 1.7M 0 1.1M 176M 564k 0 59M 0 0 > 2.0M 0 1.5M 212M 543k 0 57M 0 0 > 2.1M 0 1.5M 219M 557k 0 58M 0 0 > 1.9M 0 1.4M 205M 547k 0 57M 0 0 > 1.7M 0 1.2M 179M 553k 0 58M 0 0 > > # FreeBSD 11.0 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 3.1M 0 1.8M 326M 1.3M 0 134M 0 0 > 2.6M 0 1.5M 269M 1.1M 0 116M 0 0 > 2.7M 0 1.5M 285M 1.2M 0 127M 0 0 > 2.4M 0 1.3M 257M 1.1M 0 119M 0 0 > 2.7M 0 1.5M 287M 1.3M 0 134M 0 0 > 2.5M 0 1.3M 262M 1.2M 0 127M 0 0 > 2.1M 0 1.1M 224M 1.0M 0 108M 0 0 > 2.7M 0 1.4M 285M 1.4M 0 143M 0 0 > 2.6M 0 1.3M 272M 1.3M 0 136M 0 0 > 2.5M 0 1.4M 265M 1.1M 0 120M 0 0 > # FreeBSD 11.0-STABLE - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 849k 195M 1.0M 0 107M 0 0 > 1.9M 0 854k 196M 1.0M 0 106M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 852k 196M 1.0M 0 107M 0 0 > 1.9M 0 847k 195M 1.0M 0 107M 0 0 > 1.9M 0 836k 195M 1.0M 0 107M 0 0 > 1.9M 0 843k 195M 1.0M 0 107M 0 0 > # FreeBSD 12.0-CURRENT - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.1M 259 0 115M 1.1M 0 115M 0 0 > 1.2M 273 0 124M 1.2M 0 124M 0 0 > 1.1M 200 0 112M 1.1M 0 112M 0 0 > 1.2M 290 0 122M 1.2M 0 122M 0 0 > 1.0M 132 0 107M 1.0M 0 107M 0 0 > 1.1M 303 0 118M 1.1M 0 118M 0 0 > 1.1M 278 0 112M 1.1M 0 112M 0 0 > 1.2M 243 0 122M 1.2M 0 122M 0 0 > 1.1M 168 0 112M 1.1M 0 112M 0 0 > 1.1M 161 0 112M 1.1M 0 112M 0 0 > # FreeBSD 12.0-CURRENT + Netmap - 4 streams to 80 ports from each client = (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 10 0 144M 1.4M 0 144M 0 0 > 1.5M 6 0 159M 1.5M 0 159M 0 0 > 1.4M 5 0 144M 1.4M 0 144M 0 0 > 1.5M 14 0 158M 1.5M 0 158M 0 0 > 1.4M 5 0 151M 1.4M 0 151M 0 0 > 1.4M 10 0 152M 1.4M 0 152M 0 0 > 1.4M 12 0 148M 1.4M 0 148M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.4M 23 0 151M 1.4M 0 151M 0 0 > 1.4M 11 0 151M 1.4M 0 151M 0 0 > # FreeBSD 12.0-CURRENT + Netmap + Tuning - 4 streams to 80 ports from > each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 15 0 145M 1.4M 0 145M 0 0 > 1.5M 18 0 157M 1.5M 0 157M 0 0 > 1.5M 10 0 156M 1.5M 0 156M 0 0 > 1.5M 15 0 154M 1.5M 0 154M 0 0 > 1.4M 13 0 146M 1.4M 0 146M 0 0 > 1.5M 15 0 156M 1.5M 0 156M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.5M 13 0 153M 1.5M 0 153M 0 0 > 1.4M 14 0 145M 1.4M 0 145M 0 0 > 1.4M 17 0 151M 1.4M 0 151M 0 0 > > _______________________________________________ > 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" From owner-freebsd-net@freebsd.org Fri Dec 2 05:37:46 2016 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 2E88FC61D6B for ; Fri, 2 Dec 2016 05:37:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1672E18E6 for ; Fri, 2 Dec 2016 05:37:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB25bjxs033963 for ; Fri, 2 Dec 2016 05:37:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 206186] [patch][netgraph] New netgraph node for calculate IP IP6 TCP UDP checksums Date: Fri, 02 Dec 2016 05:37:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 02 Dec 2016 05:37:46 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206186 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: julian Date: Fri Dec 2 05:37:32 UTC 2016 New revision: 309386 URL: https://svnweb.freebsd.org/changeset/base/309386 Log: MFH: r303613 Man page for the new checksum netgraph module. PR: 206186 Submitted by: Dmitry Vagin Changes: _U stable/11/ stable/11/share/man/man4/ng_checksum.4 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Dec 2 05:39:51 2016 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 817C0C61F86 for ; Fri, 2 Dec 2016 05:39:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 691991D72 for ; Fri, 2 Dec 2016 05:39:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB25dpUY037145 for ; Fri, 2 Dec 2016 05:39:51 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 206186] [patch][netgraph] New netgraph node for calculate IP IP6 TCP UDP checksums Date: Fri, 02 Dec 2016 05:39:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 02 Dec 2016 05:39:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206186 --- Comment #5 from commit-hook@freebsd.org --- A commit references this bug: Author: julian Date: Fri Dec 2 05:39:10 UTC 2016 New revision: 309388 URL: https://svnweb.freebsd.org/changeset/base/309388 Log: MFH: r303613 Man page for the new checksum netgraph module. PR: 206186 Submitted by: Dmitry Vagin Changes: _U stable/10/ stable/10/share/man/man4/ng_checksum.4 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Dec 2 05:42:55 2016 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 ABD0AC5E3D7 for ; Fri, 2 Dec 2016 05:42:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC42138F for ; Fri, 2 Dec 2016 05:42:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB25gtOa051832 for ; Fri, 2 Dec 2016 05:42:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 206185] [netgraph][patch] refactoring ng_patch Date: Fri, 02 Dec 2016 05:42:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 02 Dec 2016 05:42:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206185 --- Comment #2 from commit-hook@freebsd.org --- A commit references this bug: Author: julian Date: Fri Dec 2 05:42:05 UTC 2016 New revision: 309389 URL: https://svnweb.freebsd.org/changeset/base/309389 Log: MFH: r303611 slite style changes. There is an incoming patch that rewrites a lot of this module and I want to get the style and whitespace changes in a separate commit (or maybe more). PR: 206185 Submitted by: Dmitry Vagin Changes: _U stable/10/ stable/10/sys/netgraph/ng_patch.c stable/10/sys/netgraph/ng_patch.h --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Dec 2 05:42:57 2016 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 3C569C5E3E7 for ; Fri, 2 Dec 2016 05:42:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C4E113AA for ; Fri, 2 Dec 2016 05:42:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB25gvPI051897 for ; Fri, 2 Dec 2016 05:42:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 206185] [netgraph][patch] refactoring ng_patch Date: Fri, 02 Dec 2016 05:42:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 02 Dec 2016 05:42:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206185 --- Comment #3 from commit-hook@freebsd.org --- A commit references this bug: Author: julian Date: Fri Dec 2 05:42:49 UTC 2016 New revision: 309390 URL: https://svnweb.freebsd.org/changeset/base/309390 Log: MFH: r303611 slite style changes. There is an incoming patch that rewrites a lot of this module and I want to get the style and whitespace changes in a separate commit (or maybe more). PR: 206185 Submitted by: Dmitry Vagin Changes: _U stable/11/ stable/11/sys/netgraph/ng_patch.c stable/11/sys/netgraph/ng_patch.h --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Dec 2 06:04:09 2016 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 EEA0BC5E9B1 for ; Fri, 2 Dec 2016 06:04:09 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C66841FBF for ; Fri, 2 Dec 2016 06:04:09 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [172.20.14.228] (50-207-184-2-static.hfc.comcastbusiness.net [50.207.184.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 0563919289A; Fri, 2 Dec 2016 06:04:07 +0000 (UTC) Subject: Re: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT To: "Pieper, Jeffrey E" , "freebsd-net@freebsd.org" References: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> <2A35EA60C3C77D438915767F458D656883995CC2@ORSMSX111.amr.corp.intel.com> From: Sean Bruno Message-ID: <9a33dbfb-179a-bd43-9dea-06707a3957e8@freebsd.org> Date: Thu, 1 Dec 2016 23:04:04 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2A35EA60C3C77D438915767F458D656883995CC2@ORSMSX111.amr.corp.intel.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oIfLrc0uEVL84g63PrjuSk1d8lGNSIqo1" 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, 02 Dec 2016 06:04:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oIfLrc0uEVL84g63PrjuSk1d8lGNSIqo1 Content-Type: multipart/mixed; boundary="tpHsqaJsFAp7aRhUdkjCr3OkKsmTMKpwS"; protected-headers="v1" From: Sean Bruno To: "Pieper, Jeffrey E" , "freebsd-net@freebsd.org" Message-ID: <9a33dbfb-179a-bd43-9dea-06707a3957e8@freebsd.org> Subject: Re: Intel 82567V-2 using em driver, no carrier or constant link-state changes with 1000BaseT References: <3b590d4f-5eeb-f4f7-8ce5-ee71807d6e14@freebsd.org> <2A35EA60C3C77D438915767F458D656883995CC2@ORSMSX111.amr.corp.intel.com> In-Reply-To: <2A35EA60C3C77D438915767F458D656883995CC2@ORSMSX111.amr.corp.intel.com> --tpHsqaJsFAp7aRhUdkjCr3OkKsmTMKpwS Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/01/16 13:07, Pieper, Jeffrey E wrote: > Sean, >=20 > This is a client (em) part, and should be 10CE (Boazman/Boulder Creek).= >=20 > Jeff Yeah, you're right. I think I transposed some numbers instead of copy/paste. Do you have this part lying around to test against? sean --tpHsqaJsFAp7aRhUdkjCr3OkKsmTMKpwS-- --oIfLrc0uEVL84g63PrjuSk1d8lGNSIqo1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQF8BAEBCgBmBQJYQQ7XXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kWIIH/jvhZX2kyk8xa6T9Ws6PjD3y a05qlPPEvxIYrkRMIuWi5Zu6ym2OpCANwzFg7PxxigV+lumW4fooirucOeAyqz5k w7U+xPMVEwE1C+zAHK6zyVYTcXwaCXxRKSfS2KZvrxOxpfPG7ub14u2s/pSa5xi6 AbeXxsITaSv/ZkS11nL3N88WH6yHf6o6M2EK68lTi6K0ibV1vw+xRcrydUbJ5vfa HoCpnFw70Klm3PD4TFNSlVomML8Wv3jTCJFT2gU8uVBRPq7LTzzsXFRzTHvFDLSJ pYB81RLqoWkhBh7+ZM+0vjMJhnSh7upoqwpvinPl1QUpvbhOxp7XDsNSec8iHlA= =Lu2Z -----END PGP SIGNATURE----- --oIfLrc0uEVL84g63PrjuSk1d8lGNSIqo1-- From owner-freebsd-net@freebsd.org Fri Dec 2 08:55:35 2016 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 A3CA7C62B61 for ; Fri, 2 Dec 2016 08:55:35 +0000 (UTC) (envelope-from jpa@semihalf.com) Received: from mail-qt0-x232.google.com (mail-qt0-x232.google.com [IPv6:2607:f8b0:400d:c0d::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 673A01848 for ; Fri, 2 Dec 2016 08:55:35 +0000 (UTC) (envelope-from jpa@semihalf.com) Received: by mail-qt0-x232.google.com with SMTP id n6so246064702qtd.1 for ; Fri, 02 Dec 2016 00:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KUl3vjzHYvhF7XhxZQNMQ7k6orHwQ/2vuHIUD5DWSWQ=; b=BYwWzBo4oYO4EVXkSL1j74QYZqRu43/DxfDLxGhG8TbJeWDmT59+xi6tvN8DFL3ZMM nio+T1rJub6bvlaWOqQ5MuzR1WEtM9hMfeGCCuPrl8iIAM1L9L+lfSEnwUQ3NCMeyUfa QLnexIbQv54gOrFJi6Nb82oP8Es4CvQuSJ5wCBHr088QzCe0tZE1SF5ccxlBb4Z1m1ia 7Gkoo4FJK3Al43gFCl+TyG9cbvPD0d44kZts/ZldmSofYIeklnFz+1WPMD4dMbwfIUMH Ah+Y4ubDTjbMMO5n7SlaTSB/WhCD+kmuBqdYb2EHwnm74DKaQWoABbv64lmckF7IOBF7 dV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KUl3vjzHYvhF7XhxZQNMQ7k6orHwQ/2vuHIUD5DWSWQ=; b=Rgk+Bscu5AQbWbx96WfdY+qLIYXMzbx/47/WjaUVHod2PLwLrRHYQ4jLxbhL0KY6MS 9lsxBbINSk22/QiT6yj5jiVF1yW6PsYK6MH0hGckQOnHzOnO6VEqhNVJUBwFW1MmBw7/ i60TXoMbPFXh7Y4qjLGln+d+xYyxNps4zHLjx+1epk9chxQR1If0wIs9Bjb7KKz2sE2m FS3BxEYpNZ0lNQpkRUw7GsLe8bTq+hw1NYfwfo3kuBMILtgJlojPvwT1mRFpx/lQDR5O BywP86ImzGiKlTYndK5uZ71Vqb3UCcW3BvV91j395tZLcF3+kTBbtkOd7nRWsg5mFolL GxGg== X-Gm-Message-State: AKaTC02KBJ+kXtBI9HlJ3JYFiwEuXVwKXGyl2a2ScbpLtXaDBriWf2y0OnZPk9Xw15Olr6W8b64LJ3MCv5WR5Q== X-Received: by 10.200.56.20 with SMTP id q20mr37023654qtb.178.1480668934251; Fri, 02 Dec 2016 00:55:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.38.15 with HTTP; Fri, 2 Dec 2016 00:55:03 -0800 (PST) In-Reply-To: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> References: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> From: Jakub Palider Date: Fri, 2 Dec 2016 09:55:03 +0100 Message-ID: Subject: Re: netmap, netmap-fwd, and how many M packets-per-second? To: Jordan Caraballo Cc: freebsd-net@freebsd.org, freebsd-hpc@freebsd.org, freebsd-performance@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, 02 Dec 2016 08:55:35 -0000 Hi, I have run some performance tests but not as router, which is your case, so some information might not be relevant: 0. validate your hw stats with what you get from the output 1. Try using FLOWTABLE option in your kernel config - this may kill your machine in -CURRENT, but it's worth checking 2. MTU set to some reasonably small value (~120) shall prevent from consolidating small packets into big frame 3. disable all kernel tracing (INVARIANTS, WITNESS, etc) 4. I read you tuned the system, but make sure there are enough resources 5. Check that context switches are not killing it Regardless on the above you might want profile the system with dtrace and export results to flamegraph, this will give you an idea what going on in the system and possibly locate the cause of the problem. It's definitely worth the effort. Jakub On Fri, Dec 2, 2016 at 12:55 AM, Jordan Caraballo < jordancaraballo87@gmail.com> wrote: > Feedback and/or tips and tricks more than welcome. > > We are trying to process huge amounts of small (64 bytes) pps through a > router. So far results have not been as we expected. We have tested > FreeBSD 10.3, 11.0, 11.0-STABLE, and 12.0-CURRENT with and without > netmap. Based on netmap documentation we were expecting about 5.0M pps; > alongside with the routing improvements from the freebsd routing > proposal a total of 12.0M. > > Server Description: > > Dell PowerEdge R530 with 2 Intel(R) Xeon(R) E5=C2=AD2695 CPU's, 18 cores = per > cpu. Equipped with a Chelsio T-580-CR dual port in an 8x slot. > > BIOS tweaks: > > Hyperthreading (or Logical Processors) is turned off. > > Current results are shown below. Additional configurations can be given > upon request. > > Test Environment: > 5 clients and 5 servers - 4 Dell C6100 and 2 Dell R420; each one > equipped with 10G NICS (4 intel 8259X and 6 with mellanox connectx2). > > Script that execute the following on each host. > > #!/usr/local/bin/bash > # Iterate through ports and start tests > for ((i=3D1;i<=3DPORTS;i++)); do > PORT=3D$(($PORT+1)) > iperf3 -c 172.16.2.$IP -u -b10000m -i 0 -N -l$PKT -t$TIME -P$STREAMS > -p$PORT & > #iperf3 -c 172.16.2.$IP -i0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & > done > > # FreeBSD 10.3 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 1.3M 194M 540k 0 57M 0 0 > 2.1M 0 1.5M 216M 556k 0 58M 0 0 > 1.8M 0 1.3M 192M 553k 0 58M 0 0 > 1.7M 0 1.1M 174M 542k 0 57M 0 0 > 1.9M 0 1.4M 204M 537k 0 56M 0 0 > 1.6M 0 1.1M 171M 550k 0 58M 0 0 > 1.6M 0 1.1M 173M 546k 0 57M 0 0 > 1.7M 0 1.1M 176M 564k 0 59M 0 0 > 2.0M 0 1.5M 212M 543k 0 57M 0 0 > 2.1M 0 1.5M 219M 557k 0 58M 0 0 > 1.9M 0 1.4M 205M 547k 0 57M 0 0 > 1.7M 0 1.2M 179M 553k 0 58M 0 0 > > # FreeBSD 11.0 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 3.1M 0 1.8M 326M 1.3M 0 134M 0 0 > 2.6M 0 1.5M 269M 1.1M 0 116M 0 0 > 2.7M 0 1.5M 285M 1.2M 0 127M 0 0 > 2.4M 0 1.3M 257M 1.1M 0 119M 0 0 > 2.7M 0 1.5M 287M 1.3M 0 134M 0 0 > 2.5M 0 1.3M 262M 1.2M 0 127M 0 0 > 2.1M 0 1.1M 224M 1.0M 0 108M 0 0 > 2.7M 0 1.4M 285M 1.4M 0 143M 0 0 > 2.6M 0 1.3M 272M 1.3M 0 136M 0 0 > 2.5M 0 1.4M 265M 1.1M 0 120M 0 0 > # FreeBSD 11.0-STABLE - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 849k 195M 1.0M 0 107M 0 0 > 1.9M 0 854k 196M 1.0M 0 106M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 852k 196M 1.0M 0 107M 0 0 > 1.9M 0 847k 195M 1.0M 0 107M 0 0 > 1.9M 0 836k 195M 1.0M 0 107M 0 0 > 1.9M 0 843k 195M 1.0M 0 107M 0 0 > # FreeBSD 12.0-CURRENT - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.1M 259 0 115M 1.1M 0 115M 0 0 > 1.2M 273 0 124M 1.2M 0 124M 0 0 > 1.1M 200 0 112M 1.1M 0 112M 0 0 > 1.2M 290 0 122M 1.2M 0 122M 0 0 > 1.0M 132 0 107M 1.0M 0 107M 0 0 > 1.1M 303 0 118M 1.1M 0 118M 0 0 > 1.1M 278 0 112M 1.1M 0 112M 0 0 > 1.2M 243 0 122M 1.2M 0 122M 0 0 > 1.1M 168 0 112M 1.1M 0 112M 0 0 > 1.1M 161 0 112M 1.1M 0 112M 0 0 > # FreeBSD 12.0-CURRENT + Netmap - 4 streams to 80 ports from each client > (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 10 0 144M 1.4M 0 144M 0 0 > 1.5M 6 0 159M 1.5M 0 159M 0 0 > 1.4M 5 0 144M 1.4M 0 144M 0 0 > 1.5M 14 0 158M 1.5M 0 158M 0 0 > 1.4M 5 0 151M 1.4M 0 151M 0 0 > 1.4M 10 0 152M 1.4M 0 152M 0 0 > 1.4M 12 0 148M 1.4M 0 148M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.4M 23 0 151M 1.4M 0 151M 0 0 > 1.4M 11 0 151M 1.4M 0 151M 0 0 > # FreeBSD 12.0-CURRENT + Netmap + Tuning - 4 streams to 80 ports from > each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 15 0 145M 1.4M 0 145M 0 0 > 1.5M 18 0 157M 1.5M 0 157M 0 0 > 1.5M 10 0 156M 1.5M 0 156M 0 0 > 1.5M 15 0 154M 1.5M 0 154M 0 0 > 1.4M 13 0 146M 1.4M 0 146M 0 0 > 1.5M 15 0 156M 1.5M 0 156M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.5M 13 0 153M 1.5M 0 153M 0 0 > 1.4M 14 0 145M 1.4M 0 145M 0 0 > 1.4M 17 0 151M 1.4M 0 151M 0 0 > > _______________________________________________ > 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" From owner-freebsd-net@freebsd.org Fri Dec 2 10:48:00 2016 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 0A719C611AC for ; Fri, 2 Dec 2016 10:48:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE75B16E1 for ; Fri, 2 Dec 2016 10:47:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB2Alx5Q008409 for ; Fri, 2 Dec 2016 10:47:59 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 206185] [netgraph][patch] refactoring ng_patch Date: Fri, 02 Dec 2016 10:48:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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, 02 Dec 2016 10:48:00 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206185 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: julian Date: Fri Dec 2 10:47:10 UTC 2016 New revision: 309408 URL: https://svnweb.freebsd.org/changeset/base/309408 Log: Changes to allow the patching of packets with an offset (and other change= s.. see man page) PR: 206185 Submitted by: Dmitry Vagin MFC after: 1 week Relnotes: yes (also ng_checksum node) Changes: head/share/man/man4/ng_patch.4 head/sys/netgraph/ng_patch.c head/sys/netgraph/ng_patch.h --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Fri Dec 2 12:16:14 2016 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 168F3C6237B; Fri, 2 Dec 2016 12:16:14 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (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 CE33A15BD; Fri, 2 Dec 2016 12:16:13 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x241.google.com with SMTP id f201so27070665oib.0; Fri, 02 Dec 2016 04:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JS3Jt6b7QflLiHAOqQRJjf+Ov20cCEY4J0XCR7cTdYI=; b=sgS9gIj5owIAjuYj6XtvoEpZQ9dKYpQS7kUngpl18uzSe2TWI1K1np3oWgyp6yzzCf aFGpGDJRp/cxu1kQDeI9kG1u9wmrFoTDUzBt0ZHJoD2JZhQvXEiK+Ca4kd0GFs3F+cPi 0EWIISyvHmJJD8YkHy4dU5F9paImRfulTT1ghBd4QhwPyEyE94XmJIbpWcdVaFTpCW15 TvpOfcwG1/3K2j5oXiFgyPPRZ8Lg03HCSGTjhh1T9TASythhuQudHLDnMpQ897iYiKgK 2/w/5u5RKdd9jUJgprifck1yHVhxyX45h0Pwej5Z255y4JaOtmPPNxkerKWGi/zdz2MU YmuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JS3Jt6b7QflLiHAOqQRJjf+Ov20cCEY4J0XCR7cTdYI=; b=BRXagHNKQWSmWMpR84dClwevX06ylbjs5qSZNUjZKSG2BmSPeK8jlzb3meL6BTwLUi XUxmRd1hqrtK8kP8OOftpGBqiTkH69+QPIbU9rm/Rv7QNoGoSwgtKrs+y5Z2+ynTFyFK zAn8mW3myTXcrdqvdSsZxJW27LPaw2eHtz5IrnO9eFcToDFNVTgZ+kQibxfzlTyVi5ki t/rxAdQEb7lYdCASJqdcZ20ID4POWON4ThhCCuHsdFr1iFbLOgElRFAzBga/WQGhzb8m G0WoouPjqXecl8JlbY2CehHlDCjvsVqvx1uwWNqVZDzcHlWSi0sOH3dUwfDp8fJJpxt9 2gCA== X-Gm-Message-State: AKaTC00IPK3QDtAX1wAJg+vOe1K/RYiyEGj+OTLkTcl2ASitBGEKIYrjLu4o1FBb/zp2eV09nnoFd05iUF5AuA== X-Received: by 10.202.235.78 with SMTP id j75mr22518632oih.74.1480680973110; Fri, 02 Dec 2016 04:16:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.200 with HTTP; Fri, 2 Dec 2016 04:16:12 -0800 (PST) In-Reply-To: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> References: <596e5c15-1a85-1fdc-ca88-11a0ccd5e125@gmail.com> From: Vincenzo Maffione Date: Fri, 2 Dec 2016 13:16:12 +0100 Message-ID: Subject: Re: netmap, netmap-fwd, and how many M packets-per-second? To: Jordan Caraballo Cc: "freebsd-net@freebsd.org" , freebsd-hpc@freebsd.org, freebsd-performance@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, 02 Dec 2016 12:16:14 -0000 Hi, If I'm getting it right, you are doing a test with 10 machines directly connected on the same LAN, using iperf to test the performance of the TCP/IP stack with your 10Gbit cards. But as far as I can see, netmap is not involved in your setup, you are not using it, aren't you? IOW , I don't understand what does that "+ Netmap" mean you our test description banner. Cheers, Vincenzo 2016-12-02 0:55 GMT+01:00 Jordan Caraballo : > Feedback and/or tips and tricks more than welcome. > > We are trying to process huge amounts of small (64 bytes) pps through a > router. So far results have not been as we expected. We have tested > FreeBSD 10.3, 11.0, 11.0-STABLE, and 12.0-CURRENT with and without > netmap. Based on netmap documentation we were expecting about 5.0M pps; > alongside with the routing improvements from the freebsd routing > proposal a total of 12.0M. > > Server Description: > > Dell PowerEdge R530 with 2 Intel(R) Xeon(R) E5=C2=AD2695 CPU's, 18 cores = per > cpu. Equipped with a Chelsio T-580-CR dual port in an 8x slot. > > BIOS tweaks: > > Hyperthreading (or Logical Processors) is turned off. > > Current results are shown below. Additional configurations can be given > upon request. > > Test Environment: > 5 clients and 5 servers - 4 Dell C6100 and 2 Dell R420; each one > equipped with 10G NICS (4 intel 8259X and 6 with mellanox connectx2). > > Script that execute the following on each host. > > #!/usr/local/bin/bash > # Iterate through ports and start tests > for ((i=3D1;i<=3DPORTS;i++)); do > PORT=3D$(($PORT+1)) > iperf3 -c 172.16.2.$IP -u -b10000m -i 0 -N -l$PKT -t$TIME -P$STREAMS > -p$PORT & > #iperf3 -c 172.16.2.$IP -i0 -N -l$PKT -t$TIME -P$STREAMS -p$PORT & > done > > # FreeBSD 10.3 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 1.3M 194M 540k 0 57M 0 0 > 2.1M 0 1.5M 216M 556k 0 58M 0 0 > 1.8M 0 1.3M 192M 553k 0 58M 0 0 > 1.7M 0 1.1M 174M 542k 0 57M 0 0 > 1.9M 0 1.4M 204M 537k 0 56M 0 0 > 1.6M 0 1.1M 171M 550k 0 58M 0 0 > 1.6M 0 1.1M 173M 546k 0 57M 0 0 > 1.7M 0 1.1M 176M 564k 0 59M 0 0 > 2.0M 0 1.5M 212M 543k 0 57M 0 0 > 2.1M 0 1.5M 219M 557k 0 58M 0 0 > 1.9M 0 1.4M 205M 547k 0 57M 0 0 > 1.7M 0 1.2M 179M 553k 0 58M 0 0 > > # FreeBSD 11.0 - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 3.1M 0 1.8M 326M 1.3M 0 134M 0 0 > 2.6M 0 1.5M 269M 1.1M 0 116M 0 0 > 2.7M 0 1.5M 285M 1.2M 0 127M 0 0 > 2.4M 0 1.3M 257M 1.1M 0 119M 0 0 > 2.7M 0 1.5M 287M 1.3M 0 134M 0 0 > 2.5M 0 1.3M 262M 1.2M 0 127M 0 0 > 2.1M 0 1.1M 224M 1.0M 0 108M 0 0 > 2.7M 0 1.4M 285M 1.4M 0 143M 0 0 > 2.6M 0 1.3M 272M 1.3M 0 136M 0 0 > 2.5M 0 1.4M 265M 1.1M 0 120M 0 0 > # FreeBSD 11.0-STABLE - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.9M 0 849k 195M 1.0M 0 107M 0 0 > 1.9M 0 854k 196M 1.0M 0 106M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 851k 196M 1.0M 0 107M 0 0 > 1.9M 0 852k 196M 1.0M 0 107M 0 0 > 1.9M 0 847k 195M 1.0M 0 107M 0 0 > 1.9M 0 836k 195M 1.0M 0 107M 0 0 > 1.9M 0 843k 195M 1.0M 0 107M 0 0 > # FreeBSD 12.0-CURRENT - 4 streams to 80 ports from each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.1M 259 0 115M 1.1M 0 115M 0 0 > 1.2M 273 0 124M 1.2M 0 124M 0 0 > 1.1M 200 0 112M 1.1M 0 112M 0 0 > 1.2M 290 0 122M 1.2M 0 122M 0 0 > 1.0M 132 0 107M 1.0M 0 107M 0 0 > 1.1M 303 0 118M 1.1M 0 118M 0 0 > 1.1M 278 0 112M 1.1M 0 112M 0 0 > 1.2M 243 0 122M 1.2M 0 122M 0 0 > 1.1M 168 0 112M 1.1M 0 112M 0 0 > 1.1M 161 0 112M 1.1M 0 112M 0 0 > # FreeBSD 12.0-CURRENT + Netmap - 4 streams to 80 ports from each client > (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 10 0 144M 1.4M 0 144M 0 0 > 1.5M 6 0 159M 1.5M 0 159M 0 0 > 1.4M 5 0 144M 1.4M 0 144M 0 0 > 1.5M 14 0 158M 1.5M 0 158M 0 0 > 1.4M 5 0 151M 1.4M 0 151M 0 0 > 1.4M 10 0 152M 1.4M 0 152M 0 0 > 1.4M 12 0 148M 1.4M 0 148M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.4M 23 0 151M 1.4M 0 151M 0 0 > 1.4M 11 0 151M 1.4M 0 151M 0 0 > # FreeBSD 12.0-CURRENT + Netmap + Tuning - 4 streams to 80 ports from > each client (5) > > input (Total) output > packets errs idrops bytes packets errs bytes colls drop= s > 1.4M 15 0 145M 1.4M 0 145M 0 0 > 1.5M 18 0 157M 1.5M 0 157M 0 0 > 1.5M 10 0 156M 1.5M 0 156M 0 0 > 1.5M 15 0 154M 1.5M 0 154M 0 0 > 1.4M 13 0 146M 1.4M 0 146M 0 0 > 1.5M 15 0 156M 1.5M 0 156M 0 0 > 1.5M 9 0 155M 1.5M 0 155M 0 0 > 1.5M 13 0 153M 1.5M 0 153M 0 0 > 1.4M 14 0 145M 1.4M 0 145M 0 0 > 1.4M 17 0 151M 1.4M 0 151M 0 0 > > _______________________________________________ > 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 From owner-freebsd-net@freebsd.org Fri Dec 2 15:23:50 2016 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 D5FD2C635FA for ; Fri, 2 Dec 2016 15:23:50 +0000 (UTC) (envelope-from Steven@stream-technologies.com) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0084.outbound.protection.outlook.com [104.47.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8E11C44 for ; Fri, 2 Dec 2016 15:23:43 +0000 (UTC) (envelope-from Steven@stream-technologies.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamtechnologiesuk.onmicrosoft.com; s=selector1-streamtechnologies-com01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=PXg6H4HAdQQt0EkAunYpO/n8jE40orsMWjvJ5JnnwK8=; b=hm4EEsHU0E8aBsdOR2M5kwqth4I+S4BZqOeZy0U7UiXe38aEJXVNYSjGq3WCgI2bW8jycTZW4xOD5EnemlY/rm7zG4F3neAVmcu45yLmW630/owUBNmOeNbpUhZzo/+8Lx7FMcm54b4JzSBJRXBBjY0acH0xR/aPaIax/1+HokI= Received: from DB5PR07MB1685.eurprd07.prod.outlook.com (10.166.13.14) by DB5PR07MB1688.eurprd07.prod.outlook.com (10.166.13.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.4; Fri, 2 Dec 2016 14:22:47 +0000 Received: from DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) by DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) with mapi id 15.01.0771.004; Fri, 2 Dec 2016 14:22:47 +0000 From: Steven Crangle To: Vincenzo Maffione CC: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Thread-Topic: Looking for some help with netmap/bhyve Thread-Index: AQHSRKuiOapzmKvhI0y8Pcsl7N08/KDmPxuAgAmeBLSAAAebAIAAJnrzgABMAwCABGOGsA== Date: Fri, 2 Dec 2016 14:22:47 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steven@stream-technologies.com; x-originating-ip: [212.20.240.118] x-ms-office365-filtering-correlation-id: 99fff871-83e7-4608-eff2-08d41abeb0c3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR07MB1688; x-microsoft-exchange-diagnostics: 1; DB5PR07MB1688; 7:8PfBJ/sggwVLoz5OzvBFlYKOr5cwLZQDYqhZ8weYup0rkReidrZOayAtT09zffL4Uf97nf1PcGjTnreBCfqQJAZwptmrkukRxQ25Hs4k/AgiIClUrJCG5DNFk+O1gGzggCLoyPuYLGpXA4nbVNzMklM2TcP6zV4p/ZpjmdP7Cy/ZtMZ43owPfH97NJZ0cN8S4mhfTBBO7b2QwS+550DAvwasr6GGif3zCqy0kuOI/uVmpahOu7f6BP9HmkeOJ/2tI31L8BwSwavoMkzwL+FeCxn4q0bKKv8F3ad5TWSuBkILC91K2YHSeEa5GEsji88UH5yslbEHuNHZyBlHvqbt0KQZlaaTaLACceiCKEF5DpDWdRDqrBbN2VRHKBnyGOjISACHgs8sL/PjvjRm+TlOtsCD/lIqczzYz7DD6aGYtfaVERbPQtlqM3fwXXg4mzs0EZfAuuEUufKh8gpnjA+qAg== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(158342451672863)(278428928389397)(166708455590820)(203790808753936)(266611908612381)(75325880899374)(211171220733660)(83272782819144); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(2016111802025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6043046)(6042181)(6072148); SRVR:DB5PR07MB1688; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1688; x-forefront-prvs: 0144B30E41 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916002)(189002)(377424004)(52314003)(43784003)(199003)(6506004)(7846002)(77096006)(16601075003)(101416001)(2900100001)(93886004)(2906002)(4326007)(122556002)(76576001)(92566002)(19627405001)(19273905006)(3280700002)(3660700001)(33656002)(105586002)(106356001)(102836003)(3846002)(6116002)(66066001)(86362001)(575784001)(189998001)(81166006)(81156014)(8676002)(97736004)(80792005)(4001150100001)(106116001)(9686002)(68736007)(8936002)(229853002)(39060400001)(606004)(38730400001)(5890100001)(54356999)(6916009)(76176999)(7736002)(2950100002)(7906003)(7696004)(74316002)(99936001)(110136003)(50986999)(5660300001)(7099028)(16866105001)(473944003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR07MB1688; H:DB5PR07MB1685.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: stream-technologies.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/mixed; boundary="_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_" MIME-Version: 1.0 X-OriginatorOrg: stream-technologies.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2016 14:22:47.5620 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 720fa073-5781-43bf-bc14-7bef2603ed21 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1688 X-Mailman-Approved-At: Fri, 02 Dec 2016 17:24:37 +0000 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, 02 Dec 2016 15:23:51 -0000 --_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Vincenzo, Figured I would reply to give you some more testing feedback! Ptnetmap is s= uccessfully working for us now on 11.0 RELEASE (stock src.txz from FreeBSD.= org) with the help of your patch! There were a few files missing from the p= atch though, so I've attached a revised one which should work incase it's o= f use to you! (might be a bit messy) I've attached a txt file with some testing results too , but in summary: 1) netmap with no ptnet or vale: between 65-70Kpps. 2) netmap with vale but no ptnet: between 121-160Kpps. 3) ptnetmap with vale: seems to vary quite alot between 7-15Mpps. All the tests were performed using pkt-gen with 60 byte packets. It's worth= noting that currently we're running the tests on a very old tired Sun Micr= o server(Sun Fire X2200 M2 with Quad Core Processor). Currently in the proc= ess of testing out our patch file on a clean 11.0 source on a much faster b= ox, so can run more detailed testing there using iperf etc if it's useful t= o you! I have also attached a few kernel traces, I tried to turn symbols on, but i= 'm not sure it worked 100% Will try and fix it for the next install so that= I can provide better crash dumps if we run into any bugs! The crashes att= ached only ever occured in setup number 2 above. Thanks again for your help! Kind Regards Steven ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione Sent: 29 November 2016 18:42:04 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Hi Steven, 2016-11-29 16:44 GMT+01:00 Steven Crangle >: Hi Vincenzo, No problem! We've decided that we will try testing with 11.0 too, as it wou= ld help us to have our test system locked to a specific version like 11.0 a= nd can hopefully help you with testing too. We'll compile netmap from sourc= e as advised, but I was wondering what steps we would take in order to port= the changes to bhyve/ptnetmap from HEAD into 11.0? I think you can get the patch containing my modifications to HEAD for bhyve= +vmm.ko+libvmmapi, that you can extract with the following command in my fr= eebsd git repository $ git diff 9e10acc0303003d8733a546bca60f242b7b0aa64 ptnet-head lib/libvmmap= i/ sys/amd64/ sys/modules/vmm/ usr.sbin/bhyve and apply that patch in your 11.0 FreeBSD tree. I've currently only tested with pkt-gen as our bhyve instances are pretty m= inimal right now, below are a few samples of the speeds seen in each of the= different configurations: which configurations? Using netmap on top of standard tap devices with no vale: vm1: 197.259100 main_thread [2325] 30.977 Kpps (32.435 Kpkts 15.569 Mbps in = 1047062 usec) 1.93 avg_batch 826 min_space 203.306126 main_thread [2325] 32.149 Kpps (32.411 Kpkts 15.557 Mbps in = 1008156 usec) 1.88 avg_batch 866 min_space 204.313055 main_thread [2325] 33.095 Kpps (33.324 Kpkts 15.996 Mbps in = 1006929 usec) 1.98 avg_batch 911 min_space vm2: 245.397418 main_thread [2325] 31.422 Kpps (33.262 Kpkts 15.966 Mbps in = 1058559 usec) 313.79 avg_batch 99999 min_space 246.429810 main_thread [2325] 31.254 Kpps (32.266 Kpkts 15.488 Mbps in = 1032392 usec) 319.47 avg_batch 99999 min_space 251.621436 main_thread [2325] 31.606 Kpps (33.329 Kpkts 15.998 Mbps in = 1054531 usec) 314.42 avg_batch 99999 min_space Be aware that you typically want to use netmap both in the VM and in the ho= st (to use VALE and ptnet). Here you are probably using netmap just in the = VM. Performance are however extremely low. When using netmap in both guest and host, with ptnet, you should be able to= get at least 10-30 Mpps from vm1 to vm2. After then trying to switch to the netmap in userspace/netmap in kernel spa= ce with ptnetmap, I realised I made a silly mistake and built from head ins= tead of the branch ptnet-head... haha So I'm currently doing a quick rebuil= d on the correct branch and will report back with the results from pkt-gen = using just vale, and also with the new ptnetmap changes! Ok, also consider that you can use the patch I indicated above against HEAD= . Cheers, Vincenzo Kind Regards ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione > Sent: 29 November 2016 11:52:18 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve Hi Steven, Thanks for your testing this in HEAD, good news to know that it works ok! I think there is not going to be much difference between HEAD and 11.0, bec= ause in the end bhyve code didn't really change (for the parts I touched), = and you need to use the latest netmap version (github) anyway, irrespective= of whether you are testing on 10.3, 11.0, head, etc. In other words, you w= ould be testing approximately the same code. Anyway, if you happen to test = 11.0 by chance please let me know. What kind of tests did you perform? netmap applications (e.g. pkt-gen), or = netperf/iperf standard TCP/IP tools? Could you please share the performance number you got for configurations (A= ) and (B) (or just the one you tried)? I think it is useful to compare your results with the ones I collected here= (see the performance evaluation section): https://wiki.freebsd.org/DevSummit/201609?action=3DAttachFile&do=3Dview&tar= get=3D20160923-freebsd-summit-ptnet.pdf Regarding the crashes, thanks for reporting, I would be nice if you could d= escribe in more detail how you trigger them (with some higher likelyhood); = also, compiling the kernel with debug symbols should help in understanding = which part of the code is involved in the crash. Cheers, Vincenzo 2016-11-29 12:26 GMT+01:00 Steven Crangle >: Hi Vincenzo! Thank you so much for your help! With your instructions I've managed to get= a set of bhyves up and running with netmap working properly within them! I= chose to go with the recent version of head instead of 10.3. I will also = try and build a version on 11.0 if I get chance! I will make sure and ask any further questions on the github page for netma= p, but while I'm emailing, I've attached a text file containing a few kerne= l page fault errors I've ran into. They don't happen repeatedly. They seem = to just happen randomly if I try to shut the process down and possibly catc= h netmap in an incorrect state! Figured they might be useful to you. If I f= igure out what the error is myself I will try and help out! And thanks again for your help! Kind Regards ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com ________________________________ From: Vincenzo Maffione > Sent: 23 November 2016 08:33:11 To: Steven Crangle Cc: FreeBSD Net Subject: Re: Looking for some help with netmap/bhyve 2016-11-22 11:31 GMT+01:00 Steven Crangle >: Hi, I've recently been trying to boot up several bhyves so that I can test netm= ap communication between instances. The problem is, no matter what configur= ation I try, the guest vm running in bhyve completely hangs and becomes unu= sable as soon as a packet hits the netmap interface. When testing with pkt-= gen, the TX side successfully starts sending packets, but the RX side will = reliable freeze with the only option being killing the bhyve process. The bhyve command used for the above test was: bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er1vol -s 3,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 4,virtio-net,tap4= -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip= er2vol -s 3,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 4,virtio-net,tap5= -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 For this test the host OS was FreeBSD-11.0-p3 and the guest OS was FreeBSD-= 11.0-p3. After failing to get this solution working, I pulled down the source from t= he following url and installed it on the host box: https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ I then ran the following commands to try and bring up the machines using th= e ptnetmap interface (the guest still running 11.0p3) : bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper1vol -s 2:0,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v= iper2vol -s 2:0,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 2:1,ptnetmap-= memdev -s 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 With the above commands the vm's fail to boot with the following message: ptnet_init: failed to get ptnetmap Output in /var/log/messages seems to just show the ptnetmap driver allocati= ng one RX/TX ring for each vm, while bringing the device up, the device the= n goes down and the above error is seen in the console. Is there something I'm doing wrong with regards to running netmap or ptnetm= ap within a bhyve? Any pointers in the right direction will be much appreci= ated! Kind Regards Steven Hi Steven, The code you are looking at is the final code released by my gsoc 2016 pr= oject at the end of August 2016. However, I've been working on that for a w= hile after the gsoc, so that code is not updated anymore. My modification b= asically involves two subsystems: netmap and bhyve. The updates to netmap are already available in HEAD. The updates to bhyve a= re not yet upstream, as we are in the process to review that with the bhyve= maintainers. Anyway, you need two sources to get the latest code: 1) https://github.com/luigirizzo/netmap for the latest netmap code, that yo= u could also compile as an external kernel module. 2) https://github.com/vmaffione/freebsd to get the updates to bhyve (and vm= m.ko). You can use this as the host system. There are two branches here: pt= net-10.3, and ptnet-head. My original code was developed under FreeBSD 10.3= , so a first possibility is to try this as the host system (using the ptnet= -10.3 branch). The other branch (ptnet-head) contains a porting of the work= to a recent version of HEAD. I would be very glad if you could test the co= de also on FreeBSD 11. We support two combinations of bhyve networking with netmap: (A) virtio-net + netmap: that is something like "-s 2:0,virtio-net,vale0:= 0" in the bhyve command line. (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev -s 2= :2,ptnet,vale0:0" in the bhyve command line. so you may want to try A first (netmap backend in user-space, slower) and t= hen B (netmap backend in kernel-space, faster). Sorry about the confusion on the code repositories, I'll try also to update= the wiki page (and/or the gsoc svn repo) to reflect these updates. It's pe= rfectly ok for me to discuss these issues here in the ML, however for more = detailed/low-level discussion and support about problems you are running in= to, feel free to open Github issues here https://github.com/luigirizzo/netm= ap. Cheers, Vincenzo ________________________________ [Stream Logo] Steven Crangle Systems Developer | Stream Technologies | Glasgow, UK [http://www.stream-technologies.com/img/phone.png] +44 (0)844 800 8520 | [http://www.stream-technologies.com/img/mouse.png] www.stream-technologies.com _______________________________________________ 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" -- Vincenzo Maffione -- Vincenzo Maffione -- Vincenzo Maffione --_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_ Content-Type: text/x-patch; name="ptnetmap-11.0.patch" Content-Description: ptnetmap-11.0.patch Content-Disposition: attachment; filename="ptnetmap-11.0.patch"; size=1559319; creation-date="Fri, 02 Dec 2016 14:17:48 GMT"; modification-date="Fri, 02 Dec 2016 14:17:48 GMT" Content-Transfer-Encoding: base64 ZGlmZiAtdSAtciAtTiB1c3Ivc3JjLy5hcmNjb25maWcgL3Vzci9zcmMvLmFyY2NvbmZpZwotLS0g dXNyL3NyYy8uYXJjY29uZmlnCTIwMTYtMDktMjkgMDA6MjY6MzYuMDAwMDAwMDAwICswMTAwCisr KyAvdXNyL3NyYy8uYXJjY29uZmlnCTE5NzAtMDEtMDEgMDE6MDA6MDAuMDAwMDAwMDAwICswMTAw CkBAIC0xLDUgKzAsMCBAQAotewotCSJyZXBvc2l0b3J5LmNhbGxzaWduIiA6ICJTIiwKLQkicGhh YnJpY2F0b3IudXJpIiA6ICJodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvIiwKLQkiaGlzdG9y eS5pbW11dGFibGUiIDogdHJ1ZQotfQpkaWZmIC11IC1yIC1OIHVzci9zcmMvLmFyY2xpbnQgL3Vz ci9zcmMvLmFyY2xpbnQKLS0tIHVzci9zcmMvLmFyY2xpbnQJMjAxNi0wOS0yOSAwMDoyNjozNi4w MDAwMDAwMDAgKzAxMDAKKysrIC91c3Ivc3JjLy5hcmNsaW50CTE5NzAtMDEtMDEgMDE6MDA6MDAu MDAwMDAwMDAwICswMTAwCkBAIC0xLDI1ICswLDAgQEAKLXsKLSAgImV4Y2x1ZGUiOiAiKGNvbnRy aWJ8Y3J5cHRvKSIsCi0gICJsaW50ZXJzIjogewotICAgICJweXRob24iOiB7Ci0gICAgICAidHlw ZSI6ICJwZXA4IiwKLSAgICAgICJpbmNsdWRlIjogIihcXC5weSQpIgotICAgIH0sCi0gICAgInNw ZWxsaW5nIjogewotICAgICAgInR5cGUiOiAic3BlbGxpbmciCi0gICAgfSwKLSAgICAiY2htb2Qi OiB7Ci0gICAgICAidHlwZSI6ICJjaG1vZCIKLSAgICB9LAotICAgICJtZXJnZS1jb25mbGljdCI6 IHsKLSAgICAgICJ0eXBlIjogIm1lcmdlLWNvbmZsaWN0IgotICAgIH0sCi0gICAgImZpbGVuYW1l IjogewotICAgICAgInR5cGUiOiAiZmlsZW5hbWUiCi0gICAgfSwKLSAgICAianNvbiI6IHsKLSAg ICAgICJ0eXBlIjogImpzb24iLAotICAgICAgImluY2x1ZGUiOiAiKFxcLmFyY2xpbnR8XFwuanNv biQpIgotICAgIH0KLSAgfQotfQpkaWZmIC11IC1yIC1OIHVzci9zcmMvT29wcy5yZWogL3Vzci9z cmMvT29wcy5yZWoKLS0tIHVzci9zcmMvT29wcy5yZW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wlzaXplX3QJbG93bWVtOworCXNpemVfdAlo aWdobWVtOworCWNoYXIJKmJhc2VhZGRyOworCWNoYXIJKm5hbWU7Cit9OworCisjZGVmaW5lCUNS RUFURSh4KSAgc3lzY3RsYnluYW1lKCJody52bW0uY3JlYXRlIiwgTlVMTCwgTlVMTCwgKHgpLCBz dHJsZW4oKHgpKSkKKyNkZWZpbmUJREVTVFJPWSh4KSBzeXNjdGxieW5hbWUoImh3LnZtbS5kZXN0 cm95IiwgTlVMTCwgTlVMTCwgKHgpLCBzdHJsZW4oKHgpKSkKKworc3RhdGljIGludAordm1fZGV2 aWNlX29wZW4oY29uc3QgY2hhciAqbmFtZSkKK3sKKyAgICAgICAgaW50IGZkLCBsZW47CisgICAg ICAgIGNoYXIgKnZtZmlsZTsKKworCWxlbiA9IHN0cmxlbigiL2Rldi92bW0vIikgKyBzdHJsZW4o bmFtZSkgKyAxOworCXZtZmlsZSA9IG1hbGxvYyhsZW4pOworCWFzc2VydCh2bWZpbGUgIT0gTlVM TCk7CisJc25wcmludGYodm1maWxlLCBsZW4sICIvZGV2L3ZtbS8lcyIsIG5hbWUpOworCisgICAg ICAgIC8qIE9wZW4gdGhlIGRldmljZSBmaWxlICovCisgICAgICAgIGZkID0gb3Blbih2bWZpbGUs IE9fUkRXUiwgMCk7CisKKwlmcmVlKHZtZmlsZSk7CisgICAgICAgIHJldHVybiAoZmQpOworfQor CitpbnQKK3ZtX2NyZWF0ZShjb25zdCBjaGFyICpuYW1lKQoreworCisJcmV0dXJuIChDUkVBVEUo KGNoYXIgKiluYW1lKSk7Cit9CisKK3N0cnVjdCB2bWN0eCAqCit2bV9vcGVuKGNvbnN0IGNoYXIg Km5hbWUpCit7CisJc3RydWN0IHZtY3R4ICp2bTsKKworCXZtID0gbWFsbG9jKHNpemVvZihzdHJ1 Y3Qgdm1jdHgpICsgc3RybGVuKG5hbWUpICsgMSk7CisJYXNzZXJ0KHZtICE9IE5VTEwpOworCisJ dm0tPmZkID0gLTE7CisJd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7CisJc3RydWN0IHZtX2V4 aXQJdm1fZXhpdDsKK307CisKK3N0cnVjdCB2bV9leGNlcHRpb24geworCWludAkJY3B1aWQ7CisJ aW50CQl2ZWN0b3I7CisJdWludDMyX3QJZXJyb3JfY29kZTsKKwlpbnQJCWVycm9yX2NvZGVfdmFs aWQ7CisJaW50CQlyZXN0YXJ0X2luc3RydWN0aW9uOworfTsKKworc3RydWN0IHZtX2xhcGljX21z aSB7CisJdWludDY0X3QJbXNnOworCXVpbnQ2NF90CWFkZHI7Cit9OworCitzdHJ1Y3Qgdm1fbGFw aWNfaXJxIHsKKwlpbnQJCWNwdWlkOworCWludAkJdmVjdG9yOworfTsKKworc3RydWN0IHZtX2lv YXBpY19pcnEgeworCWludAkJaXJxOworfTsKKworc3RydWN0IHZtX2lzYV9pcnEgeworCWludAkJ YXRwaWNfaXJxOworCWludAkJaW9hcGljX2lycTsKK307CisKK3N0cnVjdCB2bV9pc2FfaXJxX3Ry aWdnZXIgeworCWludAkJYXRwaWNfaXJxOworCWVudW0gdm1faW50cl90cmlnZ2VyIHRyaWdnZXI7 Cit9OworCitzdHJ1Y3Qgdm1fY2FwYWJpbGl0eSB7CisJaW50CQljcHVpZDsKKwllbnVtIHZtX2Nh cF90eXBlIGNhcHR5cGU7CisJaW50CQljYXB2YWw7CisJaW50CQlhbGxjcHVzOworfTsKKworc3Ry dWN0IHZtX3BwdGRldiB7CisJaW50CQlidXM7CisJaW50CQlzbG90OworCWludAkJZnVuYzsKK307 CisKK3N0cnVjdCB2bV9wcHRkZXZfbW1pbyB7CisJaW50CQlidXM7CisJaW50CQlzbG90OworCWlu dAkJZnVuYzsKKwl2bV9wYWRkcl90CWdwYTsKKwl2bV9wYWRkcl90CWhwYTsKKwlzaXplX3QJCWxl bjsKK307CisKK3N0cnVjdCB2bV9wcHRkZXZfbXNpIHsKKwlpbnQJCXZjcHU7CisJaW50CQlidXM7 CisJaW50CQlzbG90OworCWludAkJZnVuYzsKKwlpbnQJCW51bXZlYz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8gKmNvcHlpbmZvLAorICAgIGludCBudW1fY29weWluZm8s IGludCAqZmF1bHQpCit7CisJaW50IGVycm9yLCBpZHgsIG51c2VkOworCXNpemVfdCBuLCBvZmYs IHJlbWFpbmluZzsKKwl2b2lkICpodmEsICpjb29raWU7CisJdWludDY0X3QgZ3BhOworCisJYnpl cm8oY29weWluZm8sIHNpemVvZihzdHJ1Y3Qgdm1fY29weWluZm8pICogbnVtX2NvcHlpbmZvKTsK KworCW51c2VkID0gMDsKKwlyZW1haW5pbmcgPSBsZW47CisJd2hpbGUgKHJlbWFpbmluZyA+IDAp IHsKKwkJS0FTU0VSVChudXNlZCA8IG51bV9jb3B5aW5mbywgKCJpbnN1ZmZpY2llbnQgdm1fY29w eWluZm8iKSk7CisJCWVycm9yID0gdm1fZ2xhMmdwYSh2bSwgdmNwdWlkLCBwYWdpbmcsIGdsYSwg cHJvdCwgJmdwYSwgZmF1bHQpOworCQlpZiAoZXJyb3IgfHwgKmZhdWx0KQorCQkJcmV0dXJuIChl cnJvcik7CisJCW9mZiA9IGdwYSAmIFBBR0VfTUFTSzsKKwkJbiA9IG1pbihyZW1haW5pbmcsIFBB R0VfU0laRSAtIG9mZik7CisJCWNvcHlpbmZvW251c2VkXS5ncGEgPSBncGE7CisJCWNvcHlpbmZv W251c2VkXS5sZW4gPSBuOworCQlyZW1haW5pbmcgLT0gbjsKKwkJZ2xhICs9IG47CisJCW51c2Vk Kys7CisJfQorCisJZm9yIChpZHggPSAwOyBpZHggPCBudXNlZDsgaWR4KyspIHsKKwkJaHZhID0g dm1fZ3BhX2hvbGQodm0sIHZjcHVpZCwgY29weWluZm9baWR4XS5ncGEsCisJCSAgICBjb3B5aW5m b1tpZHhdLmxlbiwgcHJvdCwgJmNvb2tpZSk7CisJCWlmIChodmEgPT0gTlVMTCkKKwkJCWJyZWFr OworCQljb3B5aW5mb1tpZHhdLmh2YSA9IGh2YTsKKwkJY29weWluZm9baWR4XS5jb29raWUgPSBj b29raWU7CisJfQorCisJ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csIHVuc2lnbmVkIGludCBoZWFkKQoreworCXN0cnVjdCBuZXRt YXBfcmluZyAqcmluZyA9IGtyaW5nLT5yaW5nOworCXN0cnVjdCBuZXRtYXBfc2xvdCAqc2xvdCA9 IHJpbmctPnNsb3QgKyBoZWFkOworCisJZm9yICg7OykgeworCQloZWFkID0gbm1fbmV4dChoZWFk LCBrcmluZy0+bmtyX251bV9zbG90cyAtIDEpOworCQlpZiAoIShzbG90LT5mbGFncyAmIE5TX01P UkVGUkFHKSB8fCBoZWFkID09IHJpbmctPnRhaWwpIHsKKwkJCWJyZWFrOworCQl9CisJCXNsb3Qg PSByaW5nLT5zbG90ICsgaGVhZDsKKwl9CisKKwlyZXR1cm4gaGVhZDsKK30KKworc3RhdGljIGlu bGluZSBzdHJ1Y3QgbWJ1ZiAqCitwdG5ldF9yeF9zbG90KHN0cnVjdCBtYnVmICptdGFpbCwgdWlu dDhfdCAqbm1idWYsIHVuc2lnbmVkIGludCBubWJ1Zl9sZW4pCit7CisJdWludDhfdCAqbWRhdGEg PSBtdG9kKG10YWlsLCB1aW50OF90ICopICsgbXRhaWwtPm1fbGVuOworCisJZG8geworCQl1bnNp Z25lZCBpbnQgY29weTsKKworCQlpZiAobXRhaWwtPm1fbGVuID09IE1DTEJZVEVTKSB7CisJCQlz dHJ1Y3QgbWJ1ZiAqbWY7CisKKwkJCW1mID0gbV9nZXRjbChNX05PV0FJVCwgTVRfREFUQSwgMCk7 CisJCQlpZiAodW5saWtlbHkoIW1mKSkgeworCQkJCXJldHVybiBOVUxMOworCQkJfQorCisJCQlt dGFpbC0+bV9uZXh0ID0gbWY7CisJCQltdGFpbCA9IG1mOworCQkJbWRhdGEgPSBtdG9kKG10YWls LCB1aW50OF90ICopOworCQkJbXRhaWwtPm1fbGVuID0gMDsKKwkJfQorCisJCWNvcHkgPSBNQ0xC WVRFUyAtIG10YWlsLT5tX2xlbjsKKwkJaWYgKG5tYnVmX2xlbiA8IGNvcHkpIHsKKwkJCWNvcHkg PS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GVzY3JpcHRvciwgdGhlIHByb2Nlc3MgaXNz dWVzIGFuIGlvY3RsKCkgdG8gaWRlbnRpZnkKICAqID4gICAgdGhlIGludGVyZmFjZSB0aGF0IHNo b3VsZCByZXBvcnQgZXZlbnRzIHRvIHRoZSBmaWxlIGRlc2NyaXB0b3IuCkBAIC0yOTksMTggKzMw MiwxNyBAQAogICogICAgICAgICAgICAgICAgbmV0bWFwX3RyYW5zbWl0KCkKICAqICAgICAgICAg ICAgICAgICAgbmEtPm5tX25vdGlmeSAgPT0gbmV0bWFwX25vdGlmeSgpCiAgKiAgICAgICAgICAg MikgaW9jdGwoTklPQ1JYU1lOQykvbmV0bWFwX3BvbGwoKSBpbiBwcm9jZXNzIGNvbnRleHQKLSAq ICAgICAgICAgICAgICAgIGtyaW5nLT5ubV9zeW5jKCkgPT0gbmV0bWFwX3J4c3luY19mcm9tX2hv c3RfY29tcGF0CisgKiAgICAgICAgICAgICAgICBrcmluZy0+bm1fc3luYygpID09IG5ldG1hcF9y eHN5bmNfZnJvbV9ob3N0CiAgKiAgICAgICAgICAgICAgICAgIG5ldG1hcF9yeHN5bmNfZnJvbV9o b3N0KG5hLCBOVUxMLCBOVUxMKQogICogICAgLSB0eCB0byBob3N0IHN0YWNrCiAgKiAgICAgICAg ICAgaW9jdGwoTklPQ1RYU1lOQykvbmV0bWFwX3BvbGwoKSBpbiBwcm9jZXNzIGNvbnRleHQKLSAq ICAgICAgICAgICAgIGtyaW5nLT5ubV9zeW5jKCkgPT0gbmV0bWFwX3R4c3luY190b19ob3N0X2Nv bXBhdAorICogICAgICAgICAgICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfdHhzeW5jX3Rv X2hvc3QKICAqICAgICAgICAgICAgICAgbmV0bWFwX3R4c3luY190b19ob3N0KG5hKQotICogICAg ICAgICAgICAgICAgIE5NX1NFTkRfVVAoKQotICogICAgICAgICAgICAgICAgICAgRnJlZUJTRDog bmEtPmlmX2lucHV0KCkgPT0gPz8gWFhYCisgKiAgICAgICAgICAgICAgICAgbm1fb3Nfc2VuZF91 cCgpCisgKiAgICAgICAgICAgICAgICAgICBGcmVlQlNEOiBuYS0+aWZfaW5wdXQoKSA9PSBldGhl cl9pbnB1dCgpCiAgKiAgICAgICAgICAgICAgICAgICBsaW51eDogbmV0aWZfcngoKSB3aXRoIE5N X01BR0lDX1BSSU9SSVRZX1JYCiAgKgogICoKLSAqCiAgKiAgICAgICAgICAgICAgIC09IFNZU1RF TSBERVZJQ0UgV0lUSCBHRU5FUklDIFNVUFBPUlQgPS0KICAqCiAgKiAgICBuYSA9PSBOQShpZnAp ID09IGdlbmVyaWNfbmV0bWFwX2FkYXB0ZXIgY3JlYXRlZCBpbiBnZW5lcmljX25ldG1hcF9hdHRh Y2goKQpAQCAtMzE5LDEwICszMjEsMTEgQEAKICAqICAgICAgIGNvbmN1cnJlbnRseToKICAqICAg ICAgICAgICAxKSBpb2N0bChOSU9DVFhTWU5DKS9uZXRtYXBfcG9sbCgpIGluIHByb2Nlc3MgY29u dGV4dAogICogICAgICAgICAgICAgICBrcmluZy0+bm1fc3luYygpID09IGdlbmVyaWNfbmV0bWFw X3R4c3luYygpCi0gKiAgICAgICAgICAgICAgICAgICBsaW51eDogICBkZXZfcXVldWVfeG1pdCgp IHdpdGggTk1fTUFHSUNfUFJJT1JJVFlfVFgKLSAqICAgICAgICAgICAgICAgICAgICAgICBnZW5l cmljX25kb19zdGFydF94bWl0KCkKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgb3JpZy4g ZGV2LiBzdGFydF94bWl0Ci0gKiAgICAgICAgICAgICAgICAgICBGcmVlQlNEOiBuYS0+aWZfdHJh bnNtaXQoKSA9PSBvcmlnLiBkZXYgaWZfdHJhbnNtaXQKKyAqICAgICAgICAgICAgICAgICAgIG5t X29zX2dlbmVyaWNfeG1pdF9mcmFtZSgpCisgKiAgICAgICAgICAgICAgICAgICAgICAgbGludXg6 ICAgZGV2X3F1ZXVlX3htaXQoKSB3aXRoIE5NX01BR0lDX1BSSU9SSVRZX1RYCisgKiAgICAgICAg ICAgICAgICAgICAgICAgICAgIGlmcC0+bmRvX3N0YXJ0X3htaXQgPT0gZ2VuZXJpY19uZG9fc3Rh cnRfeG1pdCgpCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbmEtPnNhdmVfc3Rh cnRfeG1pdCA9PSBvcmlnLiBkZXYuIHN0YXJ0X3htaXQKKyAqICAgICAgICAgICAgICAgICAgICAg ICBGcmVlQlNEOiBuYS0+aWZfdHJhbnNtaXQoKSA9PSBvcmlnLiBkZXYgaWZfdHJhbnNtaXQKICAq ICAgICAgICAgICAyKSBnZW5lcmljX21idWZfZGVzdHJ1Y3RvcigpCiAgKiAgICAgICAgICAgICAg ICAgICBuYS0+bm1fbm90aWZ5KCkgPT0gbmV0bWFwX25vdGlmeSgpCiAgKiAgICAtIHJ4IGZyb20g bmV0bWFwIHVzZXJzcGFjZToKQEAgLTMzMywyNCArMzM2LDE1IEBACiAgKiAgICAgICAgICAgICAg IGdlbmVyaWNfcnhfaGFuZGxlcigpCiAgKiAgICAgICAgICAgICAgICAgICBtYnFfc2FmZV9lbnF1 ZXVlKCkKICAqICAgICAgICAgICAgICAgICAgIG5hLT5ubV9ub3RpZnkoKSA9PSBuZXRtYXBfbm90 aWZ5KCkKLSAqICAgIC0gcnggZnJvbSBob3N0IHN0YWNrOgotICogICAgICAgIGNvbmN1cnJlbnRs eToKKyAqICAgIC0gcnggZnJvbSBob3N0IHN0YWNrCisgKiAgICAgICAgRnJlZUJTRDogc2FtZSBh cyBuYXRpdmUKKyAqICAgICAgICBMaW51eDogc2FtZSBhcyBuYXRpdmUgZXhjZXB0OgogICogICAg ICAgICAgIDEpIGhvc3Qgc3RhY2sKLSAqICAgICAgICAgICAgICAgbGludXg6IGdlbmVyaWNfbmRv X3N0YXJ0X3htaXQoKQotICogICAgICAgICAgICAgICAgICAgbmV0bWFwX3RyYW5zbWl0KCkKLSAq ICAgICAgICAgICAgICAgRnJlZUJTRDogaWZwLT5pZl9pbnB1dCgpID09IG5ldG1hcF90cmFuc21p dAotICogICAgICAgICAgICAgICBib3RoOgotICogICAgICAgICAgICAgICAgICAgICAgIG5hLT5u bV9ub3RpZnkoKSA9PSBuZXRtYXBfbm90aWZ5KCkKLSAqICAgICAgICAgICAyKSBpb2N0bChOSU9D UlhTWU5DKS9uZXRtYXBfcG9sbCgpIGluIHByb2Nlc3MgY29udGV4dAotICogICAgICAgICAgICAg ICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfcnhzeW5jX2Zyb21faG9zdF9jb21wYXQKLSAq ICAgICAgICAgICAgICAgICAgbmV0bWFwX3J4c3luY19mcm9tX2hvc3QobmEsIE5VTEwsIE5VTEwp Ci0gKiAgICAtIHR4IHRvIGhvc3Qgc3RhY2s6Ci0gKiAgICAgICAgICAgaW9jdGwoTklPQ1RYU1lO QykvbmV0bWFwX3BvbGwoKSBpbiBwcm9jZXNzIGNvbnRleHQKLSAqICAgICAgICAgICAgIGtyaW5n LT5ubV9zeW5jKCkgPT0gbmV0bWFwX3R4c3luY190b19ob3N0X2NvbXBhdAotICogICAgICAgICAg ICAgICBuZXRtYXBfdHhzeW5jX3RvX2hvc3QobmEpCi0gKiAgICAgICAgICAgICAgICAgTk1fU0VO RF9VUCgpCi0gKiAgICAgICAgICAgICAgICAgICBGcmVlQlNEOiBuYS0+aWZfaW5wdXQoKSA9PSA/ Pz8gWFhYCi0gKiAgICAgICAgICAgICAgICAgICBsaW51eDogbmV0aWZfcngoKSB3aXRoIE5NX01B R0lDX1BSSU9SSVRZX1JYCisgKiAgICAgICAgICAgICAgIGRldl9xdWV1ZV94bWl0KCkgd2l0aG91 dCBOTV9NQUdJQ19QUklPUklUWV9UWAorICogICAgICAgICAgICAgICAgICAgaWZwLT5uZG9fc3Rh cnRfeG1pdCA9PSBnZW5lcmljX25kb19zdGFydF94bWl0KCkKKyAqICAgICAgICAgICAgICAgICAg ICAgICBuZXRtYXBfdHJhbnNtaXQoKQorICogICAgICAgICAgICAgICAgICAgICAgICAgICBuYS0+ bm1fbm90aWZ5KCkgPT0gbmV0bWFwX25vdGlmeSgpCisgKiAgICAtIHR4IHRvIGhvc3Qgc3RhY2sg KHNhbWUgYXMgbmF0aXZlKToKICAqCiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAt PSBWQUxFID0tCkBAIC0zNzEsNyArMzY1LDcgQEAKICAqICAgICAgICAgZnJvbSBob3N0IHN0YWNr OgogICogICAgICAgICAgICAgbmV0bWFwX3RyYW5zbWl0KCkKICAqICAgICAgICAgICAgICAgIG5h LT5ubV9ub3RpZnkoKSA9PSBuZXRtYXBfYndyYXBfaW50cl9ub3RpZnkocmluZ19uciA9PSBob3N0 IHJpbmcpCi0gKiAgICAgICAgICAgICAgICAgICAgIGtyaW5nLT5ubV9zeW5jKCkgPT0gbmV0bWFw X3J4c3luY19mcm9tX2hvc3RfY29tcGF0KCkKKyAqICAgICAgICAgICAgICAgICAgICAga3Jpbmct Pm5tX3N5bmMoKSA9PSBuZXRtYXBfcnhzeW5jX2Zyb21faG9zdCgpCiAgKiAgICAgICAgICAgICAg ICAgICAgIG5ldG1hcF92cF90eHN5bmMoKQogICoKICAqICAgICAgLSBzeXN0ZW0gZGV2aWNlIHdp dGggZ2VuZXJpYyBzdXBwb3J0OgpAQCAtMzg0LDcgKzM3OCw3IEBACiAgKiAgICAgICAgIGZyb20g aG9zdCBzdGFjazoKICAqICAgICAgICAgICAgbmV0bWFwX3RyYW5zbWl0KCkKICAqICAgICAgICAg ICAgICAgIG5hLT5ubV9ub3RpZnkoKSA9PSBuZXRtYXBfYndyYXBfaW50cl9ub3RpZnkocmluZ19u ciA9PSBob3N0IHJpbmcpCi0gKiAgICAgICAgICAgICAgICAgICAgIGtyaW5nLT5ubV9zeW5jKCkg PT0gbmV0bWFwX3J4c3luY19mcm9tX2hvc3RfY29tcGF0KCkKKyAqICAgICAgICAgICAgICAgICAg ICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfcnhzeW5jX2Zyb21faG9zdCgpCiAgKiAgICAg ICAgICAgICAgICAgICAgIG5ldG1hcF92cF90eHN5bmMoKQogICoKICAqICAgKGFsbCBjYXNlcykg LS0+IG5tX2JkZ19mbHVzaCgpCkBAIC00MDcsNyArNDAxLDcgQEAKICAqICAgICAgICAgICAgICAg ICBuZXRtYXBfdnBfcnhzeW5jKCkKICAqICAgICAgICAgIHRvIGhvc3Qgc3RhY2s6CiAgKiAgICAg ICAgICAgICAgICAgbmV0bWFwX3ZwX3J4c3luYygpCi0gKiAgICAgICAgICAgICAgICAga3Jpbmct Pm5tX3N5bmMoKSA9PSBuZXRtYXBfdHhzeW5jX3RvX2hvc3RfY29tcGF0CisgKiAgICAgICAgICAg ICAgICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfdHhzeW5jX3RvX2hvc3QKICAqICAgICAg ICAgICAgICAgICBuZXRtYXBfdnBfcnhzeW5jX2xvY2tlZCgpCiAgKgogICogICAgICAtIHN5c3Rl bSBkZXZpY2Ugd2l0aCBnZW5lcmljIGFkYXB0ZXI6CkBAIC00MTgsNyArNDEyLDcgQEAKICAqICAg ICAgICAgICAgICAgICBuZXRtYXBfdnBfcnhzeW5jKCkKICAqICAgICAgICAgIHRvIGhvc3Qgc3Rh Y2s6CiAgKiAgICAgICAgICAgICAgICAgbmV0bWFwX3ZwX3J4c3luYygpCi0gKiAgICAgICAgICAg ICAgICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfdHhzeW5jX3RvX2hvc3RfY29tcGF0Cisg KiAgICAgICAgICAgICAgICAga3JpbmctPm5tX3N5bmMoKSA9PSBuZXRtYXBfdHhzeW5jX3RvX2hv c3QKICAqICAgICAgICAgICAgICAgICBuZXRtYXBfdnBfcnhzeW5jKCkKICAqCiAgKi8KQEAgLTQ1 NSwyOSArNDQ5LDE5IEBACiAjaW5jbHVkZSA8c3lzL3JlZmNvdW50Lmg+CiAKIAotLyogcmVk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0X2RlcGFydHVyZV9oYW5k bGVyKHZvaWQgKmFyZyBfX3VudXNlZCwgc3RydWN0IGlmbmV0ICppZnApCit7CisgICAgICAgIG5l dG1hcF9tYWtlX3pvbWJpZShpZnApOworfQorCitzdGF0aWMgZXZlbnRoYW5kbGVyX3RhZyBubV9p Zm5ldF9haF90YWc7CitzdGF0aWMgZXZlbnRoYW5kbGVyX3RhZyBubV9pZm5ldF9kaF90YWc7CisK K2ludAorbm1fb3NfaWZuZXRfaW5pdCh2b2lkKQoreworICAgICAgICBubV9pZm5ldF9haF90YWcg PQorICAgICAgICAgICAgICAgIEVWRU5USEFORExFUl9SRUdJU1RFUihpZm5ldF9hcnJpdmFsX2V2 ZW50LAorICAgICAgICAgICAgICAgICAgICAgICAgbmV0bWFwX2lmbmV0X2Fycml2YWxfaGFuZGxl ciwKKyAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIEVWRU5USEFORExFUl9QUklfQU5ZKTsK KyAgICAgICAgbm1faWZuZXRfZGhfdGFnID0KKyAgICAgICAgICAgICAgICBFVkVOVEhBTkRMRVJf UkVHSVNURVIoaWZuZXRfZGVwYXJ0dXJlX2V2ZW50LAorICAgICAgICAgICAgICAgICAgICAgICAg bmV0bWFwX2lmbmV0X2RlcGFydHVyZV9oYW5kbGVyLAorICAgICAgICAgICAgICAgICAgICAgICAg TlVMTCwgRVZFTlRIQU5ETEVSX1BSSV9BTlkpOworICAgICAgICByZXR1cm4gMDsKK30KKwordm9p ZAorbm1fb3NfaWZuZXRfZmluaSh2b2lkKQoreworICAgICAgICBFVkVOVEhBTkRMRVJfREVSRUdJ U1RFUihpZm5ldF9hcnJpdmFsX2V2ZW50LAorICAgICAgICAgICAgICAgIG5tX2lmbmV0X2FoX3Rh Zyk7CisgICAgICAgIEVWRU5USEFORExFUl9ERVJFR0lTVEVSKGlmbmV0X2RlcGFydHVyZV9ldmVu dCwKKyAgICAgICAgICAgICAgICBubV9pZm5ldF9kaF90YWcpOworfQorCiByYXdzdW1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DAsICJubS1rdGhyZWFkLSVsZCIsCisJCQlubWstPndvcmtlcl9jdHgu dHlwZSkpKSB7CisJCWdvdG8gZXJyOworCX0KKworCUQoIm5tX2t0aHJlYWQgc3RhcnRlZCB0ZCAl cCIsIG5tay0+d29ya2VyKTsKKworCXJldHVybiAwOworZXJyOgorCUQoIm5tX2t0aHJlYWQgc3Rh cnQgZmFpbGVkIGVyciAlZCIsIGVycm9yKTsKKwlubWstPndvcmtlciA9IE5VTEw7CisJcmV0dXJu IGVycm9yOworfQorCit2b2lkCitubV9vc19rdGhyZWFkX3N0b3Aoc3RydWN0IG5tX2t0aHJlYWQg Km5taykKK3sKKwlpZiAoIW5tay0+d29ya2VyKSB7CisJCXJldHVybjsKKwl9CisJLyogdGVsbCB0 byBrdGhyZWFkIHRvIGV4aXQgZnJvbSBtYWluIGxvb3AgKi8KKwlubWstPnJ1biA9IDA7CisKKwkv KiB3YWtlIHVwIGt0aHJlYWQgaWYgaXQgc2xlZXBzICovCisJa3RocmVhZF9yZXN1bWUobm1rLT53 b3JrZXIpOworCW5tX29zX2t0aHJlYWRfd2FrZXVwX3dvcmtlcihubWspOworCisJbm1rLT53b3Jr ZXIgPSBOVUxMOworfQorCit2b2lkCitubV9vc19rdGhyZWFkX2RlbGV0ZShzdHJ1Y3Qgbm1fa3Ro cmVhZCAqbm1rKQoreworCWlmICghbm1rKQorCQlyZXR1cm47CisJaWYgKG5tay0+d29ya2VyKSB7 CisJCW5tX29zX2t0aHJlYWRfc3RvcChubWspOworCX0KKworCW1lbXNldCgmbm1rLT53b3JrZXJf Y3R4LmNmZywgMCwgc2l6ZW9mKG5tay0+d29ya2VyX2N0eC5jZmcpKTsKKworCWZyZWUobm1rLCBN X0RFVkJVRik7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKiBrcXVldWUgc3VwcG9ydCAqKioq KioqKioqKioqKioqLwogCiAvKgotICogVGhlIE9TX3NlbHdha2V1cCBhbHNvIG5lZWRzIHRvIGlz c3VlIGEgS05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c2xvdHM7CiAKIAlzZW50ID0gcmVsX3Nsb3RzOwogCWZvciAoIDsgcmVsX3Nsb3RzOyBy ZWxfc2xvdHMtLSkgewpAQCAtNTM0LDcgKzU2Nyw3IEBACiAKIC8qCiAgKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogZnVu Y3Rpb25zIHNwZWNpZmljIGZvciBjb3B5IG1vbml0b3JzICAgICAgICAgICAgICAgICAgICAKKyAq IGZ1bmN0aW9ucyBzcGVjaWZpYyBmb3IgY29weSBtb25pdG9ycwogICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqLwogCkBA IC02NTIsMTcgKzY4NSwyNyBAQAogc3RhdGljIGludAogbmV0bWFwX21vbml0b3JfcGFyZW50X25v dGlmeShzdHJ1Y3QgbmV0bWFwX2tyaW5nICprcmluZywgaW50IGZsYWdzKQogeworCWludCAoKm5v dGlmeSkoc3RydWN0IG5ldG1hcF9rcmluZyosIGludCk7CiAJTkQoNSwgIiVzICV4Iiwga3Jpbmct Pm5hbWUsIGZsYWdzKTsKIAkvKiA/eHN5bmMgY2FsbGJhY2tzIGhhdmUgdHJ5Z2V0IGNhbGxlZCBi eSB0aGVpciBjYWxsZXJzCiAJICogKE5JT0NSRUdJRiBhbmQgcG9sbCgpKSwgYnV0IGhlcmUgd2Ug aGF2ZSB0byBjYWxsIGl0CiAJICogYnkgb3Vyc2VsZgogCSAqLwotCWlmIChubV9rcl90cnlnZXQo a3JpbmcpKQotCQlnb3RvIG91dDsKLQluZXRtYXBfbW9uaXRvcl9wYXJlbnRfcnhzeW5jKGtyaW5n LCBOQUZfRk9SQ0VfUkVBRCk7CisJaWYgKG5tX2tyX3RyeWdldChrcmluZywgMCwgTlVMTCkpIHsK KwkJLyogaW4gYWxsIGNhc2VzLCBqdXN0IHNraXAgdGhlIHN5bmMgKi8KKwkJcmV0dXJu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2b2lkCityYXRlX2JhdGNoX3N0YXRzX3VwZGF0 ZShzdHJ1Y3QgcmF0ZV9iYXRjaF9zdGF0cyAqYmYsIHVpbnQzMl90IHByZV90YWlsLAorCQkgICAg ICAgIHVpbnQzMl90IGFjdF90YWlsLCB1aW50MzJfdCBudW1fc2xvdHMpCit7CisgICAgaW50IG4g PSAoaW50KWFjdF90YWlsIC0gcHJlX3RhaWw7CisKKyAgICBpZiAobikgeworICAgICAgICBpZiAo biA8IDApCisgICAgICAgICAgICBuICs9IG51bV9zbG90czsKKworICAgICAgICBiZi0+c3luYysr OworICAgICAgICBiZi0+cGt0ICs9IG47CisgICAgfSBlbHNlIHsKKyAgICAgICAgYmYtPnN5bmNf ZHJ5Kys7CisgICAgfQorfQorCisjZWxzZSAvKiAhUkFURSAqLworI2RlZmluZSBJRlJBVEUoeCkK KyNlbmRpZiAvKiBSQVRFICovCisKK3N0cnVjdCBwdG5ldG1hcF9zdGF0ZSB7CisgICAgLyogS3Ro cmVhZHMuICovCisgICAgc3RydWN0IG5tX2t0aHJlYWQgKiprdGhyZWFkczsKKworICAgIC8qIFNo YXJlZCBtZW1vcnkgd2l0aCB0aGUgZ3Vlc3QgKFRYL1JYKSAqLworICAgIHN0cnVjdCBwdG5ldF9y aW5nIF9fdXNlciAqcHRyaW5nczsKKworICAgIGJvb2wgc3RvcHBlZDsKKworICAgIC8qIE5ldG1h cCBhZGFwdGVyIHdyYXBwaW5nIHRoZSBiYWNrZW5kLiAqLworICAgIHN0cnVjdCBuZXRtYXBfcHRf aG9zdF9hZGFwdGVyICpwdGhfbmE7CisKKyAgICBJRlJBVEUoc3RydWN0IHJhdGVfY29udGV4dCBy YXRlX2N0eDspCit9OworCitzdGF0aWMgaW5saW5lIHZvaWQKK3B0bmV0bWFwX2tyaW5nX2R1bXAo Y29uc3QgY2hhciAqdGl0bGUsIGNvbnN0IHN0cnVjdCBuZXRtYXBfa3JpbmcgKmtyaW5nKQorewor ICAgIFJEKDEsICIlcyAtIG5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dlIGRvbid0IGV4 Y2VlZCBvdXIgYmF0Y2ggbGltaXQuICovCisgICAgICAgIGJhdGNoID0gc2hhZG93X3JpbmcuaGVh ZCAtIGtyaW5nLT5ucl9od2N1cjsKKyAgICAgICAgaWYgKGJhdGNoIDwgMCkKKyAgICAgICAgICAg IGJhdGNoICs9IG51bV9zbG90czsKKworI2lmZGVmIFBUTl9UWF9CQVRDSF9MSU0KKyAgICAgICAg aWYgKGJhdGNoID4gUFROX1RYX0JBVENIX0xJTShudW1fc2xvdHMpKSB7CisgICAgICAgICAgICB1 aW50MzJfdCBoZWFkX2xpbSA9IGtyaW5nLT5ucl9od2N1ciArIFBUTl9UWF9CQVRDSF9MSU0obnVt X3Nsb3RzKTsKKworICAgICAgICAgICAgaWYgKGhlYWRfbGltID49IG51bV9zbG90cykKKyAgICAg ICAgICAgICAgICBoZWFkX2xpbSAtPSBudW1fc2xvdHM7CisgICAgICAgICAgICBORCgxLCAiYmF0 Y2g6ICVkIGhlYWQ6ICVkIGhlYWRfbGltOiAlZCIsIGJhdGNoLCBzaGFkb3dfcmluZy5oZWFkLAor CQkJCQkJICAgICBoZWFkX2xpbSk7CisgICAgICAgICAgICBzaGFkb3dfcmluZy5oZWFkID0gaGVh ZF9saW07CisJICAgIGJhdGNoID0gUFROX1RYX0JBVENIX0xJTShudW1fc2xvdHMpOworICAgICAg ICB9CisjZW5kaWYgLyogUFROX1RYX0JBVENIX0xJTSAqLworCisgICAgICAgIGlmIChubV9rcl90 eHNwYWNlKGtyaW5nKSA8PSAobnVtX3Nsb3RzID4+IDEpKSB7CisgICAgICAgICAgICBzaGFkb3df cmluZy5mbGFncyB8PSBOQUZfRk9SQ0VfUkVDTEFJTTsKKyAgICAgICAgfQorCisgICAgICAgIC8q IE5ldG1hcCBwcm9sb2d1ZSAqLworCXNoYWRvd19yaW5nLnRhaWwgPSBrcmluZy0+cnRhaWw7Cisg ICAgICAgIGlmICh1bmxpa2VseShubV90eHN5bmNfcHJvbG9ndWUoa3JpbmcsICZzaGFkb3dfcmlu ZykgPj0gbnVtX3Nsb3RzKSkgeworICAgICAgICAgICAgLyogUmVpbml0IHJpbmcgYW5kIGVuYWJs ZSBub3RpZmljYXRpb25zLiAqLworICAgICAgICAgICAgbmV0bWFwX3JpbmdfcmVpbml0KGtyaW5n KTsKKyAgICAgICAgICAgIHB0cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDEpOworICAgICAgICAg ICAgYnJlYWs7CisgICAgICAgIH0KKworICAgICAgICBpZiAodW5saWtlbHkobmV0bWFwX3ZlcmJv c2UgJiBOTV9WRVJCX1RYU1lOQykpIHsKKyAgICAgICAgICAgIHB0bmV0bWFwX2tyaW5nX2R1bXAo InByZSB0eHN5bmMiLCBrcmluZyk7CisJfQorCisgICAgICAgIElGUkFURShwcmVfdGFpbCA9IGty aW5nLT5ydGFpbCk7CisgICAgICAgIGlmICh1bmxpa2VseShrcmluZy0+bm1fc3luYyhrcmluZywg c2hhZG93X3JpbmcuZmxhZ3MpKSkgeworICAgICAgICAgICAgLyogUmVlbmFibGUgbm90aWZpY2F0 aW9ucy4gKi8KKyAgICAgICAgICAgIHB0cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDEpOworICAg ICAgICAgICAgRCgiRVJST1IgdHhzeW5jKCkiKTsKKwkgICAgYnJlYWs7CisgICAgICAgIH0KKwor ICAgICAgICAvKgorICAgICAgICAgKiBGaW5hbGl6ZQorICAgICAgICAgKiBDb3B5IGhvc3QgaHdj dXIgYW5kIGh3dGFpbCBpbnRvIHRoZSBDU0IgZm9yIHRoZSBndWVzdCBzeW5jKCksIGFuZAorCSAq IGRvIHRoZSBubV9zeW5jX2ZpbmFsaXplLgorICAgICAgICAgKi8KKyAgICAgICAgcHRuZXRtYXBf aG9zdF93cml0ZV9rcmluZ19jc2IocHRyaW5nLCBrcmluZy0+bnJfaHdjdXIsCisJCQkJICAgICAg a3JpbmctPm5yX2h3dGFpbCk7CisgICAgICAgIGlmIChrcmluZy0+cnRhaWwgIT0ga3JpbmctPm5y X2h3dGFpbCkgeworCSAgICAvKiBTb21lIG1vcmUgcm9vbSBhdmFpbGFibGUgaW4gdGhlIHBhcmVu dCBhZGFwdGVyLiAqLworCSAgICBrcmluZy0+cnRhaWwgPSBrcmluZy0+bnJfaHd0YWlsOworCSAg ICBtb3JlX3R4c3BhY2UgPSB0cnVlOworICAgICAgICB9CisKKyAgICAgICAgSUZSQVRFKHJhdGVf YmF0Y2hfc3RhdHNfdXBkYXRlKCZwdG5zLT5yYXRlX2N0eC5uZXcudHhicywgcHJlX3RhaWwsCisJ CQkJICAgICAgIGtyaW5nLT5ydGFpbCwgbnVtX3Nsb3RzKSk7CisKKyAgICAgICAgaWYgKHVubGlr ZWx5KG5ldG1hcF92ZXJib3NlICYgTk1fVkVSQl9UWFNZTkMpKSB7CisgICAgICAgICAgICBwdG5l dG1hcF9rcmluZ19kdW1wKCJwb3N0IHR4c3luYyIsIGtyaW5nKTsKKwl9CisKKyNpZm5kZWYgQlVT WV9XQUlUCisgICAgICAgIC8qIEludGVycnVwdCB0aGUgZ3Vlc3QgaWYgbmVlZGVkLiAqLworICAg ICAgICBpZiAobW9yZV90eHNwYWNlICYmIHB0cmluZ19pbnRyX2VuYWJsZWQocHRyaW5nKSkgewor ICAgICAgICAgICAgLyogRGlzYWJsZSBndWVzdCBraWNrIHRvIGF2b2lkIHNlbmRpbmcgdW5uZWNl c3Nhcnkga2lja3MgKi8KKyAgICAgICAgICAgIHB0cmluZ19pbnRyX2VuYWJsZShwdHJpbmcsIDAp OworICAgICAgICAgICAgbm1fb3Nfa3RocmVhZF9zZW5kX2lycShrdGgpOworICAgICAgICAgICAg SUZSQVRFKHB0bnMtPnJhdGVfY3R4Lm5ldy5odHhrKyspOworICAgICAgICAgICAgbW9yZV90eHNw YWNlID0gZmFsc2U7CisgICAgICAgIH0KKyNlbmRpZgorICAgICAgICAvKiBSZWFkIENTQiB0byBz ZWUgaWYgdGhlcmUgaXMgbW9yZSB3b3JrIHRvIGRvLiAqLworICAgICAgICBwdG5ldG1hcF9ob3N0 X3JlYWRfa3JpbmdfY3NiKHB0cmluZywgJnNoYWRvd19yaW5nLCBudW1fc2xvdHMpOworI2lmbmRl ZiBCVVNZX1dBSVQKKyAgICAgICAgaWYgKHNoYWRvd19yaW5nLmhlYWQgPT0ga3JpbmctPnJoZWFk KSB7CisgICAgICAgICAgICAvKgorICAgICAgICAgICAgICogTm8gbW9yZSBwYWNrZXRzIHRvIHRy YW5zbWl0LiBXZSBlbmFibGUgbm90aWZpY2F0aW9ucyBhbmQKKyAgICAgICAgICAgICAqIGdvIHRv IHNsZWVwLCB3YWl0aW5nIGZvciBhIGtpY2sgZnJvbSB0aGUgZ3Vlc3Qgd2hlbiBuZXcKKyAgICAg ICAgICAgICAqIG5ldyBzbG90cyBhcmUgcmVhZHkgZm9yIHRyYW5zbWlzc2lvbi4KKyAgICAgICAg ICAgICAqLworICAgICAgICAgICAgdXNsZWVwX3JhbmdlKDEsMSk7CisgICAgICAgICAgICAvKiBS ZWVuYWJsZSBub3RpZmljYXRpb25zLiAqLworICAgICAgICAgICAgcHRyaW5nX2tpY2tfZW5hYmxl KHB0cmluZywgMSk7CisgICAgICAgICAgICAvKiBEb3VibGVjaGVjay4gKi8KKyAgICAgICAgICAg IHB0bmV0bWFwX2hvc3RfcmVhZF9rcmluZ19jc2IocHRyaW5nLCAmc2hhZG93X3JpbmcsIG51bV9z bG90cyk7CisgICAgICAgICAgICBpZiAoc2hhZG93X3JpbmcuaGVhZCAhPSBrcmluZy0+cmhlYWQp IHsKKwkJLyogV2Ugd29uIHRoZSByYWNlIGNvbmRpdGlvbiwgdGhlcmUgYXJlIG1vcmUgcGFja2V0 cyB0bworCQkgKiB0cmFuc21pdC4gRGlzYWJsZSBub3RpZmljYXRpb25zIGFuZCBkbyBhbm90aGVy IGN5Y2xlICovCisJCXB0cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDApOworCQljb250aW51ZTsK KwkgICAgfQorCSAgICBicmVhazsKKyAgICAgICAgfQorCisJaWYgKG5tX2tyX3R4ZW1wdHkoa3Jp bmcpKSB7CisJICAgIC8qIE5vIG1vcmUgYXZhaWxhYmxlIFRYIHNsb3RzLiBXZSBzdG9wIHdhaXRp bmcgZm9yIGEgbm90aWZpY2F0aW9uCisJICAgICAqIGZyb20gdGhlIGJhY2tlbmQgKG5ldG1hcF90 eF9pcnEpLiAqLworICAgICAgICAgICAgTkQoMSwgIlRYIHJpbmciKTsKKyAgICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisjZW5kaWYKKyAgICAgICAgaWYgKHVubGlrZWx5KHB0bnMtPnN0b3Bw ZWQpKSB7CisgICAgICAgICAgICBEKCJiYWNrZW5kIG5ldG1hcCBpcyBiZWluZyBzdG9wcGVkIik7 CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKworICAgIG5tX2tyX3B1dChr cmluZyk7CisKKyAgICBpZiAobW9yZV90eHNwYWNlICYmIHB0cmluZ19pbnRyX2VuYWJsZWQocHRy aW5nKSkgeworICAgICAgICBwdHJpbmdfaW50cl9lbmFibGUocHRyaW5nLCAwKTsKKyAgICAgICAg bm1fb3Nfa3RocmVhZF9zZW5kX2lycShrdGgpOworICAgICAgICBJRlJBVEUocHRucy0+cmF0ZV9j dHgubmV3Lmh0eGsrKyk7CisgICAgfQorfQorCisvKgorICogV2UgbmVlZCBSWCBraWNrcyBmcm9t IHRoZSBndWVzdCB3aGVuICh0YWlsID09IGhlYWQtMSksIHdoZXJlIHdlIHdhaXQKKyAqIGZvciB0 aGUgZ3Vlc3QgdG8gcmVmaWxsLgorICovCisjaWZuZGVmIEJVU1lfV0FJVAorc3RhdGljIGlubGlu ZSBpbnQKK3B0bmV0bWFwX25vcnhzbG90cyhzdHJ1Y3QgbmV0bWFwX2tyaW5nICprcmluZywgdWlu dDMyX3QgZ19oZWFkKQoreworICAgIHJldHVybiAoTk1fQUNDRVNTX09OQ0Uoa3JpbmctPm5yX2h3 dGFpbCkgPT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uOworICAgIH0KKworICAgIGlmICh1bmxpa2VseShwdG5zLT5zdG9w cGVkKSkgeworICAgICAgICBSRCgxLCAiYmFja2VuZCBuZXRtYXAgaXMgYmVpbmcgc3RvcHBlZCIp OworCXJldHVybjsKKyAgICB9CisKKyAgICBpZiAodW5saWtlbHkobm1fa3JfdHJ5Z2V0KGtyaW5n LCAxLCBOVUxMKSkpIHsKKyAgICAgICAgRCgiRVJST1Igbm1fa3JfdHJ5Z2V0KCkiKTsKKwlyZXR1 cm47CisgICAgfQorCisgICAgLyogVGhpcyBpcyBhIGd1ZXNzLCB0byBiZSBmaXhlZCBpbiB0aGUg cmF0ZSBjYWxsYmFjay4gKi8KKyAgICBJRlJBVEUocHRucy0+cmF0ZV9jdHgubmV3LmdyeGsrKyk7 CisKKyAgICAvKiBHZXQgUlggcHRyaW5nIHBvaW50ZXIgZnJvbSB0aGUgQ1NCLiAqLworICAgIHB0 cmluZyA9IHB0bnMtPnB0cmluZ3MgKyAocHRoX25hLT51cC5udW1fdHhfcmluZ3MgKyBrcmluZy0+ cmluZ19pZCk7CisgICAga3RoID0gcHRucy0+a3RocmVhZHNbcHRoX25hLT51cC5udW1fdHhfcmlu Z3MgKyBrcmluZy0+cmluZ19pZF07CisKKyAgICBudW1fc2xvdHMgPSBrcmluZy0+bmtyX251bV9z bG90czsKKyAgICBzaGFkb3dfcmluZy5oZWFkID0ga3JpbmctPnJoZWFkOworICAgIHNoYWRvd19y aW5nLmN1ciA9IGtyaW5nLT5yY3VyOworCisgICAgLyogRGlzYWJsZSBub3RpZmljYXRpb25zLiAq LworICAgIHB0cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDApOworICAgIC8qIENvcHkgdGhlIGd1 ZXN0IGtyaW5nIHBvaW50ZXJzIGZyb20gdGhlIENTQiAqLworICAgIHB0bmV0bWFwX2hvc3RfcmVh ZF9rcmluZ19jc2IocHRyaW5nLCAmc2hhZG93X3JpbmcsIG51bV9zbG90cyk7CisKKyAgICBmb3Ig KDs7KSB7CisJdWludDMyX3QgaHd0YWlsOworCisgICAgICAgIC8qIE5ldG1hcCBwcm9sb2d1ZSAq LworCXNoYWRvd19yaW5nLnRhaWwgPSBrcmluZy0+cnRhaWw7CisgICAgICAgIGlmICh1bmxpa2Vs eShubV9yeHN5bmNfcHJvbG9ndWUoa3JpbmcsICZzaGFkb3dfcmluZykgPj0gbnVtX3Nsb3RzKSkg eworICAgICAgICAgICAgLyogUmVpbml0IHJpbmcgYW5kIGVuYWJsZSBub3RpZmljYXRpb25zLiAq LworICAgICAgICAgICAgbmV0bWFwX3JpbmdfcmVpbml0KGtyaW5nKTsKKyAgICAgICAgICAgIHB0 cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDEpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAg IH0KKworICAgICAgICBpZiAodW5saWtlbHkobmV0bWFwX3ZlcmJvc2UgJiBOTV9WRVJCX1JYU1lO QykpIHsKKyAgICAgICAgICAgIHB0bmV0bWFwX2tyaW5nX2R1bXAoInByZSByeHN5bmMiLCBrcmlu Zyk7CisJfQorCisgICAgICAgIElGUkFURShwcmVfdGFpbCA9IGtyaW5nLT5ydGFpbCk7CisgICAg ICAgIGlmICh1bmxpa2VseShrcmluZy0+bm1fc3luYyhrcmluZywgc2hhZG93X3JpbmcuZmxhZ3Mp KSkgeworICAgICAgICAgICAgLyogUmVlbmFibGUgbm90aWZpY2F0aW9ucy4gKi8KKyAgICAgICAg ICAgIHB0cmluZ19raWNrX2VuYWJsZShwdHJpbmcsIDEpOworICAgICAgICAgICAgRCgiRVJST1Ig cnhzeW5jKCkiKTsKKwkgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgLyoKKyAgICAgICAg ICogRmluYWxpemUKKyAgICAgICAgICogQ29weSBob3N0IGh3Y3VyIGFuZCBod3RhaWwgaW50byB0 aGUgQ1NCIGZvciB0aGUgZ3Vlc3Qgc3luYygpCisgICAgICAgICAqLworCWh3dGFpbCA9IE5NX0FD Q0VTU19PTkNFKGtyaW5nLT5ucl9od3RhaWwpOworICAgICAgICBwdG5ldG1hcF9ob3N0X3dyaXRl X2tyaW5nX2NzYihwdHJpbmcsIGtyaW5nLT5ucl9od2N1ciwgaHd0YWlsKTsKKyAgICAgICAgaWYg KGtyaW5nLT5ydGFpbCAhPSBod3RhaWwpIHsKKwkgICAga3JpbmctPnJ0YWlsID0gaHd0YWlsOwor ICAgICAgICAgICAgc29tZV9yZWN2ZCA9IHRydWU7CisgICAgICAgICAgICBkcnlfY3ljbGVzID0g MDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGRyeV9jeWNsZXMrKzsKKyAgICAgICAg fQorCisgICAgICAgIElGUkFURShyYXRlX2JhdGNoX3N0YXRzX3VwZGF0ZSgmcHRucy0+cmF0ZV9j dHgubmV3LnJ4YnMsIHByZV90YWlsLAorCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBr cmluZy0+cnRhaWwsIG51bV9zbG90cykpOworCisgICAgICAgIGlmICh1bmxpa2VseShuZXRtYXBf dmVyYm9zZSAmIE5NX1ZFUkJfUlhTWU5DKSkgeworICAgICAgICAgICAgcHRuZXRtYXBfa3Jpbmdf ZHVtcCgicG9zdCByeHN5bmMiLCBrcmluZyk7CisJfQorCisjaWZuZGVmIEJVU1lfV0FJVAorCS8q IEludGVycnVwdCB0aGUgZ3Vlc3QgaWYgbmVlZGVkLiAqLworICAgICAgICBpZiAoc29tZV9yZWN2 ZCAmJiBwdHJpbmdfaW50cl9lbmFibGVkKHB0cmluZykpIHsKKyAgICAgICAgICAgIC8qIERpc2Fi bGUgZ3Vlc3Qga2ljayB0byBhdm9pZCBzZW5kaW5nIHVubmVjZXNzYXJ5IGtpY2tzICovCisgICAg ICAgICAgICBwdHJpbmdfaW50cl9lbmFibGUocHRyaW5nLCAwKTsKKyAgICAgICAgICAgIG5tX29z X2t0aHJlYWRfc2VuZF9pcnEoa3RoKTsKKyAgICAgICAgICAgIElGUkFURShwdG5zLT5yYXRlX2N0 eC5uZXcuaHJ4aysrKTsKKyAgICAgICAgICAgIHNvbWVfcmVjdmQgPSBmYWxzZTsKKyAgICAgICAg fQorI2VuZGlmCisgICAgICAgIC8qIFJlYWQgQ1NCIHRvIHNlZSBpZiB0aGVyZSBpcyBtb3JlIHdv cmsgdG8gZG8uICovCisgICAgICAgIHB0bmV0bWFwX2hvc3RfcmVhZF9rcmluZ19jc2IocHRyaW5n LCAmc2hhZG93X3JpbmcsIG51bV9zbG90cyk7CisjaWZuZGVmIEJVU1lfV0FJVAorICAgICAgICBp ZiAocHRuZXRtYXBfbm9yeHNsb3RzKGtyaW5nLCBzaGFkb3dfcmluZy5oZWFkKSkgeworICAgICAg ICAgICAgLyoKKyAgICAgICAgICAgICAqIE5vIG1vcmUgc2xvdHMgYXZhaWxhYmxlIGZvciByZWNl cHRpb24uIFdlIGVuYWJsZSBub3RpZmljYXRpb24gYW5kCisgICAgICAgICAgICAgKiBnbyB0byBz bGVlcCwgd2FpdGluZyBmb3IgYSBraWNrIGZyb20gdGhlIGd1ZXN0IHdoZW4gbmV3IHJlY2VpdmUK KwkgICAgICogc2xvdHMgYXJlIGF2YWlsYWJsZS4KKyAgICAgICAgICAgICAqLworICAgICAgICAg ICAgdXNsZWVwX3JhbmdlKDEsMSk7CisgICAgICAgICAgICAvKiBSZWVuYWJsZSBub3RpZmljYXRp b25zLiAqLworICAgICAgICAgICAgcHRyaW5nX2tpY2tfZW5hYmxlKHB0cmluZywgMSk7CisgICAg ICAgICAgICAvKiBEb3VibGVjaGVjay4gKi8KKyAgICAgICAgICAgIHB0bmV0bWFwX2hvc3RfcmVh ZF9rcmluZ19jc2IocHRyaW5nLCAmc2hhZG93X3JpbmcsIG51bV9zbG90cyk7CisgICAgICAgICAg ICBpZiAoIXB0bmV0bWFwX25vcnhzbG90cyhrcmluZywgc2hhZG93X3JpbmcuaGVhZCkpIHsKKwkJ LyogV2Ugd29uIHRoZSByYWNlIGNvbmRpdGlvbiwgbW9yZSBzbG90cyBhcmUgYXZhaWxhYmxlLiBE aXNhYmxlCisJCSAqIG5vdGlmaWNhdGlvbnMgYW5kIGRvIGFub3RoZXIgY3ljbGUuICovCisgICAg ICAgICAgICAgICAgcHRyaW5nX2tpY2tfZW5hYmxlKHB0cmluZywgMCk7CisgICAgICAgICAgICAg ICAgY29udGludWU7CisJICAgIH0KKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisKKwlo d3RhaWwgPSBOTV9BQ0NFU1NfT05DRShrcmluZy0+bnJfaHd0YWlsKTsKKyAgICAgICAgaWYgKHVu bGlrZWx5KGh3dGFpbCA9PSBrcmluZy0+cmhlYWQgfHwKKwkJICAgICBkcnlfY3ljbGVzID49IFBU Tl9SWF9EUllfQ1lDTEVTX01BWCkpIHsKKwkgICAgLyogTm8gbW9yZSBwYWNrZXRzIHRvIGJlIHJl YWQgZnJvbSB0aGUgYmFja2VuZC4gV2Ugc3RvcCBhbmQKKwkgICAgICogd2FpdCBmb3IgYSBub3Rp ZmljYXRpb24gZnJvbSB0aGUgYmFja2VuZCAobmV0bWFwX3J4X2lycSkuICovCisgICAgICAgICAg ICBORCgxLCAibnJfaHd0YWlsOiAlZCByaGVhZDogJWQgZHJ5X2N5Y2xlczogJWQiLAorCSAgICAg ICBod3RhaWwsIGtyaW5nLT5yaGVhZCwgZHJ5X2N5Y2xlcyk7CisgICAgICAgICAgICBicmVhazsK KyAgICAgICAgfQorI2VuZGlmCisgICAgICAgIGlmICh1bmxpa2VseShwdG5zLT5zdG9wcGVkKSkg eworICAgICAgICAgICAgRCgiYmFja2VuZCBuZXRtYXAgaXMgYmVpbmcgc3RvcHBlZCIpOworICAg ICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBubV9rcl9wdXQoa3Jpbmcp OworCisgICAgLyogSW50ZXJydXB0IHRoZSBndWVzdCBpZiBuZWVkZWQuICovCisgICAgaWYgKHNv bWVfcmVjdmQgJiYgcHRyaW5nX2ludHJfZW5hYmxlZChwdH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F9ubV9ub3RpZnk7CisgICAgcHRoX25h LT5wYXJlbnQtPm5hX3ByaXZhdGUgPSBOVUxMOworCisgICAgZm9yIChpID0gMDsgaSA8IHB0aF9u YS0+cGFyZW50LT5udW1fcnhfcmluZ3M7IGkrKykgeworICAgICAgICBwdGhfbmEtPnVwLnJ4X3Jp bmdzW2ldLm5tX25vdGlmeSA9CisgICAgICAgIAlwdGhfbmEtPnVwLnJ4X3JpbmdzW2ldLnNhdmVf bm90aWZ5OworICAgICAgICBwdGhfbmEtPnVwLnJ4X3JpbmdzW2ldLnNhdmVfbm90aWZ5ID0gTlVM TDsKKyAgICB9CisgICAgZm9yIChpID0gMDsgaSA8IHB0aF9uYS0+cGFyZW50LT5udW1fdHhfcmlu Z3M7IGkrKykgeworICAgICAgICBwdGhfbmEtPnVwLnR4X3JpbmdzW2ldLm5tX25vdGlmeSA9Cisg ICAgICAgIAlwdGhfbmEtPnVwLnR4X3JpbmdzW2ldLnNhdmVfbm90aWZ5OworICAgICAgICBwdGhf bmEtPnVwLnR4X3JpbmdzW2ldLnNhdmVfbm90aWZ5ID0gTlVMTDsKKyAgICB9CisKKyAgICAvKiBE ZWxldGUga3RocmVhZHMuICovCisgICAgbnVtX3JpbmdzID0gcHRucy0+cHRoX25hLT51cC5udW1f dHhfcmluZ3MgKworICAgICAgICAgICAgICAgIHB0bnMtPnB0aF9uYS0+dXAubnVtX3J4X3Jpbmdz OworICAgIGZvciAoaSA9IDA7IGkgPCBudW1fcmluZ3M7IGkrKykgeworICAgICAgICBubV9vc19r dGhyZWFkX2RlbGV0ZShwdG5zLT5rdGhyZWFkc1tpXSk7CisJcHRucy0+a3RocmVhZHNbaV0gPSBO VUxMOworICAgIH0KKworICAgIElGUkFURShkZWxfdGltZXIoJnB0bnMtPnJhdGVfY3R4LnRpbWVy KSk7CisKKyAgICBubV9vc19mcmVlKHB0bnMpOworCisgICAgcHRoX25hLT5wdG5zID0gTlVMTDsK KworICAgIERCRyhEKCJbJXNdIHB0bmV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gICAgICAg ICAgIGJyZWFrOworICAgICAgICAvKiBDcmVhdGUgcHRuZXRtYXAgc3RhdGUgKGt0aHJlYWRzLCAu Li4pIGFuZCBzd2l0Y2ggcGFyZW50CisJICogYWRhcHRlciB0byBwdG5ldG1hcCBtb2RlLiAqLwor ICAgICAgICBlcnJvciA9IHB0bmV0bWFwX2NyZWF0ZShwdGhfbmEsIGNmZyk7CisJbm1fb3NfZnJl ZShjZmcpOworICAgICAgICBpZiAoZXJyb3IpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAg LyogU3RhcnQga3RocmVhZHMuICovCisgICAgICAgIGVycm9yID0gcHRuZXRtYXBfc3RhcnRfa3Ro cmVhZHMocHRoX25hKTsKKyAgICAgICAgaWYgKGVycm9yKQorICAgICAgICAgICAgcHRuZXRtYXBf ZGVsZXRlKHB0aF9uYSk7CisgICAgICAgIGJyZWFrOworCisgICAgY2FzZSBORVRNQVBfUFRfSE9T VF9ERUxFVEU6CisgICAgICAgIC8qIFN0b3Aga3RocmVhZHMuICovCisgICAgICAgIHB0bmV0bWFw X3N0b3Bfa3RocmVhZHMocHRoX25hKTsKKyAgICAgICAgLyogU3dpdGNoIHBhcmVudCBhZGFwdGVy IGJhY2sgdG8gbm9ybWFsIG1vZGUgYW5kIGRlc3Ryb3kKKwkgKiBwdG5ldG1hcCBzdGF0ZSAoa3Ro cmVhZHMsIC4uLikuICovCisgICAgICAgIHB0bmV0bWFwX2RlbGV0ZShwdGhfbmEpOworICAgICAg ICBicmVhazsKKworICAgIGRlZmF1bHQ6CisgICAgICAgIEQoIkVSUk9SIGludmFsaWQgY21kIChu bXItPm5yX2NtZCkgKDB4JXgpIiwgY21kKTsKKyAgICAgICAgZXJyb3IgPSBFSU5WQUw7CisgICAg ICAgIGJyZWFrOworICAgIH0KKyAgICBOTUdfVU5MT0NLKCk7CisKK2RvbmU6CisgICAgcmV0dXJu IGVycm9yOworfQorCisvKiBubV9ub3RpZnkgY2FsbGJhY2tzIGZvciBwdG5ld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9u YS0+dXAubmFtZSkpOworCisgICAgcGFyZW50LT5ubV9rcmluZ3NfZGVsZXRlKHBhcmVudCk7CisK KyAgICBuYS0+dHhfcmluZ3MgPSBuYS0+cnhfcmluZ3MgPSBuYS0+dGFpbHJvb20gPSBOVUxMOwor fQorCisvKiBubV9yZWdpc3RlciBjYWxsYmFjayAqLworc3RhdGljIGludAorbm1fcHRfaG9zdF9y ZWdpc3RlcihzdHJ1Y3QgbmV0bWFwX2FkYXB0ZXIgKm5hLCBpbnQgb25vZmYpCit7CisgICAgc3Ry dWN0IG5ldG1hcF9wdF9ob3N0X2FkYXB0ZXIgKnB0aF9uYSA9CisgICAgICAgIChzdHJ1Y3QgbmV0 bWFwX3B0X2hvc3RfYWRhcHRlciAqKW5hOworICAgIHN0cnVjdCBuZXRtYXBfYWRhcHRlciAqcGFy ZW50ID0gcHRoX25hLT5wYXJlbnQ7CisgICAgaW50IGVycm9yOworICAgIERCRyhEKCIlcyBvbm9m ZiAlZCIsIHB0aF9uYS0+dXAubmFtZSwgb25vZmYpKTsKKworICAgIGlmIChvbm9mZikgeworICAg ICAgICAvKiBuZXRtYXBfZG9fcmVnaWYgaGFzIGJlZW4gY2FsbGVkIG9uIHRoZSBwdG5ldG1hcCBu YS4KKyAgICAgICAgICogV2UgbmVlZCB0byBwYXNzIHRoZSBpbmZvcm1hdGlvbiBhYm91dCB0aGUK KyAgICAgICAgICogbWVtb3J5IGFsbG9jYXRvciB0byB0aGUgcGFyZW50IGJlZm9yZQorICAgICAg ICAgKiBwdXR0aW5nIGl0IGluIG5ldG1hcCBtb2RlCisgICAgICAgICAqLworICAgICAgICBwYXJl bnQtPm5hX2x1dCA9IG5hLT5uYV9sdXQ7CisgICAgfQorCisgICAgLyogZm9yd2FyZCB0aGUgcmVx dWVzdCB0byB0aGUgcGFyZW50ICovCisgICAgZXJyb3IgPSBwYXJlbnQtPm5tX3JlZ2lzdGVyKHBh cmVudCwgb25vZmYpOworICAgIGlmIChlcnJvcikKKyAgIC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5kIGhlYWQgaW4g dGhlIENTQi4KKwkgKi8KKwlpZiAoa3JpbmctPnJoZWFkICE9IGtyaW5nLT5ucl9od2N1cikgewor CQlwdG5ldG1hcF9ndWVzdF93cml0ZV9rcmluZ19jc2IocHRyaW5nLCBrcmluZy0+cmN1ciwKKwkJ CQkJICAgICAgIGtyaW5nLT5yaGVhZCk7CisgICAgICAgICAgICAgICAgLyogQXNrIGZvciBhIGtp Y2sgZnJvbSB0aGUgZ3Vlc3QgdG8gdGhlIGhvc3QgaWYgbmVlZGVkLiAqLworCQlpZiAoTk1fQUND RVNTX09OQ0UocHRyaW5nLT5ob3N0X25lZWRfa2ljaykpIHsKKwkJCXB0cmluZy0+c3luY19mbGFn cyA9IGZsYWdzOworCQkJbm90aWZ5ID0gdHJ1ZTsKKwkJfQorCX0KKworICAgICAgICAvKgorICAg ICAgICAgKiBObyBtb3JlIGNvbXBsZXRlZCBSWCBzbG90cy4gVGhlIHVzZXIgdGhyZWFkIHdpbGwg Z28gdG8gc2xlZXAgYW5kCisJICogd2UgbmVlZCB0byBiZSBub3RpZmllZCBieSB0aGUgaG9zdCB3 aGVuIG1vcmUgUlggc2xvdHMgaGF2ZSBiZWVuCisJICogY29tcGxldGVkLgorICAgICAgICAgKi8K KwlpZiAobm1fa3JfcnhlbXB0eShrcmluZykpIHsKKwkJLyogUmVlbmFibGUgbm90aWZpY2F0aW9u cy4gKi8KKyAgICAgICAgICAgICAgICBwdHJpbmctPmd1ZXN0X25lZWRfa2ljayA9IDE7CisgICAg ICAgICAgICAgICAgLyogRG91YmxlIGNoZWNrICovCisgICAgICAgICAgICAgICAgcHRuZXRtYXBf Z3Vlc3RfcmVhZF9rcmluZ19jc2IocHRyaW5nLCBrcmluZyk7CisgICAgICAgICAgICAgICAgLyog SWYgdGhlcmUgYXJlIG5ldyBzbG90cywgZGlzYWJsZSBub3RpZmljYXRpb25zLiAqLworCQlpZiAo IW5tX2tyX3J4ZW1wdHkoa3JpbmcpKSB7CisgICAgICAg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qIEBwYXJhbSBfZmxhZ3MJYW55IGV4dHJhIGZsYWdzIHRvIGNv bnRyb2wgdGhlIHJlc291cmNlCisgKgkJCWFsbG9jYXRpb24gLSBzZWUgQGMgUkZfWFhYIGZsYWdz IGluCisgKgkJCTxzeXMvcm1hbi5oPiBmb3IgZGV0YWlscworICogCisgKiBAcmV0dXJucwkJdGhl IHJlc291cmNlIHdoaWNoIHdhcyBhbGxvY2F0ZWQgb3IgQGMgTlVMTCBpZiBubworICoJCQlyZXNv dXJjZSBjb3VsZCBiZSBhbGxvY2F0ZWQKKyAqLworCitzdGF0aWMgX19pbmxpbmUgc3RydWN0IHJl c291cmNlICogQlVTX0FMTE9DX1JFU09VUkNFKGRldmljZV90IF9kZXYsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldmljZV90IF9jaGlsZCwg aW50IF90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBpbnQgKl9yaWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHJtYW5fcmVzX3QgX3N0YXJ0LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBybWFuX3Jlc190IF9lbmQsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtYW5fcmVzX3Qg X2NvdW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB1X2ludCBfZmxhZ3MpCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9PS1VQKCgoa29i al90KV9kZXYpLT5vcHMsYnVzX2FsbG9jX3Jlc291cmNlKTsKKwlyZXR1cm4gKChidXNfYWxsb2Nf cmVzb3VyY2VfdCAqKSBfbSkoX2RldiwgX2NoaWxkLCBfdHlwZSwgX3JpZCwgX3N0YX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l0aGUgdHlwZSBvZiByZXNvdXJjZQorICogQHBhcmFtIF9yaWQJCXRoZSByZXNvdXJjZSBp ZGVudGlmaWVyCisgKiBAcGFyYW0gX3IJCXRoZSByZXNvdXJjZSB0byBhY3RpdmF0ZQorICovCisK K3N0YXRpYyBfX2lubGluZSBpbnQgQlVTX0FDVElWQVRFX1JFU09VUkNFKGRldmljZV90IF9kZXYs IGRldmljZV90IF9jaGlsZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGludCBfdHlwZSwgaW50IF9yaWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgcmVzb3VyY2UgKl9yKQoreworCWtvYmpvcF90IF9tOworCUtPQkpP UExPT0tVUCgoKGtvYmpfdClfZGV2KS0+b3BzLGJ1c19hY3RpdmF0ZV9yZXNvdXJjZSk7CisJcmV0 dXJuICgoYnVzX2FjdGl2YXRlX3Jlc291cmNlX3QgKikgX20pKF9kZXYsIF9jaGlsZCwgX3R5cGUs IF9yaWQsIF9yKTsKK30KKworLyoqIEBicmllZiBVbmlxdWUgZGVzY3JpcHRvciBmb3IgdGhlIEJV U19NQVBfUkVTT1VSQ0UoKSBtZXRob2QgKi8KK2V4dGVybiBzdHJ1Y3Qga29iam9wX2Rlc2MgYnVz X21hcF9yZXNvdXJjZV9kZXNjOworLyoqIEBicmllZiBBIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0 aGUgQlVTX01BUF9SRVNPVVJDRSgpIG1ldGhvZCAqLwordHlwZWRlZiBpbnQgYnVzX21hcF9yZXNv dXJjZV90KGRldmljZV90IF9kZXYsIGRldmljZV90IF9jaGlsZCwgaW50IF90eXBlLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCByZXNvdXJjZSAqX3IsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHJlc291cmNlX21hcF9yZXF1ZXN0ICpfYXJncywK K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AgICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgcmVzb3VyY2UgKl9pcnEsIGludCBfZmxhZ3MsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGRyaXZlcl9maWx0ZXJfdCAqX2ZpbHRlciwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZHJpdmVyX2ludHJfdCAqX2ludHIsIHZvaWQgKl9hcmcsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvaWQgKipfY29va2llcCkKK3sKKwlrb2Jqb3Bf dCBfbTsKKwlLT0JKT1BMT09LVVAoKChrb2JqX3QpX2RldiktPm9wcyxidXNfc2V0dXBfaW50cik7 CisJcmV0dXJuICgoYnVzX3NldHVwX2ludHJfdCAqKSBfbSkoX2RldiwgX2NoaWxkLCBfaXJxLCBf ZmxhZ3MsIF9maWx0ZXIsIF9pbnRyLCBfYXJnLCBfY29va2llcCk7Cit9CisKKy8qKiBAYnJpZWYg VW5pcXVlIGRlc2NyaXB0b3IgZm9yIHRoZSBCVVNfVEVBUkRPV05fSU5UUigpIG1ldGhvZCAqLwor ZXh0ZXJuIHN0cnVjdCBrb2Jqb3BfZGVzYyBidXNfdGVhcmRvd25faW50cl9kZXNjOworLyoqIEBi cmllZiBBIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0aGUgQlVTX1RFQVJET1dOX0lOVFIoKSBtZXRo b2QgKi8KK3R5cGVkZWYgaW50IGJ1c190ZWFyZG93bl9pbnRyX3QoZGV2aWNlX3QgX2RldiwgZGV2 aWNlX3QgX2NoaWxkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgcmVz b3VyY2UgKl9pcnEsIHZvaWQgKl9jb29raWUpOworLyoqCisgKiBAYnJpZWYgVW5pbnN0YWxsIGFu IGludGVycnVwdCBoYW5kbGVyCisgKgorICogVGhpcyBtZXRob2QgaXMgdXNlZCB0byBkaXNhc3Nv Y2lhdGUgYW4gaW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cnQgb2YgdGhl IHJlc291cmNlIHJhbmdlCisgKiBAcGFyYW0gX2NvdW50CXRoZSBzaXplIG9mIHRoZSByZXNvdXJj ZSByYW5nZQorICovCisKK3N0YXRpYyBfX2lubGluZSBpbnQgQlVTX1NFVF9SRVNPVVJDRShkZXZp Y2VfdCBfZGV2LCBkZXZpY2VfdCBfY2hpbGQsIGludCBfdHlwZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBpbnQgX3JpZCwgcm1hbl9yZXNfdCBfc3RhcnQsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm1hbl9yZXNfdCBfY291bnQpCit7CisJa29i am9wX3QgX207CisJS09CSk9QTE9PS1VQKCgoa29ial90KV9kZXYpLT5vcHMsYnVzX3NldF9yZXNv dXJjZSk7CisJcmV0dXJuICgoYnVzX3NldF9yZXNvdXJjZV90ICopIF9tKShfZGV2LCBfY2hpbGQs IF90eXBlLCBfcmlkLCBfc3RhcnQsIF9jb3VudCk7Cit9CisKKy8qKiBAYnJpZWYgVW5pcXVlIGRl c2NyaXB0b3IgZm9yIHRoZSBCVVNfR0VUX1JFU09VUkNFKCkgbWV0aG9kICovCitleHRlcm4gc3Ry dWN0IGtvYmpvcF9kZXNjIGJ1c19nZXRfcmVzb3VyY2VfZGVzYzsKKy8qKiBAYnJpZWYgQSBmdW5j dGlvbiBpbXBsZW1lbnRpbmcgdGhlIEJVU19HRVRfUkVTT1VSQ0UoKSBtZXRob2QgKi8KK3R5cGVk ZWYgaW50IGJ1c19nZXRfcmVzb3VyY2VfdChkZXZpY2VfdCBfZGV2LCBkZXZpY2VfdCBfY2hpbGQs IGludCBfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgX3JpZCwgcm1h bl9yZXNfdCAqX3N0YXJ0cCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBybWFuX3Jl c190ICpfY291bnRwKTsKKy8qKgorICogQGJyaWVmIER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IG9mIGEgYnVmZmVyIHRvIHJlY2VpdmUgdGhlIHBucAorICoJCQlzdHJpbmcKKyAqIEBwYXJhbSBf YnVmbGVuCXRoZSBzaXplIG9mIHRoZSBidWZmZXIgcG9pbnRlZCB0byBieSBAcCBfYnVmCisgKi8K Kworc3RhdGljIF9faW5saW5lIGludCBCVVNfQ0hJTERfUE5QSU5GT19TVFIoZGV2aWNlX3QgX2Rl diwgZGV2aWNlX3QgX2NoaWxkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY2hhciAqX2J1Ziwgc2l6ZV90IF9idWZsZW4pCit7CisJa29iam9wX3QgX207CisJS09C Sk9QTE9PS1VQKCgoa29ial90KV9kZXYpLT5vcHMsYnVzX2NoaWxkX3BucGluZm9fc3RyKTsKKwly ZXR1cm4gKChidXNfY2hpbGRfcG5waW5mb19zdHJfdCAqKSBfbSkoX2RldiwgX2NoaWxkLCBfYnVm LCBfYnVmbGVuKTsKK30KKworLyoqIEBicmllZiBVbmlxdWUgZGVzY3JpcHRvciBmb3IgdGhlIEJV U19DSElMRF9MT0NBVElPTl9TVFIoKSBtZXRob2QgKi8KK2V4dGVybiBzdHJ1Y3Qga29iam9wX2Rl c2MgYnVzX2NoaWxkX2xvY2F0aW9uX3N0cl9kZXNjOworLyoqIEBicmllZiBBIGZ1bmN0aW9uIGlt cGxlbWVudGluZyB0aGUgQlVTX0NISUxEX0xPQ0FUSU9OX1NUUigpIG1ldGhvZCAqLwordHlwZWRl ZiBpbnQgYnVzX2NoaWxkX2xvY2F0aW9uX3N0cl90KGRldmljZV90IF9kZXYsIGRldmljZV90IF9j aGlsZCwgY2hhciAqX2J1ZiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz aXplX3QgX2J1Zmxlbik7CisvKioKKyAqIEBicmllZiBSZXR1cm5zIHRoZSBsb2NhdGlvbiBmb3Ig dGhpcyBkZXZpY2UuCisgKgorICogUmV0dXJuIGl0IGFzIGEgc3R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FtIF90cmlnCQl0aGUgdHJpZ2dlciBt b2RlIHJlcXVpcmVkCisgKiBAcGFyYW0gX3BvbAkJdGhlIGludGVycnVwdCBwb2xhcml0eSByZXF1 aXJlZAorICovCisKK3N0YXRpYyBfX2lubGluZSBpbnQgQlVTX0NPTkZJR19JTlRSKGRldmljZV90 IF9kZXYsIGludCBfaXJxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBpbnRyX3RyaWdnZXIgX3RyaWcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBlbnVtIGludHJfcG9sYXJpdHkgX3BvbCkKK3sKKwlrb2Jqb3BfdCBfbTsKKwlLT0JKT1BMT09L VVAoKChrb2JqX3QpX2RldiktPm9wcyxidXNfY29uZmlnX2ludHIpOworCXJldHVybiAoKGJ1c19j b25maWdfaW50cl90ICopIF9tKShfZGV2LCBfaXJxLCBfdHJpZywgX3BvbCk7Cit9CisKKy8qKiBA YnJpZWYgVW5pcXVlIGRlc2NyaXB0b3IgZm9yIHRoZSBCVVNfREVTQ1JJQkVfSU5UUigpIG1ldGhv ZCAqLworZXh0ZXJuIHN0cnVjdCBrb2Jqb3BfZGVzYyBidXNfZGVzY3JpYmVfaW50cl9kZXNjOwor LyoqIEBicmllZiBBIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0aGUgQlVTX0RFU0NSSUJFX0lOVFIo KSBtZXRob2QgKi8KK3R5cGVkZWYgaW50IGJ1c19kZXNjcmliZV9pbnRyX3QoZGV2aWNlX3QgX2Rl diwgZGV2aWNlX3QgX2NoaWxkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgcmVzb3VyY2UgKl9pcnEsIHZvaWQgKl9jb29raWUsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNvbnN0IGNoYXIgKl9kZXNjcik7CisvKioKKyAqIEBicmllZiBBbGxvdyBkcml2 ZXJzIHRvIGFzc29jaWF0ZSBhIGR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0aG9kICovCitleHRlcm4gc3RydWN0IGtvYmpv cF9kZXNjIGJ1c19oaW50X2RldmljZV91bml0X2Rlc2M7CisvKiogQGJyaWVmIEEgZnVuY3Rpb24g aW1wbGVtZW50aW5nIHRoZSBCVVNfSElOVF9ERVZJQ0VfVU5JVCgpIG1ldGhvZCAqLwordHlwZWRl ZiB2b2lkIGJ1c19oaW50X2RldmljZV91bml0X3QoZGV2aWNlX3QgX2RldiwgZGV2aWNlX3QgX2No aWxkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hhciAqX25h bWUsIGludCAqX3VuaXRwKTsKKy8qKgorICogQGJyaWVmIEFsbG93IHRoZSBidXMgdG8gZGV0ZXJt aW5lIHRoZSB1bml0IG51bWJlciBvZiBhIGRldmljZS4KKyAqCisgKiBAcGFyYW0gX2RldgkJdGhl IHBhcmVudCBkZXZpY2Ugb2YgQHAgX2NoaWxkCisgKiBAcGFyYW0gX2NoaWxkCXRoZSBkZXZpY2Ug d2hvc2UgdW5pdCBpcyB0byBiZSB3aXJlZAorICogQHBhcmFtIF9uYW1lCQl0aGUgbmFtZSBvZiB0 aGUgZGV2aWNlJ3MgbmV3IGRldmNsYXNzCisgKiBAcGFyYW0gX3VuaXRwCWEgcG9pbnRlciB0byB0 aGUgZGV2aWNlJ3MgbmV3IHVuaXQgdmFsdWUKKyAqLworCitzdGF0aWMgX19pbmxpbmUgdm9pZCBC VVNfSElOVF9ERVZJQ0VfVU5JVChkZXZpY2VfdCBfZGV2LCBkZXZpY2VfdCBfY2hpbGQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGFyICpfbmFtZSwg aW50ICpfdW5pdHApCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9PS1VQKCgoa29ial90KV9k ZXYpLT5vcHMsYnVzX2hpbnRfZGV2aWNlX3VuaXQpOworCSgoYnVzX2hpbnRfZGV2aWNlX3VuaXRf dCAqKSBfbSk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W92cQlURl9SMTQoJXJzcCksJXIxNCA7CQkJCQlcCisJbW92cQlURl9SMTUoJXJzcCksJXIxNSA7 CQkJCQlcCisJdGVzdGIJJFNFTF9SUExfTUFTSyxURl9DUyglcnNwKSA7IC8qIGNvbWUgZnJvbSBr ZXJuZWw/ICovCVwKKwlqegkxZiA7CQkvKiBrZWVwIGtlcm5lbCBHUy5iYXNlICovCQlcCisJY2xp IDsJCQkJCQkJCVwKKwlzd2FwZ3MgOwkJCQkJCQlcCisxOglhZGRxCSRURl9SSVAsJXJzcAkvKiBz a2lwIG92ZXIgdGZfZXJyLCB0Zl90cmFwbm8gKi8KKworLyoKKyAqIEFjY2VzcyBwZXItQ1BVIGRh dGEuCisgKi8KKyNkZWZpbmUJUENQVShtZW1iZXIpCSVnczpQQ18gIyMgbWVtYmVyCisjZGVmaW5l CVBDUFVfQUREUihtZW1iZXIsIHJlZykJCQkJCVwKKwltb3ZxICVnczpQQ19QUlZTUEFDRSwgcmVn IDsJCQkJXAorCWFkZHEgJFBDXyAjIyBtZW1iZXIsIHJlZworCisjZW5kaWYgLyogTE9DT1JFICov CisKKyNpZmRlZiBfX1NURENfXworI2RlZmluZSBFTEZOT1RFKG5hbWUsIHR5cGUsIGRlc2N0eXBl LCBkZXNjZGF0YS4uLikgXAorLnB1c2hzZWN0aW9uIC5ub3RlLm5hbWUgICAgICAgICAgICAgICAg IDsgICAgICAgXAorICAuYWxpZ24gNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDsgICAg ICAgXAorICAubG9uZyAyZiAtIDFmICAgICAgICAgLyogbmFtZXN6ICovICAgIDsgICAgICAgXAor ICAubG9uZyA0ZiAtIDNmICAgICAgICAgLyogZGVzY3N6ICovICAgIDsgICAgICAgXAorICAubG9u ZyB0eXBlICAgICAgICAgICAgICAgICAgICAgICAgICAgIDsgICAgICAgXAorMTouYXNjaXogI25h bWUgICAgICAgICAgICAgICAgICAgICAgICAgIDsgICAgICAgXAorMjouYWxpZ24gNCAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDsgICAgICAgXAorMzpkZXNjdHlwZSBkZXNjZGF0YSAgICAg ICAgICAgICAgICAgICAgIDsgICAgICAgXAorNDouYWxpZ24gNCAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDsgICAgICAgXAorLnBvcHNlY3Rpb24KKyNlbHNlIC8qICFfX1NURENfXywgaS5l LiAtdHJhZGl0aW9uYWwgKi8KKyNkZWZpbmUgRUxGTk9URShuYW1lLCB0eXBlLCBkZXNjdHlwZSwg ZGVzY2RhdGEpIFwKKy5wdXNoc2VjdGlvbiAubm90ZS5uYW1lICAgICAgICAgICAgICAgICA7ICAg ICAgIFwKKyAgLmFsaWduIDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7ICAgICAgIFwK KyAgLmxvbmcgMmYgLSAxZiAgICAgICAgIC8qIG5hbWVzeiAqLyAgICA7ICAgICAgIFwKKyAgLmxv bmcgNGYgLSAzZiAgICAgICAgIC8qIGRlc2NzeiAqLyAgICA7ICAgICAgIFwKKyAgLmxvbmcgdHlw ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICA7ICAgICAgIFwKKzE6LmFzY2l6ICJuYW1lIiAg ICAgICAgICAgICAgICAgICAgICAgICA7ICAgICAgIFwKKzI6LmFsaWduIDQgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA7ICAgICAgIFwKKzM6ZGVzY3R5cGUgZGVzY2RhdGEgICAgICAgICAg ICAgICAgICAgICA7ICAgICAgIFwKKzQ6LmFsaWduIDQgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA7ICAgICAgIFwKKy5wb3BzZWN0aW9uCisjZW5kaWYgLyogX19TVERDX18gKi8KKworI2Vu ZGlmIC8qICFfTUFDSElORV9BU01BQ1JPU19IXyAqLwpkaWZmIC11IC1yIC1OIHVzci9zcmMvc3lz L21vZHVsZXMvbmV0bWFwL21hY2hpbmUvYXRvbWljLmggL3Vzci9zcmMvc3lzL21vZHVsZXMvbmV0 bW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iAibWVtb3J5IikKKworLyoKKyAqIFZhcmlvdXMg c2ltcGxlIG9wZXJhdGlvbnMgb24gbWVtb3J5LCBlYWNoIG9mIHdoaWNoIGlzIGF0b21pYyBpbiB0 aGUKKyAqIHByZXNlbmNlIG9mIGludGVycnVwdHMgYW5kIG11bHRpcGxlIHByb2Nlc3NvcnMuCisg KgorICogYXRvbWljX3NldF9jaGFyKFAsIFYpCSgqKHVfY2hhciAqKShQKSB8PSAoVikpCisgKiBh dG9taWNfY2xlYXJfY2hhcihQLCBWKQkoKih1X2NoYXIgKikoUCkgJj0gfihWKSkKKyAqIGF0b21p Y19hZGRfY2hhcihQLCBWKQkoKih1X2NoYXIgKikoUCkgKz0gKFYpKQorICogYXRvbWljX3N1YnRy YWN0X2NoYXIoUCwgVikJKCoodV9jaGFyICopKFApIC09IChWKSkKKyAqCisgKiBhdG9taWNfc2V0 X3Nob3J0KFAsIFYpCSgqKHVfc2hvcnQgKikoUCkgfD0gKFYpKQorICogYXRvbWljX2NsZWFyX3No b3J0KFAsIFYpCSgqKHVfc2hvcnQgKikoUCkgJj0gfihWKSkKKyAqIGF0b21pY19hZGRfc2hvcnQo UCwgVikJKCoodV9zaG9ydCAqKShQKSArPSAoVikpCisgKiBhdG9taWNfc3VidHJhY3Rfc2hvcnQo UCwgVikJKCoodV9zaG9ydCAqKShQKSAtPSAoVikpCisgKgorICogYXRvbWljX3NldF9pbnQoUCwg VikJCSgqKHVfaW50ICopKFApIHw9IChWKSkKKyAqIGF0b21pY19jbGVhcl9pbnQoUCwgVikJKCoo dV9pbnQgKikoUCkgJj0gfihWKSkKKyAqIGF0b21pY19hZGRfaW50KFAsIFYpCQkoKih1X2ludCAq KShQKSArPSAoVikpCisgKiBhdG9taWNfc3VidHJhY3RfaW50KFAsIFYpCSgqKHVfaW50ICopKFAp IC09IChWKSkKKyAqIGF0b21pY19zd2FwX2ludChQLCBWKQkocmV0dXJuICgqKHVfaW50ICopKFAp KTsgKih1X2ludCAqKShQKSA9ICh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25nIgor CTogIj1xIiAocmVzKSwJCQkvKiAwICovCisJICAiK20iICgqcCkJCQkvKiAxICovCisJOiAiSnIi ICgodV9sb25nKSh2ICYgMHgzZikpCS8qIDIgKi8KKwk6ICJjYyIpOworCXJldHVybiAocmVzKTsK K30KKworc3RhdGljIF9faW5saW5lIGludAorYXRvbWljX3Rlc3RhbmRjbGVhcl9pbnQodm9sYXRp bGUgdV9pbnQgKnAsIHVfaW50IHYpCit7CisJdV9jaGFyIHJlczsKKworCV9fYXNtIF9fdm9sYXRp bGUoCisJIgkiIE1QTE9DS0VEICIJCSIKKwkiCWJ0cmwJJTIsJTEgOwkJIgorCSIJc2V0YwklMCA7 CQkiCisJIiMgYXRvbWljX3Rlc3RhbmRjbGVhcl9pbnQiCisJOiAiPXEiIChyZXMpLAkJCS8qIDAg Ki8KKwkgICIrbSIgKCpwKQkJCS8qIDEgKi8KKwk6ICJJciIgKHYgJiAweDFmKQkJLyogMiAqLwor CTogImNjIik7CisJcmV0dXJuIChyZXMpOworfQorCitzdGF0aWMgX19pbmxpbmUgaW50CithdG9t aWNfdGVzdGFuZGNsZWFyX2xvbmcodm9sYXRpbGUgdV9sb25nICpwLCB1X2ludCB2KQoreworCXVf Y2hhciByZXM7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKAorCSIJIiBNUExPQ0tFRCAiCQkiCisJIgli dHJxCSUyLCUxIDsJCSIKKwkiCXNldGMJJTAgOwkJIgorCSIjIGF0b21pY190ZXN0YW5kY2xlYXJf bG9uZyIKKwk6ICI9cSIgKHJlcyksCQkJLyogMCAqLworCSAgIittIiAoKnApCQkJLyogMSAqLwor CTogIkpyIiAoKHVfbG9uZykodiAmIDB4M2YpKQkvKiAyICovCisJOiAiY2MiKTsKKwlyZXR1cm4g KHJlcyk7Cit9CisKKy8qCisgKiBXZSBhc3N1bWUgdGhhdCBhID0gYiB3aWxsIGRvIGF0b21pYyBs b2FkcyBhbmQgc3RvcmVzLiAgRHVlIHRvIHRoZQorICogSUEzM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XJyaWVyKCk7Cit9CisKKyNlbmRp ZiAvKiBLTERfTU9EVUxFIHx8ICFfX0dOVUNMSUtFX0FTTSAqLworCitBVE9NSUNfQVNNKHNldCwJ ICAgICBjaGFyLCAgIm9yYiAlYjEsJTAiLCAgImlxIiwgIHYpOworQVRPTUlDX0FTTShjbGVhciwg ICAgY2hhciwgICJhbmRiICViMSwlMCIsICJpcSIsIH52KTsKK0FUT01JQ19BU00oYWRkLAkgICAg IGNoYXIsICAiYWRkYiAlYjEsJTAiLCAiaXEiLCAgdik7CitBVE9NSUNfQVNNKHN1YnRyYWN0LCBj aGFyLCAgInN1YmIgJWIxLCUwIiwgImlxIiwgIHYpOworCitBVE9NSUNfQVNNKHNldCwJICAgICBz aG9ydCwgIm9ydyAldzEsJTAiLCAgImlyIiwgIHYpOworQVRPTUlDX0FTTShjbGVhciwgICAgc2hv cnQsICJhbmR3ICV3MSwlMCIsICJpciIsIH52KTsKK0FUT01JQ19BU00oYWRkLAkgICAgIHNob3J0 LCAiYWRkdyAldzEsJTAiLCAiaXIiLCAgdik7CitBVE9NSUNfQVNNKHN1YnRyYWN0LCBzaG9ydCwg InN1YncgJXcxLCUwIiwgImlyIiwgIHYpOworCitBVE9NSUNfQVNNKHNldCwJICAgICBpbnQsICAg Im9ybCAlMSwlMCIsICAgImlyIiwgIHYpOworQVRPTUlDX0FTTShjbGVhciwgICAgaW50LCAgICJh bmRsICUxLCUwIiwgICJpciIsIH52KTsKK0FUT01JQ19BU00oYWRkLAkgICAgIGludCwgICAiYWRk bCAlMSwlMCIsICAiaXIiLCAgdik7CitBVE9NSUNfQVNNKHN1YnRyYWN0LCBpbnQsICAgInN1Ymwg JTEsJTAiLCAgImlyIiwgIHYpOworCitBVE9NSUNfQVNNKHNldCwJICAgICBsb25nLCAgIm9ycSAl MSwlMCIsICAgImlyIiwgIHYpOworQVRPTUlDX0FTTShjbGVhciwgICAgbG9uZywgICJhbmRxICUx LCUwIiwgICJpciIsIH52KTsKK0FUT01JQ19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YXRv bWljX2NtcHNldF9pbnQKKworI2RlZmluZQlhdG9taWNfc2V0X2FjcV9sb25nCQlhdG9taWNfc2V0 X2JhcnJfbG9uZworI2RlZmluZQlhdG9taWNfc2V0X3JlbF9sb25nCQlhdG9taWNfc2V0X2JhcnJf bG9uZworI2RlZmluZQlhdG9taWNfY2xlYXJfYWNxX2xvbmcJCWF0b21pY19jbGVhcl9iYXJyX2xv bmcKKyNkZWZpbmUJYXRvbWljX2NsZWFyX3JlbF9sb25nCQlhdG9taWNfY2xlYXJfYmFycl9sb25n CisjZGVmaW5lCWF0b21pY19hZGRfYWNxX2xvbmcJCWF0b21pY19hZGRfYmFycl9sb25nCisjZGVm aW5lCWF0b21pY19hZGRfcmVsX2xvbmcJCWF0b21pY19hZGRfYmFycl9sb25nCisjZGVmaW5lCWF0 b21pY19zdWJ0cmFjdF9hY3FfbG9uZwlhdG9taWNfc3VidHJhY3RfYmFycl9sb25nCisjZGVmaW5l CWF0b21pY19zdWJ0cmFjdF9yZWxfbG9uZwlhdG9taWNfc3VidHJhY3RfYmFycl9sb25nCisjZGVm aW5lCWF0b21pY19jbXBzZXRfYWNxX2xvbmcJCWF0b21pY19jbXBzZXRfbG9uZworI2RlZmluZQlh dG9taWNfY21wc2V0X3JlbF9sb25nCQlhdG9taWNfY21wc2V0X2xvbmcKKworI2RlZmluZQlhdG9t aWNfcmVhZGFuZGNsZWFyX2ludChwKQlhdG9taWNfc3dhcF9pbnQocCwgMCkKKyNkZWZpbmUJYXRv bWljX3JlYWRhbmRjbGVhcl9sb25nKHApCWF0b21pY19zd2FwX2xvbmcocCwgMCkKKworLyogT3Bl cmF0aW9ucyBvbiA4LWJpdCBieXRlcy4gKi8KKyNkZWZpbmUJYXRvbWljX3NldF84CQlhdG9taWNf c2V0X2NoYXIKKyNkZWZpbmUJYXRvbWljX3NldF9hY3FfOAlhdG9taWNfc2V0X2FjcV9jaGFyCisj ZGVmaW5lCWF0b21pY19zZXRfcmVsXzgJYXRvbWljX3Nld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fQorCitzdGF0aWMgX19pbmxpbmUgdV9pbnQKK2JzcmwodV9pbnQgbWFzaykKK3sKKwl1X2ludAly ZXN1bHQ7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCJic3JsICUxLCUwIiA6ICI9ciIgKHJlc3VsdCkg OiAicm0iIChtYXNrKSk7CisJcmV0dXJuIChyZXN1bHQpOworfQorCitzdGF0aWMgX19pbmxpbmUg dV9sb25nCitic3JxKHVfbG9uZyBtYXNrKQoreworCXVfbG9uZwlyZXN1bHQ7CisKKwlfX2FzbSBf X3ZvbGF0aWxlKCJic3JxICUxLCUwIiA6ICI9ciIgKHJlc3VsdCkgOiAicm0iIChtYXNrKSk7CisJ cmV0dXJuIChyZXN1bHQpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAorY2xmbHVzaCh1X2xv bmcgYWRkcikKK3sKKworCV9fYXNtIF9fdm9sYXRpbGUoImNsZmx1c2ggJTAiIDogOiAibSIgKCoo Y2hhciAqKWFkZHIpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2NsZmx1c2hvcHQodV9s b25nIGFkZHIpCit7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCIuYnl0ZSAweDY2O2NsZmx1c2ggJTAi IDogOiAibSIgKCooY2hhciAqKWFkZHIpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2Ns dHModm9pZCkKK3sKKworCV9fYXNtIF9fdm9sYXRpbGUoImNsdHMiKTsKK30KKworc3RhdGljIF9f aW5saW5lIHZvaWQKK2Rpc2FibGVfaW50cih2b2lkKQoreworCV9fYXNtIF9fdm9sYXRpbGUoImNs aSIgOiA6IDogIm1lbW9yeSIpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAorZG9fY3B1aWQo dV9pbnQgYXgsIHVfaW50ICpwKQoreworCV9fYXNtIF9fdm9sYXRpbGUoImNwdWlkIgorCQkJIDog Ij1hIiAocFswXSksICI9YiIgKHBbMV0pLCAiPWMiIChwWzJdKSwgIj1kIiAocFszXSkKKwkJCSA6 ICAiMCIgKGF4KSk7Cit9CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCitjcHVpZF9jb3VudCh1X2lu dCBheCwgdV9pbnQgY3gsIHVfaW50ICpwKQoreworCV9fYXNtIF9fdm9sYXRpbGUoImNwdWlkIgor CQkJIDogIj1hIiAocFswXSksICI9YiIgKHBbMV0pLCAiPWMiIChwWzJdKSwgIj1kIiAocFszXSkK KwkJCSA6ICAiMCIgKGF4KSwgImMiIChjeCkpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAor ZW5hYmxlX2ludHIodm9pZCkKK3sKKwlfX2FzbSBfX3ZvbGF0aWxlKCJzdGkiKTsKK30KKworI2lm ZGVmIF9LRVJORUwKKworI2RlZmluZQlIQVZFX0lOTElORV9GRlMKKyNkZWZpbmUgICAgICAgIGZm cyh4KSAgX19idWlsdGluX2Zmcyh4KQorCisjZGVmaW5lCUhBVkVfSU5MSU5FX0ZGU0wKKworc3Rh dGljIF9faW5saW5lIGludAorZmZzbChsb25nIG1hc2spCit7CisJcmV0dXJuIChtYXNrID09IDAg PyBtYXNrIDogKGludClic2ZxKCh1X2xvbmcpbWFzaykgKyAxKTsKK30KKworI2RlZmluZQlIQVZF X0lOTElORV9GRlNMTAorCitzdGF0aWMgX19pbmxpbmUgaW50CitmZnNsbChsb25nIGxvbmcgbWFz aykKK3sKKwlyZXR1cm4gKGZmc2woKGxvbmcpbWFzaykpOworfQorCisjZGVmaW5lCUhBVkVfSU5M SU5FX0ZMUworCitzdGF0aWMgX19pbmxpbmUgaW50CitmbHMoaW50IG1hc2spCit7CisJcmV0dXJu IChtYXNrID09IDAgPyBtYXNrIDogKGludClic3JsKCh1X2ludCltYXNrKSArIDEpOworfQorCisj ZGVmaW5lCUhBVkVfSU5MSU5FX0ZMU0wKKworc3RhdGljIF9faW5saW5lIGludAorZmxzbChsb25n IG1hc2spCit7CisJcmV0dXJuIChtYXNrID09IDAgPyBtYXNrIDogKGludClic3JxKCh1X2xvbmcp bWFzaykgKyAxKTsKK30KKworI2RlZmluZQlIQVZFX0lOTElORV9GTFNMTAorCitzdGF0aWMgX19p bmxpbmUgaW50CitmbHNsbChsb25nIGxvbmcgbWFzaykKK3sKKwlyZXR1cm4gKGZsc2woKGxvbmcp bWFzaykpOworfQorCisjZW5kaWYgLyogX0tFUk5FTCAqLworCitzdGF0aWMgX19pbmxpbmUgdm9p ZAoraGFsdCh2b2lkKQoreworCV9fYXNtIF9fdm9sYXRpbGUoImhsdCIpOworfQorCitzdGF0aWMg X19pbmxpbmUgdV9jaGFyCitpbmIodV9pbnQgcG9ydCkKK3sKKwl1X2NoYXIJZGF0YTsKKworCV9f YXNtIF9fdm9sYXRpbGUoImluYiAldzEsICUwIiA6ICI9YSIgKGRhdGEpIDogIk5kIiAocG9ydCkp OworCXJldHVybiAoZGF0YSk7Cit9CisKK3N0YXRpYyBfX2lubGluZSB1X2ludAoraW5sKHVfaW50 IHBvcnQpCit7CisJdV9pbnQJZGF0YTsKKworCV9fYXNtIF9fdm9sYXRpbGUoImlubCAldzEsICUw IiA6ICI9YSIgKGRhdGEpIDogIk5kIiAocG9ydCkpOworCXJldHVybiAoZGF0YSk7Cit9CisKK3N0 YXRpYyBfX2lubGluZSB2b2lkCitpbnNiKHVfaW50IHBvcnQsIHZvaWQgKmFkZHIsIHNpemVfdCBj b3VudCkKK3sKKwlfX2FzbSBfX3ZvbGF0aWxlKCJjbGQ7IHJlcDsgaW5zYiIKKwkJCSA6ICIrRCIg KGFkZHIpLCAiK2MiIChjb3VudCkKKwkJCSA6ICJkIiAocG9ydCkKKwkJCSA6ICJtZW1vcnkiKTsK K30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2luc3codV9pbnQgcG9ydCwgdm9pZCAqYWRkciwg c2l6ZV90IGNvdW50KQoreworCV9fYXNtIF9fdm9sYXRpbGUoImNsZDsgcmVwOyBpbnN3IgorCQkJ IDogIitEIiAoYWRkciksICIrYyIgKGNvdW50KQorCQkJIDogImQiIChwb3J0KQorCQkJIDogIm1l bW9yeSIpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAoraW5zbCh1X2ludCBwb3J0LCB2b2lk ICphZGRyLCBzaXplX3QgY291bnQpCit7CisJX19hc20gX192b2xhdGlsZSgiY2xkOyByZXA7IGlu c2wiCisJCQkgOiAiK0QiIChhZGRyKSwgIitjIiAoY291bnQpCisJCQkgOiAiZCIgKHBvcnQpCisJ CQkgOiAibWVtb3J5Iik7Cit9CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCitpbnZkKHZvaWQpCit7 CisJX19hc20gX192b2xhdGlsZSgiaW52ZCIpOworfQorCitzdGF0aWMgX19pbmxpbmUgdV9zaG9y dAoraW53KHVfaW50IHBvcnQpCit7CisJdV9zaG9ydAlkYXRhOworCisJX19hc20gX192b2xhdGls ZSgiaW53ICV3MSwgJTAiIDogIj1hIiAoZGF0YSkgOiAiTmQiIChwb3J0KSk7CisJcmV0dXJuIChk YXRhKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK291dGIodV9pbnQgcG9ydCwgdV9jaGFy IGRhdGEpCit7CisJX19hc20gX192b2xhdGlsZSgib3V0YiAlMCwgJXcxIiA6IDogImEiIChkYXRh KSwgIk5kIiAocG9ydCkpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAorb3V0bCh1X2ludCBw b3J0LCB1X2ludCBkYXRhKQoreworCV9fYXNtIF9fdm9sYXRpbGUoIm91dGwgJTAsICV3MSIgOiA6 ICJhIiAoZGF0YSksICJOZCIgKHBvcnQpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK291 dHNiKHVfaW50IHBvcnQsIGNvbnN0IHZvaWQgKmFkZHIsIHNpemVfdCBjb3VudCkKK3sKKwlfX2Fz bSBfX3ZvbGF0aWxlKCJjbGQ7IHJlcDsgb3V0c2IiCisJCQkgOiAiK1MiIChhZGRyKSwgIitjIiAo Y291bnQpCisJCQkgOiAiZCIgKHBvcnQpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK291 dHN3KHVfaW50IHBvcnQsIGNvbnN0IHZvaWQgKmFkZHIsIHNpemVfdCBjb3VudCkKK3sKKwlfX2Fz bSBfX3ZvbGF0aWxlKCJjbGQ7IHJlcDsgb3V0c3ciCisJCQkgOiAiK1MiIChhZGRyKSwgIitjIiAo Y291bnQpCisJCQkgOiAiZCIgKHBvcnQpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK291 dHNsKHVfaW50IHBvcnQsIGNvbnN0IHZvaWQgKmFkZHIsIHNpemVfdCBjb3VudCkKK3sKKwlfX2Fz bSBfX3ZvbGF0aWxlKCJjbGQ7IHJlcDsgb3V0c2wiCisJCQkgOiAiK1MiIChhZGRyKSwgIitjIiAo Y291bnQpCisJCQkgOiAiZCIgKHBvcnQpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK291 dHcodV9pbnQgcG9ydCwgdV9zaG9ydCBkYXRhKQoreworCV9fYXNtIF9fdm9sYXRpbGUoIm91dHcg JTAsICV3MSIgOiA6ICJhIiAoZGF0YSksICJOZCIgKHBvcnQpKTsKK30KKworc3RhdGljIF9faW5s aW5lIHVfbG9uZworcG9wY250cSh1X2xvbmcgbWFzaykKK3sKKwl1X2xvbmcgcmVzdWx0OworCisJ X19hc20gX192b2xhdGlsZSgicG9wY250cSAlMSwlMCIgOiAiPXIiIChyZXN1bHQpIDogInJtIiAo bWFzaykpOworCXJldHVybiAocmVzdWx0KTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2xm ZW5jZSh2b2lkKQoreworCisJX19hc20gX192b2xhdGlsZSgibGZlbmNlIiA6IDogOiAibWVtb3J5 Iik7Cit9CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCittZmVuY2Uodm9pZCkKK3sKKworCV9fYXNt IF9fdm9sYXRpbGUoIm1mZW5jZSIgOiA6IDogIm1lbW9yeSIpOworfQorCitzdGF0aWMgX19pbmxp bmUgdm9pZAoraWEzMl9wYXVzZSh2b2lkKQoreworCV9fYXNtIF9fdm9sYXRpbGUoInBhdXNlIik7 Cit9CisKK3N0YXRpYyBfX2lubGluZSB1X2xvbmcKK3JlYWRfcmZsYWdzKHZvaWQpCit7CisJdV9s b25nCXJmOworCisJX19hc20gX192b2xhdGlsZSgicHVzaGZxOyBwb3BxICUwIiA6ICI9ciIgKHJm KSk7CisJcmV0dXJuIChyZik7Cit9CisKK3N0YXRpYyBfX2lubGluZSB1aW50NjRfdAorcmRtc3Io dV9pbnQgbXNyKQoreworCXVpbnQzMl90IGxvdywgaGlnaDsKKworCV9fYXNtIF9fdm9sYXRpbGUo InJkbXNyIiA6ICI9YSIgKGxvdyksICI9ZCIgKGhpZ2gpIDogImMiIChtc3IpKTsKKwlyZXR1cm4g KGxvdyB8ICgodWludDY0X3QpaGlnaCA8PCAzMikpOworfQorCitzdGF0aWMgX19pbmxpbmUgdWlu dDMyX3QKK3JkbXNyMzIodV9pbnQgbXNyKQoreworCXVpbnQzMl90IGxvdzsKKworCV9fYXNtIF9f dm9sYXRpbGUoInJkbXNyIiA6ICI9YSIgKGxvdykgOiAiYyIgKG1zcikgOiAicmR4Iik7CisJcmV0 dXJuIChsb3cpOworfQorCitzdGF0aWMgX19pbmxpbmUgdWludDY0X3QKK3JkcG1jKHVfaW50IHBt YykKK3sKKwl1aW50MzJfdCBsb3csIGhpZ2g7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCJyZHBtYyIg OiAiPWEiIChsb3cpLCAiPWQiIChoaWdoKSA6ICJjIiAocG1jKSk7CisJcmV0dXJuIChsb3cgfCAo KHVpbnQ2NF90KWhpZ2ggPDwgMzIpKTsKK30KKworc3RhdGljIF9faW5saW5lIHVpbnQ2NF90City ZHRzYyh2b2lkKQoreworCXVpbnQzMl90IGxvdywgaGlnaDsKKworCV9fYXNtIF9fdm9sYXRpbGUo InJkdHNjIiA6ICI9YSIgKGxvdyksICI9ZCIgKGhpZ2gpKTsKKwlyZXR1cm4gKGxvdyB8ICgodWlu dDY0X3QpaGlnaCA8PCAzMikpOworfQorCitzdGF0aWMgX19pbmxpbmUgdWludDMyX3QKK3JkdHNj MzIodm9pZCkKK3sKKwl1aW50MzJfdCBydjsKKworCV9fYXNtIF9fdm9sYXRpbGUoInJkdHNjIiA6 ICI9YSIgKHJ2KSA6IDogImVkeCIpOworCXJldHVybiAocnYpOworfQorCitzdGF0aWMgX19pbmxp bmUgdm9pZAord2JpbnZkKHZvaWQpCit7CisJX19hc20gX192b2xhdGlsZSgid2JpbnZkIik7Cit9 CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCit3cml0ZV9yZmxhZ3ModV9sb25nIHJmKQoreworCV9f YXNtIF9fdm9sYXRpbGUoInB1c2hxICUwOyAgcG9wZnEiIDogOiAiciIgKHJmKSk7Cit9CisKK3N0 YXRpYyBfX2lubGluZSB2b2lkCit3cm1zcih1X2ludCBtc3IsIHVpbnQ2NF90IG5ld3ZhbCkKK3sK Kwl1aW50MzJfdCBsb3csIGhpZ2g7CisKKwlsb3cgPSBuZXd2YWw7CisJaGlnaCA9IG5ld3ZhbCA+ PiAzMjsKKwlfX2FzbSBfX3ZvbGF0aWxlKCJ3cm1zciIgOiA6ICJhIiAobG93KSwgImQiIChoaWdo KSwgImMiIChtc3IpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2xvYWRfY3IwKHVfbG9u ZyBkYXRhKQoreworCisJX19hc20gX192b2xhdGlsZSgibW92cSAlMCwlJWNyMCIgOiA6ICJyIiAo ZGF0YSkpOworfQorCitzdGF0aWMgX19pbmxpbmUgdV9sb25nCityY3IwKHZvaWQpCit7CisJdV9s b25nCWRhdGE7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCJtb3ZxICUlY3IwLCUwIiA6ICI9ciIgKGRh dGEpKTsKKwlyZXR1cm4gKGRhdGEpOworfQorCitzdGF0aWMgX19pbmxpbmUgdV9sb25nCityY3Iy KHZvaWQpCit7CisJdV9sb25nCWRhdGE7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCJtb3ZxICUlY3Iy LCUwIiA6ICI9ciIgKGRhdGEpKTsKKwlyZXR1cm4gKGRhdGEpOworfQorCitzdGF0aWMgX19pbmxp bmUgdm9pZAorbG9hZF9jcjModV9sb25nIGRhdGEpCit7CisKKwlfX2FzbSBfX3ZvbGF0aWxlKCJt b3ZxICUwLCUlY3IzIiA6IDogInIiIChkYXRhKSA6ICJtZW1vcnkiKTsKK30KKworc3RhdGljIF9f aW5saW5lIHVfbG9uZworcmNyMyh2b2lkKQoreworCXVfbG9uZwlkYXRhOworCisJX19hc20gX192 b2xhdGlsZSgibW92cSAlJWNyMywlMCIgOiAiPXIiIChkYXRhKSk7CisJcmV0dXJuIChkYXRhKTsK K30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2xvYWRfY3I0KHVfbG9uZyBkYXRhKQoreworCV9f YXNtIF9fdm9sYXRpbGUoIm1vdnEgJTAsJSVjcjQiIDogOiAiciIgKGRhdGEpKTsKK30KKworc3Rh dGljIF9faW5saW5lIHVfbG9uZworcmNyNCh2b2lkKQoreworCXVfbG9uZwlkYXRhOworCisJX19h c20gX192b2xhdGlsZSgibW92cSAlJWNyNCwlMCIgOiAiPXIiIChkYXRhKSk7CisJcmV0dXJuIChk YXRhKTsKK30KKworc3RhdGljIF9faW5saW5lIHVfbG9uZworcnhjcih1X2ludCByZWcpCit7CisJ dV9pbnQgbG93LCBoaWdoOworCisJX19hc20gX192b2xhdGlsZSgieGdldGJ2IiA6ICI9YSIgKGxv dyksICI9ZCIgKGhpZ2gpIDogImMiIChyZWcpKTsKKwlyZXR1cm4gKGxvdyB8ICgodWludDY0X3Qp aGlnaCA8PCAzMikpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAorbG9hZF94Y3IodV9pbnQg cmVnLCB1X2xvbmcgdmFsKQoreworCXVfaW50IGxvdywgaGlnaDsKKworCWxvdyA9IHZhbDsKKwlo aWdoID0gdmFsID4+IDMyOworCV9fYX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ovCisJX19hc20gX192b2xh dGlsZSgicHVzaGZxOyBjbGk7IHJkbXNyOyBtb3Z3ICUwLCUlZ3M7IHdybXNyOyBwb3BmcSIKKwkg ICAgOiA6ICJybSIgKHNlbCksICJjIiAoTVNSX0dTQkFTRSkgOiAiZWF4IiwgImVkeCIpOworfQor I2Vsc2UKKy8qIFVzYWJsZSBieSB1c2VybGFuZCAqLworc3RhdGljIF9faW5saW5lIHZvaWQKK2xv YWRfZnModV9zaG9ydCBzZWwpCit7CisJX19hc20gX192b2xhdGlsZSgibW92dyAlMCwlJWZzIiA6 IDogInJtIiAoc2VsKSk7Cit9CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCitsb2FkX2dzKHVfc2hv cnQgc2VsKQoreworCV9fYXNtIF9fdm9sYXRpbGUoIm1vdncgJTAsJSVncyIgOiA6ICJybSIgKHNl bCkpOworfQorI2VuZGlmCisKK3N0YXRpYyBfX2lubGluZSB2b2lkCitsaWR0KHN0cnVjdCByZWdp b25fZGVzY3JpcHRvciAqYWRkcikKK3sKKwlfX2FzbSBfX3ZvbGF0aWxlKCJsaWR0ICglMCkiIDog OiAiciIgKGFkZHIpKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2xsZHQodV9zaG9ydCBz ZWwpCit7CisJX19hc20gX192b2xhdGlsZSgibGxkdCAlMCIgOiA6ICJyIiAoc2VsKSk7Cit9CisK K3N0YXRpYyBfX2lubGluZSB2b2lkCitsdHIodV9zaG9ydCBzZWwpCit7CisJX19hc20gX192b2xh dGlsZSgibHRyICUwIiA6IDogInIiIChzZWwpKTsKK30KKworc3RhdGljIF9faW5saW5lIHVpbnQ2 NF90CityZHIwKHZvaWQpCit7CisJdWludDY0X3QgZGF0YTsKKwlfX2FzbSBfX3ZvbGF0aWxlKCJt b3ZxICUlZHIwLCUwIiA6ICI9ciIgKGRhdGEpKTsKKwlyZXR1cm4gKGRhdGEpOworfQorCitzdGF0 aWMgX19pbmxpbmUgdm9pZAorbG9hZF9kcjAodWludDY0X3QgZHIwKQoreworCV9fYXNtIF9fdm9s YXRpbGUoIm1vdnEgJTAsJSVkcjAiIDogOiAiciIgKGRyMCkpOworfQorCitzdGF0aWMgX19pbmxp bmUgdWludDY0X3QKK3JkcjEodm9pZCkKK3sKKwl1aW50NjRfdCBkYXRhOworCV9fYXNtIF9fdm9s YXRpbGUoIm1vdnEgJSVkcjEsJTAiIDogIj1yIiAoZGF0YSkpOworCXJldHVybiAoZGF0YSk7Cit9 CisKK3N0YXRpYyBfX2lubGluZSB2b2lkCitsb2FkX2RyMSh1aW50NjRfdCBkcjEpCit7CisJX19h c20gX192b2xhdGlsZSgibW92cSAlMCwlJWRyMSIgOiA6ICJyIiAoZHIxKSk7Cit9CisKK3N0YXRp YyBfX2lubGluZSB1aW50NjRfdAorcmRyMih2b2lkKQoreworCXVpbnQ2NF90IGRhdGE7CisJX19h c20gX192b2xhdGlsZSgibW92cSAlJWRyMiwlMCIgOiAiPXIiIChkYXRhKSk7CisJcmV0dXJuIChk YXRhKTsKK30KKworc3RhdGljIF9faW5saW5lIHZvaWQKK2xvYWRfZHIyKHVpbnQ2NF90IGRyMikK K3sKKwlfX2FzbSBfX3ZvbGF0aWxlKCJtb3ZxICUwLCUlZHIyIiA6IDogInIiIChkcjIpKTsKK30K Kworc3RhdGljIF9faW5saW5lIHVpbnQ2NF90CityZHIzKHZvaWQpCit7CisJdWludDY0X3QgZGF0 YTsKKwlfX2FzbSBfX3ZvbGF0aWxlKCJtb3ZxICUlZHIzLCUwIiA6ICI9ciIgKGRhdGEpKTsKKwly ZXR1cm4gKGRhdGEpOworfQorCitzdGF0aWMgX19pbmxpbmUgdm9pZAorbG9hZF9kcjModWludDY0 X3QgZHIzKQoreworCV9fYXNtIF9fdm9sYXRpbGUoIm1vdnEgJTAsJSVkcjMiIDogOiAiciIgKGRy MykpOworfQorCitzdGF0aWMgX19pbmxpbmUgdWludDY0X3QKK3JkcjQodm9pZCkKK3sKKwl1aW50 NjRfdCBkYXRhOworC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19uYW1lICovCisJdWludDY0X3QJcmVndmFsOwor fTsKKworc3RydWN0IHZtX3NlZ19kZXNjIHsJCQkvKiBkYXRhIG9yIGNvZGUgc2VnbWVudCAqLwor CWludAkJY3B1aWQ7CisJaW50CQlyZWdudW07CQkvKiBlbnVtIHZtX3JlZ19uYW1lICovCisJc3Ry dWN0IHNlZ19kZXNjIGRlc2M7Cit9OworCitzdHJ1Y3Qgdm1fcnVuIHsKKwlpbnQJCWNwdWlkOwor CXN0cnVjdCB2bV9leGl0CXZtX2V4aXQ7Cit9OworCitzdHJ1Y3Qgdm1fZXhjZXB0aW9uIHsKKwlp bnQJCWNwdWlkOworCWludAkJdmVjdG9yOworCXVpbnQzMl90CWVycm9yX2NvZGU7CisJaW50CQll cnJvcl9jb2RlX3ZhbGlkOworCWludAkJcmVzdGFydF9pbnN0cnVjdGlvbjsKK307CisKK3N0cnVj dCB2bV9sYXBpY19tc2kgeworCXVpbnQ2NF90CW1zZzsKKwl1aW50NjRfdAlhZGRyOworfTsKKwor c3RydWN0IHZtX2xhcGljX2lycSB7CisJaW50CQljcHVpZDsKKwlpbnQJCXZlY3RvcjsKK307CisK K3N0cnVjdCB2bV9pb2FwaWNfaXJxIHsKKwlpbnQJCWlycTsKK307CisKK3N0cnVjdCB2bV9pc2Ff aXJxIHsKKwlpbnQJCWF0cGljX2lycTsKKwlpbnQJCWlvYXBpY19pcnE7Cit9OworCitzdHJ1Y3Qg dm1faXNhX2lycV90cmlnZ2VyIHsKKwlpbnQJCWF0cGljX2lycTsKKwllbnVtIHZtX2ludHJfdHJp Z2dlciB0cmlnZ2VyOworfTsKKworc3RydWN0IHZtX2NhcGFiaWxpdHkgeworCWludAkJY3B1aWQ7 CisJZW51bSB2bV9jYXBfdHlwZSBjYXB0eXBlOworCWludAkJY2FwdmFsOworCWludAkJYWxsY3B1 czsKK307CisKK3N0cnVjdCB2bV9wcHRkZXYgeworCWludAkJYnVzOworCWludAkJc2xvdDsKKwlp bnQJCWZ1bmM7Cit9OworCitzdHJ1Y3Qgdm1fcHB0ZGV2X21taW8geworCWludAkJYnVzOworCWlu dAkJc2xvdDsKKwlpbnQJCWZ1bmM7CisJdm1fcGFkZHJfdAlncGE7CisJdm1fcGFkZHJfdAlocGE7 CisJc2l6ZV90CQlsZW47Cit9OworCisvKiBBcmd1bWVudCBmb3IgVk1fTUFQX1VTRVJfQlVGIGlv Y3RsIGluIHZtbWFwaS5jICovCitzdHJ1Y3Qgdm1fdXNlcl9idWYgeworCXZtX3BhZGRyX3QJZ3Bh OworCXZvaWQgCQkqYWRkcjsKKwlzaXplX3QJCWxlbjsKK307CisKKy8qIEFyZ3VtZW50IGZvciBW TV9JT19SRUdfSEFORExFUiBpb2N0bCBpbiB2bW1hcGkuYyAqLworc3RydWN0IHZtX2lvX3JlZ19o YW5kbGVyIHsKKwl1aW50MTZfdAkJcG9ydDsJCS8qIEkvTyBhZGRyZXNzICovCisJdWludDE2X3QJ CWluOwkJLyogMCBvdXQsIDEgaW4gKi8KKwl1aW50MzJfdAkJbWFza19kYXRhOwkvKiAwIG1lYW5z IG1hdGNoIGFueXRoaW5nICovCisJdWludDMyX3QJCWRhdGE7CQkvKiBkYXRhIHRvIG1hdGNoICov CisJZW51bSB2bV9pb19yZWdoX3R5cGUJdHlwZTsJCS8qIGhhbmRsZXIgdHlwZSAqLworCXZvaWQJ CQkqYXJnOwkJLyogaGFuZGxlciBhcmd1bWVudCAqLworfTsKKworc3RydWN0IHZtX3BwdGRldl9t c2kgeworCWludAkJdmNwdTsKKwlpbnQJCWJ1czsKKwlpbnQJCXNsb3Q7CisJaW50CQlmdW5jOwor CWludAkJbnVtdmVjOwkJLyogMCBtZWFucyBkaXNhYmxlZCAqLworCXVpbnQ2NF90CW1zZzsKKwl1 aW50NjRfdAlhZGRyOworfTsKKworc3RydWN0IHZtX3BwdGRldl9tc2l4IHsKKwlpbnQJCXZjcHU7 CisJaW50CQlidXM7CisJaW50CQlzbG90OworCWludAkJZnVuYzsKKwlpbnQJCW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K307 CisKK3N0cnVjdCB2bV9leGNlcHRpb24geworCWludAkJY3B1aWQ7CisJaW50CQl2ZWN0b3I7CisJ dWludDMyX3QJZXJyb3JfY29kZTsKKwlpbnQJCWVycm9yX2NvZGVfdmFsaWQ7CisJaW50CQlyZXN0 YXJ0X2luc3RydWN0aW9uOworfTsKKworc3RydWN0IHZtX2xhcGljX21zaSB7CisJdWludDY0X3QJ bXNnOworCXVpbnQ2NF90CWFkZHI7Cit9OworCitzdHJ1Y3Qgdm1fbGFwaWNfaXJxIHsKKwlpbnQJ CWNwdWlkOworCWludAkJdmVjdG9yOworfTsKKworc3RydWN0IHZtX2lvYXBpY19pcnEgeworCWlu dAkJaXJxOworfTsKKworc3RydWN0IHZtX2lzYV9pcnEgeworCWludAkJYXRwaWNfaXJxOworCWlu dAkJaW9hcGljX2lycTsKK307CisKK3N0cnVjdCB2bV9pc2FfaXJxX3RyaWdnZXIgeworCWludAkJ YXRwaWNfaXJxOworCWVudW0gdm1faW50cl90cmlnZ2VyIHRyaWdnZXI7Cit9OworCitzdHJ1Y3Qg dm1fY2FwYWJpbGl0eSB7CisJaW50CQljcHVpZDsKKwllbnVtIHZtX2NhcF90eXBlIGNhcHR5cGU7 CisJaW50CQljYXB2YWw7CisJaW50CQlhbGxjcHVzOworfTsKKworc3RydWN0IHZtX3BwdGRldiB7 CisJaW50CQlidXM7CisJaW50CQlzbG90OworCWludAkJZnVuYzsKK307CisKK3N0cnVjdCB2bV9w cHRkZXZfbW1pbyB7CisJaW50CQlidXM7CisJaW50CQlzbG90OworCWludAkJZnVuYzsKKwl2bV9w YWRkcl90CWdwYTsKKwl2bV9wYWRkcl90CWhwYTsKKwlzaXplX3QJCWxlbjsKK307CisKK3N0cnVj dCB2bV9wcHRkZXZfbXNpIHsKKwlpbnQJCXZjcHU7CisJaW50CQlidXM7CisJaW50CQlzbG90Owor CWludAkJZnVuYzsKKwlpbnQJCW51bXZlYzsJCS8qIDAgbWVhbnMgZGlzYWJsZWQgKi8KK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LnUpKTsKKwl9CisjZW5kaWYKKworCXJl dHVybiByYzsKK30KKworc3RhdGljIGlubGluZSBpbnQgX19tdXN0X2NoZWNrCitIWVBFUlZJU09S X2dyYW50X3RhYmxlX29wKAorCXVuc2lnbmVkIGludCBjbWQsIHZvaWQgKnVvcCwgdW5zaWduZWQg aW50IGNvdW50KQoreworCXJldHVybiBfaHlwZXJjYWxsMyhpbnQsIGdyYW50X3RhYmxlX29wLCBj bWQsIHVvcCwgY291bnQpOworfQorCitzdGF0aWMgaW5saW5lIGludCBfX211c3RfY2hlY2sKK0hZ UEVSVklTT1JfdXBkYXRlX3ZhX21hcHBpbmdfb3RoZXJkb21haW4oCisJdW5zaWduZWQgbG9uZyB2 YSwgdWludDY0X3QgbmV3X3ZhbCwgdW5zaWduZWQgbG9uZyBmbGFncywgZG9taWRfdCBkb21pZCkK K3sKKwlyZXR1cm4gX2h5cGVyY2FsbDQoaW50LCB1cGRhdGVfdmFfbWFwcGluZ19vdGhlcmRvbWFp biwgdmEsCisJCQkgICBuZXdfdmFsLCBmbGFncywgZG9taWQpOworfQorCitzdGF0aWMgaW5saW5l IGludCBfX211c3RfY2hlY2sKK0hZUEVSVklTT1Jfdm1fYXNzaXN0KAorCXVuc2lnbmVkIGludCBj bWQsIHVuc2lnbmVkIGludCB0eXBlKQoreworCXJldHVybiBfaHlwZXJjYWxsMihpbnQsIHZtX2Fz c2lzdCwgY21kLCB0eXBlKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgX19tdXN0X2NoZWNrCitI WVBFUlZJU09SX3ZjcHVfb3AoCisJaW50IGNtZCwgdW5zaWduZWQgaW50IHZjcHVpZCwgdm9pZCAq ZXh0cmFfYXJncykKK3sKKwlyZXR1cm4gX2h5cGVyY2FsbDMoaW50LCB2Y3B1X29wLCBjbWQsIHZj cHVpZCwgZXh0cmFfYXJncyk7Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50IF9fbXVzdF9jaGVjawor SFlQRVJWSVNPUl9zZXRfc2Vn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gMDA6MjQ6NTQuMDAwMDAwMDAwICswMTAwCkBAIC0wLDAgKzEsMTI5IEBA CisjaWZuZGVmIF9fWEVOX1NZTkNIX0JJVE9QU19IX18KKyNkZWZpbmUgX19YRU5fU1lOQ0hfQklU T1BTX0hfXworCisvKgorICogQ29weXJpZ2h0IDE5OTIsIExpbnVzIFRvcnZhbGRzLgorICogSGVh dmlseSBtb2RpZmllZCB0byBwcm92aWRlIGd1YXJhbnRlZWQgc3Ryb25nIHN5bmNocm9uaXNhdGlv bgorICogd2hlbiBjb21tdW5pY2F0aW5nIHdpdGggWGVuIG9yIG90aGVyIGd1ZXN0IE9TZXMgcnVu bmluZyBvbiBvdGhlciBDUFVzLgorICovCisKKworI2RlZmluZSBBRERSICgqKHZvbGF0aWxlIGxv bmcgKikgYWRkcikKKworc3RhdGljIF9faW5saW5lX18gdm9pZCBzeW5jaF9zZXRfYml0KGludCBu ciwgdm9sYXRpbGUgdm9pZCAqIGFkZHIpCit7CisgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCAK KyAgICAgICAgImxvY2sgYnRzbCAlMSwlMCIKKyAgICAgICAgOiAiPW0iIChBRERSKSA6ICJJciIg KG5yKSA6ICJtZW1vcnkiICk7Cit9CisKK3N0YXRpYyBfX2lubGluZV9fIHZvaWQgc3luY2hfY2xl YXJfYml0KGludCBuciwgdm9sYXRpbGUgdm9pZCAqIGFkZHIpCit7CisgICAgX19hc21fXyBfX3Zv bGF0aWxlX18gKAorICAgICAgICAibG9jayBidHJsICUxLCUwIgorICAgICAgICA6ICI9bSIgKEFE RFIpIDogIklyIiAobnIpIDogIm1lbW9yeSIgKTsKK30KKworc3RhdGljIF9faW5saW5lX18gdm9p ZCBzeW5jaF9jaGFuZ2VfYml0KGludCBuciwgdm9sYXRpbGUgdm9pZCAqIGFkZHIpCit7CisgICAg X19hc21fXyBfX3ZvbGF0aWxlX18gKAorICAgICAgICAibG9jayBidGNsICUxLCUwIgorICAgICAg ICA6ICI9bSIgKEFERFIpIDogIklyIiAobnIpIDogIm1lbW9yeSIgKTsKK30KKworc3RhdGljIF9f aW5saW5lX18gaW50IHN5bmNoX3Rlc3RfYW5kX3NldF9iaXQoaW50IG5yLCB2b2xhdGlsZSB2b2lk ICogYWRkcikKK3sKKyAgICBpbnQgb2xkYml0OworICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgK KyAgICAgICAgImxvY2sgYnRzbCAlMiwlMVxuXHRzYmJsICUwLCUwIgorICAgICAgICA6ICI9ciIg KG9sZGJpdCksICI9bSIgKEFERFIpIDogIklyIiAobnIpIDogIm1lbW9yeSIpOworICAgIHJldHVy biBvbGRiaXQ7Cit9CisKK3N0YXRpYyBfX2lubGluZV9fIGludCBzeW5jaF90ZXN0X2FuZF9jbGVh cl9iaXQoaW50IG5yLCB2b2xhdGlsZSB2b2lkICogYWRkcikKK3sKKyAgICBpbnQgb2xkYml0Owor ICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgKKyAgICAgICAgImxvY2sgYnRybCAlMiwlMVxuXHRz YmJsICUwLCUwIgorICAgICAgICA6ICI9ciIgKG9sZGJpdCksICI9bSIgKEFERFIpIDogIklyIiAo bnIpIDogIm1lbW9yeSIpOworICAgIHJldHVybiBvbGRiaXQ7Cit9CisKK3N0YXRpYyBfX2lubGlu ZV9fIGludCBzeW5jaF90ZXN0X2FuZF9jaGFuZ2VfYml0KGludCBuciwgdm9sYXRpbGUgdm9pZCAq IGFkZHIpCit7CisgICAgaW50IG9sZGJpdDsKKworICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgK KyAgICAgICAgImxvY2sgYnRjbCAlMiwlMVxuXHRzYmJsICUwLCUwIgorICAgICAgICA6ICI9ciIg KG9sZGJpdCksICI9bSIgKEFERFIpIDogIklyIiAobnIpIDogIm1lbW9yeSIpOworICAgIHJldHVy biBvbGRiaXQ7Cit9CisKK3N0cnVjdCBfX3N5bmNoX3hjaGdfZHVtbXkgeyB1bnNpZ25lZCBsb25n IGFbMTAwXTsgfTsKKyNkZWZpbmUgX19zeW5jaF94Zyh4KSAoKHZvbGF0aWxlIHN0cnVjdCBfX3N5 bmNoX3hjaGdfZHVtbXkgKikoeCkpCisKKyNkZWZpbmUgc3luY2hfY21weGNoZyhwdHIsIG9sZCwg bmV3KSBcCisoKF9fdHlwZW9mX18oKihwdHIpKSlfX3N5bmNoX2NtcHhjaGcoKHB0ciksXAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKShvbGQpLCBc CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGxvbmcpKG5l dyksIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoKihwdHIp KSkpCisKK3N0YXRpYyBpbmxpbmUgdW5zaWduZWQgbG9uZyBfX3N5bmNoX2NtcHhjaGcodm9sYXRp bGUgdm9pZCAqcHRyLAorCQkJCQkgICAgdW5zaWduZWQgbG9uZyBvbGQsCisJCQkJCSAgICB1bnNp Z25lZCBsb25nIG5ldywgaW50IHNpemUpCit7CisJdW5zaWduZWQgbG9uZyBwcmV2OworCXN3aXRj aCAoc2l6ZSkgeworCWNhc2UgMToKKwkJX19hc21fXyBfX3ZvbGF0aWxlX18oImxvY2s7IGNtcHhj aGdiICViMSwlMiIKKwkJCQkgICAgIDogIj1hIihwcmV2KQorCQkJCSAgICAgOiAicSIobmV3KSwg Im0iKCpfX3N5bmNoX3hnKHB0cikpLAorCQkJCSAgICAgICAiMCIob2xkKQorCQkJCSAgICAgOiAi bWVtb3J5Iik7CisJCXJldHVybiBwcmV2OworCWNhc2UgMjoKKwkJX19hc21fXyBfX3ZvbGF0aWxl X18oImxvY2s7IGNtcHhjaGd3ICV3MSwlMiIKKwkJCQkgICAgIDogIj1hIihwcmV2KQorCQkJCSAg ICAgOiAicSIobmV3KSwgIm0iKCpfX3N5bmNoX3hnKHB0cikpLAorCQkJCSAgICAgICAiMCIob2xk KQorCQkJCSAgICAgOiAibWVtb3J5Iik7CisJCXJldHVybiBwcmV2OworCWNhc2UgNDoKKwkJX19h c21fXyBfX3ZvbGF0aWxlX18oImxvY2s7IGNtcHhjaGdsICVrMSwlMiIKKwkJCQkgICAgIDogIj1h IihwcmV2KQorCQkJCSAgICAgOiAicSIobmV3KSwgIm0iKCpfX3N5bmNoX3hnKHB0cikpLAorCQkJ CSAgICAgICAiMCIob2xkKQorCQkJCSAgICAgOiAibWVtb3J5Iik7CisJCXJldHVybiBwcmV2Owor CWNhc2UgODoKKwkJX19hc21fXyBfX3ZvbGF0aWxlX18oImxvY2s7IGNtcHhjaGdxICUxLCUyIgor CQkJCSAgICAgOiAiPWEiKHByZXYpCisJCQkJICAgICA6ICJxIihuZXcpLCAibSIoKl9fc3luY2hf eGcocHRyKSksCisJCQkJICAgICAgICIwIihvbGQpCisJCQkJICAgICA6ICJtZW1vcnkiKTsKKwkJ cmV0dXJuIHByZXY7CisJfQorCXJldHVybiBvbGQ7Cit9CisKK3N0YXRpYyBfX2lubGluZV9fIGlu dCBzeW5jaF9jb25zdF90ZXN0X2JpdChpbnQgbnIsIGNvbnN0IHZvbGF0aWxlIHZvaWQgKiBhZGRy KQoreworICAgIHJldHVybiAoKDFVTCA8PCAobnIgJiAzMSkpICYgCisgICAgICAgICAgICAoKChj b25zdCB2b2xhdGlsZSB1bnNpZ25lZCBpbnQgKikgYWRkcilbbnIgPj4gNV0pKSAhPSAwOworfQor CitzdGF0aWMgX19pbmxpbmVfXyBpbnQgc3luY2hfdmFyX3Rlc3RfYml0KGludCBuciwgdm9sYXRp bGUgdm9pZCAqIGFkZHIpCit7CisgICAgaW50IG9sZGJpdDsKKyAgICBfX2FzbV9fIF9fdm9sYXRp bGVfXyAoCisgICAgICAgICJidGwgJTIsJTFcblx0c2JibCAlMCwlMCIKKyAgICAgICAgOiAiPXIi IChvbGRiaXQpIDogIm0iIChBRERSKSwgIklyIiAobnIpICk7CisgICAgcmV0dXJuIG9sZGJpdDsK K30KKworI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X3JlYWRfY29uZmlnX3QoZGV2aWNlX3QgZGV2LCBkZXZpY2VfdCBjaGlsZCwgaW50IHJlZywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB3aWR0aCk7CisKK3N0YXRpYyBf X2lubGluZSB1X2ludDMyX3QgUENJX1JFQURfQ09ORklHKGRldmljZV90IGRldiwgZGV2aWNlX3Qg Y2hpbGQsIGludCByZWcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgd2lkdGgpCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9PS1VQKCgoa29ial90KWRl diktPm9wcyxwY2lfcmVhZF9jb25maWcpOworCXJldHVybiAoKHBjaV9yZWFkX2NvbmZpZ190ICop IF9tKShkZXYsIGNoaWxkLCByZWcsIHdpZHRoKTsKK30KKworLyoqIEBicmllZiBVbmlxdWUgZGVz Y3JpcHRvciBmb3IgdGhlIFBDSV9XUklURV9DT05GSUcoKSBtZXRob2QgKi8KK2V4dGVybiBzdHJ1 Y3Qga29iam9wX2Rlc2MgcGNpX3dyaXRlX2NvbmZpZ19kZXNjOworLyoqIEBicmllZiBBIGZ1bmN0 aW9uIGltcGxlbWVudGluZyB0aGUgUENJX1dSSVRFX0NPTkZJRygpIG1ldGhvZCAqLwordHlwZWRl ZiB2b2lkIHBjaV93cml0ZV9jb25maWdfdChkZXZpY2VfdCBkZXYsIGRldmljZV90IGNoaWxkLCBp bnQgcmVnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1X2ludDMyX3QgdmFsLCBp bnQgd2lkdGgpOworCitzdGF0aWMgX19pbmxpbmUgdm9pZCBQQ0lfV1JJVEVfQ09ORklHKGRldmlj ZV90IGRldiwgZGV2aWNlX3QgY2hpbGQsIGludCByZWcsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHVfaW50MzJfdCB2YWwsIGludCB3aWR0aCkKK3sKKwlrb2Jqb3BfdCBf bTsKKwl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IGRldmljZV90IGNoaWxkLCBpbnQgc3RhdGUpOworCitzdGF0 aWMgX19pbmxpbmUgaW50IFBDSV9TRVRfUE9XRVJTVEFURShkZXZpY2VfdCBkZXYsIGRldmljZV90 IGNoaWxkLCBpbnQgc3RhdGUpCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9PS1VQKCgoa29i al90KWRldiktPm9wcyxwY2lfc2V0X3Bvd2Vyc3RhdGUpOworCXJldHVybiAoKHBjaV9zZXRfcG93 ZXJzdGF0ZV90ICopIF9tKShkZXYsIGNoaWxkLCBzdGF0ZSk7Cit9CisKKy8qKiBAYnJpZWYgVW5p cXVlIGRlc2NyaXB0b3IgZm9yIHRoZSBQQ0lfR0VUX1ZQRF9JREVOVCgpIG1ldGhvZCAqLworZXh0 ZXJuIHN0cnVjdCBrb2Jqb3BfZGVzYyBwY2lfZ2V0X3ZwZF9pZGVudF9kZXNjOworLyoqIEBicmll ZiBBIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0aGUgUENJX0dFVF9WUERfSURFTlQoKSBtZXRob2Qg Ki8KK3R5cGVkZWYgaW50IHBjaV9nZXRfdnBkX2lkZW50X3QoZGV2aWNlX3QgZGV2LCBkZXZpY2Vf dCBjaGlsZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hhciAqKmlk ZW50cHRyKTsKKworc3RhdGljIF9faW5saW5lIGludCBQQ0lfR0VUX1ZQRF9JREVOVChkZXZpY2Vf dCBkZXYsIGRldmljZV90IGNoaWxkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjb25zdCBjaGFyICoqaWRlbnRwdHIpCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9P S1VQKCgoa29ial90KWRldiktPm9wcyxwY2lfZ2V0X3ZwZF9pZGVudCk7CisJcmV0dXJuICgocGNp X2dldF92cGRfaWRlbnRfdCAqKSBfbSkoZGV2LCBjaGlsZCwgaWRlbnRwdHIpOworfQorCisvKiog QG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wZWRl ZiBpbnQgcGNpX3JlbWFwX21zaXhfdChkZXZpY2VfdCBkZXYsIGRldmljZV90IGNoaWxkLCBpbnQg Y291bnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVfaW50ICp2ZWN0b3Jz KTsKKworc3RhdGljIF9faW5saW5lIGludCBQQ0lfUkVNQVBfTVNJWChkZXZpY2VfdCBkZXYsIGRl dmljZV90IGNoaWxkLCBpbnQgY291bnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNvbnN0IHVfaW50ICp2ZWN0b3JzKQoreworCWtvYmpvcF90IF9tOworCUtPQkpPUExPT0tV UCgoKGtvYmpfdClkZXYpLT5vcHMscGNpX3JlbWFwX21zaXgpOworCXJldHVybiAoKHBjaV9yZW1h cF9tc2l4X3QgKikgX20pKGRldiwgY2hpbGQsIGNvdW50LCB2ZWN0b3JzKTsKK30KKworLyoqIEBi cmllZiBVbmlxdWUgZGVzY3JpcHRvciBmb3IgdGhlIFBDSV9SRUxFQVNFX01TSSgpIG1ldGhvZCAq LworZXh0ZXJuIHN0cnVjdCBrb2Jqb3BfZGVzYyBwY2lfcmVsZWFzZV9tc2lfZGVzYzsKKy8qKiBA YnJpZWYgQSBmdW5jdGlvbiBpbXBsZW1lbnRpbmcgdGhlIFBDSV9SRUxFQVNFX01TSSgpIG1ldGhv ZCAqLwordHlwZWRlZiBpbnQgcGNpX3JlbGVhc2VfbXNpX3QoZGV2aWNlX3QgZGV2LCBkZXZpY2Vf dCBjaGlsZCk7CisKK3N0YXRpYyBfX2lubGluZSBpbnQgUENJX1JFTEVBU0VfTVNJKGRldmljZV90 IGRldiwgZGV2aWNlX3QgY2hpbGQpCit7CisJa29iam9wX3QgX207CisJS09CSk9QTE9PS1VQKCgo a29ial90KWRldiktPm9wcyxwY2lfcmVsZWFzZV9tc2kpOworCXJldHVybiAoKHBjaV9yZWxlYXNl X21zaV90ICopIF9tKShkZXYsIGNoaWxkKTsKK30KKworLy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ZfREVUQUNIKCkgbWV0aG9kICovCit0eXBlZGVmIGludCBwY2lfaW92X2RldGFjaF90KGRl dmljZV90IGRldiwgZGV2aWNlX3QgY2hpbGQpOworCitzdGF0aWMgX19pbmxpbmUgaW50IFBDSV9J T1ZfREVUQUNIKGRldmljZV90IGRldiwgZGV2aWNlX3QgY2hpbGQpCit7CisJa29iam9wX3QgX207 CisJS09CSk9QTE9PS1VQKCgoa29ial90KWRldiktPm9wcyxwY2lfaW92X2RldGFjaCk7CisJcmV0 dXJuICgocGNpX2lvdl9kZXRhY2hfdCAqKSBfbSkoZGV2LCBjaGlsZCk7Cit9CisKKy8qKiBAYnJp ZWYgVW5pcXVlIGRlc2NyaXB0b3IgZm9yIHRoZSBQQ0lfQ1JFQVRFX0lPVl9DSElMRCgpIG1ldGhv ZCAqLworZXh0ZXJuIHN0cnVjdCBrb2Jqb3BfZGVzYyBwY2lfY3JlYXRlX2lvdl9jaGlsZF9kZXNj OworLyoqIEBicmllZiBBIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0aGUgUENJX0NSRUFURV9JT1Zf Q0hJTEQoKSBtZXRob2QgKi8KK3R5cGVkZWYgZGV2aWNlX3QgcGNpX2NyZWF0ZV9pb3ZfY2hpbGRf dChkZXZpY2VfdCBidXMsIGRldmljZV90IHBmLCB1aW50MTZfdCByaWQsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdWludDE2X3QgdmlkLCB1aW50MTZfdCBkaWQpOwor CitzdGF0aWMgX19pbmxpbmUgZGV2aWNlX3QgUENJX0NSRUFURV9JT1ZfQ0hJTEQoZGV2aWNlX3Qg YnVzLCBkZXZpY2VfdCBwZiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB1aW50MTZfdCByaWQsIHVpbnQxNl90IHZpZCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB1aW50MTZfdCBkaWQpCit7CisJa29iam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1JUIChJTkNMVURJTkcgTkVHTElHRU5DRSBPUiBPVEhF UldJU0UpIEFSSVNJTkcgSU4gQU5ZIFdBWQorICogT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZU V0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRgorICogU1VDSCBEQU1B R0UuCisgKgorICogJEZyZWVCU0Q6IHJlbGVuZy8xMS4wL3N5cy94ODYvaW5jbHVkZS9hY3BpY2Ff bWFjaGRlcC5oIDI5ODA5NCAyMDE2LTA0LTE2IDAzOjQ0OjUwWiBnamIgJAorICovCisKKy8qKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKKyAqCisgKiBOYW1lOiBhY3BpY2FfbWFjaGRlcC5oIC0gYXJjaC1z cGVjaWZpYyBkZWZpbmVzLCBldGMuCisgKiAgICAgICAkUmV2aXNpb24kCisgKgorICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqLworCisjaWZuZGVmIF9fQUNQSUNBX01BQ0hERVBfSF9fCisjZGVmaW5lCV9f QUNQSUNBX01BQ0hERVBfSF9fCisKKyNpZmRlZiBfS0VSTkVMCisvKgorICogQ2FsbGluZyBjb252 ZW50aW9uczoKKyAqCisgKiBBQ1BJX1NZU1RFTV9YRkFDRSAgICAgICAgLSBJbnRlcmZhY2VzIHRv IGhvc3QgT1MgKGhhbmRsZXJzLCB0aHJlYWRzKQorICogQUNQSV9FWFRFUk5BTF9YRkFDRSAgICAg IC0gRXh0ZXJuYWwgQUNQSSBpbnRlcmZhY2VzIAorICogQUNQSV9JTlRFUk5BTF9YRkFDRSAgICAg IC0gSW50ZXJuYWwgQUNQSSBpbnRlcmZhY2VzCisgKiBBQ1BJX0lOVEVSTkFMX1ZBUl9YRkFDRSAg LSBJbnRlcm5hbC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aWx0LWluIEFQSUMgaW4gbWVtb3J5IGxvY2F0aW9uCisgKiBpcyAw eGZlZTAwMDAwLgorICogCisgKiBNYXAgb2YgQVBJQyBSZWdpc3RlcnM6CisgKiAKKyAqIE9mZnNl dCAoaGV4KSAgICBEZXNjcmlwdGlvbiAgICAgICAgICAgICAgICAgICAgIFJlYWQvV3JpdGUgc3Rh dGUKKyAqIDAwMCAgICAgICAgICAgICBSZXNlcnZlZAorICogMDEwICAgICAgICAgICAgIFJlc2Vy dmVkCisgKiAwMjAgSUQgICAgICAgICAgTG9jYWwgQVBJQyBJRCAgICAgICAgICAgICAgICAgICBS L1cKKyAqIDAzMCBWRVIgICAgICAgICBMb2NhbCBBUElDIFZlcnNpb24gICAgICAgICAgICAgIFIK KyAqIDA0MCAgICAgICAgICAgICBSZXNlcnZlZAorICogMDUwICAgICAgICAgICAgIFJlc2VydmVk CisgKiAwNjAgICAgICAgICAgICAgUmVzZXJ2ZWQKKyAqIDA3MCAgICAgICAgICAgICBSZXNlcnZl ZAorICogMDgwICAgICAgICAgICAgIFRhc2sgUHJpb3JpdHkgUmVnaXN0ZXIgICAgICAgICAgUi9X CisgKiAwOTAgICAgICAgICAgICAgQXJiaXRyYXRpb24gUHJpb3JpdHkgUmVnaXN0ZXIgICBSCisg KiAwQTAgICAgICAgICAgICAgUHJvY2Vzc29yIFByaW9yaXR5IFJlZ2lzdGVyICAgICBSCisgKiAw QjAgICAgICAgICAgICAgRU9JIFJlZ2lzdGVyICAgICAgICAgICAgICAgICAgICBXCisgKiAwQzAg UlJSICAgICAgICAgUmVtb3RlIHJlYWQgICAgICAgICAgICAgICAgICAgICBSCisgKiAwRDAgICAg ICAgICAgICAgTG9naWNhbCBEZXN0aW5hdGlvbiAgICAgICAgICAgICBSL1cKKyAqIDBFMCAgICAg ICAgICAgICBEZXN0aW5hdGlvbiBGb3JtYXQgUmVnaXN0ZXIgICAgIDAuLjI3IFI7ICAyOC4uMzEg Ui9XCisgKiAwRjAgU1ZSICAgICAgICAgU3B1cmlvdXMgSW50ZXJydXB0IFZlY3RvciBSZWcuICAw Li4zICBSOyAgNC4uOSAgIFIvVworICogMTAwICAgICAgICAgICAgIElTUiAgMDAwLTAzMSAgICAg ICAgICAgICAgICAgICAgUgorICogMTEwICAgICAgICAgICAgIElTUiAgMDMyLTA2MyAgICAgICAg ICAgICAgICAgICAgUgorICogMTIwICAgICAgICAgICAgIElTUiAgMDY0LTA5NSAgICAgICAgICAg ICAgICAgICAgUgorICogMTMwICAgICAgICAgICAgIElTUiAgMDk1LTEyOCAgICAgICAgICAgICAg ICAgICAgUgorICogMTQwICAgICAgICAgICAgIElTUiAgMTI4LTE1OSAgICAgICAgICAgICAgICAg ICAgUgorICogMTUwICAgICAgICAgICAgIElTUiAgMTYwLTE5MSAgICAgICAgICAgICAgICAgICAg UgorICogMTYwICAgICAgICAgICAgIElTUiAgMTkyLTIyMyAgICAgICAgICAgICAgICAgICAgUgor ICogMTcwICAgICAgICAgICAgIElTUiAgMjI0LTI1NSAgICAgICAgICAgICAgICAgICAgUgorICog MTgwICAgICAgICAgICAgIFRNUiAgMDAwLTAzMSAgICAgICAgICAgICAgICAgICAgUgorICogMTkw ICAgICAgICAgICAgIFRNUiAgMDMyLTA2MyAgICAgICAgICAgICAgICAgICAgUgorICogMUEwICAg ICAgICAgICAgIFRNUiAgMDY0LTA5NSAgICAgICAgICAgICAgICAgICAgUgorICogMUIwICAgICAg ICAgICAgIFRNUiAgMDk1LTEyOCAgICAgICAgICAgICAgICAgICAgUgorICogMUMwICAgICAgICAg ICAgIFRNUiAgMTI4LTE1OSAgICAgICAgICAgICAgICAgICAgUgorICogMUQwICAgICAgICAgICAg IFRNUiAgMTYwLTE5MSAgICAgICAgICAgICAgICAgICAgUgorICogMUUwICAgICAgICAgICAgIFRN UiAgMTkyLTIyMyAgICAgICAgICAgICAgICAgICAgUgorICogMUYwICAgICAgICAgICAgIFRNUiAg MjI0LTI1NSAgICAgICAgICAgICAgICAgICAgUgorICogMjAwICAgICAgICAgICAgIElSUiAgMDAw LTAzMSAgICAgICAgICAgICAgICAgICAgUgorICogMjEwICAgICAgICAgICAgIElSUiAgMDMyLTA2 MyAgICAgICAgICAgICAgICAgICAgUgorICogMjIwICAgICAgICAgICAgIElSUiAgMDY0LTA5NSAg ICAgICAgICAgICAgICAgICAgUgorICogMjMwICAgICAgICAgICAgIElSUiAgMDk1LTEyOCAgICAg ICAgICAgICAgICAgICAgUgorICogMjQwICAgICAgICAgICAgIElSUiAgMTI4LTE1OSAgICAgICAg ICAgICAgICAgICAgUgorICogMjUwICAgICAgICAgICAgIElSUiAgMTYwLTE5MSAgICAgICAgICAg ICAgICAgICAgUgorICogMjYwICAgICAgICAgICAgIElSUiAgMTkyLTIyMyAgICAgICAgICAgICAg ICAgICAgUgorICogMjcwICAgICAgICAgICAgIElSUiAgMjI0LTI1NSAgICAgICAgICAgICAgICAg ICAgUgorICogMjgwICAgICAgICAgICAgIEVycm9yIFN0YXR1cyBSZWdpc3RlciAgICAgICAgICAg UgorICogMjkwICAgICAgICAgICAgIFJlc2VydmVkCisgKiAyQTAgICAgICAgICAgICAgUmVzZXJ2 ZWQKKyAqIDJCMCAgICAgICAgICAgICBSZXNlcnZlZAorICogMkMwICAgICAgICAgICAgIFJlc2Vy dmVkCisgKiAyRDAgICAgICAgICAgICAgUmVzZXJ2ZWQKKyAqIDJFMCAgICAgICAgICAgICBSZXNl cnZlZAorICogMkYwICAgICAgICAgICAgIExvY2FsIFZlY3RvciBUYWJsZSAoQ01DSSkgICAgICAg Ui9XCisgKiAzMDAgSUNSX0xPVyAgICAgSW50ZXJydXB0IENvbW1hbmQgUmVnLiAoMC0zMSkgICBS L1cKKyAqIDMxMCBJQ1JfSEkgICAgICBJbnRlcnJ1cHQgQ29tbWFuZCBSZWcuICgzMi02MykgIFIv VworICogMzIwICAgICAgICAgICAgIExvY2FsIFZlY3RvciBUYWJsZSAoVGltZXIpICAgICAgUi9X CisgKiAzMzAgICAgICAgICAgICAgTG9jYWwgVmVjdG9yIFRhYmxlIChUaGVybWFsKSAgICBSL1cg KFBJVispCisgKiAzNDAgICAgICAgICAgICAgTG9jYWwgVmVjdG9yIFRhYmxlIChQZXJmb3JtYW5j ZSkgUi9XIChQNispCisgKiAzNTAgTFZUMSAgICAgICAgTG9jYWwgVmVjdG9yIFRhYmxlIChMSU5U MCkgICAgICBSL1cKKyAqIDM2MCBMVlQyICAgICAgICBMb2NhbCBWZWN0b3IgVGFibGUgKExJTlQx KSAgICAgIFIvVworICogMzcwIExWVDMgICAgICAgIExvY2FsIFZlY3RvciBUYWJsZSAoRVJST1Ip ICAgICAgUi9XCisgKiAzODAgICAgICAgICAgICAgSW5pdGlhbCBDb3VudCBSZWcuIGZvciBUaW1l ciAgICBSL1cKKyAqIDM5MCAgICAgICAgICAgICBDdXJyZW50IENvdW50IG9mIFRpbWVyICAgICAg ICAgIFIKKyAqIDNBMCAgICAgICAgICAgICBSZXNlcnZlZAorICogM0IwICAgICAgICAgICAgIFJl c2VydmVkCisgKiAzQzAgICAgICAgICAgICAgUmVzZXJ2ZWQKKyAqIDNEMCAgICAgICAgICAgICBS ZXNlcnZlZAorICogM0UwICAgICAgICAgICAgIFRpbWVyIERpdmlkZSBDb25maWd1cmF0aW9uIFJl Zy4gUi9XCisgKiAzRjAgICAgICAgICAgICAgUmVzZXJ2ZWQKKyAqLworCisKKy8qKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAqIGdsb2JhbCBkZWZpbmVzLCBldGMuCisgKi8KKworCisvKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqCisgKiBMT0NBTCBBUElDIHN0cnVjdHVyZQorICovCisKKyNpZm5kZWYgTE9D T1JFCisjaW5jbHVkZSA8c3lzL3R5cGVzLmg+CisKKyNkZWZpbmUgUEFEMwlpbnQgOiAz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QgKi8JCVBBRDQ7CisJ dV9pbnQzMl90IGRjcl90aW1lcjsJUEFEMzsKKwkvKiByZXNlcnZlZCAqLwkJUEFENDsKK307CisK K3R5cGVkZWYgc3RydWN0IExBUElDIGxhcGljX3Q7CisKK2VudW0gTEFQSUNfUkVHSVNURVJTIHsK KwlMQVBJQ19JRAk9IDB4MiwKKwlMQVBJQ19WRVJTSU9OCT0gMHgzLAorCUxBUElDX1RQUgk9IDB4 OCwKKwlMQVBJQ19BUFIJPSAweDksCisJTEFQSUNfUFBSCT0gMHhhLAorCUxBUElDX0VPSQk9IDB4 YiwKKwlMQVBJQ19MRFIJPSAweGQsCisJTEFQSUNfREZSCT0gMHhlLCAvKiBOb3QgaW4geDJBUElD ICovCisJTEFQSUNfU1ZSCT0gMHhmLAorCUxBUElDX0lTUjAJPSAweDEwLAorCUxBUElDX0lTUjEJ PSAweDExLAorCUxBUElDX0lTUjIJPSAweDEyLAorCUxBUElDX0lTUjMJPSAweDEzLAorCUxBUElD X0lTUjQJPSAweDE0LAorCUxBUElDX0lTUjUJPSAweDE1LAorCUxBUElDX0lTUjYJPSAweDE2LAor CUxBUElDX0lTUjcJPSAweDE3LAorCUxBUElDX1RNUjAJPSAweDE4LAorCUxBUElDX1RNUjEJPSAw eDE5LAorCUxBUElDX1RNUjIJPSAweDFhLAorCUxBUElDX1RNUjMJPSAweDFiLAorCUxBUElDX1RN UjQJPSAweDFjLAorCUxBUElDX1RNUjUJPSAweDFkLAorCUxBUElDX1RNUjYJPSAweDFlLAorCUxB UElDX1RNUjcJPSAweDFmLAorCUxBUElDX0lSUjAJPSAweDIwLAorCUxBUElDX0lSUjEJPSAweDIx LAorCUxBUElDX0lSUjIJPSAweDIyLAorCUxBUElDX0lSUjMJPSAweDIzLAorCUxBUElDX0lSUjQJ PSAweDI0LAorCUxBUElDX0lSUjUJPSAweDI1LAorCUxBUElDX0lSUjYJPSAweDI2LAorCUxBUElD X0lSUjcJPSAweDI3LAorCUxBUElDX0VTUgk9I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worCitzdHJ1 Y3QgSU9BUElDIHsKKwl1X2ludDMyX3QgaW9yZWdzZWw7CVBBRDM7CisJdV9pbnQzMl90IGlvd2lu OwlQQUQzOworfTsKKwordHlwZWRlZiBzdHJ1Y3QgSU9BUElDIGlvYXBpY190OworCisjdW5kZWYg UEFENAorI3VuZGVmIFBBRDMKKworI2VuZGlmICAvKiAhTE9DT1JFICovCisKKworLyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgorICogdmFyaW91cyBjb2RlICdsb2dpY2FsJyB2YWx1ZXMKKyAqLworCisv KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqCisgKiBMT0NBTCBBUElDIGRlZmluZXMKKyAqLworCisvKiBk ZWZhdWx0IHBoeXNpY2FsIGxvY2F0aW9ucyBvZiBMT0NBTCAoQ1BVKSBBUElDcyAqLworI2RlZmlu ZSBERUZBVUxUX0FQSUNfQkFTRQkweGZlZTAwMDAwCisKKy8qIGNvbnN0YW50cyByZWxhdGluZyB0 byBBUElDIElEIHJlZ2lzdGVycyAqLworI2RlZmluZSBBUElDX0lEX01BU0sJCTB4ZmYwMDAwMDAK KyNkZWZpbmUJQVBJQ19JRF9TSElGVAkJMjQKKyNkZWZpbmUJQVBJQ19JRF9DTFVTVEVSCQkweGYw CisjZGVmaW5lCUFQSUNfSURfQ0xVU1RFUl9JRAkweDBmCisjZGVmaW5lCUFQSUNfTUFYX0NMVVNU RVIJMHhlCisjZGVmaW5lCUFQSUNfTUFYX0lOVFJBQ0xVU1RFUl9JRCAzCisjZGVmaW5lCUFQSUNf SURfQ0xVU1RFUl9TSElGVAk0CisKKy8qIGZpZWxkcyBpbiBWRVIgKi8KKyNkZWZpbmUgQVBJQ19W RVJfVkVSU0lPTgkweDAwMDAwMGZmCisjZGVmaW5lIEFQSUNfVkVSX01BWEx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IE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkg V0FZCisgKiBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQg T0YgVEhFIFBPU1NJQklMSVRZIE9GCisgKiBTVUNIIERBTUFHRS4KKyAqCisgKiAkRnJlZUJTRDog cmVsZW5nLzExLjAvc3lzL3g4Ni9pbmNsdWRlL2FwaWN2YXIuaCAzMDEwMTUgMjAxNi0wNS0zMSAw NDo0Nzo1M1ogc2VwaGUgJAorICovCisKKyNpZm5kZWYgX1g4Nl9BUElDVkFSX0hfCisjZGVmaW5l IF9YODZfQVBJQ1ZBUl9IXworCisvKgorICogTG9jYWwgJiYgSS9PIEFQSUMgdmFyaWFibGUgZGVm aW5pdGlvbnMuCisgKi8KKworLyoKKyAqIExheW91dCBvZiBsb2NhbCBBUElDIGludGVycnVwdCB2 ZWN0b3JzOgorICoKKyAqCTB4ZmYgKDI1NSkgICstLS0tLS0tLS0tLS0tKworICogICAgICAgICAg ICAgICAgICB8ICAgICAgICAgICAgIHwgMTUgKFNwdXJpb3VzIC8gSVBJcyAvIExvY2FsIEludGVy cnVwdHMpCisgKgkweGYwICgyNDApICArLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgICAg ICAgfCAgICAgICAgICAgICB8IDE0IChJL08gSW50ZXJydXB0cyAvIFRpbWVyKQorICoJMHhlMCAo MjI0KSAgKy0tLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAg fCAxMyAoSS9PIEludGVycnVwdHMpCisgKgkweGQwICgyMDgpICArLS0tLS0tLS0tLS0tLSsKKyAq ICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICB8IDEyIChJL08gSW50ZXJydXB0cykKKyAq CTB4YzAgKDE5MikgICstLS0tLS0tLS0tLS0tKworICogICAgICAgICAgICAgICAgICB8ICAgICAg ICAgICAgIHwgMTEgKEkvTyBJbnRlcnJ1cHRzKQorICoJMHhiMCAoMTc2KSAgKy0tLS0tLS0tLS0t LS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfCAxMCAoSS9PIEludGVycnVw dHMpCisgKgkweGEwICgxNjApICArLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgICAgICAg fCAgICAgICAgICAgICB8IDkgKEkvTyBJbnRlcnJ1cHRzKQorICoJMHg5MCAoMTQ0KSAgKy0tLS0t LS0tLS0tLS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfCA4IChJL08gSW50 ZXJydXB0cyAvIFN5c3RlbSBDYWxscykKKyAqCTB4ODAgKDEyOCkgICstLS0tLS0tLS0tLS0tKwor ICogICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgIHwgNyAoSS9PIEludGVycnVwdHMpCisg KgkweDcwICgxMTIpICArLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgICAgICAgfCAgICAg ICAgICAgICB8IDYgKEkvTyBJbnRlcnJ1cHRzKQorICoJMHg2MCAoOTYpICAgKy0tLS0tLS0tLS0t LS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfCA1IChJL08gSW50ZXJydXB0 cykKKyAqCTB4NTAgKDgwKSAgICstLS0tLS0tLS0tLS0tKworICogICAgICAgICAgICAgICAgICB8 ICAgICAgICAgICAgIHwgNCAoSS9PIEludGVycnVwdHMpCisgKgkweDQwICg2NCkgICArLS0tLS0t LS0tLS0tLSsKKyAqICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICB8IDMgKEkvTyBJbnRl cnJ1cHRzKQorICoJMHgzMCAoNDgpICAgKy0tLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgICAg ICAgIHwgICAgICAgICAgICAgfCAyIChBVFBJQyBJbnRlcnJ1cHRzKQorICoJMHgyMCAoMzIpICAg Ky0tLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfCAxIChF eGNlcHRpb25zLCB0cmFwcywgZmF1bHRzLCBldGMuKQorICoJMHgxMCAoMTYpICAgKy0tLS0tLS0t LS0tLS0rCisgKiAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgfCAwIChFeGNlcHRpb25z LCB0cmFwcywgZmF1bHRzLCBldGMuKQorICoJMHgwMCAoMCkgICAgKy0tLS0tLS0tLS0tLS0rCisg KgorICogTm90ZTogMHg4MCBuZWVkcyB0byBiZSBoYW5kbGVkIHNwZWNpYWxseSBhbmQgbm90IGFs bG9jYXRlZCB0byBhbgorICogSS9PIGRldmljZSEKKyAqLworCisjZGVmaW5lCU1BWF9BUElDX0lE CTB4ZmUKKyNkZWZpbmUJQVBJQ19JRF9BTEwJMHhmZgorCisvKiBJL08gSW50ZXJydXB0cyBhcmUg dXNlZCBmb3IgZXh0ZXJuYWwgZGV2aWNlcyBzdWNoIGFzIElTQSwgUENJLCBldGMuICovCisjZGVm aW5lCUFQSUNfSU9fSU5UUwkoSURUX0lPX0lOVFMgKyAxNikKKyNkZWZpbmUJQVBJQ19OVU1fSU9J TlRTCTE5MQorCisvKiBUaGUgdGltZXIgaW50ZXJydXB0IGlzIHVzZWQgZm9yIGNsb2NrIGhhbmRs aW5nIGFuZCBkcml2ZXMgaGFyZGNsb2NrLCBldGMuICovCisjZGVmaW5lCUFQSUNfVElNRVJfSU5U CShBUElDX0lPX0lOVFMgKyBBUElDX05VTV9JT0lOVFMpCisKKy8qICAKKyAqKioqKioqKioqKioq KioqKioqKiogISEhIFdBUk5JTkcgISEhICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgor ICogRWFjaCBsb2NhbCBhcGljIGhhcyBhbiBpbnRlcnJ1cHQgcmVjZWl2ZSBmaWZvIHRoYXQgaXMg dHdvIGVudHJpZXMgZGVlcAorICogZm9yIGVhY2ggaW50ZXJydXB0IHByaW9yaXR5IGNsYXNzICho aWdoZXIgNCBiaXRzIG9mIGludGVycnVwdCB2ZWN0b3IpLg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vdXNpbnQpLCBJRFRW RUModGltZXJpbnQpOworCitleHRlcm4gdm1fcGFkZHJfdCBsYXBpY19wYWRkcjsKK2V4dGVybiBp bnQgYXBpY19jcHVpZHNbXTsKKwordm9pZAlhcGljX3JlZ2lzdGVyX2VudW1lcmF0b3Ioc3RydWN0 IGFwaWNfZW51bWVyYXRvciAqZW51bWVyYXRvcik7Cit2b2lkCSppb2FwaWNfY3JlYXRlKHZtX3Bh ZGRyX3QgYWRkciwgaW50MzJfdCBhcGljX2lkLCBpbnQgaW50YmFzZSk7CitpbnQJaW9hcGljX2Rp c2FibGVfcGluKHZvaWQgKmNvb2tpZSwgdV9pbnQgcGluKTsKK2ludAlpb2FwaWNfZ2V0X3ZlY3Rv cih2b2lkICpjb29raWUsIHVfaW50IHBpbik7Cit2b2lkCWlvYXBpY19yZWdpc3Rlcih2b2lkICpj b29raWUpOworaW50CWlvYXBpY19yZW1hcF92ZWN0b3Iodm9pZCAqY29va2llLCB1X2ludCBwaW4s IGludCB2ZWN0b3IpOworaW50CWlvYXBpY19zZXRfYnVzKHZvaWQgKmNvb2tpZSwgdV9pbnQgcGlu LCBpbnQgYnVzX3R5cGUpOworaW50CWlvYXBpY19zZXRfZXh0aW50KHZvaWQgKmNvb2tpZSwgdV9p bnQgcGluKTsKK2ludAlpb2FwaWNfc2V0X25taSh2b2lkICpjb29raWUsIHVfaW50IHBpbik7Citp bnQJaW9hcGljX3NldF9wb2xhcml0eSh2b2lkICpjb29raWUsIHVfaW50IHBpbiwgZW51bSBpbnRy X3BvbGFyaXR5IHBvbCk7CitpbnQJaW9hcGljX3NldF90cmlnZ2VybW9kZSh2b2lkICpjb29raWUs IHVfaW50IHBpbiwKKwkgICAgZW51bSBpbnRyX3RyaWdnZXIgdHJpZ2dlcik7CitpbnQJaW9hcGlj X3NldF9zbWkodm9pZCAqY29va2llLCB1X2ludCBwaW4pOworCisvKgorICogU3RydWN0IGNvbnRh aW5pbmcgcG9pbnRlcnMgdG8gQVBJQyBmdW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b2lkCSgqaXBp X3ZlY3RvcmVkKSh1X2ludCwgaW50KTsKKwlpbnQJKCppcGlfd2FpdCkoaW50KTsKKwlpbnQJKCpp cGlfYWxsb2MpKGludGhhbmRfdCAqaXBpZnVuYyk7CisJdm9pZAkoKmlwaV9mcmVlKShpbnQgdmVj dG9yKTsKKworCS8qIExWVCAqLworCWludAkoKnNldF9sdnRfbWFzaykodV9pbnQsIHVfaW50LCB1 X2NoYXIpOworCWludAkoKnNldF9sdnRfbW9kZSkodV9pbnQsIHVfaW50LCB1X2ludDMyX3QpOwor CWludAkoKnNldF9sdnRfcG9sYXJpdHkpKHVfaW50LCB1X2ludCwgZW51bSBpbnRyX3BvbGFyaXR5 KTsKKwlpbnQJKCpzZXRfbHZ0X3RyaWdnZXJtb2RlKSh1X2ludCwgdV9pbnQsIGVudW0gaW50cl90 cmlnZ2VyKTsKK307CisKK2V4dGVybiBzdHJ1Y3QgYXBpY19vcHMgYXBpY19vcHM7CisKK3N0YXRp YyBpbmxpbmUgdm9pZAorbGFwaWNfY3JlYXRlKHVfaW50IGFwaWNfaWQsIGludCBib290X2NwdSkK K3sKKworCWFwaWNfb3BzLmNyZWF0ZShhcGljX2lkLCBib290X2NwdSk7Cit9CisKK3N0YXRpYyBp bmxpbmUgdm9pZAorbGFwaWNfaW5pdCh2bV9wYWRkcl90IGFkZHIpCit7CisKKwlhcGljX29wcy5p bml0KGFkZHIpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX3hhcGljX21vZGUodm9p ZCkKK3sKKworCWFwaWNfb3BzLnhhcGljX21vZGUoKTsKK30KKworc3RhdGljIGlubGluZSB2b2lk CitsYXBpY19zZXR1cChpbnQgYm9vdCkKK3sKKworCWFwaWNfb3BzLnNldHVwKGJvb3QpOworfQor CitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX2R1bXAoY29uc3QgY2hhciAqc3RyKQoreworCisJ YXBpY19vcHMuZHVtcChzdHIpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX2Rpc2Fi bGUodm9pZCkKK3sKKworCWFwaWNfb3BzLmRpc2FibGUoKTsKK30KKworc3RhdGljIGlubGluZSB2 b2lkCitsYXBpY19lb2kodm9pZCkKK3sKKworCWFwaWNfb3BzLmVvaSgpOworfQorCitzdGF0aWMg aW5saW5lIGludAorbGFwaWNfaWQodm9pZCkKK3sKKworCXJldHVybiAoYXBpY19vcHMuaWQoKSk7 Cit9CisKK3N0YXRpYyBpbmxpbmUgaW50CitsYXBpY19pbnRyX3BlbmRpbmcodV9pbnQgdmVjdG9y KQoreworCisJcmV0dXJuIChhcGljX29wcy5pbnRyX3BlbmRpbmcodmVjdG9yKSk7Cit9CisKKy8q IFhYWDogVU5VU0VEICovCitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX3NldF9sb2dpY2FsX2lk KHVfaW50IGFwaWNfaWQsIHVfaW50IGNsdXN0ZXIsIHVfaW50IGNsdXN0ZXJfaWQpCit7CisKKwlh cGljX29wcy5zZXRfbG9naWNhbF9pZChhcGljX2lkLCBjbHVzdGVyLCBjbHVzdGVyX2lkKTsKK30K Kworc3RhdGljIGlubGluZSB1X2ludAorYXBpY19jcHVpZCh1X2ludCBhcGljX2lkKQoreworCisJ cmV0dXJuIChhcGljX29wcy5jcHVpZChhcGljX2lkKSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdV9p bnQKK2FwaWNfYWxsb2NfdmVjdG9yKHVfaW50IGFwaWNfaWQsIHVfaW50IGlycSkKK3sKKworCXJl dHVybiAoYXBpY19vcHMuYWxsb2NfdmVjdG9yKGFwaWNfaWQsIGlycSkpOworfQorCitzdGF0aWMg aW5saW5lIHVfaW50CithcGljX2FsbG9jX3ZlY3RvcnModV9pbnQgYXBpY19pZCwgdV9pbnQgKmly cXMsIHVfaW50IGNvdW50LCB1X2ludCBhbGlnbikKK3sKKworCXJldHVybiAoYXBpY19vcHMuYWxs b2NfdmVjdG9ycyhhcGljX2lkLCBpcnFzLCBjb3VudCwgYWxpZ24pKTsKK30KKworc3RhdGljIGlu bGluZSB2b2lkCithcGljX2VuYWJsZV92ZWN0b3IodV9pbnQgYXBpY19pZCwgdV9pbnQgdmVjdG9y KQoreworCisJYXBpY19vcHMuZW5hYmxlX3ZlY3RvcihhcGljX2lkLCB2ZWN0b3IpOworfQorCitz dGF0aWMgaW5saW5lIHZvaWQKK2FwaWNfZGlzYWJsZV92ZWN0b3IodV9pbnQgYXBpY19pZCwgdV9p bnQgdmVjdG9yKQoreworCisJYXBpY19vcHMuZGlzYWJsZV92ZWN0b3IoYXBpY19pZCwgdmVjdG9y KTsKK30KKworc3RhdGljIGlubGluZSB2b2lkCithcGljX2ZyZWVfdmVjdG9yKHVfaW50IGFwaWNf aWQsIHVfaW50IHZlY3RvciwgdV9pbnQgaXJxKQoreworCisJYXBpY19vcHMuZnJlZV92ZWN0b3Io YXBpY19pZCwgdmVjdG9yLCBpcnEpOworfQorCitzdGF0aWMgaW5saW5lIGludAorbGFwaWNfZW5h YmxlX3BtYyh2b2lkKQoreworCisJcmV0dXJuIChhcGljX29wcy5lbmFibGVfcG1jKCkpOworfQor CitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX2Rpc2FibGVfcG1jKHZvaWQpCit7CisKKwlhcGlj X29wcy5kaXNhYmxlX3BtYygpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX3JlZW5h YmxlX3BtYyh2b2lkKQoreworCisJYXBpY19vcHMucmVlbmFibGVfcG1jKCk7Cit9CisKK3N0YXRp YyBpbmxpbmUgdm9pZAorbGFwaWNfZW5hYmxlX2NtYyh2b2lkKQoreworCisJYXBpY19vcHMuZW5h YmxlX2NtYygpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQKK2xhcGljX2lwaV9yYXcocmVnaXN0 ZXJfdCBpY3JsbywgdV9pbnQgZGVzdCkKK3sKKworCWFwaWNfb3BzLmlwaV9yYXcoaWNybG8sIGRl c3QpOworfQorCitzdGF0aWMgaW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WUg eworCWludAl0Zl9mczsKKwlpbnQJdGZfZXM7CisJaW50CXRmX2RzOworCWludAl0Zl9lZGk7CisJ aW50CXRmX2VzaTsKKwlpbnQJdGZfZWJwOworCWludAl0Zl9pc3A7CisJaW50CXRmX2VieDsKKwlp bnQJdGZfZWR4OworCWludAl0Zl9lY3g7CisJaW50CXRmX2VheDsKKwlpbnQJdGZfdHJhcG5vOwor CS8qIGJlbG93IHBvcnRpb24gZGVmaW5lZCBpbiAzODYgaGFyZHdhcmUgKi8KKwlpbnQJdGZfZXJy OworCWludAl0Zl9laXA7CisJaW50CXRmX2NzOworCWludAl0Zl9lZmxhZ3M7CisJLyogYmVsb3cg b25seSB3aGVuIGNyb3NzaW5nIHJpbmdzIChlLmcuIHVzZXIgdG8ga2VybmVsKSAqLworCWludAl0 Zl9lc3A7CisJaW50CXRmX3NzOworfTsKKworLyogU3VwZXJzZXQgb2YgdHJhcCBmcmFtZSwgZm9y IHRyYXBzIGZyb20gdmlydHVhbC04MDg2IG1vZGUgKi8KKworc3RydWN0IHRyYXBmcmFtZV92bTg2 IHsKKwlpbnQJdGZfZnM7CisJaW50CXRmX2VzOworCWludAl0Zl9kczsKKwlpbnQJdGZfZWRpOwor CWludAl0Zl9lc2k7CisJaW50CXRmX2VicDsKKwlpbnQJdGZfaXNwOworCWludAl0Zl9lYng7CisJ aW50CXRmX2VkeDsKKwlpbnQJdGZfZWN4OworCWludAl0Zl9lYXg7CisJaW50CXRmX3RyYXBubzsK KwkvKiBiZWxvdyBwb3J0aW9uIGRlZmluZWQgaW4gMzg2IGhhcmR3YXJlICovCisJaW50CXRmX2Vy cjsKKwlpbnQJdGZfZWlwOworCWludAl0Zl9jczsKKwlpbnQJdGZfZWZsYWdzOworCS8qIGJlbG93 IG9ubHkgd2hlbiBjcm9zc2luZyByaW5ncyAoZS5nLiB1c2VyIHRvIGtlcm5lbCkgKi8KKwlpbnQJ dGZfZXNwOworCWludAl0Zl9zczsKKwkvKiBiZWxvdyBvbmx5I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OCwKKyAgICBVTktOT1dOX0JVU1RZUEUgPSAw eGZmCit9OworCisvKiBNUCBGbG9hdGluZyBQb2ludGVyIFN0cnVjdHVyZSAqLwordHlwZWRlZiBz dHJ1Y3QgTVBGUFMgeworCXVpbnQ4X3QJc2lnbmF0dXJlWzRdOworCXVpbnQzMl90IHBhcDsKKwl1 aW50OF90CWxlbmd0aDsKKwl1aW50OF90CXNwZWNfcmV2OworCXVpbnQ4X3QJY2hlY2tzdW07CisJ dWludDhfdAljb25maWdfdHlwZTsKKwl1aW50OF90CW1wZmIyOworCXVpbnQ4X3QJbXBmYjM7CisJ dWludDhfdAltcGZiNDsKKwl1aW50OF90CW1wZmI1OworfSBfX3BhY2tlZCAqbXBmcHNfdDsKKwor I2RlZmluZQlNUEZCMl9JTUNSX1BSRVNFTlQJMHg4MAorI2RlZmluZQlNUEZCMl9NVUxfQ0xLX1NS Q1MJMHg0MAorCisvKiBNUCBDb25maWd1cmF0aW9uIFRhYmxlIEhlYWRlciAqLwordHlwZWRlZiBz dHJ1Y3QgTVBDVEggeworCXVpbnQ4X3QJc2lnbmF0dXJlWzRdOworCXVpbnQxNl90IGJhc2VfdGFi bGVfbGVuZ3RoOworCXVpbnQ4X3QJc3BlY19yZXY7CisJdWludDhfdAljaGVja3N1bTsKKwl1aW50 OF90CW9lbV9pZFs4XTsKKwl1aW50OF90CXByb2R1Y3RfaWRbMTJdOworCXVpbnQzMl90IG9lbV90 YWJsZV9wb2ludGVyOworCXVpbnQxNl90IG9lbV90YWJsZV9zaXplOworCXVpbnQxNl90IGVudHJ5 X2NvdW50OworCXVpbnQzMl90IGFwaWNfYWRkcmVzczsKKwl1aW50MTZfdCBleHRlbmRlZF90YWJs ZV9sZW5ndGg7CisJdWludDhfdAlleHRlbmRlZF90YWJsZV9jaGVja3N1bTsKKwl1aW50OF90CXJl c2VydmVkOworfSBfX3BhY2tlZCAqbXBjdGhfdDsKKworLyogQmFzZSB0YWJsZSBlbnRyaWVzICov CisKKyNkZWZp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pbnQzMl90CXJfZWF4OworCV9f dWludDMyX3QJcl90cmFwbm87CisJX191aW50MzJfdAlyX2VycjsKKwlfX3VpbnQzMl90CXJfZWlw OworCV9fdWludDMyX3QJcl9jczsKKwlfX3VpbnQzMl90CXJfZWZsYWdzOworCV9fdWludDMyX3QJ cl9lc3A7CisJX191aW50MzJfdAlyX3NzOworCV9fdWludDMyX3QJcl9nczsKK307CisKK3N0cnVj dCBfX3JlZzY0IHsKKwlfX2ludDY0X3QJcl9yMTU7CisJX19pbnQ2NF90CXJfcjE0OworCV9faW50 NjRfdAlyX3IxMzsKKwlfX2ludDY0X3QJcl9yMTI7CisJX19pbnQ2NF90CXJfcjExOworCV9faW50 NjRfdAlyX3IxMDsKKwlfX2ludDY0X3QJcl9yOTsKKwlfX2ludDY0X3QJcl9yODsKKwlfX2ludDY0 X3QJcl9yZGk7CisJX19pbnQ2NF90CXJfcnNpOworCV9faW50NjRfdAlyX3JicDsKKwlfX2ludDY0 X3QJcl9yYng7CisJX19pbnQ2NF90CXJfcmR4OworCV9faW50NjRfdAlyX3JjeDsKKwlfX2ludDY0 X3QJcl9yYXg7CisJX191aW50MzJfdAlyX3RyYXBubzsKKwlfX3VpbnQxNl90CXJfZnM7CisJX191 aW50MTZfdAlyX2dzOworCV9fdWludDMyX3QJcl9lcnI7CisJX191aW50MTZfdAlyX2VzOworCV9f dWludDE2X3QJcl9kczsKKwlfX2ludDY0X3QJcl9yaXA7CisJX19pbnQ2NF90CXJfY3M7CisJX19p bnQ2NF90CXJfcmZsYWdzOworCV9faW50NjRfdAlyX3JzcDsKKwlfX2ludDY0X3QJcl9zczsKK307 CisKKy8qCisgKiBSZWdpc3RlciBzZXQgYWNjZXNzaWJsZSB2aWEgL3Byb2MvJHBpZC9mcHJlZ3Mu CisgKgorICogWFhYIHNob3VsZCBnZXQgc3RydWN0IGZyb20gZnB1LmguICBIZXJlIHdlIGdpdmUg YSBzbGlnaHRseQorICogc2ltcGxpZmllZCBzdHJ1Y3QuICB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o c3RydWN0IHRyYXBmcmFtZSkgKi8KKwlpbnQJc2NfZnM7CisJaW50CXNjX2VzOworCWludAlzY19k czsKKwlpbnQJc2NfZWRpOworCWludAlzY19lc2k7CisJaW50CXNjX2VicDsKKwlpbnQJc2NfaXNw OworCWludAlzY19lYng7CisJaW50CXNjX2VkeDsKKwlpbnQJc2NfZWN4OworCWludAlzY19lYXg7 CisJaW50CXNjX3RyYXBubzsKKwlpbnQJc2NfZXJyOworCWludAlzY19laXA7CisJaW50CXNjX2Nz OworCWludAlzY19lZmw7CisJaW50CXNjX2VzcDsKKwlpbnQJc2Nfc3M7CisJaW50CXNjX2xlbjsJ CQkvKiBzaXplb2YobWNvbnRleHRfdCkgKi8KKwkvKgorCSAqIFNlZSA8bWFjaGluZS91Y29udGV4 dC5oPiBhbmQgPG1hY2hpbmUvbnB4Lmg+IGZvcgorCSAqIHRoZSBmb2xsb3dpbmcgZmllbGRzLgor CSAqLworCWludAlzY19mcGZvcm1hdDsKKwlpbnQJc2Nfb3duZWRmcDsKKwlpbnQJc2NfZmxhZ3M7 CisJaW50CXNjX2Zwc3RhdGVbMTI4XSBfX2FsaWduZWQoMTYpOworCisJaW50CXNjX2ZzYmFzZTsK KwlpbnQJc2NfZ3NiYXNlOworCisJaW50CXNjX3hmcHVzdGF0ZTsKKwlpbnQJc2NfeGZwdXN0YXRl X2xlbjsKKworCWludAlzY19zcGFyZTJbNF07Cit9OworCisjZGVmaW5lCXNjX3NwCQlzY19lc3AK KyNkZWZpbmUJc2NfZnAJCXNjX2VicAorI2RlZmluZQlzY19wYwkJc2NfZWlwCisjZGVmaW5lCXNj X3BzCQlzY19lZmwKKyNkZWZpbmUJc2NfZWZsYWdzCXNjX2VmbAorCisjZW5kaWYgLyogX19CU0Rf VklTSUJMRSAqLworI2VuZGlmIC8qIF9faTM4Nl9fICovCisKKyNpZmRlZiBfX2FtZDY0X18KK3R5 cGVkZWYgbG9uZyBzaWdfYXRvbWljX3Q7CisKKyNpZiBfX0JTR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JfSBlbHNl IHsKKwkJUE9MTF9SRVFVRVNUX0RBVEEgcHJkOworCisJCXByZC50aW1lb3V0ID0gdGltZW91dDsK KwkJcHJkLmV2ZW50cyA9IGZkcy0+ZXZlbnRzOworCisJCXdpbl9ubV9pb2N0bF9pbnRlcm5hbCho LCBORVRNQVBfUE9MTCwgJnByZCk7CisJCWlmICgocHJkLnJldmVudHMgPT0gUE9MTEVSUikgfHwg KHByZC5yZXZlbnRzID09IFNUQVRVU19USU1FT1VUKSkgeworCQkJcmV0dXJuIC0xOworCQl9CisJ CXJldHVybiAxOworCX0KK30KKworI2RlZmluZSBwb2xsIHdpbl9ubV9wb2xsCisKK3N0YXRpYyBp bnQKK3dpbl9ubV9vcGVuKGNoYXIqIHBhdGhuYW1lLCBpbnQgZmxhZ3MpCit7CisKKwlpZiAoc3Ry Y21wKHBhdGhuYW1lLCBORVRNQVBfREVWSUNFX05BTUUpID09IDApIHsKKwkJaW50IGZkID0gb3Bl bihORVRNQVBfREVWSUNFX05BTUUsIE9fUkRXUik7CisJCWlmIChmZCA8IDApIHsKKwkJCXJldHVy biAtMTsKKwkJfQorCisJCXdpbl9pbnNlcnRfZmRfcmVjb3JkKGZkKTsKKwkJcmV0dXJuIGZkOwor CX0gZWxzZSB7CisJCXJldHVybiBvcGVuKHBhdGhuYW1lLCBmbGFncyk7CisJfQorfQorCisjZGVm aW5lIG9wZW4gd2luX25tX29wZW4KKworc3RhdGljIGludAord2luX25tX2Nsb3NlKGludCBmZCkK K3sKKwlpZiAoZmQgIT0gLTEpIHsKKwkJY2xvc2UoZmQpOworCQlpZiAod2luX2dldF9uZXRtYXBf aGFuZGxlKGZkKSAhPSBOVUxMKSB7CisJCQl3aW5fcmVtb3ZlX2ZkX3JlY29yZChmZCk7CisJCX0K Kwl9CisJcmV0dXJuIDA7Cit9CisKKyNkZWZpbmUgY2xvc2Ugd2luX25tX2Nsb3NlCisKKyNlbmRp ZiAvKiBfV0lOMzIgKi8KKworc3RhdGljIGludAorbm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ZWQgdG8gbWFrZSB0aGlzIGhhcHBlbjoKKyAg ICAgKgorICAgICAqICAgICAgICAgIEd1ZXN0ICAgICAgICAgICAgICBIb3N0CisgICAgICoKKyAg ICAgKiAgICAgICAgICBTVE9SRShjdXIpICAgICAgICAgTE9BRChoZWFkKQorICAgICAqICAgICAg ICAgIG1iKCkgPC0tLS0tLS0tLS0tPiBtYigpCisgICAgICogICAgICAgICAgU1RPUkUoaGVhZCkg ICAgICAgIExPQUQoY3VyKQorICAgICAqLworICAgIHB0ci0+Y3VyID0gY3VyOworICAgIG1iKCk7 CisgICAgcHRyLT5oZWFkID0gaGVhZDsKK30KKworLyogR3Vlc3QgZHJpdmVyOiBSZWFkIGtyaW5n IHBvaW50ZXJzIChod2N1ciwgaHd0YWlsKSBmcm9tIHRoZSBDU0IuCisgKiBUaGlzIHJvdXRpbmUg aXMgY291cGxlZCB3aXRoIHB0bmV0bWFwX2hvc3Rfd3JpdGVfa3JpbmdfY3NiKCkuICovCitzdGF0 aWMgaW5saW5lIHZvaWQKK3B0bmV0bWFwX2d1ZXN0X3JlYWRfa3JpbmdfY3NiKHN0cnVjdCBwdG5l dF9yaW5nICpwdHIsIHN0cnVjdCBuZXRtYXBfa3JpbmcgKmtyaW5nKQoreworICAgIC8qCisgICAg ICogV2UgcGxhY2UgYSBtZW1vcnkgYmFycmllciB0byBtYWtlIHN1cmUgdGhhdCB0aGUgdXBkYXRl IG9mIGh3dGFpbCBuZXZlcgorICAgICAqIG92ZXJ0YWtlcyB0aGUgdXBkYXRlIG9mIGh3Y3VyLgor ICAgICAqIChzZWUgZXhwbGFuYXRpb24gaW4gcHRuZXRtYXBfaG9zdF93cml0ZV9rcmluZ19jc2Ip LgorICAgICAqLworICAgIGtyaW5nLT5ucl9od3RhaWwgPSBwdHItPmh3dGFpbDsKKyAgICBtYigp OworICAgIGtyaW5nLT5ucl9od2N1ciA9IHB0ci0+aHdjdXI7Cit9CisKKyNlbmRpZiAvKiBXSVRI X1BUTkVUTUFQ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AgIGNvbnN0IHVpbnQ2NF90ICpzcmMgPSBfc3JjOworICAgIHVpbnQ2NF90ICpkc3QgPSBf ZHN0OworICAgIGlmIChsID49IDEwMjQpIHsKKyAgICAgICAgYmNvcHkoc3JjLCBkc3QsIGwpOwor ICAgICAgICByZXR1cm47CisgICAgfQorICAgIGZvciAoOyBsID4gMDsgbCAtPSA2NCkgeworICAg ICAgICAqZHN0KysgPSAqc3JjKys7CisgICAgICAgICpkc3QrKyA9ICpzcmMrKzsKKyAgICAgICAg KmRzdCsrID0gKnNyYysrOworICAgICAgICAqZHN0KysgPSAqc3JjKys7CisgICAgICAgICpkc3Qr KyA9ICpzcmMrKzsKKyAgICAgICAgKmRzdCsrID0gKnNyYysrOworICAgICAgICAqZHN0KysgPSAq c3JjKys7CisgICAgICAgICpkc3QrKyA9ICpzcmMrKzsKKyAgICB9Cit9CisKK3N0YXRpYyBpbnQK K25ldG1hcF9zZW5kKHN0cnVjdCBuZXRfYmFja2VuZCAqYmUsIHN0cnVjdCBpb3ZlYyAqaW92LAor CSAgICBpbnQgaW92Y250LCB1aW50MzJfdCBzaXplLCBpbnQgbW9yZSkKK3sKKwlzdHJ1Y3QgbmV0 bWFwX3ByaXYgKnByaXYgPSBiZS0+cHJpdjsKKwlzdHJ1Y3QgbmV0bWFwX3JpbmcgKnJpbmc7CisJ aW50IG5tX2J1Zl9zaXplOworCWludCBubV9idWZfbGVuOworCXVpbnQzMl90IGhlYWQ7CisJdm9p ZCAqbm1fYnVmOworCWludCBqOworCisJaWYgKGlvdmNudCA8PSAwIHx8IHNpemUgPD0gMCkgewor CQlEKCJXcm9uZyBpb3Y6IGlvdmNudCAlZCBzaXplICVkIiwgaW92Y250LCBzaXplKTsKKwkJcmV0 dXJuIDA7CisJfQorCisJcmluZyA9IHByaXYtPnR4OworCWhlYWQgPSByaW5nLT5oZWFkOworCWlm IChoZWFkID09IHJpbmctPnRhaWwpIHsKKwkJUkQoMSwgIk5vIHNwYWNlLCBkcm9wICVkIGJ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jOwor ICAgIHVpbnQ2NF90ICpkc3QgPSBfZHN0OworICAgIGlmIChsID49IDEwMjQpIHsKKyAgICAgICAg YmNvcHkoc3JjLCBkc3QsIGwpOworICAgICAgICByZXR1cm47CisgICAgfQorICAgIGZvciAoOyBs ID4gMDsgbCAtPSA2NCkgeworICAgICAgICAqZHN0KysgPSAqc3JjKys7CisgICAgICAgICpkc3Qr KyA9ICpzcmMrKzsKKyAgICAgICAgKmRzdCsrID0gKnNyYysrOworICAgICAgICAqZHN0KysgPSAq c3JjKys7CisgICAgICAgICpkc3QrKyA9ICpzcmMrKzsKKyAgICAgICAgKmRzdCsrID0gKnNyYysr OworICAgICAgICAqZHN0KysgPSAqc3JjKys7CisgICAgICAgICpkc3QrKyA9ICpzcmMrKzsKKyAg ICB9Cit9CisKK3N0YXRpYyBpbnQKK25ldG1hcF9zZW5kKHN0cnVjdCBuZXRfYmFja2VuZCAqYmUs IHN0cnVjdCBpb3ZlYyAqaW92LAorCSAgICBpbnQgaW92Y250LCB1aW50MzJfdCBzaXplLCBpbnQg bW9yZSkKK3sKKwlzdHJ1Y3QgbmV0bWFwX3ByaXYgKnByaXYgPSBiZS0+cHJpdjsKKwlzdHJ1Y3Qg bmV0bWFwX3JpbmcgKnJpbmc7CisJaW50IG5tX2J1Zl9zaXplOworCWludCBubV9idWZfbGVuOwor CXVpbnQzMl90IGhlYWQ7CisJdm9pZCAqbm1fYnVmOworCWludCBqOworCisJaWYgKGlvdmNudCA8 PSAwIHx8IHNpemUgPD0gMCkgeworCQlEKCJXcm9uZyBpb3Y6IGlvdmNudCAlZCBzaXplICVkIiwg aW92Y250LCBzaXplKTsKKwkJcmV0dXJuIDA7CisJfQorCisJcmluZyA9IHByaXYtPnR4OworCWhl YWQgPSByaW5nLT5oZWFkOworCWlmIChoZWFkID09IHJpbmctPnRhaWwpIHsKKwkJUkQoMSwgIk5v IHNwYWNlLCBkcm9wICVkIGJ5dGVzIiwgc2l6ZSk7CisJCWdvdG8gdHhzeW5j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cHRocmVhZF9zZXRfbmFtZV9ucChwcml2LT5ldmxvb3BfdGlkLCB0bmFtZSk7CisJfQor CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkCituZXRtYXBfY2xlYW51cChzdHJ1Y3QgbmV0 X2JhY2tlbmQgKmJlKQoreworCXN0cnVjdCBuZXRtYXBfcHJpdiAqcHJpdiA9IGJlLT5wcml2Owor CisJaWYgKGJlLT5wcml2KSB7CisJCWlmIChwcml2LT5wdG5ldG1hcC5ydW5uaW5nKSB7CisJCQlw dG5ldG1hcF9kZWxldGUoJnByaXYtPnB0bmV0bWFwKTsKKwkJfQorCQlubV9jbG9zZShwcml2LT5u bWQpOworCQlmcmVlKGJlLT5wcml2KTsKKwkJYmUtPnByaXYgPSBOVUxMOworCX0KKwliZS0+ZmQg PSAtMTsKK30KKworLyogQSBmYXN0IGNvcHkgcm91dGluZSBvbmx5IGZvciBtdWx0aXBsZXMgb2Yg NjQgYnl0ZXMsIG5vbiBvdmVybGFwcGVkLiAqLworc3RhdGljIGlubGluZSB2b2lkCitwa3RfY29w eShjb25zdCB2b2lkICpfc3JjLCB2b2lkICpfZHN0LCBpbnQgbCkKK3sKKyAgICBjb25zdCB1aW50 NjRfdCAqc3JjID0gX3NyYzsKKyAgICB1aW50NjRfdCAqZHN0ID0gX2RzdDsKKyAgICBpZiAobCA+ PSAxMDI0KSB7CisgICAgICAgIGJjb3B5KHNyYywgZHN0LCBsKTsKKyAgICAgICAgcmV0dXJuOwor ICAgIH0KKyAgICBmb3IgKDsgbCA+IDA7IGwgLT0gNjQpIHsKKyAgICAgICAgKmRzdCsrID0gKnNy YysrOworICAgICAgICAqZHN0KysgPSAqc3JjKys7CisgICAgICAgICpkc3QrKyA9ICpzcmMrKzsK KyAgICAgICAgKmRzdCsrID0gKnNyYysrOworICAgICAgICAqZHN0KysgPSAqc3JjKys7CisgICAg ICAgICpkc3QrKyA9ICpzcmMrKzsKKyAgICAgICAgKmRzdCsrID0gKnNyYysrOworIC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Jc2xvdCA9IHJpbmctPnNsb3QgKyBoZWFkOworCQlubV9idWYgPSBORVRNQVBf QlVGKHJpbmcsIHNsb3QtPmJ1Zl9pZHgpOworCQlubV9idWZfbGVuID0gc2xvdC0+bGVuOworCisJ CWZvciAoOzspIHsKKwkJCWludCBjb3B5bGVuID0gbm1fYnVmX2xlbiA8IGlvdl9mcmFnX3NpemUg PyBubV9idWZfbGVuIDogaW92X2ZyYWdfc2l6ZTsKKworCQkJcGt0X2NvcHkobm1fYnVmLCBpb3Zf ZnJhZ19idWYsIGNvcHlsZW4pOworCQkJbm1fYnVmICs9IGNvcHlsZW47CisJCQlubV9idWZfbGVu IC09IGNvcHlsZW47CisJCQlpb3ZfZnJhZ19idWYgKz0gY29weWxlbjsKKwkJCWlvdl9mcmFnX3Np emUgLT0gY29weWxlbjsKKwkJCXRvdGxlbiArPSBjb3B5bGVuOworCisJCQlpZiAobm1fYnVmX2xl biA9PSAwKSB7CisJCQkJYnJlYWs7CisJCQl9CisKKwkJCWlvdisrOworCQkJaW92Y250LS07CisJ CQlpZiAoaW92Y250ID09IDApIHsKKwkJCQkvKiBObyBzcGFjZSB0byByZWNlaXZlLiAqLworCQkJ CUQoIlNob3J0IGlvdiwgZHJvcCAlZCBieXRlcyIsIHRvdGxlbik7CisJCQkJcmV0dXJuIC1FTk9T UEM7CisJCQl9CisJCQlpb3ZfZnJhZ19idWYgPSBpb3YtPmlvdl9iYXNlOworCQkJaW92X2ZyYWdf c2l6ZSA9IGlvdi0+aW92X2xlbjsKKwkJfQorCisJCWhlYWQgPSBubV9yaW5nX25leHQocmluZywg aGVhZCk7CisKKwl9IHdoaWxlIChzbG90LT5mbGFncyAmIE5TX01PUkVGUkFHKTsKKworCS8qIFJl bGVhc2Ugc2xvdHMgdG8gbmV0bWFwLiAqLworCXJpbmctPmhlYWQgPSByaW5nLT5jdXIgPSBoZWFk OworCisJcmV0dXJuIHRvdGxlbjsKK30KKworc3RhdGljIHN0cnVjdCBuZXRfYmFja2Vu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c3RyID0gc3Ryc2Vw KCZtYWNfc3RyLCI9Iik7CisKKyAgICAgICAgaWYgKChtYWNfc3RyICE9IE5VTEwpICYmICghc3Ry Y21wKHRtcHN0ciwibWFjIikpKSB7CisgICAgICAgICAgICAgICAgZWEgPSBldGhlcl9hdG9uKG1h Y19zdHIpOworCisgICAgICAgICAgICAgICAgaWYgKGVhID09IE5VTEwgfHwgRVRIRVJfSVNfTVVM VElDQVNUKGVhLT5vY3RldCkgfHwKKyAgICAgICAgICAgICAgICAgICAgbWVtY21wKGVhLT5vY3Rl dCwgemVyb19hZGRyLCBFVEhFUl9BRERSX0xFTikgPT0gMCkgeworCQkJZnByaW50ZihzdGRlcnIs ICJJbnZhbGlkIE1BQyAlc1xuIiwgbWFjX3N0cik7CisgICAgICAgICAgICAgICAgICAgICAgICBy ZXR1cm4gKEVJTlZBTCk7CisgICAgICAgICAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAg ICAgICAgICBtZW1jcHkobWFjX2FkZHIsIGVhLT5vY3RldCwgRVRIRVJfQUREUl9MRU4pOworICAg ICAgICB9CisKKyAgICAgICAgcmV0dXJuICgwKTsKK30KKwordm9pZAorbmV0X2dlbm1hYyhzdHJ1 Y3QgcGNpX2Rldmluc3QgKnBpLCB1aW50OF90ICptYWNhZGRyKQoreworCS8qCisJICogVGhlIGRl ZmF1bHQgTUFDIGFkZHJlc3MgaXMgdGhlIHN0YW5kYXJkIE5ldEFwcCBPVUkgb2YgMDAtYTAtOTgs CisJICogZm9sbG93ZWQgYnkgYW4gTUQ1IG9mIHRoZSBQQ0kgc2xvdC9mdW5jIG51bWJlciBhbmQg ZGV2IG5hbWUKKwkgKi8KKwlNRDVfQ1RYIG1kY3R4OworCXVuc2lnbmVkIGNoYXIgZGlnZXN0WzE2 XTsKKwljaGFyIG5zdHJbODBdOworCisJc25wcmludGYobnN0ciwgc2l6ZW9mKG5zdHIpLCAiJWQt JWQtJXMiLCBwaS0+cGlfc2xvdCwKKwkgICAgcGktP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MTCkgJiYgKCFzdHJjbXAodG1wc3RyLCJtYWMiKSkpIHsKKyAgICAgICAgICAgICAg ICBlYSA9IGV0aGVyX2F0b24obWFjX3N0cik7CisKKyAgICAgICAgICAgICAgICBpZiAoZWEgPT0g TlVMTCB8fCBFVEhFUl9JU19NVUxUSUNBU1QoZWEtPm9jdGV0KSB8fAorICAgICAgICAgICAgICAg ICAgICBtZW1jbXAoZWEtPm9jdGV0LCB6ZXJvX2FkZHIsIEVUSEVSX0FERFJfTEVOKSA9PSAwKSB7 CisJCQlmcHJpbnRmKHN0ZGVyciwgIkludmFsaWQgTUFDICVzXG4iLCBtYWNfc3RyKTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIHJldHVybiAoRUlOVkFMKTsKKyAgICAgICAgICAgICAgICB9IGVs c2UKKyAgICAgICAgICAgICAgICAgICAgICAgIG1lbWNweShtYWNfYWRkciwgZWEtPm9jdGV0LCBF VEhFUl9BRERSX0xFTik7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gKDApOworfQorCit2 b2lkCituZXRfZ2VubWFjKHN0cnVjdCBwY2lfZGV2aW5zdCAqcGksIHVpbnQ4X3QgKm1hY2FkZHIp Cit7CisJLyoKKwkgKiBUaGUgZGVmYXVsdCBNQUMgYWRkcmVzcyBpcyB0aGUgc3RhbmRhcmQgTmV0 QXBwIE9VSSBvZiAwMC1hMC05OCwKKwkgKiBmb2xsb3dlZCBieSBhbiBNRDUgb2YgdGhlIFBDSSBz bG90L2Z1bmMgbnVtYmVyIGFuZCBkZXYgbmFtZQorCSAqLworCU1ENV9DVFggbWRjdHg7CisJdW5z aWduZWQgY2hhciBkaWdlc3RbMTZdOworCWNoYXIgbnN0cls4MF07CisKKwlzbnByaW50Zihuc3Ry LCBzaXplb2YobnN0ciksICIlZC0lZC0lcyIsIHBpLT5waV9zbG90LAorCSAgICBwaS0+cGlfZnVu Yywgdm1uYW1lKTsKKworCU1ENUluaXQoJm1kY3R4KTsKKwlNRDVVcGRhdGUoJm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jbHVkZSAiYmh5dmVydW4uaCIKKyNpbmNsdWRlIDxtZDUuaD4KKyNpbmNs dWRlIDxuZXQvZXRoZXJuZXQuaD4KKyNpbmNsdWRlIDxzdHJpbmcuaD4KKyNpbmNsdWRlIDxzdGRp by5oPgorI2luY2x1ZGUgPGVycm5vLmg+CisKKy8qCisgKiBTb21lIHV0aWxzIGZ1bmN0aW9ucywg dXNlZCBieSBuZXQgZnJvbnQtZW5kcy4gT3JpZ2luYWxseSwgdGhleSB3ZXJlCisgKiBpbiBwY2lf dmlydGlvX25ldC5jLgorICovCisKK2ludAorbmV0X3BhcnNlbWFjKGNoYXIgKm1hY19zdHIsIHVp bnQ4X3QgKm1hY19hZGRyKQoreworICAgICAgICBzdHJ1Y3QgZXRoZXJfYWRkciAqZWE7CisgICAg ICAgIGNoYXIgKnRtcHN0cjsKKyAgICAgICAgY2hhciB6ZXJvX2FkZHJbRVRIRVJfQUREUl9MRU5d ID0geyAwLCAwLCAwLCAwLCAwLCAwIH07CisKKyAgICAgICAgdG1wc3RyID0gc3Ryc2VwKCZtYWNf c3RyLCI9Iik7CisKKyAgICAgICAgaWYgKChtYWNfc3RyICE9IE5VTEwpICYmICghc3RyY21wKHRt cHN0ciwibWFjIikpKSB7CisgICAgICAgICAgICAgICAgZWEgPSBldGhlcl9hdG9uKG1hY19zdHIp OworCisgICAgICAgICAgICAgICAgaWYgKGVhID09IE5VTEwgfHwgRVRIRVJfSVNfTVVMVElDQVNU KGVhLT5vY3RldCkgfHwKKyAgICAgICAgICAgICAgICAgICAgbWVtY21wKGVhLT5vY3RldCwgemVy b19hZGRyLCBFVEhFUl9BRERSX0xFTikgPT0gMCkgeworCQkJZnByaW50ZihzdGRlcnIsICJJbnZh bGlkIE1BQyAlc1xuIiwgbWFjX3N0cik7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4g KEVJTlZBTCk7CisgICAgICAgICAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgICAgICAg ICBtZW1jcH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VlZGVkLgorCQkgKi8KKwkJdnFfZW5kY2hhaW5zKHZxLCAxKTsKKworCQlwdGhyZWFk X211dGV4X2xvY2soJnNjLT50eF9tdHgpOworCX0KK30KKworI2lmZGVmIG5vdHlldAorc3RhdGlj IHZvaWQKK3BjaV92dG5ldF9waW5nX2N0bHEodm9pZCAqdnNjLCBzdHJ1Y3QgdnF1ZXVlX2luZm8g KnZxKQoreworCisJRFBSSU5URigoInZ0bmV0OiBjb250cm9sIHFub3RpZnkhXG5cciIpKTsKK30K KyNlbmRpZgorCitzdGF0aWMgaW50CitwY2lfdnRuZXRfcGFyc2VtYWMoY2hhciAqbWFjX3N0ciwg dWludDhfdCAqbWFjX2FkZHIpCit7CisgICAgICAgIHN0cnVjdCBldGhlcl9hZGRyICplYTsKKyAg ICAgICAgY2hhciAqdG1wc3RyOworICAgICAgICBjaGFyIHplcm9fYWRkcltFVEhFUl9BRERSX0xF Tl0gPSB7IDAsIDAsIDAsIDAsIDAsIDAgfTsKKworICAgICAgICB0bXBzdHIgPSBzdHJzZXAoJm1h Y19zdHIsIj0iKTsKKyAgICAgICAKKyAgICAgICAgaWYgKChtYWNfc3RyICE9IE5VTEwpICYmICgh c3RyY21wKHRtcHN0ciwibWFjIikpKSB7CisgICAgICAgICAgICAgICAgZWEgPSBldGhlcl9hdG9u KG1hY19zdHIpOworCisgICAgICAgICAgICAgICAgaWYgKGVhID09IE5VTEwgfHwgRVRIRVJfSVNf TVVMVElDQVNUKGVhLT5vY3RldCkgfHwKKyAgICAgICAgICAgICAgICAgICAgbWVtY21wKGVhLT5v Y3RldCwgemVyb19hZGRyLCBFVEhFUl9BRERSX0xFTikgPT0gMCkgeworCQkJZnByaW50ZihzdGRl cnIsICJJbnZhbGlkIE1BQyAlc1xuIiwgbWFjX3N0cik7CisgICAgICAgICAgICAgICAgICAgICAg ICByZXR1cm4gKEVJTlZBTCk7CisgICAgICAgICAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAg ICAgICAgICAgICBtZW1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pzYyA9IHZzYzsKKworCXNjLT52c2NfZmVh dHVyZXMgPSBuZWdvdGlhdGVkX2ZlYXR1cmVzOworCisJaWYgKCEoc2MtPnZzY19mZWF0dXJlcyAm IFZJUlRJT19ORVRfRl9NUkdfUlhCVUYpKSB7CisJCXNjLT5yeF9tZXJnZSA9IDA7CisJCS8qIG5v bi1tZXJnZSByeCBoZWFkZXIgaXMgMiBieXRlcyBzaG9ydGVyICovCisJCXNjLT5yeF92aGRybGVu IC09IDI7CisJfQorfQorCitzdHJ1Y3QgcGNpX2RldmVtdSBwY2lfZGVfdm5ldCA9IHsKKwkucGVf ZW11ID0gCSJ2aXJ0aW8tbmV0IiwKKwkucGVfaW5pdCA9CXBjaV92dG5ldF9pbml0LAorCS5wZV9i YXJ3cml0ZSA9CXZpX3BjaV93cml0ZSwKKwkucGVfYmFycmVhZCA9CXZpX3BjaV9yZWFkCit9Owor UENJX0VNVUxfU0VUKHBjaV9kZV92bmV0KTsK --_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_ Content-Type: text/plain; name="test_results.txt" Content-Description: test_results.txt Content-Disposition: attachment; filename="test_results.txt"; size=5125; creation-date="Fri, 02 Dec 2016 14:17:58 GMT"; modification-date="Fri, 02 Dec 2016 14:17:58 GMT" Content-Transfer-Encoding: base64 VEFQOgoKMzc1Ljc0ODcxOCBtYWluX3RocmVhZCBbMjMyNV0gNjcuNTIyIEtwcHMgKDY3Ljg1OSBL cGt0cyAzMi41NzIgTWJwcyBpbiAxMDA0OTg2IHVzZWMpIDI1My4yMSBhdmdfYmF0Y2ggOTk5OTkg bWluX3NwYWNlCjM3Ni43NTE3MzYgbWFpbl90aHJlYWQgWzIzMjVdIDY2LjQ4NCBLcHBzICg2Ni42 ODUgS3BrdHMgMzIuMDA5IE1icHMgaW4gMTAwMzAxNyB1c2VjKSAyNDguODIgYXZnX2JhdGNoIDk5 OTk5IG1pbl9zcGFjZQozNzcuNzYxNTMzIG1haW5fdGhyZWFkI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cyA0LjAxMCBHYnBzIGluIDEwMDA3NTQgdXNlYykgNTExLjUwIGF2Z19i YXRjaCAxIG1pbl9zcGFjZQo5MzQuMzAyMjQ0IG1haW5fdGhyZWFkIFsyMzI1XSA3LjQ5NiBNcHBz ICg3LjUxOSBNcGt0cyA0LjMzMSBHYnBzIGluIDEwMDMwMjcgdXNlYykgNTExLjUwIGF2Zw== --_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_ Content-Type: text/plain; name="kernel_dumps.txt" Content-Description: kernel_dumps.txt Content-Disposition: attachment; filename="kernel_dumps.txt"; size=3734; creation-date="Fri, 02 Dec 2016 14:18:14 GMT"; modification-date="Fri, 02 Dec 2016 14:18:14 GMT" Content-Transfer-Encoding: base64 OTU3LjI4NTYyNCBbIDQ0Ml0gZ2VuZXJpY19uZXRtYXBfcmVnaXN0ZXIgICBHZW5lcmljIGFkYXB0 ZXIgMHhmZmZmZjgwMDEyYTVjYzAwIGdvZXMgb24KOTU3LjI4NzI1NyBbIDQ4N10gZ2VuZXJpY19u ZXRtYXBfcmVnaXN0ZXIgICBSWCByaW5nIDAgb2YgZ2VuZXJpYyBhZGFwdGVyIDB4ZmZmZmY4MDAx MmE1Y2MwMCBnb2VzIG9uCjk1Ny4yODg5NzkgWyA0OTRdIGdlbmVyaWNfbmV0bWFwX3JlZ2lzdGVy ICAgVFggcmluZyAwIG9mIGdlbmVyaWMgYWRhcHRlciAweGZmZmZmODAwMTJhNWNjMDAgZ29lcyBv bgo5NTcuNTg0Mjg1IG1haW4gWzI3NzBdIG1hcHBlZCAzMzQ5ODBLQiBhdCAweDgwMTYwMDAwMApT ZW5kaW5nIG9uIG5ldG1hcDp2dG5ldDE6IDEgcXVldWVzLCAxIHRocmVhZHMgYW5kIDEgY3B1cy4K MTAuMC4wLjEgLT4gMTAuMS4wLjEgKDAwOjAwOjAwOjAwOjAwOjAwIC0+IGZmOmZmOmZmOmZmOmZm OmZmKQo5NTcuNjcxMTMyIG1haW4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BiMjc1YzEgYXQgc3lzX3BvbGwrMHg2MQojMTMgMHhmZmZmZmZmZjgwZjg1 NjhlIGF0IGFtZDY0X3N5c2NhbGwrMHg0Y2UKIzE0IDB4ZmZmZmZmZmY4MGY2N2FiYiBhdCBYZmFz dF9zeXNjYWxsKzB4ZmIKVXB0aW1lOiA1bTQ3cwo= --_006_DB5PR07MB16857B8F7A2B4783640074979B8E0DB5PR07MB1685eurp_-- From owner-freebsd-net@freebsd.org Fri Dec 2 18:41:37 2016 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 39527C63B57 for ; Fri, 2 Dec 2016 18:41:37 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::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 EDBFC16FD for ; Fri, 2 Dec 2016 18:41:36 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x22e.google.com with SMTP id y198so276283676oia.1 for ; Fri, 02 Dec 2016 10:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bYZUQkW8Ejs7lGyZtfuVWMbIacOhPFEWyQzj4lqoUL0=; b=ysEQFjnc7gqRs4ZCfrDMiyaU0GDQwpGCD7f8YYdkrEqO67gyxCE5mtMPc8Y8hZkEkd Ae/hLI7MX2Kjc6v6vdL51SLkttFNY5KHU6lAmkqWw6wNMF08fshnwj6RhZ+jWMfrB2X5 OEZRBx9PsMyxqn0m1NTMZlXkAPXRz5GAGUiu01wDzEXz51cmUHGKp8Oh7OMynu77FnoH JHfEPPXrCyHuqH0L/BFkF/Ip5ICTPs2RbSDPnpmu7d+na3PTrOba4lpLXKXdJcxnIN2I 4+p7xX85Pf1h7APitnK69EU+Ox19CJ2wGPuT80InSs7bBMGLjYGn07TFNgrL/ge93dIQ YgZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bYZUQkW8Ejs7lGyZtfuVWMbIacOhPFEWyQzj4lqoUL0=; b=WXSiEk9bXyOEukx22gGMYvtw7Dhh30ufNHdwbUDfl29OE8PebmvysH0IVb9Wju9ocH OwUbdgY0g2tiOWjTBBclU0zDQnFrDdBeJBgo82fsAlcXlaNeQ0YlN35cg7yvSdZzYA8H RHvSgPZcv8XoHl/CKzK5pXAVtIFXVDDbNYjnljyjjHPdkI7VyUAz6bXhByP/SQlWL2Ve /oMPSAXQ7v3yBsjA2uP/Zky5LyCZhTLh7iZg99xhJuRF26wk9pP3YjiOp+KOtNlwqZ2J Lw+FYslkYE2Ljup9MTQwteDwDyl64wJPvG5P7l1aQrUBosHZZt9M78/sB3TsIS7SSJuS lI9w== X-Gm-Message-State: AKaTC00HqXIVFwPnr46YCaMaJcHWpcnNew8g+i2KF6htv02FkaYmOV6Sz1BhY+F1PMtt1mNm2G56kgCrMD5jag== X-Received: by 10.202.177.6 with SMTP id a6mr20967550oif.147.1480704096090; Fri, 02 Dec 2016 10:41:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.200 with HTTP; Fri, 2 Dec 2016 10:41:35 -0800 (PST) In-Reply-To: References: From: Vincenzo Maffione Date: Fri, 2 Dec 2016 19:41:35 +0100 Message-ID: Subject: Re: Looking for some help with netmap/bhyve To: Steven Crangle Cc: FreeBSD Net Content-Type: text/plain; charset=UTF-8 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, 02 Dec 2016 18:41:37 -0000 Hi, Thanks for testing, the numbers you report make sense, 7-15 Mpps is good for an old machine. On my machine I get 25 Mpps, so probably you could get something similar with newer hardware. The crash dumps you reported are not related to ptnetmap, but to the emulated (aka generic) netmap mode driver, that you have used over virtio-net VM interfaces. When you use ptnetmap, instead, inside the VM you see "ptnetX" interfaces. In any case, thanks for reporting. Hopefully we should get rid of these patches soon, once all the code will be pushed into HEAD. We are still progressing with this item, together with the bhyve maintainers. Cheers, Vincenzo 2016-12-02 15:22 GMT+01:00 Steven Crangle : > Hi Vincenzo, > > > Figured I would reply to give you some more testing feedback! Ptnetmap is > successfully working for us now on 11.0 RELEASE (stock src.txz from > FreeBSD.org) with the help of your patch! There were a few files missing > from the patch though, so I've attached a revised one which should work > incase it's of use to you! (might be a bit messy) > > I've attached a txt file with some testing results too , but in summary: > > > 1) netmap with no ptnet or vale: between 65-70Kpps. > > > 2) netmap with vale but no ptnet: between 121-160Kpps. > > > 3) ptnetmap with vale: seems to vary quite alot between 7-15Mpps. > > > All the tests were performed using pkt-gen with 60 byte packets. It's > worth noting that currently we're running the tests on a very old tired Sun > Micro server(Sun Fire X2200 M2 with Quad Core Processor). Currently in > the process of testing out our patch file on a clean 11.0 source on a much > faster box, so can run more detailed testing there using iperf etc if it's > useful to you! > > > I have also attached a few kernel traces, I tried to turn symbols on, but > i'm not sure it worked 100% Will try and fix it for the next install so > that I can provide better crash dumps if we run into any bugs! The crashes > attached only ever occured in setup number 2 above. > > > Thanks again for your help! > > > Kind Regards > > > Steven > > > > > > > > > > > > > ------------------------------ > > > > [image: Stream Logo] > > > > > > *Steven Crangle* > > Systems Developer | Stream Technologies | Glasgow, UK > > [image: http://www.stream-technologies.com/img/phone.png] > > +44 (0)844 800 8520 <+44%20844%20800%208520> > > | > > [image: http://www.stream-technologies.com/img/mouse.png] > > www.stream-technologies.com > > > > > > ------------------------------ > *From:* Vincenzo Maffione > *Sent:* 29 November 2016 18:42:04 > > *To:* Steven Crangle > *Cc:* FreeBSD Net > *Subject:* Re: Looking for some help with netmap/bhyve > > Hi Steven, > > 2016-11-29 16:44 GMT+01:00 Steven Crangle > : > >> >> Hi Vincenzo, >> >> >> No problem! We've decided that we will try testing with 11.0 too, as it >> would help us to have our test system locked to a specific version like >> 11.0 and can hopefully help you with testing too. We'll compile netmap from >> source as advised, but I was wondering what steps we would take in order to >> port the changes to bhyve/ptnetmap from HEAD into 11.0? >> > > I think you can get the patch containing my modifications to HEAD for > bhyve+vmm.ko+libvmmapi, that you can extract with the following command in > my freebsd git repository > > $ git diff 9e10acc0303003d8733a546bca60f242b7b0aa64 ptnet-head > lib/libvmmapi/ sys/amd64/ sys/modules/vmm/ usr.sbin/bhyve > > and apply that patch in your 11.0 FreeBSD tree. > > >> >> I've currently only tested with pkt-gen as our bhyve instances are pretty >> minimal right now, below are a few samples of the speeds seen in each of >> the different configurations: >> > > which configurations? > >> >> Using netmap on top of standard tap devices with no vale: >> >> >> vm1: >> 197.259100 main_thread [2325] 30.977 Kpps (32.435 Kpkts 15.569 Mbps >> in 1047062 usec) 1.93 avg_batch 826 min_space >> 203.306126 main_thread [2325] 32.149 Kpps (32.411 Kpkts 15.557 Mbps >> in 1008156 usec) 1.88 avg_batch 866 min_space >> 204.313055 main_thread [2325] 33.095 Kpps (33.324 Kpkts 15.996 Mbps >> in 1006929 usec) 1.98 avg_batch 911 min_space >> vm2: >> 245.397418 main_thread [2325] 31.422 Kpps (33.262 Kpkts 15.966 Mbps >> in 1058559 usec) 313.79 avg_batch 99999 min_space >> 246.429810 main_thread [2325] 31.254 Kpps (32.266 Kpkts 15.488 Mbps >> in 1032392 usec) 319.47 avg_batch 99999 min_space >> 251.621436 main_thread [2325] 31.606 Kpps (33.329 Kpkts 15.998 Mbps >> in 1054531 usec) 314.42 avg_batch 99999 min_space >> > > Be aware that you typically want to use netmap both in the VM and in the > host (to use VALE and ptnet). Here you are probably using netmap just in > the VM. Performance are however extremely low. > When using netmap in both guest and host, with ptnet, you should be able > to get at least 10-30 Mpps from vm1 to vm2. > >> >> After then trying to switch to the netmap in userspace/netmap in kernel >> space with ptnetmap, I realised I made a silly mistake and built from head >> instead of the branch ptnet-head... haha So I'm currently doing a quick >> rebuild on the correct branch and will report back with the results from >> pkt-gen using just vale, and also with the new ptnetmap changes! >> > > Ok, also consider that you can use the patch I indicated above against > HEAD. > > Cheers, > Vincenzo > >> >> >> Kind Regards >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> [image: Stream Logo] >> >> >> >> >> >> *Steven Crangle* >> >> Systems Developer | Stream Technologies | Glasgow, UK >> >> [image: http://www.stream-technologies.com/img/phone.png] >> >> +44 (0)844 800 8520 >> >> | >> >> [image: http://www.stream-technologies.com/img/mouse.png] >> >> www.stream-technologies.com >> >> >> >> >> >> ------------------------------ >> *From:* Vincenzo Maffione >> *Sent:* 29 November 2016 11:52:18 >> >> *To:* Steven Crangle >> *Cc:* FreeBSD Net >> *Subject:* Re: Looking for some help with netmap/bhyve >> >> Hi Steven, >> Thanks for your testing this in HEAD, good news to know that it works >> ok! >> >> I think there is not going to be much difference between HEAD and 11.0, >> because in the end bhyve code didn't really change (for the parts I >> touched), and you need to use the latest netmap version (github) anyway, >> irrespective of whether you are testing on 10.3, 11.0, head, etc. In other >> words, you would be testing approximately the same code. Anyway, if you >> happen to test 11.0 by chance please let me know. >> >> What kind of tests did you perform? netmap applications (e.g. pkt-gen), >> or netperf/iperf standard TCP/IP tools? >> Could you please share the performance number you got for configurations >> (A) and (B) (or just the one you tried)? >> >> I think it is useful to compare your results with the ones I collected >> here (see the performance evaluation section): >> >> https://wiki.freebsd.org/DevSummit/201609?action=AttachFile& >> do=view&target=20160923-freebsd-summit-ptnet.pdf >> >> Regarding the crashes, thanks for reporting, I would be nice if you could >> describe in more detail how you trigger them (with some higher likelyhood); >> also, compiling the kernel with debug symbols should help in understanding >> which part of the code is involved in the crash. >> >> Cheers, >> Vincenzo >> >> >> 2016-11-29 12:26 GMT+01:00 Steven Crangle > >: >> >>> Hi Vincenzo! >>> >>> >>> Thank you so much for your help! With your instructions I've managed to >>> get a set of bhyves up and running with netmap working properly within >>> them! I chose to go with the recent version of head instead of 10.3. I >>> will also try and build a version on 11.0 if I get chance! >>> >>> >>> I will make sure and ask any further questions on the github page for >>> netmap, but while I'm emailing, I've attached a text file containing a few >>> kernel page fault errors I've ran into. They don't happen repeatedly. They >>> seem to just happen randomly if I try to shut the process down and possibly >>> catch netmap in an incorrect state! Figured they might be useful to you. If >>> I figure out what the error is myself I will try and help out! >>> >>> >>> And thanks again for your help! >>> >>> >>> Kind Regards >>> >>> >>> >>> >>> >>> >>> >>> ------------------------------ >>> >>> >>> >>> [image: Stream Logo] >>> >>> >>> >>> >>> >>> *Steven Crangle* >>> >>> Systems Developer | Stream Technologies | Glasgow, UK >>> >>> [image: http://www.stream-technologies.com/img/phone.png] >>> >>> +44 (0)844 800 8520 >>> >>> | >>> >>> [image: http://www.stream-technologies.com/img/mouse.png] >>> >>> www.stream-technologies.com >>> >>> >>> >>> >>> >>> ------------------------------ >>> *From:* Vincenzo Maffione >>> *Sent:* 23 November 2016 08:33:11 >>> *To:* Steven Crangle >>> *Cc:* FreeBSD Net >>> *Subject:* Re: Looking for some help with netmap/bhyve >>> >>> >>> >>> 2016-11-22 11:31 GMT+01:00 Steven Crangle >> m>: >>> >>>> >>>> Hi, >>>> >>>> >>>> I've recently been trying to boot up several bhyves so that I can test >>>> netmap communication between instances. The problem is, no matter what >>>> configuration I try, the guest vm running in bhyve completely hangs and >>>> becomes unusable as soon as a packet hits the netmap interface. When >>>> testing with pkt-gen, the TX side successfully starts sending packets, but >>>> the RX side will reliable freeze with the only option being killing the >>>> bhyve process. >>>> >>>> >>>> The bhyve command used for the above test was: >>>> >>>> >>>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s >>>> 2,virtio-blk,/dev/zvol/zroot/viper1vol -s >>>> 3,virtio-net,tap0,mac=00:01:23:45:67:83 -s 4,virtio-net,tap4 -l >>>> com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >>>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s >>>> 2,virtio-blk,/dev/zvol/zroot/viper2vol -s >>>> 3,virtio-net,tap1,mac=00:01:23:45:67:84 -s 4,virtio-net,tap5 -l >>>> com1,/dev/nmdm1A -A -H -P -m 6g viper2 >>>> >>>> For this test the host OS was FreeBSD-11.0-p3 and the guest OS was >>>> FreeBSD-11.0-p3. >>>> >>>> After failing to get this solution working, I pulled down the source >>>> from the following url and installed it on the host box: >>>> >>>> https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/ >>>> >>>> I then ran the following commands to try and bring up the machines >>>> using the ptnetmap interface (the guest still running 11.0p3) : >>>> >>>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s >>>> 1:1,virtio-blk,/dev/zvol/zroot/viper1vol -s >>>> 2:0,virtio-net,tap0,mac=00:01:23:45:67:83 -s 2:1,ptnetmap-memdev -s >>>> 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 & >>>> bhyve -c 1 -s 0,hostbridge -s 1,lpc -s >>>> 1:1,virtio-blk,/dev/zvol/zroot/viper2vol -s >>>> 2:0,virtio-net,tap1,mac=00:01:23:45:67:84 -s 2:1,ptnetmap-memdev -s >>>> 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2 >>>> >>>> With the above commands the vm's fail to boot with the following >>>> message: >>>> >>>> ptnet_init: failed to get ptnetmap >>>> >>>> Output in /var/log/messages seems to just show the ptnetmap driver >>>> allocating one RX/TX ring for each vm, while bringing the device up, the >>>> device then goes down and the above error is seen in the console. >>>> >>>> Is there something I'm doing wrong with regards to running netmap or >>>> ptnetmap within a bhyve? Any pointers in the right direction will be much >>>> appreciated! >>>> >>>> Kind Regards >>>> >>>> Steven >>>> >>>> >>> Hi Steven, >>> >>> The code you are looking at is the final code released by my gsoc 2016 >>> project at the end of August 2016. However, I've been working on that for a >>> while after the gsoc, so that code is not updated anymore. My modification >>> basically involves two subsystems: netmap and bhyve. >>> >>> The updates to netmap are already available in HEAD. The updates to >>> bhyve are not yet upstream, as we are in the process to review that with >>> the bhyve maintainers. >>> >>> Anyway, you need two sources to get the latest code: >>> 1) https://github.com/luigirizzo/netmap for the latest netmap code, >>> that you could also compile as an external kernel module. >>> 2) https://github.com/vmaffione/freebsd to get the updates to bhyve >>> (and vmm.ko). You can use this as the host system. There are two branches >>> here: ptnet-10.3, and ptnet-head. My original code was developed under >>> FreeBSD 10.3, so a first possibility is to try this as the host system >>> (using the ptnet-10.3 branch). The other branch (ptnet-head) contains a >>> porting of the work to a recent version of HEAD. I would be very glad if >>> you could test the code also on FreeBSD 11. >>> >>> We support two combinations of bhyve networking with netmap: >>> >>> (A) virtio-net + netmap: that is something like "-s >>> 2:0,virtio-net,vale0:0" in the bhyve command line. >>> (B) ptnet + ptnetmap: that is something like "-s 2:1,ptnetmap-memdev >>> -s 2:2,ptnet,vale0:0" in the bhyve command line. >>> >>> so you may want to try A first (netmap backend in user-space, slower) >>> and then B (netmap backend in kernel-space, faster). >>> >>> Sorry about the confusion on the code repositories, I'll try also to >>> update the wiki page (and/or the gsoc svn repo) to reflect these updates. >>> It's perfectly ok for me to discuss these issues here in the ML, however >>> for more detailed/low-level discussion and support about problems you are >>> running into, feel free to open Github issues here >>> https://github.com/luigirizzo/netmap. >>> >>> Cheers, >>> Vincenzo >>> >>> >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ________________________________ >>>> >>>> >>>> >>>> [Stream Logo] >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Steven Crangle >>>> >>>> >>>> Systems Developer | Stream Technologies | Glasgow, UK >>>> >>>> >>>> [http://www.stream-technologies.com/img/phone.png] >>>> >>>> >>>> +44 (0)844 800 8520 >>>> >>>> >>>> | >>>> >>>> >>>> [http://www.stream-technologies.com/img/mouse.png] >>>> >>>> >>>> www.stream-technologies.com >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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" >>>> >>> >>> >>> >>> -- >>> Vincenzo Maffione >>> >> >> >> >> -- >> Vincenzo Maffione >> > > > > -- > Vincenzo Maffione > -- Vincenzo Maffione From owner-freebsd-net@freebsd.org Fri Dec 2 19:23:12 2016 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 48E30C6352B for ; Fri, 2 Dec 2016 19:23:12 +0000 (UTC) (envelope-from vicepresjoebiden@gmail.com) Received: from mail-vk0-x231.google.com (mail-vk0-x231.google.com [IPv6:2607:f8b0:400c:c05::231]) (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 0494714A0 for ; Fri, 2 Dec 2016 19:23:12 +0000 (UTC) (envelope-from vicepresjoebiden@gmail.com) Received: by mail-vk0-x231.google.com with SMTP id 137so151266687vkl.0 for ; Fri, 02 Dec 2016 11:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=QENxzR8pEvUAFkQsEopK4+/FQIvLa913g3yaIgNaIzI=; b=JGZ5SvIMmw6SKXATJXTW/dQBG6A/fnlOpU5U3yLCo7Evfc9ON0IGISDG4CMPutPx8f 2HBDAD6wpyloCAEiSkxNH9MdjI5ArpzIx0txWmhsaEaVA0PPCz+i/o3Zte2RqSLek/Ie v134/hhbBIMQ4iBRTXoZ6qUlSdVulywl5h+YBFfp3Q99MmkJ6oSdyNfELH7jERkUcJof 4XsZgcrAvhJD0UP+Kjgjdp/Vip/RqzSTlj+qS3im3/KwCPfRY1ZSt77vFD++q0piEDtR jqfcrXfa+shvugKxzkD4oddTpswYAN2m+OSeKG+OChC1GfViwqCZPv6ig68GxAXb2TSO S6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QENxzR8pEvUAFkQsEopK4+/FQIvLa913g3yaIgNaIzI=; b=E7sAlJJNVbdxeXjGt8lu/G9GnJm6XQTD5niVxUtur6hji6v2hIShH6QQnSHx7wwKF3 DlvJ6LkmmE0wyprWTVRgvbGsJ9wSYtAFzBxWskCIs5NL2HxdDQ9wKgu56QGvDp69ueKc ILWkGuPSSBKCS6zHURlAm4d9f03m4jH3pQMsocD0QzUJRY1zZk9us4KZzJIyPiR6VMmf ji0MUvOpIh7i+KZOpp3tc5k3xDSPnhrGvD6QlrNYd8ThUb9WgjgLoTZxJNXJUP3DilqV U+XOh13tQ8fX1Mkcp3mVdZ3j5iJQ2Itn9He665LBzlbgrx0JH+n4vCxcidZxrj5YjhkM r1yQ== X-Gm-Message-State: AKaTC0062dSNc1dPPqXyiyr3bdIDqUMuyDF0Zn9drTZiuPxoEmLNywoEEsZu4i7rqJZFGlJ4H7H4wJNIFfODuw== X-Received: by 10.31.162.72 with SMTP id l69mr17712754vke.123.1480706590993; Fri, 02 Dec 2016 11:23:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.0.103 with HTTP; Fri, 2 Dec 2016 11:23:10 -0800 (PST) From: Jordan Ladora Date: Fri, 2 Dec 2016 12:23:10 -0700 Message-ID: Subject: File duplication on NFSv4 exported ZFS filesystems to centos client To: 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, 02 Dec 2016 19:23:12 -0000 Curious phenomenon of file pseudo-dup with exported ZFS filesystems on FreeBSD 10.3-REL NFSv4 export to a centos7 client. *FreeBSD server-* zpool create zpool_nfsv4 ... zfs create zpool_nfsv4/zfs2 zfs create zpool_nfsv4/zfs3 /etc/exports- V4: / /zpool_nfsv4 /zpool_nfsv4/zfs2 /zpool_nfsv4/zfs3 zfs unshare -a *Centos client-* mkdir /zpool_nfsv4 mkdir /zpool_nfsv4_zfs2 mkdir /zpool_nfsv4_zfs3 mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4 /zpool_nfsv4 mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4/zfs2 /zpool_nfsv4_zfs2 mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4/zfs3 /zpool_nfsv4_zfs3 The FreeBSD share and centos client have the same username (nfsuser), groupname, and user:group IDs, which also owns the exported /zpool_nfsv4, so UID/GIDs map correctly on the client and permissions work fine. The unexpected behavior happens when the user touches a file on the client's share of either /zpool_nfsv4/zfs2 or /zpool_nfsv4/zfs3- sudo -u nfsuser touch /zpool_nfs4_zfs2/testfile # centos client ...this new file then also appears immediately on the client's share mount at- /zpool_nfs4_zfs3/testfile ...but not at /zpool_nfs4 (the top-level zfs). It is not duplicated on the server and there it only appears [in the correct location] at- /zpool_nfs4/zfs2/testfile # freebsd server If I unmount the share and remount it, it looks the same (you still see the duplicate file on the client) and =E2=80=98testfile=E2=80=99 can be manipul= ated on the client from either location. This also doesn't happen if touching a file on the top-level dir (/zpool_nfsv4) on the client (in other words, there is no duplication seen on the client if nfsuser touches e.g. /zpool_nfsv4/testfile). This seems similar to this (https://serverfault.com/quest ions/535318/creating-two-nfs-shares-from-same-server-but- when-mounted-both-point-to-same-d) thread with NFSv4 exports on a centos server, but I cannot find anything similar to what I see here with a FreeBSD NFSv4 server. It seems to me that two of the zfs filesystems (zfs1 and zfs2) are mapping to the same place on the client, but I'm not sure how to deal with this... From owner-freebsd-net@freebsd.org Fri Dec 2 20:44:53 2016 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 96906C62A3D for ; Fri, 2 Dec 2016 20:44:53 +0000 (UTC) (envelope-from torek@torek.net) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 847D339F for ; Fri, 2 Dec 2016 20:44:52 +0000 (UTC) (envelope-from torek@torek.net) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id uB2KgOkO055419 for ; Fri, 2 Dec 2016 12:42:24 -0800 (PST) (envelope-from torek@torek.net) Message-Id: <201612022042.uB2KgOkO055419@elf.torek.net> From: Chris Torek To: freebsd-net@freebsd.org Subject: mutex usage in if_bridge vs other drivers MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <55417.1480711344.1@elf.torek.net> Date: Fri, 02 Dec 2016 12:42:24 -0800 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 02 Dec 2016 12:42:24 -0800 (PST) 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, 02 Dec 2016 20:44:53 -0000 I'm not sure if this is really a freebsd-net topic or more generic kernel, but since I observed this by looking for possible causes of a bizarre network driver crash I'll send it here (I'm not on the freebsd-net mailing list but I'll check the archives for a bit too). When doing if_bridge SIOCSDRVSPEC commands we go through this code path: static int bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { [snip] BRIDGE_LOCK(sc); error = (*bc->bc_func)(sc, &args); BRIDGE_UNLOCK(sc); Note that the BRIDGE_LOCK is a plain (non-sleepable) mutex. The bc_func may be one of many functions, but two interesting ones are bridge_ioctl_add() and bridge_ioctl_del(). These are somewhat complicated, but both eventually call: bridge_mutecaps(sc); which iterates over all (newly augmented, or remaining) bridge members calling bridge_set_ifcap(sc, bif, enabled) to enable or disable capabilities like IFCAP_TSO4 and so on. This in turn sets up an SIOCSIFCAP ioctl and does: struct ifnet *ifp = bif->bif_ifp; if (ifp->if_capenable != set) { error = (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr); ... } In the case of dev/bxe/bxe.c, this now (as of FreeBSD 10) has its own sleep (sx) lock, and it may lock that sx lock. If it does, we panic because we're holding the bridge lock. THE QUESTION: - Who is wrong, the bxe driver or the bridge code? I.e., does the bridge driver need to release its lock here, and if so, is that actually safe to do? (We might need to restart the loop over all the members if we drop the lock.) - Or if the bridge driver should retain its lock, can it use an sx lock here, to permit members to also use sx locks? Chris From owner-freebsd-net@freebsd.org Fri Dec 2 23:36:28 2016 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 B0A86C639A0 for ; Fri, 2 Dec 2016 23:36:28 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0099.outbound.protection.outlook.com [207.46.100.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69D2FB10 for ; Fri, 2 Dec 2016 23:36:27 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Fri, 2 Dec 2016 22:04:41 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.0747.018; Fri, 2 Dec 2016 22:04:41 +0000 From: Rick Macklem To: Jordan Ladora , "freebsd-net@freebsd.org" Subject: Re: File duplication on NFSv4 exported ZFS filesystems to centos client Thread-Topic: File duplication on NFSv4 exported ZFS filesystems to centos client Thread-Index: AQHSTNGLvid/pn4fzkGYDop7p0LBoKD1MwKF Date: Fri, 2 Dec 2016 22:04:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-office365-filtering-correlation-id: a3480c52-fefb-4790-7827-08d41aff3789 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:YTXPR01MB0189; x-microsoft-exchange-diagnostics: 1; YTXPR01MB0189; 7:TGwD8nSTzKwYoqs/nvmpM+vOgApSS7KjnVQpm9So7UMu38BWwpk6yzaEy4v8q7fdRBoBWHZ3xU7zwuX7SoE49HXDtm1Klrb0il297BCBnj62skeG2E0C6zcJ0dXT5ViYM+iKZzsYzB7E0XkiII0Eo56YnZJP5Mxeo4gAqY7uQdX3i9O5Tp68kXzxeAvARWBIahi16qvl+A9Y+5eFNxYKeyoGtdWnrW7OZ8tmfPpEwezFawQZntW1aUeWVjmWzrSfOwZFoAJTEf+xKzSXNWzYCXOugK4poVnmPyMfchslKXNmPJP1cWia3VFh8INxMzf8iMYcQULlxg6hwlYXmEMSwMXLMpRnWskHPdixtHgboXGR0efZrOJETjmzd7vHtYpl5OM1fCEH1MW/7ldfLJVBzWQ1NGIP4/8f2jWB1VP81mwX32gZo4opxtZTlWF5KMUFa5yMyTyZ7eQCCsnd5/7QFw== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(235228084354710); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(2016111802025)(6072148)(6043046); SRVR:YTXPR01MB0189; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0189; x-forefront-prvs: 0144B30E41 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(189002)(24454002)(199003)(122556002)(86362001)(97736004)(92566002)(2501003)(2900100001)(74482002)(74316002)(101416001)(9686002)(3280700002)(189998001)(107886002)(102836003)(305945005)(68736007)(81156014)(3660700001)(8936002)(81166006)(2906002)(38730400001)(106116001)(106356001)(105586002)(50986999)(8676002)(7846002)(54356999)(76176999)(39060400001)(39410400001)(2950100002)(77096006)(33656002)(229853002)(5660300001)(7696004)(39450400002)(5001770100001)(6506006); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0189; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2016 22:04:41.6040 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0189 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, 02 Dec 2016 23:36:28 -0000 Jordan Ladora wrote: >Curious phenomenon of file pseudo-dup with exported ZFS filesystems on >FreeBSD 10.3-REL NFSv4 export to a centos7 client. > > >*FreeBSD server-* > >zpool create zpool_nfsv4 ... > >zfs create zpool_nfsv4/zfs2 > >zfs create zpool_nfsv4/zfs3 > > >/etc/exports- > >V4: / > >/zpool_nfsv4 > >/zpool_nfsv4/zfs2 > >/zpool_nfsv4/zfs3 > > >zfs unshare -a > > >*Centos client-* > >mkdir /zpool_nfsv4 > >mkdir /zpool_nfsv4_zfs2 > >mkdir /zpool_nfsv4_zfs3 > >mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid >10.0.100.100:/zpool_nfsv4 >/zpool_nfsv4 > - I'll call this mount #2. >mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid >10.0.100.100:/zpool_nfsv4/zfs2 >/zpool_nfsv4_zfs2 - I'll call this mount #3. >mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid >10.0.100.100:/zpool_nfsv4/zfs3 >/zpool_nfsv4_zfs3 By default (unlike NFSv3) NFSv4 mounts the entire tree of file systems under the mount point and not just the file system being mounted. You have two choices: 1 - Don't do mount #2 or mount #3. The first mount should allow you to access /zpool_nfsv4/zfs2 and /zpool_nfsv4/zfs3 with the addition mount= s. OR 2 - Turn of the "whole tree" behaviour on the server via: # sysctl vfs.nfsd.mirrormnt=3D0 on the FreeBSD server. (I know, mirrormnt is a weird name for it, but that is what Linux used, so.= .. I guess it means "mirror the tree of mounted file systems on the server to= the clients".) [stuff snipped] >This seems similar to this (https://serverfault.com/quest >ions/535318/creating-two-nfs-shares-from-same-server-but- >when-mounted-both-point-to-same-d) thread with NFSv4 exports on a centos >server, but I cannot find anything similar to what I see here with a >FreeBSD NFSv4 server. What you did definitely had the same file systems mounted multiple times, so I suspect that is what caused this behaviour. rick From owner-freebsd-net@freebsd.org Sat Dec 3 02:42:51 2016 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 AD5F8C63194 for ; Sat, 3 Dec 2016 02:42:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D21D286 for ; Sat, 3 Dec 2016 02:42:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB32goGh036664 for ; Sat, 3 Dec 2016 02:42:51 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 214746] Carp ipv6 duplicate address detection Date: Sat, 03 Dec 2016 02:42:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sat, 03 Dec 2016 02:42:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214746 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Keywords| |needs-qa --- Comment #1 from Kubilay Kocak --- @Athanasios Could you please attach a file containing the non-working and working configurations (ie: /etc/rc.conf, if specified there).=20 Please also include the exact FreeBSD version (uname -a) output. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-net@freebsd.org Sat Dec 3 05:20:18 2016 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 DE16FC6417A for ; Sat, 3 Dec 2016 05:20:18 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (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 AC2FB1A76 for ; Sat, 3 Dec 2016 05:20:18 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x233.google.com with SMTP id a124so517185222ioe.2 for ; Fri, 02 Dec 2016 21:20:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yl0Eo3+al2XVFSMoRA2rxGseoA9xZ4AOUNz7gKV9faE=; b=CiwcsOBlBxsu5CA9VLbVmKr1HjhTISGxM56Az/9JomE3ETdHbzLmbee15WlCUvazUI ZGgn7uCh06g2QqvpAfQiJQH/wgAznfoxGaJ1h2GuMqPc42B7+k4zMSbGp/5bZ18LZNwI 7Ot+T0VXehS/QPZub3t/EXnNN1PTkmLYgdgxV/8LCvrniEctQ1K948qQIDh01vngA2qp 1OoOQCEBGamUTsz4gPPDQKgsgNmBDkBpEy2wYqJwMNliVBFr85Wk1C3HLBScwpC52EjX KgWAmmXB+0q0FshtZKMhNyRxvHiQfbYrutDfimwQy4AbTLbCVLH+SpHvsEuwFu/DNb2m w/Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yl0Eo3+al2XVFSMoRA2rxGseoA9xZ4AOUNz7gKV9faE=; b=Cd3KzN+IWS+XoaHL2U1n0tcovXerpIGVaWxCyifL4tpLPr6kUikWqoivBJHflj8LX6 XjnVpTixspEZEDrASuD5IZ2ZVEP3SAO/S2taTUvjw3zgmyTLwYZwPN5nrbxFzjRlut7t 8mbkBLW/GxnojbOVvj9m1/6wbwRzKcBuQRDtDeL4ynvSoDGFs66dG2jnP+10rKS1VUF0 fuAYr8P6OhK4twSbA2lTw3581FAWguIF8CLXswQ5AXFuHo4q7s0yC7GGWIK0tjEWmbSL Pf7BgZZLc2H3jTLzBsYaUsrlEYD3Ry0NJW5E6wD5T33pedSYt+4RaDJukVvOv1zK4mZv ekYQ== X-Gm-Message-State: AKaTC03BRkfK2Q69+uVQWksMs0RyWEaww8qzmcAYkt3Oz/rciJZD3Z0xAXmX3yXqeVcKw47/t3V18aaHIPc2tw== X-Received: by 10.107.136.164 with SMTP id s36mr41987235ioi.214.1480742418228; Fri, 02 Dec 2016 21:20:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.144.84 with HTTP; Fri, 2 Dec 2016 21:20:17 -0800 (PST) In-Reply-To: <201612022042.uB2KgOkO055419@elf.torek.net> References: <201612022042.uB2KgOkO055419@elf.torek.net> From: Ryan Stone Date: Sat, 3 Dec 2016 00:20:17 -0500 Message-ID: Subject: Re: mutex usage in if_bridge vs other drivers To: Chris Torek Cc: freebsd-net Content-Type: text/plain; charset=UTF-8 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: Sat, 03 Dec 2016 05:20:19 -0000 On Fri, Dec 2, 2016 at 3:42 PM, Chris Torek wrote: > THE QUESTION: > > - Who is wrong, the bxe driver or the bridge code? I.e., > does the bridge driver need to release its lock here, > and if so, is that actually safe to do? (We might need > to restart the loop over all the members if we drop the > lock.) > > - Or if the bridge driver should retain its lock, can it > use an sx lock here, to permit members to also use sx > locks? > bxe is not the only driver that sleeps in its config path, so I would say that if_bridge is de facto incorrect. Dropping the lock is entirely the wrong thing to do -- as you note, if we do, then the bridge members can change out from under us. The only path forward is to use an sx lock, but unfortunately it's not quite as simple as just converting the lock to an sx lock. The problem is that BRIDGE_LOCK() is also called in the transmit and receive paths, and those paths absolutely may not sleep for any reason. I believe that the correct fix would be to introduce an sx lock to if_bridge in additional to the current lock. In code paths that call ioctls() on bridge members, replace the use of BRIDGE_LOCK with the new sx lock. In code paths that modify the list of bridge members, hold both the BRIDGE_LOCK and the new sx lock. In the transmit and receive paths, nothing should change. From owner-freebsd-net@freebsd.org Sat Dec 3 07:36:12 2016 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 4C113C64C0C for ; Sat, 3 Dec 2016 07:36:12 +0000 (UTC) (envelope-from torek@elf.torek.net) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382BF1B47 for ; Sat, 3 Dec 2016 07:36:11 +0000 (UTC) (envelope-from torek@elf.torek.net) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id uB37aAr8057472; Fri, 2 Dec 2016 23:36:10 -0800 (PST) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id uB37aArG057471; Fri, 2 Dec 2016 23:36:10 -0800 (PST) (envelope-from torek) Date: Fri, 2 Dec 2016 23:36:10 -0800 (PST) From: Chris Torek Message-Id: <201612030736.uB37aArG057471@elf.torek.net> To: rysto32@gmail.com Subject: Re: mutex usage in if_bridge vs other drivers Cc: freebsd-net@freebsd.org In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 02 Dec 2016 23:36:10 -0800 (PST) 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: Sat, 03 Dec 2016 07:36:12 -0000 >... Dropping the lock is entirely the wrong thing to do -- as >you note, if we do, then the bridge members can change out from >under us. The only path forward is to use an sx lock, but ... [snip] >In code paths that modify the list of bridge members, hold both the >BRIDGE_LOCK and the new sx lock. In the transmit and receive paths, >nothing should change. That should work, but I hate the cost of obtaining two locks -- not so much the lock acquire/release cost, but the "mental cost" of keeping the lock ordering straight. The other option I thought of was gathering the list of members that need an ioctl done on them in one pass, then doing all the ioctls after dropping the lock. But that runs the risk of doing ioctls on interfaces that are no longer members of the bridge. I guess the "mental cost" is not that high, since the lock order requirement is guaranteed to be "sx lock first, then mtx lock" (because the other way around causes sleeping while holding a regular mutex!). Chris From owner-freebsd-net@freebsd.org Sat Dec 3 09:53:00 2016 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 3EC4AC6257C for ; Sat, 3 Dec 2016 09:53:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E832B95 for ; Sat, 3 Dec 2016 09:53:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uB39r0Pv028657 for ; Sat, 3 Dec 2016 09:53:00 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 214746] Carp ipv6 duplicate address detection Date: Sat, 03 Dec 2016 09:53:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: aduitsis@douitsis.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sat, 03 Dec 2016 09:53:00 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214746 --- Comment #2 from Athanasios Douitsis --- (In reply to Kubilay Kocak from comment #1) Running FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 on b= oth nodes. This works (dead:beef instead of my real prefix): ifconfig_vmx0_ipv6=3D"inet6 accept_rtadv dead:beef::60/64" ifconfig_vmx0_alias1=3D"inet6 dead:beef::95/64 no_dad vhid 34 pass bar=E2= =80=9D dead:beef::60 is node0 and dead:beef::61 is node1. Both have dead:beef::95/= 64 as the common carp IPv6 address. Vhid 34 is randomly chosen.=20 For IPv4, I'm using a different vhid and pass, just to be on the safe side. Removing the no_dad from ifconfig_vmx0_alias1 and rebooting the BACKUP node causes the problem to appear. Backup node will compain about DAD upon reboo= t, ifconfig will say dead:beef::95/64 duplicated, so it can't really be used.= =20 Afterwards, trying to manualy issue=20 ifconfig inet6 dead:beef::95/64 vhid 34 pass bar will fail the first time, second time it will go through. --=20 You are receiving this mail because: You are the assignee for the bug.=