From owner-freebsd-net@freebsd.org Thu Oct 4 15:05:27 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2719810AE060 for ; Thu, 4 Oct 2018 15:05:27 +0000 (UTC) (envelope-from v.maffione@gmail.com) 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 7FEB572E03 for ; Thu, 4 Oct 2018 15:05:26 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 4196410AE05F; Thu, 4 Oct 2018 15:05:26 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F297C10AE05D for ; Thu, 4 Oct 2018 15:05:25 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCDC72E01; Thu, 4 Oct 2018 15:05:25 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-qt1-x834.google.com with SMTP id q41-v6so10193991qtq.10; Thu, 04 Oct 2018 08:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qSTAwMsCFWpfuaH5AVsfQyfJYbtzhkCyo/oObqqvOQ8=; b=m2JpLVod+4P25vfcmuzHiM67jNEqvkahVXEICrgUFkQbPIA/qhmumFjvtOzImV8Cf1 fKFkWgBkz4UQ22KYNlfnMyhfzTM0v05oEQlafYu/yeC0aTV4oRlMr0qPcUu8TThbG7Tw pcQK20klHAwHXqq7F+Spx8y70qjbZHjw6lIXhBzSMO5cg9TnbU3DgPtfAkm1pPcbBI9p J1zQGqtw9yf+UMxlSba2cqt8GxXcmsToGmLRLSQSGDQ5+dwrtI36eETpQukkbLRcDQ5a 6VRbZ3nTB9XzgTp19RX6shQdpQ3qZuYg/A2uJW4+hFtdZcvFdU6lTqPRyH8INx9P5MvZ QVRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qSTAwMsCFWpfuaH5AVsfQyfJYbtzhkCyo/oObqqvOQ8=; b=edgsbJSpYuredTwb+unm1H7du6CzSMEO8eAPSI0xPIdqsZ7814oFcWAjBKGdGm+nMe EfayY8bYhJRmJAvGQfV1E+7gaE9olNx6TdzCuWOd+nKsjnYjsq8QVKHBiJ7zsG7S2eo7 t04S+388bgElLT976Nhoi9gc6eI82J97Uo3hCKblBgUwgz+4M3DWcnB2Yr0xUhEHLG5u WkPzcWzletqZrIA/9zPp3Q0lOgGBZNasD92JWTdVtACnoTTK3bDhE61fy05eVWIjARqm Z2MtGpCI9vZ/3zvuiz5HBseuKrHIyMtTomlIGVp5mJCvnma6H+VhUCRYZA5VmG3KbA8z CYHQ== X-Gm-Message-State: ABuFfohANb8B2JxmdqPlT9ju9XB4k/xt4Aq1t9P8896h4V357E3IQ063 URgaD/Yq++GjKwOXlsBNj8IXrT5VDAlc4YFuT+g= X-Google-Smtp-Source: ACcGV61g0KEZsxDIym/eNER0laYeXvam8yMzvA6QkzxWoQPitKB8lwh6H1CP3NQMnMuo7PbWgqELWOX/QpVqmal2XCU= X-Received: by 2002:ac8:36c8:: with SMTP id b8-v6mr5920808qtc.49.1538665524834; Thu, 04 Oct 2018 08:05:24 -0700 (PDT) MIME-Version: 1.0 References: <201810041503.w94F3Yim006705@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201810041503.w94F3Yim006705@pdx.rh.CN85.dnsmgr.net> From: Vincenzo Maffione Date: Thu, 4 Oct 2018 17:05:12 +0200 Message-ID: Subject: Re: vale and netmap module questions To: freebsd-rwg@pdx.rh.cn85.dnsmgr.net Cc: "K. Macy" , Luigi Rizzo , "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 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, 04 Oct 2018 15:05:27 -0000 Hi Rodney, Sure. Is there a specific procedure for this, or should I just send the .diff to re@freebsd.org? Thanks, Vincenzo Il giorno gio 4 ott 2018 alle ore 17:03 Rodney W. Grimes < freebsd-rwg@pdx.rh.cn85.dnsmgr.net> ha scritto: > > Hi, > > I fixed this upstream in this commit > > > https://github.com/luigirizzo/netmap/commit/282f404ccb4fc777056a591127060e29657c9ab7 > > I will apply the change into FreeBSD as soon as HEAD thaws. > > This appears to be a man page change only, > please do submit that to re@freebsd.org to be > committed now. > > Thanks, > Rod > > > Cheers, > > Vincenzo > > > > Il giorno gio 4 ott 2018 alle ore 00:36 K. Macy ha > > scritto: > > > > > On Fri, Aug 31, 2018 at 6:50 PM John-Mark Gurney > wrote: > > > > > > > > First, does vale work for anyone? At least one of the documented > > > > commands in vale(4) does not work. > > > > > > > The documentation with respect to naming is wrong. I didn't have a bit > > > when I was using it so never got around to fixing it. > > > > > > > > > > After manually building the netmap module and loading it: > > > > # tcpdump -ni vale-a:1 > > > > 313.748851 nm_open [947] invalid bridge name vale-a:1 > > > > tcpdump: netmap open: cannot access vale-a:1: Invalid argument > > > > > > > > If I run tcpdump with a more correct looking name of vale1:a, I get a > > > > null deref panic in ifunit_ref. Full trace is at the end. > > > > > > > > Second, is there a good reason why the netmap module is still > > > > disconnected from being built as a module? I guess not working > > > > would be one, but I figure the above might be an aarch64 specific > > > > problem, and not a general issue. > > > > > > > > FreeBSD generic 12.0-ALPHA3 FreeBSD 12.0-ALPHA3 #0 r338296M: Sat Aug > 25 > > > 06:17:25 UTC 2018 freebsd@generic > :/usr/obj/usr/src/arm64.aarch64/sys/GENERIC > > > arm64 > > > > > > > > netmap: loaded module > > > > Fatal data abort: > > > > x0: ffff00005894f900 > > > > x1: ffff000040351028 > > > > x2: 5 > > > > x3: ffff0000405e4090 > > > > x4: 4000 > > > > x5: 0 > > > > x6: 0 > > > > x7: ffff000040351cb0 > > > > x8: 0 > > > > x9: ffff000000a09960 > > > > x10: ffff00005894f908 > > > > x11: 0 > > > > x12: 1 > > > > x13: fffffcffc0000000 > > > > x14: 3 > > > > x15: 10000 > > > > x16: ffff00005cd35580 > > > > x17: ffff000000476de0 > > > > x18: ffff000040351010 > > > > x19: ffff000040351160 > > > > x20: fffffd000739798e > > > > x21: ffff000000a02000 > > > > x22: 1 > > > > x23: 0 > > > > x24: fffffd0007397988 > > > > x25: 0 > > > > x26: 1 > > > > x27: 0 > > > > x28: fffffd0007397982 > > > > x29: ffff000040351050 > > > > sp: ffff000040351010 > > > > lr: ffff000000476e0c > > > > elr: ffff000000476e1c > > > > spsr: 60000345 > > > > far: 28 > > > > esr: 96000007 > > > > [ thread pid 802 tid 100096 ] > > > > Stopped at ifunit_ref+0x3c: ldr x8, [x8, #40] > > > > db> bt > > > > Tracing pid 802 tid 100096 td 0xfffffd0007422000 > > > > db_trace_self() at db_stack_trace+0xf0 > > > > pc = 0xffff00000069b81c lr = 0xffff0000000d6b28 > > > > sp = 0xffff000040350920 fp = 0xffff000040350950 > > > > > > > > db_stack_trace() at db_command+0x220 > > > > pc = 0xffff0000000d6b28 lr = 0xffff0000000d67ac > > > > sp = 0xffff000040350960 fp = 0xffff000040350a40 > > > > > > > > db_command() at db_command_loop+0x60 > > > > pc = 0xffff0000000d67ac lr = 0xffff0000000d6570 > > > > sp = 0xffff000040350a50 fp = 0xffff000040350a70 > > > > > > > > db_command_loop() at db_trap+0xf4 > > > > pc = 0xffff0000000d6570 lr = 0xffff0000000d9694 > > > > sp = 0xffff000040350a80 fp = 0xffff000040350ca0 > > > > > > > > db_trap() at kdb_trap+0x1d8 > > > > pc = 0xffff0000000d9694 lr = 0xffff0000003cdf70 > > > > sp = 0xffff000040350cb0 fp = 0xffff000040350d60 > > > > > > > > kdb_trap() at data_abort+0x1e0 > > > > pc = 0xffff0000003cdf70 lr = 0xffff0000006b5ca4 > > > > sp = 0xffff000040350d70 fp = 0xffff000040350e20 > > > > > > > > data_abort() at do_el1h_sync+0x11c > > > > pc = 0xffff0000006b5ca4 lr = 0xffff0000006b59c0 > > > > sp = 0xffff000040350e30 fp = 0xffff000040350e60 > > > > > > > > do_el1h_sync() at handle_el1h_sync+0x74 > > > > pc = 0xffff0000006b59c0 lr = 0xffff00000069d874 > > > > sp = 0xffff000040350e70 fp = 0xffff000040350f80 > > > > > > > > handle_el1h_sync() at ifunit_ref+0x28 > > > > pc = 0xffff00000069d874 lr = 0xffff000000476e08 > > > > sp = 0xffff000040350f90 fp = 0xffff000040351050 > > > > > > > > ifunit_ref() at netmap_get_bdg_na+0x194 > > > > pc = 0xffff000000476e08 lr = 0xffff00005cd20b24 > > > > sp = 0xffff000040351060 fp = 0xffff0000403510c0 > > > > > > > > netmap_get_bdg_na() at netmap_get_na+0x1b0 > > > > pc = 0xffff00005cd20b24 lr = 0xffff00005cd15994 > > > > sp = 0xffff0000403510d0 fp = 0xffff000040351120 > > > > > > > > netmap_get_na() at netmap_ioctl+0xcd0 > > > > pc = 0xffff00005cd15994 lr = 0xffff00005cd18160 > > > > sp = 0xffff000040351130 fp = 0xffff0000403511f0 > > > > > > > > netmap_ioctl() at netmap_ioctl_legacy+0x4b8 > > > > pc = 0xffff00005cd18160 lr = 0xffff00005cd2b188 > > > > sp = 0xffff000040351200 fp = 0xffff0000403515b0 > > > > > > > > netmap_ioctl_legacy() at netmap_ioctl+0x15c > > > > pc = 0xffff00005cd2b188 lr = 0xffff00005cd175ec > > > > sp = 0xffff0000403515c0 fp = 0xffff000040351680 > > > > > > > > netmap_ioctl() at freebsd_netmap_ioctl+0x4c > > > > pc = 0xffff00005cd175ec lr = 0xffff00005cd25f94 > > > > sp = 0xffff000040351690 fp = 0xffff0000403516b0 > > > > > > > > freebsd_netmap_ioctl() at devfs_ioctl+0xc4 > > > > pc = 0xffff00005cd25f94 lr = 0xffff00000025f1ac > > > > sp = 0xffff0000403516c0 fp = 0xffff000040351700 > > > > > > > > devfs_ioctl() at VOP_IOCTL_APV+0xa8 > > > > pc = 0xffff00000025f1ac lr = 0xffff0000006ef704 > > > > sp = 0xffff000040351710 fp = 0xffff000040351730 > > > > > > > > VOP_IOCTL_APV() at vn_ioctl+0x110 > > > > pc = 0xffff0000006ef704 lr = 0xffff00000045c828 > > > > sp = 0xffff000040351740 fp = 0xffff000040351840 > > > > > > > > vn_ioctl() at devfs_ioctl_f+0x24 > > > > pc = 0xffff00000045c828 lr = 0xffff00000025f818 > > > > sp = 0xffff000040351850 fp = 0xffff000040351860 > > > > > > > > devfs_ioctl_f() at kern_ioctl+0x358 > > > > pc = 0xffff00000025f818 lr = 0xffff0000003f130c > > > > sp = 0xffff000040351870 fp = 0xffff0000403518c0 > > > > > > > > kern_ioctl() at sys_ioctl+0x15c > > > > pc = 0xffff0000003f130c lr = 0xffff0000003f0f64 > > > > sp = 0xffff0000403518d0 fp = 0xffff0000403519a0 > > > > > > > > sys_ioctl() at do_el0_sync+0x4b8 > > > > pc = 0xffff0000003f0f64 lr = 0xffff0000006b61f8 > > > > sp = 0xffff0000403519b0 fp = 0xffff000040351a70 > > > > > > > > do_el0_sync() at handle_el0_sync+0x84 > > > > pc = 0xffff0000006b61f8 lr = 0xffff00000069da00 > > > > sp = 0xffff000040351a80 fp = 0xffff000040351b90 > > > > > > > > handle_el0_sync() at 0x401996f4 > > > > pc = 0xffff00000069da00 lr = 0x00000000401996f4 > > > > sp = 0xffff000040351ba0 fp = 0x0000ffffffffe2f0 > > > > > > > > Line number maps: > > > > (kgdb) list *ifunit_ref+0x28 > > > > 0xffff000000476e08 is in ifunit_ref (/usr/src/sys/net/if.c:2417). > > > > 2412 struct ifnet * > > > > 2413 ifunit_ref(const char *name) > > > > 2414 { > > > > 2415 struct ifnet *ifp; > > > > 2416 > > > > 2417 IFNET_RLOCK_NOSLEEP(); > > > > 2418 CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { > > > > 2419 if (strncmp(name, ifp->if_xname, IFNAMSIZ) > == 0 > > > && > > > > 2420 !(ifp->if_flags & IFF_DYING)) > > > > 2421 break; > > > > > > > > Following look to be correct, but modules don't build by default w/ > > > > debug symbols, so I had to rebuild the module... > > > > > > > > Reading symbols from > > > /usr/obj/usr/src/arm64.aarch64/sys/modules/netmap/netmap.kld...done. > > > > (kgdb) list *netmap_get_bdg_na+0x194 > > > > 0xcb18 is in netmap_get_bdg_na > > > (/usr/src/sys/dev/netmap/netmap_vale.c:931). > > > > 926 /* > > > > 927 * try see if there is a matching NIC with this name > > > > 928 * (after the bridge's name) > > > > 929 */ > > > > 930 ifname = nr_name + b->bdg_namelen + 1; > > > > 931 ifp = ifunit_ref(ifname); > > > > 932 if (!ifp) { > > > > 933 /* Create an ephemeral virtual port. > > > > 934 * This block contains all the > > > ephemeral-specific logic. > > > > 935 */ > > > > (kgdb) list *netmap_get_na+0x1b0 > > > > 0x1994 is in netmap_get_na (/usr/src/sys/dev/netmap/netmap.c:1538). > > > > 1533 error = netmap_get_pipe_na(hdr, na, nmd, create); > > > > 1534 if (error || *na != NULL) > > > > 1535 goto out; > > > > 1536 > > > > 1537 /* try to see if this is a bridge port */ > > > > 1538 error = netmap_get_bdg_na(hdr, na, nmd, create); > > > > 1539 if (error) > > > > 1540 goto out; > > > > 1541 > > > > 1542 if (*na != NULL) /* valid match in > netmap_get_bdg_na() */ > > > > > > > > Thanks. > > > > > > > > -- > > > > John-Mark Gurney Voice: +1 415 225 > 5579 > > > > > > > > "All that I will do, has been done, All that I have, has not." > > > > _______________________________________________ > > > > 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" > > > > > > > > > -- > > Vincenzo > > _______________________________________________ > > 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" > > > > -- > Rod Grimes > rgrimes@freebsd.org > -- Vincenzo