From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDD4EC433DB for ; Tue, 5 Jan 2021 04:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8305822597 for ; Tue, 5 Jan 2021 04:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726599AbhAEELh (ORCPT ); Mon, 4 Jan 2021 23:11:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48345 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbhAEELh (ORCPT ); Mon, 4 Jan 2021 23:11:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609819810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dT2rLC0d09/u9EF932LGHm38h2GYKdxtIzh0CShwNPw=; b=OMsqu59YPTQkX+VQjmexlMGLAhkalMx5xjVf1y1MsVMfuCG2JGUOwEgmNVHEDx7bh/Nlis gCwlNEpD9PPFMGMVkxcQuB9WhP8G6dPiwkSmMwDKEHtG4AvChLSNqD1+CgiVmFh1q/OiXW fy0PQLHs4f8rwrcFPIXAK+XKy/G5o6M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-573-pmypdNfSPUmJbS28SFXKWQ-1; Mon, 04 Jan 2021 23:10:09 -0500 X-MC-Unique: pmypdNfSPUmJbS28SFXKWQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D1CDF8014D8; Tue, 5 Jan 2021 04:10:07 +0000 (UTC) Received: from [10.72.13.192] (ovpn-13-192.pek2.redhat.com [10.72.13.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9DEB1002382; Tue, 5 Jan 2021 04:10:02 +0000 (UTC) Subject: Re: [PATCH linux-next v2 4/7] vdpa: Define vdpa mgmt device, ops and a netlink interface To: Parav Pandit , "virtualization@lists.linux-foundation.org" Cc: "mst@redhat.com" , Eli Cohen , "netdev@vger.kernel.org" References: <20201112064005.349268-1-parav@nvidia.com> <20210104033141.105876-1-parav@nvidia.com> <20210104033141.105876-5-parav@nvidia.com> From: Jason Wang Message-ID: Date: Tue, 5 Jan 2021 12:10:01 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021/1/4 下午3:24, Parav Pandit wrote: > >> From: Jason Wang >> Sent: Monday, January 4, 2021 12:33 PM >> >> On 2021/1/4 上午11:31, Parav Pandit wrote: >>> To add one or more VDPA devices, define a management device which >>> allows adding or removing vdpa device. A management device defines set >>> of callbacks to manage vdpa devices. >>> >>> To begin with, it defines add and remove callbacks through which a >>> user defined vdpa device can be added or removed. >>> >>> A unique management device is identified by its unique handle >>> identified by management device name and optionally the bus name. >>> >>> Hence, introduce routine through which driver can register a >>> management device and its callback operations for adding and remove a >>> vdpa device. >>> >>> Introduce vdpa netlink socket family so that user can query management >>> device and its attributes. >>> >>> Example of show vdpa management device which allows creating vdpa >>> device of networking class (device id = 0x1) of virtio specification >>> 1.1 section 5.1.1. >>> >>> $ vdpa mgmtdev show >>> vdpasim_net: >>> supported_classes: >>> net >>> >>> Example of showing vdpa management device in JSON format. >>> >>> $ vdpa mgmtdev show -jp >>> { >>> "show": { >>> "vdpasim_net": { >>> "supported_classes": [ "net" ] >>> } >>> } >>> } >>> >>> Signed-off-by: Parav Pandit >>> Reviewed-by: Eli Cohen >>> Reviewed-by: Jason Wang >>> --- >>> Changelog: >>> v1->v2: >>> - rebased >>> - updated commit log example for management device name from >>> "vdpasim" to "vdpasim_net" >>> - removed device_id as net and block management devices are >>> separated >> >> So I wonder whether there could be a type of management devices that can >> deal with multiple types of virtio devices. If yes, we probably need to add >> device id back. > At this point mlx5 plan to support only net. > It is useful to see what type of vdpa device is supported by a management device. > > In future if a mgmt dev supports multiple types, user needs to choose desired type. > I guess we can differ this optional type to future, when such mgmt. device will/may be available. I worry if we remove device_id, it may gives a hint that multiple mgmt devices needs to be registered if it supports multiple types. So if possible I would like to keep the device_id here. Thanks