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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 A8E8DC433E0 for ; Thu, 21 May 2020 17:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B7B120826 for ; Thu, 21 May 2020 17:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590083042; bh=6nyP9nRABbr9I/+R+8UXncPfsESo3IVTz5PwLOZXbYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Lslw5MRqELSO0Vhf98C913qxCDWm/hAji+4s01FUI1tvQgQFzI2S1pHc6iPy3APrf Dl2hQssdlTbnESHYQRCTSby/pMCD3rNZcTCjSX9NvIvqbVY1yVKZs6Re2fyIqh3UKp CxIf8D368snOHS5uBkFAjzRG53Rz9cafMMHyVoxU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728890AbgEURoB (ORCPT ); Thu, 21 May 2020 13:44:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:53704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728542AbgEURoB (ORCPT ); Thu, 21 May 2020 13:44:01 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4AB41207F7; Thu, 21 May 2020 17:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590083040; bh=6nyP9nRABbr9I/+R+8UXncPfsESo3IVTz5PwLOZXbYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oP+78MBQZdAXiAp3ysB221UvjLOUd6vfKMJKlmeazoSG+cAcWSAEhfHEW49jnoAUQ PLkSMVv6px48fpaC1JdmBUdKUGLUEodyiZTCN3nNphL9nXBbkAV9kdLQhUh2pwV3gQ DW/5wIfuOqYSvJiepgHONkcH3VqKchhB8vK8hebU= Date: Thu, 21 May 2020 19:43:58 +0200 From: "gregkh@linuxfoundation.org" To: Parav Pandit Cc: Jeff Kirsher , "davem@davemloft.net" , Dave Ertman , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "nhorman@redhat.com" , "sassmann@redhat.com" , "jgg@ziepe.ca" , "galpress@amazon.com" , "selvin.xavier@broadcom.com" , "sriharsha.basavapatna@broadcom.com" , "benve@cisco.com" , "bharat@chelsio.com" , "xavier.huwei@huawei.com" , Yishai Hadas , Leon Romanovsky , "mkalderon@marvell.com" , "aditr@vmware.com" , "ranjani.sridharan@linux.intel.com" , "pierre-louis.bossart@linux.intel.com" , Kiran Patil , Andrew Bowers Subject: Re: [net-next v4 01/12] Implementation of Virtual Bus Message-ID: <20200521174358.GA3679752@kroah.com> References: <20200520070227.3392100-1-jeffrey.t.kirsher@intel.com> <20200520070227.3392100-2-jeffrey.t.kirsher@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, May 21, 2020 at 02:57:55PM +0000, Parav Pandit wrote: > Hi Greg, Jason, > > On 5/20/2020 12:32 PM, Jeff Kirsher wrote: > > From: Dave Ertman > > > > > +static const > > +struct virtbus_dev_id *virtbus_match_id(const struct virtbus_dev_id *id, > > + struct virtbus_device *vdev) > > +{ > > + while (id->name[0]) { > > + if (!strcmp(vdev->match_name, id->name)) > > + return id; > > Should we have VID, DID based approach instead of _any_ string chosen by > vendor drivers? No, because: > This will required central place to define the VID, DID of the vdev in > vdev_ids.h to have unique ids. That's not a good way to run things :) Have the virtbus core create the "name", as it really doesn't matter what it is, just that it is unique, right? thanks, greg k-h