From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9D4AA051C; Fri, 26 Jun 2020 16:47:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BEBB91C0C0; Fri, 26 Jun 2020 16:47:41 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id C26B11C0BF for ; Fri, 26 Jun 2020 16:47:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593182860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=3gnFkvod4Gxe86fK56lZlBy/CELdNxlRcrwLGFBjfsE=; b=JPs5ZC18zAoXimDCjRrDrGPRT/WmBiSSW//+WCA7fXIDiOnIcwr0Br7YAppJkPgxyFgbvQ lV1z5Mbdci9GCZ0WqvY/JMv7J4w3B7koCsd7DovevA/4CSkSfNaJtKUMNoK8m+6j9Rtulu +P0QREEIH9cj2HVF8bWvbSW5mRrl9T4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-250-4QXdiTkXMVO6wPIZZdEtYw-1; Fri, 26 Jun 2020 10:47:36 -0400 X-MC-Unique: 4QXdiTkXMVO6wPIZZdEtYw-1 Received: by mail-wm1-f70.google.com with SMTP id t18so11523458wmj.5 for ; Fri, 26 Jun 2020 07:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3gnFkvod4Gxe86fK56lZlBy/CELdNxlRcrwLGFBjfsE=; b=BJaZSpL13XKipJYPTfYdy0vwGKakdB7T+pdmAb0ihOS18IgrWerhxN30pOHLsVNUs8 4op9hBW3akzm2ng/IgrowsoYFO7+6ET0xreOMF9+fP9U3g77hzLEcNAC4CiJ6z0BwLpA 7mS0XdpUhlxpATTTG6pj2ci7w4La4ytdlkTJzVleqw/ZkFHm5KLK6xgo5mp8PEtMLovX o47b2yxY4SUHvvOYxtVxAD0cPA2zBRivw4FEhZcEgfx6laifD8Tu/28WxvPyZzJ1XGAT e+kcGQQJ3A74XnC+Akemy/qlzFcMWdpJmu5nnZEiDkP1p2xv/2GyBMNyI6X0ziaPsoAh +Ang== X-Gm-Message-State: AOAM531LUgjrwrnEWUtTFAPIQv4swLfo4Mh+k1rGN5KYn90T7NcGJB8+ GIQmoUa/kuQTg1LS3AVxtSLh6o2UXeDkApsyB03tfnDrWFPrirWsmzVwmJFztL9JbOfkm5HQUD6 5ohc= X-Received: by 2002:a5d:6a01:: with SMTP id m1mr4392021wru.115.1593182855269; Fri, 26 Jun 2020 07:47:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcO0iGM1k5/fKF6gy5tH+0m/B2GYphHNJE8JiJ2oTOlTYK6J7JSTQ+UgkFpjebc/oQs7a97A== X-Received: by 2002:a5d:6a01:: with SMTP id m1mr4391996wru.115.1593182855069; Fri, 26 Jun 2020 07:47:35 -0700 (PDT) Received: from amorenoz.users.ipa.redhat.com ([92.176.159.3]) by smtp.gmail.com with ESMTPSA id s10sm6704948wme.31.2020.06.26.07.47.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jun 2020 07:47:34 -0700 (PDT) To: Maxime Coquelin , matan@mellanox.com, xiao.w.wang@intel.com, zhihong.wang@intel.com, chenbo.xia@intel.com, david.marchand@redhat.com, viacheslavo@mellanox.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com, grive@u256.net, dev@dpdk.org References: <20200626140441.1441763-1-maxime.coquelin@redhat.com> From: Adrian Moreno Autocrypt: addr=amorenoz@redhat.com; prefer-encrypt=mutual; keydata= mQENBF1syNUBCADQ9dk3fDMxOZ/+OQpmbanpodYxEv8IRtDz8PXw8YX7UyGfozOpLjQ8Fftj ZxuubYNbt2QVbSgviFilFdNWu2eTnN/JaGtfhmTOLPVoakkPHZF8lbgImMoch7L0fH8wN2IM KPxQyPNlX+K9FD5brHsV1lfe1TwAxmhcvLW8yNrVq+9eDIDykxc7tH4exIqXgZroahGxMHKy c8Ti2kJka/t6pDfRaY0J+6J7I1nrn6GXXSMNA45EH8+0N/QlcXhP3rfftnoPeVmpjswzvJqY FNjf/Q5VPLx7RX0Qx+y8mMB2JcChV5Bl7D7x5EUbItj6+Sy7QfOgCtPegk9HSrBCNYaLABEB AAG0I0FkcmlhbiBNb3Jlbm8gPGFtb3Jlbm96QHJlZGhhdC5jb20+iQFUBBMBCAA+FiEEogUD gihhmbOPHy26d5C5fbYeFsUFAl1syNUCGwMFCQHhM4AFCwkIBwIGFQoJCAsCBBYCAwECHgEC F4AACgkQd5C5fbYeFsX7qwgArGHSkX+ILNcujkVzjTG4OtkpJMPFlkn/1PxSEKD0jLuzx14B COzpg/Mqj3Re/QBuOas+ci9bsUA0/2nORtmmEBvzDOJpR5FH1jaGCx8USlY4WM6QqEDNZgTw hsy9KhjFzFjMk+oo3HyItXA+Uq9yrRBTjNBGTXxezMRcMuUZ4MIAfY0IRBglL2BufiuL43jD BvTENNFLoQ/wFV7qkFWSkv+8IjTsxr7M6XUo1QLd29Hn0dvwssN579HL1+BP46i2REpzeBEG L75iVChi+YnIQQNMJ9NYarVabZx4Y1Gn8+7B/1SNArDV+IDgnYgt7E58otoV2Ap310dmtuvE VbxGpbkBDQRdbMjVAQgAqyp9oA7WDu7/Y9T4Ommt69iZx8os7shUIfdgPEy5xrcPn6qGwN1/ HQ4j8nWfBG9uuX1X0RXUZIUEtYTxtED4yaCQMTqDUf9cBAwAA2mYxBfoiNYx8YqxM+sT0/J4 2qmDd+y+20UR4yzHE8AmIbspTzDFIJDAi+jKSR8F355z0sfW7CIMDC4ZWrPsskjEy1YN/U10 r6tRRH1kNyrCSbTG0d9MtcQO58h7DLXuzUhErB+BtG52A04t5cweIJTJC+koV5XPeilzlHnm RFoj0ncruGa9Odns21BNt3cy9wLfK+aUnWuAB1uc6bJGQPiAwjkilz7g7MBRUuIQ2Zt7HGLc SwARAQABiQE8BBgBCAAmFiEEogUDgihhmbOPHy26d5C5fbYeFsUFAl1syNUCGwwFCQHhM4AA CgkQd5C5fbYeFsUlSwf8CH+u/IXaE7WeWxwFkMaORfW8cM4q0xrL3M6yRGuQNW+kMjnrvK9U J9G+L1/5uTRbDQ/4LdoKqize8LjehA+iF6ba4t9Npikh8fLKWgaJfQ/hPhH4C3O5gWPOLTW6 ylGxiuER4CdFwQIoAMMslhFA7G+teeOKBq36E+1+zrybI6Xy1UBSlpDK9j4CtTnMQejjuSQb Qhle+l8VroaUHq869wjAhRHHhqmtJKggI+OvzgQpDIwfHIDypb1BuKydi2W6cVYEALUYyCLS dTBDhzj8zR5tPCsga8J7+TclQzkWOiI2C6ZtiWrMsL/Uym3uXk5nsoc7lSj7yLd/MrBRhYfP JQ== Message-ID: <1d8a6ae2-9175-10c5-8287-a0614048b39c@redhat.com> Date: Fri, 26 Jun 2020 16:47:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200626140441.1441763-1-maxime.coquelin@redhat.com> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 00/14] vDPA API and framework rework X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/26/20 4:04 PM, Maxime Coquelin wrote: > This series aims to rework the vDPA framework and > its API to better fit into the DPDK device model > and also be more easily consumable by applications. > > Main changes are creating a device class for vDPA, > which enables applications to iterate vDPA devices > in a generic way: > > RTE_DEV_FOREACH(dev, "class=vdpa", it) {...} > > Also the notion of vDPA device ID is replaced > with both application & drivers using the > rte_vdpa_device as reference. Doing that also > made possible to store devices references into > a linked list instead of a static array. Last > patch makes the rte_vdpa_device structure > content opaque to the applications, creating > a clear barrier between application visible > API and drivers visble ones. > > The first two patches fixes issues in some > busses iterators, causing segmentation faults > when iterating only on a device class. > > While reviewing, if you notice further possible > improvements, please let me know. Target is to > remove the experimental tag from vDPA APIs in > next LTS release. > > Thanks to David for giving me some ideas of > improvements! > > Changes since v3: > ----------------- > - Fix double lock in unregister API (Adrian) > - Apply Acked-by's > > Changes since v2: > ----------------- > - Remove useless new line in error messages (Adrian) > - Use strncmp fo dev name comparisons (Adrian) > - Apply Adrian Acked-by's > > Changes since v1: > ----------------- > - Rebase on top of net-next > - Use rte_pci_addr_cmp() instead of comparing pci dev pointers (Gaëtan) > - Use proper types for calculating device ID (Gaëtan) > > Maxime Coquelin (14): > bus/dpaa: fix null pointer dereference > bus/fslmc: fix null pointer dereference > vhost: introduce vDPA devices class > vhost: make vDPA framework bus agnostic > vhost: replace device ID in vDPA ops > vhost: replace vDPA device ID in Vhost > vhost: replace device ID in applications > vhost: remove useless vDPA API > vhost: use linked-list for vDPA devices > vhost: introduce wrappers for some vDPA ops > examples/vdpa: use new wrappers instead of ops > examples/vdpa: remove useless device count > vhost: remove vDPA device count API > vhost: split vDPA header file > > drivers/bus/dpaa/dpaa_bus.c | 5 + > drivers/bus/fslmc/fslmc_bus.c | 5 + > drivers/vdpa/ifc/ifcvf_vdpa.c | 87 ++++---- > drivers/vdpa/mlx5/mlx5_vdpa.c | 134 ++++++------ > drivers/vdpa/mlx5/mlx5_vdpa.h | 5 +- > examples/vdpa/main.c | 149 +++++++------- > lib/librte_vhost/Makefile | 3 +- > lib/librte_vhost/meson.build | 3 +- > lib/librte_vhost/rte_vdpa.h | 188 +++++------------ > lib/librte_vhost/rte_vdpa_dev.h | 147 +++++++++++++ > lib/librte_vhost/rte_vhost.h | 20 +- > lib/librte_vhost/rte_vhost_version.map | 11 +- > lib/librte_vhost/socket.c | 48 ++--- > lib/librte_vhost/vdpa.c | 275 +++++++++++++++---------- > lib/librte_vhost/vhost.c | 19 +- > lib/librte_vhost/vhost.h | 9 +- > lib/librte_vhost/vhost_user.c | 28 +-- > 17 files changed, 634 insertions(+), 502 deletions(-) > create mode 100644 lib/librte_vhost/rte_vdpa_dev.h > Besides the wrong patch version: Acked-by: Adrián Moreno -- Adrián Moreno