From owner-freebsd-virtualization@freebsd.org Tue Mar 10 15:16:01 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D160C266E18 for ; Tue, 10 Mar 2020 15:16:01 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48cJZS2GDrz4RF1 for ; Tue, 10 Mar 2020 15:16:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 3EEAD266E10; Tue, 10 Mar 2020 15:16:00 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E28C266E0E; Tue, 10 Mar 2020 15:16:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48cJZQ3vdBz4R8h; Tue, 10 Mar 2020 15:15:58 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f65.google.com with SMTP id a6so5571404otb.10; Tue, 10 Mar 2020 08:15:58 -0700 (PDT) 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=R67LPPOFLjUiCs4J3knDk69qRXAA0Owhpznhxfrb2sY=; b=rwbo719H2PfQRi3Pt+aPSyaj+u4zsCNdea6vXll2Mwc0WK1YTzQ3qenAHVVBiCW16d tkp62Vs/DFlP78TvdEPAHO8RJwF/mcDZLsKK+XidOVk5fNE6FFzSBDaNnPjkCjdRP5W1 ogZd0iONMsNsgxEE3dgFFI667E/UDftlIzi6HvUXRUIWz2XVVLejgMcaPCxj2M9GC4mQ 1cSyLRi0HyXs0O7mO3RDyUbEQ6xyqRtSeHOau1X1T905EZZissNDiXtTcWpMLQSeH2Xz 4Qdie2MMhPBjFSfPCZvJy3MRo0DZItSpydwk0gcZsEvaM8vlcxTO36BrCTtdJDERgB52 VziA== X-Gm-Message-State: ANhLgQ0z57Q6hLsZEfqyYY1Rd6Y2vo5ik+FlGNN1tvRzMFki6K1TrsTe XwF9aKDypqxvMZ3ra1BzxeMujYmoU/lCx+wgNGiXf7bewnA= X-Google-Smtp-Source: ADFU+vuw7TzSwMNFLCPAx9RrQFauFycjTVTY/dtznZTTIZ27JdO11GK6uncNQqUTYqvqGPnEXuoW0utCfihg1VevFDQ= X-Received: by 2002:a9d:7359:: with SMTP id l25mr7861793otk.18.1583853357006; Tue, 10 Mar 2020 08:15:57 -0700 (PDT) MIME-Version: 1.0 References: <9c7a8dea-ac8a-4d17-ed33-b6c4e882add8@digiware.nl> In-Reply-To: From: Alan Somers Date: Tue, 10 Mar 2020 09:15:45 -0600 Message-ID: Subject: Re: [RFC] Adding a Rados block driver to bhyve To: Willem Jan Withagen Cc: "freebsd-virtualization@freebsd.org" , FreeBSD Hackers , "ports@freebsd.org" X-Rspamd-Queue-Id: 48cJZQ3vdBz4R8h X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.210.65 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.99 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[11]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[65.210.85.209.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_GOOD(0.00)[65.210.85.209.rep.mailspike.net : 127.0.0.18]; IP_SCORE(-0.99)[ip: (-0.26), ipnet: 209.85.128.0/17(-2.98), asn: 15169(-1.65), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 15:16:01 -0000 On Tue, Mar 10, 2020 at 3:59 AM Willem Jan Withagen wrote: > On 9-3-2020 14:46, Alan Somers wrote: > > On Mon, Mar 9, 2020 at 4:32 AM Willem Jan Withagen > wrote: > >> Hi all, >> >> And sorry for crosspoing three groups, but the answer can/could be a mix >> of things to do in these three areas. >> >> I have a prototype of bhyve running on Rados/Ceph working: >> https://github.com/freebsd/freebsd/pull/426 >> >> .......... > > 4) Create a bhyve-blockrbd port. >> This is much like 3) but instead of building a bhyve-rbd executable, >> it delivers a libblockrbd.so that is dynamically loadable by the >> standaard bhyve that comes with base. >> > ............ > > > Great work! I also agree that option 4 sounds like the best. There's > precedent for ports that > > require the FreeBSD Sources. For example, see devel/py-libzfs or > emulators/virtualbox-ose. > > You just need to define the SRC_BASE variable. > > Hi Alan, > > Thanx for the hint, and it made me check what is actually available within > the poudriere jail > And that does have full source, so the Makefile code is mainly for those > that build in a different way. > > I've got a proto version working when compiling stuff with `make > buildworld`, but run in the > problem that libblock_rbd.so is stripped in such a way that the symbol I > need is removed. > Using the unstripped version does work. > > Is there an incantation for the SRC Makefiles that builds a dynamical > loadable lib?? > And I'm still looking for a PORTS example of building a dynamical loadable > lib. > Or is there no generic code for that in the PORTS Mk files? > > --WjW > > BTW: Still haven't worked in your AIO code :( > There are plenty of dynamic libraries built with the SRC makefiles. For example, https://svnweb.freebsd.org/base/head/lib/libbsdstat/Makefile?view=markup . And there are plenty of ports that build shared libraries too, just look at /usr/local/lib/*.so. However, the ports framework doesn't have much special code just to support building libraries. Instead the hard work is always done by the ports themselves. Some use autotools, some cmake, etc etc. The simplest port I can find that uses both SRC_BASE and INSTALL_LIB is this one: https://svnweb.freebsd.org/ports/head/devel/linux_libusb/ .