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 CFFA242942; Fri, 14 Apr 2023 16:25:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B9C740144; Fri, 14 Apr 2023 16:25:23 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) by mails.dpdk.org (Postfix) with ESMTP id 9E33A400D5 for ; Fri, 14 Apr 2023 16:25:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NsfPkUu5n2FweiWlaqrh6n+YFeP/bKgRfNFSTA6IecGXi6koXvdRYKPZa3w7LCeL/ScsJeUmODY/WRbDJsjzpBIY8c9ZyfqX44Tf3JIocjCYke6t82jGs/kdJumGRDxN9c99NDe24tOl3aRwKB5OkRBazohuKMV7BG2QTpXr6t5XDvCLHZxvCyS/bKWSE3/sL5Jm9qGMd9PX2IPqnkxa3nJYoRlCH1Tu3b6UtmNyoFZmzxAMxj913M5/18WvQhp1qCCvkBXlq1ULRYviaanx+wKtd15juWXMppXeHlTsiZ1rAv7dabruUdKfSShlj2rpwykgw2kanaukTfUEv2ZZ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rmu8F+ouY839FBLqhlFaeLGcTUSF9D5hcaVuxiQAdho=; b=iina9LvEPp0zZk2+bpdjLg8eJg5Ck0UKH7Fc2KLgz00xflKZ8SktDdlkTzOFJHD3Kh2QXs/b8RxkU7qJZl2m0VRe7o6YmvRMl9hz8RFsE7MGn4H9j5o6Zzyq2ULf3vMYC5krwnmH3WWuEeern740+zjO97C1H+ruT0oPzCPsgVRLIFvNjczYMHLpWQzvXPEXijm2znFlLnBUvbLbwX3Z51DuqmY7txIw4p5Sb73H/znMyo7zDKMlyRV7Gczea31arloCQKupfpb4D01ui/eAdQimsUii+fp/FRmKPf5i+NSww/kRj7r3iHzF21s72o2FXJBa1JrpidCn9cBIqiEF6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rmu8F+ouY839FBLqhlFaeLGcTUSF9D5hcaVuxiQAdho=; b=Z6DATg706gsXxdlEe6vIzR3EJjvUhhquctKi3lvEOyxOKITTtQvgSdsAAZedL+JPd+XFD1dvEgLnSUaGLjnjWtONgrr4dTWE3GL0R/o+HZ6f6HClZVPnhcBLn9NlaA4PiCf72V+Vzak1SMUi3Qr77J5Y9BA+rHOLdZgj5o0TBMo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SA0PR12MB4509.namprd12.prod.outlook.com (2603:10b6:806:9e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Fri, 14 Apr 2023 14:25:19 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7%7]) with mapi id 15.20.6298.030; Fri, 14 Apr 2023 14:25:18 +0000 Message-ID: Date: Fri, 14 Apr 2023 15:25:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Maxime Coquelin , "Xia, Chenbo" , =?UTF-8?Q?Morten_Br=c3=b8rup?= , "dev@dpdk.org" , "david.marchand@redhat.com" , "mkp@redhat.com" , "fbl@redhat.com" , "jasowang@redhat.com" , "Liang, Cunming" , "Xie, Yongji" , "echaudro@redhat.com" , "eperezma@redhat.com" , "amorenoz@redhat.com" References: <20230331154259.1447831-1-maxime.coquelin@redhat.com> <3789c0c7-281b-89c3-45aa-3d985736b04a@amd.com> <107f53d8-c0c3-68a8-1857-4b6ef0165b48@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35D8786B@smartserver.smartshare.dk> <58480498-8037-ec45-548a-8027e185fcaf@redhat.com> <94efd072-ae82-60ca-a84b-529b69db2810@redhat.com> From: Ferruh Yigit Subject: Re: [RFC 00/27] Add VDUSE support to Vhost library In-Reply-To: <94efd072-ae82-60ca-a84b-529b69db2810@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0366.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::18) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SA0PR12MB4509:EE_ X-MS-Office365-Filtering-Correlation-Id: 87711c47-59f2-4fd0-9dfb-08db3cf412aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W8GS7mpRp2IT/Npd2xXrDf2uwY52emXI8s4bhMDB9BdrkJgZMLgnxukvZ0KDlsaGd2tEo3dTVGtFZnLiwNw4dUUBCQ34YYEliXBcy1Eood/aDjQgrJXaCP1C1fNU44dQZjJCq9Ng69iPHYQdmpDLikQ5OYNzGRjGqFT8pNPBKEJgekA+nMJl6mYpXpRLGw++/waWBUBEeZ3WIng9pCwrAhweLLndqxPOVC18L1PHy+i+UUlPQBlJrpDYGnHrkkkTJdAMdQ03S1xdCeNsrPYEmC9YxmRzWQW29LZI/a/VmfwHLmxEs/0+N58zjl33swMaQwY1I4dFcQ8nIby+ZgQU55ABLhWMO9bs8kz+vzDY9h5cpuYqI9/pbKvbMCz5L/rKs6vjagmrJgo+HDTQ0a+9vn6qMi13eqkPUNoTrtf3j9Ntg+fV+mA1D5su9qKVu1u5+yhZxuxuq6jq169vFPjz4ddibaTK2tQMoPVTscjq3//T+/XY2+OtjvoDf4qiX/Ojadd4t8uNidOxoaUNDeC0fsEdo5hxN44iYpbGufiv+/qglrm7n1JiUGMCIX2alCvH9SOHEXj3oMAy2O7e0ECarRL+ggnlHA/8AGnzAHJfMVQcl1pivPFe5+x+IMh1Yupxqq2ROyPtV6D5EOa1tFuzdWDsaz/jSum1jSmqhP5ZMYM0r4HH3Y6yDyPmJXCAgyVM4KdsLke0pwcVzoJDP6KFYw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(396003)(39860400002)(136003)(366004)(451199021)(66946007)(31686004)(53546011)(66556008)(66476007)(6506007)(26005)(6512007)(36756003)(31696002)(2906002)(6666004)(83380400001)(6486002)(2616005)(66574015)(186003)(44832011)(86362001)(7416002)(110136005)(966005)(5660300002)(8936002)(8676002)(38100700002)(921005)(478600001)(41300700001)(316002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QVBnajk3eEtZOWh4TUhobkloUHJnS0x1QXp0MSszeTFqV3pRQm1GWDdVZ3lR?= =?utf-8?B?czNqOW9LT1pjWWJpdnpxUVh2TGgxUmtGN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?utf-8?B?VVJhZSthbmJpd05ZZldFT3F3Y2ZwQmUvbTBTZXpZVnZTWERWeWhyS0c3T3Jh?= =?utf-8?B?MnY4dTF3M09yY0VRMFhaYVQra1hoeHh6Mk1HdzQ5dVlMTERtUGpJRDF0SFo1?= =?utf-8?B?MnpLeTV5TVBGRWVMUkpkaXJ3bjlnT1ROWlY3cEc4U2hES3psZCtoMVl4R0hu?= =?utf-8?B?WnRGYnJHcGdQK2ZHemNhNkZVZVE3UVdyRGtYcVVNVGVMUmhUZ2NCR1JDMVNQ?= =?utf-8?Q?IUpDr242X4NLR9K39jObQXZec?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87711c47-59f2-4fd0-9dfb-08db3cf412aa X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 14:25:18.8808 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i2APbXt2xEwk9KS2ClbQAwu/uzoizbR5HKKFfWHEZ3OesmeDzBqpBZw645enZ0NS X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4509 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 4/14/2023 1:06 PM, Maxime Coquelin wrote: > > > On 4/14/23 12:48, Ferruh Yigit wrote: >> On 4/13/2023 8:59 AM, Maxime Coquelin wrote: >>> Hi, >>> >>> On 4/13/23 09:08, Xia, Chenbo wrote: >>>>> -----Original Message----- >>>>> From: Morten Brørup >>>>> Sent: Thursday, April 13, 2023 3:41 AM >>>>> To: Maxime Coquelin ; Ferruh Yigit >>>>> ; dev@dpdk.org; david.marchand@redhat.com; Xia, >>>>> Chenbo ; mkp@redhat.com; fbl@redhat.com; >>>>> jasowang@redhat.com; Liang, Cunming ; Xie, >>>>> Yongji >>>>> ; echaudro@redhat.com; eperezma@redhat.com; >>>>> amorenoz@redhat.com >>>>> Subject: RE: [RFC 00/27] Add VDUSE support to Vhost library >>>>> >>>>>> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] >>>>>> Sent: Wednesday, 12 April 2023 17.28 >>>>>> >>>>>> Hi Ferruh, >>>>>> >>>>>> On 4/12/23 13:33, Ferruh Yigit wrote: >>>>>>> On 3/31/2023 4:42 PM, Maxime Coquelin wrote: >>>>>>>> This series introduces a new type of backend, VDUSE, >>>>>>>> to the Vhost library. >>>>>>>> >>>>>>>> VDUSE stands for vDPA device in Userspace, it enables >>>>>>>> implementing a Virtio device in userspace and have it >>>>>>>> attached to the Kernel vDPA bus. >>>>>>>> >>>>>>>> Once attached to the vDPA bus, it can be used either by >>>>>>>> Kernel Virtio drivers, like virtio-net in our case, via >>>>>>>> the virtio-vdpa driver. Doing that, the device is visible >>>>>>>> to the Kernel networking stack and is exposed to userspace >>>>>>>> as a regular netdev. >>>>>>>> >>>>>>>> It can also be exposed to userspace thanks to the >>>>>>>> vhost-vdpa driver, via a vhost-vdpa chardev that can be >>>>>>>> passed to QEMU or Virtio-user PMD. >>>>>>>> >>>>>>>> While VDUSE support is already available in upstream >>>>>>>> Kernel, a couple of patches are required to support >>>>>>>> network device type: >>>>>>>> >>>>>>>> https://gitlab.com/mcoquelin/linux/-/tree/vduse_networking_poc >>>>>>>> >>>>>>>> In order to attach the created VDUSE device to the vDPA >>>>>>>> bus, a recent iproute2 version containing the vdpa tool is >>>>>>>> required. >>>>>>> >>>>>>> Hi Maxime, >>>>>>> >>>>>>> Is this a replacement to the existing DPDK vDPA framework? What >>>>>>> is the >>>>>>> plan for long term? >>>>>>> >>>>>> >>>>>> No, this is not a replacement for DPDK vDPA framework. >>>>>> >>>>>> We (Red Hat) don't have plans to support DPDK vDPA framework in our >>>>>> products, but there are still contribution to DPDK vDPA by several >>>>>> vDPA >>>>>> hardware vendors (Intel, Nvidia, Xilinx), so I don't think it is >>>>>> going >>>>>> to be deprecated soon. >>>>> >>>>> Ferruh's question made me curious... >>>>> >>>>> I don't know anything about VDUSE or vDPA, and don't use any of it, so >>>>> consider me ignorant in this area. >>>>> >>>>> Is VDUSE an alternative to the existing DPDK vDPA framework? What are >>>>> the >>>>> differences, e.g. in which cases would an application developer (or >>>>> user) >>>>> choose one or the other? >>>> >>>> Maxime should give better explanation.. but let me just explain a bit. >>>> >>>> Vendors have vDPA HW that support vDPA framework (most likely in their >>>> DPU/IPU >>>> products). This work is introducing a way to emulate a SW vDPA >>>> device in >>>> userspace (DPDK), and this SW vDPA device also supports vDPA framework. >>>> >>>> So it's not an alternative to existing DPDK vDPA framework :) >>> >>> Correct. >>> >>> When using DPDK vDPA, the datapath of a Vhost-user port is offloaded to >>> a compatible physical NIC (i.e. a NIC that implements Virtio rings >>> support), the control path remains the same as a regular Vhost-user >>> port, i.e. it provides a Vhost-user unix socket to the application (like >>> QEMU or DPDK Virtio-user PMD). >>> >>> When using Kernel vDPA, the datapath is also offloaded to a vDPA >>> compatible device, and the control path is managed by the vDPA bus. >>> It can either be consumed by a Kernel Virtio device (here Virtio-net) >>> when using Virtio-vDPA. In this case the device is exposed as a regular >>> netdev and, in the case of Kubernetes, can be used as primary interfaces >>> for the pods. >>> Or it can be exposed to user-space via Vhost-vDPA, a chardev that can be >>> seen as an alternative to Vhost-user sockets. In this case it can for >>> example be used by QEMU or DPDK Virtio-user PMD. In Kubernetes, it can >>> be used as a secondary interface. >>> >>> Now comes VDUSE. VDUSE is a Kernel vDPA device, but instead of being a >>> physical device where the Virtio datapath is offloaded, the Virtio >>> datapath is offloaded to a user-space application. With this series, a >>> DPDK application, like OVS-DPDK for instance, can create VDUSE device >>> and expose them either as regular netdev when binding them to Kernel >>> Virtio-net driver via Virtio-vDPA, or as Vhost-vDPA interface to be >>> consumed by another userspace appliation like QEMU or DPDK application >>> using Virtio-user PMD. With this solution, OVS-DPDK could serve both >>> primary and secondary interfaces of Kubernetes pods. >>> >>> I hope it clarifies, I will add these information in the cover-letter >>> for next revisions. Let me know if anything is still unclear. >>> >>> I did a presentation at last DPDK summit [0], maybe the diagrams will >>> help to clarify furthermore. >>> >> >> Thanks Chenbo, Maxime for clarification. >> >> After reading a little more (I think) I got it better, slides [0] were >> useful. >> >> So this is more like a backend/handler, similar to vhost-user, although >> it is vDPA device emulation. >> Can you please describe more the benefit of vduse comparing to >> vhost-user? > > The main benefit is that VDUSE device can be exposed as a regular > netdev, while this is not possible with Vhost-user. > Got it, thanks. I think better to highlight this in commit logs. And out of curiosity, Why there is no virtio(guest) to virtio(host) communication support (without vdpa), something like adding virtio as backend to vhost-net, is it not needed or technical difficulties? >> Also what is "VDUSE daemon", which is referred a few times in >> documentation, is it another userspace implementation of the vduse? > > VDUSE daemon is the application that implements the VDUSE device, e.g. > OVS-DPDK with DPDK Vhost library using this series in our case. > > Maxime >> >>>>> >>>>> And if it is a better alternative, perhaps the documentation should >>>>> mention that it is recommended over DPDK vDPA. Just like we started >>>>> recommending alternatives to the KNI driver, so we could phase it out >>>>> and >>>>> eventually get rid of it. >>>>> >>>>>> >>>>>> Regards, >>>>>> Maxime >>>> >>> >>> [0]: >>> https://static.sched.com/hosted_files/dpdkuserspace22/9f/Open%20DPDK%20to%20containers%20networking%20with%20VDUSE.pdf >>> >> >