From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7CA0D43AFE; Mon, 12 Feb 2024 23:49:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4856B40274; Mon, 12 Feb 2024 23:49:21 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id CE8AE4026E for ; Mon, 12 Feb 2024 23:49:19 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e0ac91e1e9so1311809b3a.3 for ; Mon, 12 Feb 2024 14:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1707778159; x=1708382959; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=SoLtSsRyJGl8Np0qL2TuVku/jytDpHGkE9qEbqLWBsg=; b=swGy+Y7x5+d/Fvr4g30F3t2vLbcuVqpZV6t46AGOoANam1BiTbwH1a2IVgWPqpNNtS sTQHBB2Ayh3jrejGT2XjIc3C6We/MKdscSJEjwI+4hyo/k5mOz/yyFawu9a3QhFSS3NI +IKBcZs8ZSARjBn9U5nyg9RI92Q087Jy0ZkhqARz7nFoM0Z0QwyD3jyE1d0gH0N/IPLn tovezYrkz5JC+X1ZG4mJRZXmg11ekGt9shufszG8WuAjhgr9RLHmUeDr5JfdtyGY4K5M wevnkEGMDW7z8Pd/LjqjM1YTlSEtCi7sForkJb8kF5eoakVvp+cPkHDdV0enjzOFXeHC yEyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707778159; x=1708382959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SoLtSsRyJGl8Np0qL2TuVku/jytDpHGkE9qEbqLWBsg=; b=NMmXKChditH+dEJNNOUMrzNn1XtvHG9uQfW+KC9/sBqUtedT7ufUA7DqdFY8bex64a jlXpp6mKrHbzriOyJnP0Ll0iwdd2b+CWQUgFN+8ZurQf3tZvIf22MKPuiSXfotxFfOex Sx+4+hckgZnoqQEacQfxnj33qbutWkOnHFW7kKdwmswu1sSfWmuD/cTFGT+6bFCFZw37 S/hAQ0rtQVmqEWa4PvutxPIiwPvNt4eAxcQ3ib8TeXcl7+T89FQ+iTjQmsNoiL2N2k5q LVHfdJG69KHVxsZOu/goDupHSO0kxRJqbJjMPtAUeY7zqG1RzCqUedVy/TrRjS0IGlt4 6+Hg== X-Gm-Message-State: AOJu0YzQg9EorRNjgFHVc5Gn0cA/iWGANYm9ryjMcCKSn2S42VcNxxl0 hhoKB866bp1iHtDryikjUVM+CR9Fq3zpJTBQ4kh5mMWkgXTEncP59U1sRLnSTSk= X-Google-Smtp-Source: AGHT+IHhQyiGYs5RGqZ1Qjfe5rWH/WGVgJ+Ws4PNxW+rp37CWIO6UFgKxHVWzU1grP0Lss0hbWXzNQ== X-Received: by 2002:a62:e406:0:b0:6e0:4b8a:7ab7 with SMTP id r6-20020a62e406000000b006e04b8a7ab7mr7084135pfh.21.1707778158780; Mon, 12 Feb 2024 14:49:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVyJuUv0A5Ol1BvcX2aecjTZm7K37l9cMFoPTLCeBiNCyrWZwypDO9OoF1SpQ5IfwUZavhOL9KLzsiOwkiqT2A5bD+NzIy4iEEWyidv/T6bBxKFKMZgKLbcy2K/0bssC6z5D7FuW5OMdK+UNagVgyxOnWMucc2LEeHNhE/kuPH5NL3tSmuXEUz08gVyG8l+zuOs1kmT7aOxWozyocoWjY+9Ch0hHJtpFTmZ/vLRBvI3kr0ca36jYOXrVEOt1lPFE10802L7M1nhdQLgDPtDPg== Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id o15-20020a056a001b4f00b006e09e97b803sm5652921pfv.46.2024.02.12.14.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 14:49:18 -0800 (PST) Date: Mon, 12 Feb 2024 14:49:16 -0800 From: Stephen Hemminger To: Chenbo Xia Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, cunming.liang@intel.com, xiuchun.lu@intel.com, miao.li@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Subject: Re: [dpdk-dev] [PATCH v3 0/8] Introduce emudev library and iavf emudev driver Message-ID: <20240212144916.398008ef@hermes.local> In-Reply-To: <20210114062512.45462-1-chenbo.xia@intel.com> References: <20201219062806.56477-1-chenbo.xia@intel.com> <20210114062512.45462-1-chenbo.xia@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 14 Jan 2021 14:25:04 +0800 Chenbo Xia wrote: > This series introduces a new device abstraction called emudev for emulated > devices. A new library (librte_emudev) is implemented. The first emudev > driver is also introduced, which emulates Intel Adaptive Virtual Function > (iavf) as a software network device. > > This series has a dependency on librte_vfio_user patch series: > http://patchwork.dpdk.org/cover/86498/ > > Background & Motivation > ----------------------- > The disaggregated/multi-process QEMU is using VFIO-over-socket/vfio-user > as the main transport mechanism to disaggregate IO services from QEMU. > Therefore, librte_vfio_user is introduced in DPDK to accommodate > emulated devices for high performance I/O. Although vfio-user library > provides possibility of emulating devices in DPDK, DPDK does not have > a device abstraction for emulated devices. A good device abstraction will > be useful for applications or high performance data path driver. With > this consideration, emudev library is designed and implemented. It also > make it possbile to keep modular design on emulated devices by implementing > data path related logic in a standalone driver (e.g., an ethdev driver) > and keeps the unrelated logic in the emudev driver. > > Design overview > --------------- > > +---------------------------------------+ > | +---------------+ +-----------+ | > | | iavf_emudev |<-->| data path | | > | | driver | | driver | | > | +---------------+ +-----------+ | > | | | > | --------------------------- VDEV BUS | > | | | > | +---------------+ | > +--------------+ | | vdev: | | > | +----------+ | | | /path/to/vfio | | > | | Generic | | | +---------------+ | > | | vfio-dev | | | | | > | +----------+ | | | | > | +----------+ | | +----------+ | > | | vfio-user| | | | vfio-user| | > | | client | |<---|----->| server | | > | +----------+ | | +----------+ | > | QEMU/DPDK | | DPDK | > +--------------+ +---------------------------------------+ > > - Generic vfio-dev/vfio-user client/vfio-user server > Above concepts are all introduced in librte_vfio_user patch series: > http://patchwork.dpdk.org/cover/86498/ > > - vdev:/path/to/vfio. > It binds to vdev bus driver. The vdev device is defined by DPDK applications > through command line as '--vdev=emu_iavf, path=/path/to/socket' in iavf_emudev > case. Parameters in command line include device name (emu_iavf) which is used > to identify corresponding driver (in this case, iavf_emudev driver), > path=/path/to/socket which is used to open the transport interface to vfio-user > client in QEMU/DPDK. > > - data path driver. > The data path handling is splited to another standalone driver for modular > design. > > Why not rawdev for emulated device > ---------------------------------- > Instead of introducing new class emudev, emulated device could be presented as rawdev. > However, existing rawdev APIs cannot meet the requirements of emulated device. There are > three API categories for emudev. They are emudev device lifecycle management, backend > facing APIs, and emudev device provider facing APIs respectively. Existing rawdev APIs > could only cover lifecycle management APIs and some of backend facing APIs. Other APIs, > even if added to rawdev API are not required by other rawdev applications. > This looks interesting but there has been on further work on it for three years. I recommend that the patch be dropped for now and resubmitted if/when the vfio_user patches get accepted.