Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1577228pxb; Mon, 8 Mar 2021 00:37:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+dL2xIdisFY5jjFO1r2UorlgXAXHCQcKW2NF/JDfLKpCCBDsU3fCR6RPE9lC8qT/5VtMe X-Received: by 2002:a17:906:3685:: with SMTP id a5mr14558788ejc.352.1615192638018; Mon, 08 Mar 2021 00:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615192638; cv=none; d=google.com; s=arc-20160816; b=VcCKAobZdEwQQn4kpJF3Zo8Szh4rlP0WnmmstZfadPzml2XH/vhbnUqcG7zvOoU9xA s/XRpY7Zao0vvuU7MBjhZqRwXzeAKfdQMAajr7It96K2d2snKVnJkVtOD/jCKdSkYuPX mDqdWir0GKoSEpXm1mlxqxzYyft9JPvKKvL4u+gowbK6CNgxMEPRUUMKs/YFcviXwI5b metwdygtnMYJbRgnzUCAYgtE+qDLO9IEECCFc83ThE3TAG3sR34BAggBYECNFgTIY2+b xkPEi5g7COUSxFUkHCZDz2h9ZzdkExagefJbLw+PTTyEn2eYYj+kL0poeK8zpDGbJPen wKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kfjo+8+m1mc1N69M4/qDsvTFzx3hcR3U05A0ZBrBI6M=; b=REpyr3SNuZ3MaMQbFJjjfbmCJuiGUqIko7gPIh405whRBPEhmv+LuVtJcBxdm+NvBp KTxCjhPfrAELzOCLJntUDcUQNG2ixXomr1uSamrUpNG9l5WnEb1zt8GBr9L1RhggRZ1N d+NJtLXoPY5MmyNzigwMfnRxO7XKvpXzix5gsRZtTZAsqc8S9eFUSw4S3arXdkrcI/x2 sl2/478mRlrHdt5+p0IbhNb8mvc8wL1VPlqVa4xDmAnoM86mt1ELLNplHODQkhSW8P/H PT8R+bPJJumuI7GPSm8CW9kRUgBAtaUO8W6PdYMqhhZSIZ0eeY83USq7xLdd2qQsBBkT AXmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hOYfVkHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si7217484edf.314.2021.03.08.00.36.55; Mon, 08 Mar 2021 00:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hOYfVkHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232294AbhCHCwa (ORCPT + 99 others); Sun, 7 Mar 2021 21:52:30 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42536 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbhCHCwC (ORCPT ); Sun, 7 Mar 2021 21:52:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615171921; 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=kfjo+8+m1mc1N69M4/qDsvTFzx3hcR3U05A0ZBrBI6M=; b=hOYfVkHNmMb09utnrkRC1KQ2ceaCx94L1ff/GRHaNmeaoCztdAaduK6TgBFkdJZ8udK1F/ oAmSNlWKswVPcSu0vBydRus8BeItlOZ1bC+fL36mKwHN1d3uN5wrrvnn5AWHtrHUZVeEeV MZht0zf7fGKKTECkNaV4JTh93hXYv1Q= 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-27-93brkqDoMwa0nhyVxoqSNA-1; Sun, 07 Mar 2021 21:51:55 -0500 X-MC-Unique: 93brkqDoMwa0nhyVxoqSNA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3315780432F; Mon, 8 Mar 2021 02:51:54 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-13-193.pek2.redhat.com [10.72.13.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id A49665D9D0; Mon, 8 Mar 2021 02:51:48 +0000 (UTC) Subject: Re: [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id To: Zhu Lingshan , mst@redhat.com, lulu@redhat.com Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210305142000.18521-1-lingshan.zhu@intel.com> <20210305142000.18521-2-lingshan.zhu@intel.com> From: Jason Wang Message-ID: Date: Mon, 8 Mar 2021 10:51:47 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210305142000.18521-2-lingshan.zhu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/5 10:19 下午, Zhu Lingshan wrote: > In this commit, ifcvf_get_vendor_id() will return > a device specific vendor id of the probed pci device > than a hard code. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index fa1af301cf55..e501ee07de17 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -324,7 +324,10 @@ static u32 ifcvf_vdpa_get_device_id(struct vdpa_device *vdpa_dev) > > static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) > { > - return IFCVF_SUBSYS_VENDOR_ID; > + struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev); > + struct pci_dev *pdev = adapter->pdev; > + > + return pdev->subsystem_vendor; > } Acked-by: Jason Wang > > static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)