Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1577732pxb; Mon, 8 Mar 2021 00:38:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyghjzsPX3009o8Rz35JCMPb3B+YxR5UJTaZ2prXgXJOIJKUOvQqz61HbljXlIFj4QIlhrJ X-Received: by 2002:a50:82c5:: with SMTP id 63mr20679390edg.97.1615192704846; Mon, 08 Mar 2021 00:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615192704; cv=none; d=google.com; s=arc-20160816; b=yWbG2AmGhXT66n7FhkZxNY/4f2NyDKEFEa27L9c7Gm7/JAkMURChFRiFc2+ljjet5Q abwE5B/l2fT50aSb7qQr89msvAPrkpzCuBITaIfp64WryZrvaJvs16xsfIHGIaEXJozj LsNbulyJB62ZXZfJsCDHdwmKJ9gxGdnT8aDSedxe54ffilHD0/4u8kkvCnvGyOAEVt/t HsoZJeTk5YV2bO3JMWUP29xJWjbHxkJ0J4xFB+DUY+eBBR3p+u/7vlA+nBPUkxSoj2EW w8AlRo51rXDefzPvsjk8uJyGXl1YONnkqMGSo0kHjkE7dQa2FrbiFvumrhk5uVOOsFbs 8Y/A== 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=VWTExvkpL3xvnU71XBjAtEuJZDgLR8SWFyWHBwfA6EQ=; b=UsKk2ZgzHdMNBG/jKaNKjg/JEmslBvudafKpdZz7pWLdRmmwBOoH0puZrZV0fk85/E hSj56SsZF5cFgEqzMbQJKqTDpFaMPsgt4oxM2W7dQCyUfu8pVuA71EKNQ2G17IyEJZEj VzOPnMmzmm1chJCWa/y0bB4CxJE7pt01phEi2g1/p9aVN7repWeDKtH1Upej2Xx3pVMj pCVMqZ4u6hrf3pzr8fGM7zlzXvtdoPu4VTimlDyLlofePI2KC2sUAQbOwptSrIuOvhK6 bDm5r2XjbescCh4oT9MnLpLC+EpabUvqC0v7FpPEFWWJBaDiHS348jNTV3+V9mbZrcCh wb8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NeFIMR2y; 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 o13si7070895edi.135.2021.03.08.00.38.02; Mon, 08 Mar 2021 00:38:24 -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=NeFIMR2y; 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 S233865AbhCHCxx (ORCPT + 99 others); Sun, 7 Mar 2021 21:53:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38774 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233903AbhCHCxh (ORCPT ); Sun, 7 Mar 2021 21:53:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615172017; 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=VWTExvkpL3xvnU71XBjAtEuJZDgLR8SWFyWHBwfA6EQ=; b=NeFIMR2yfHF3+4MuiO5FwpyiPUG5IyGRgBLDScJclKGgd039CwiMa2LcU/N53YdVvTZVy4 BBtx4mgNHdLE3NdwPPf7OPqt8yrN1heKKYrESpnbN06Fudz0qfX3bSTLvwK+yoirrbx9Yb feD+O2nnJTxWF7oVZkS3p7GHLt46974= 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-441-lX5C2eSqOmOk0EQ0k1P4LQ-1; Sun, 07 Mar 2021 21:53:33 -0500 X-MC-Unique: lX5C2eSqOmOk0EQ0k1P4LQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 56770100CF64; Mon, 8 Mar 2021 02:53:32 +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 A45766F988; Mon, 8 Mar 2021 02:53:26 +0000 (UTC) Subject: Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA 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-3-lingshan.zhu@intel.com> From: Jason Wang Message-ID: Date: Mon, 8 Mar 2021 10:53:25 +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-3-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.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/5 10:19 下午, Zhu Lingshan wrote: > This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net > for vDPA. > C5000X-PL vendor id 0x1AF4, device id 0x1000, > subvendor id 0x8086, sub device id 0x0001 > > To distinguish C5000X-PL from other ifcvf driven devices, > the original ifcvf device is named "N3000". > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_base.h | 13 +++++++++---- > drivers/vdpa/ifcvf/ifcvf_main.c | 13 +++++++++---- > 2 files changed, 18 insertions(+), 8 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > index 64696d63fe07..794d1505d857 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -18,10 +18,15 @@ > #include > #include > > -#define IFCVF_VENDOR_ID 0x1AF4 > -#define IFCVF_DEVICE_ID 0x1041 > -#define IFCVF_SUBSYS_VENDOR_ID 0x8086 > -#define IFCVF_SUBSYS_DEVICE_ID 0x001A > +#define N3000_VENDOR_ID 0x1AF4 > +#define N3000_DEVICE_ID 0x1041 > +#define N3000_SUBSYS_VENDOR_ID 0x8086 > +#define N3000_SUBSYS_DEVICE_ID 0x001A Patch looks good, I wonder if it's better to do the rename separately. Thanks > + > +#define C5000X_PL_VENDOR_ID 0x1AF4 > +#define C5000X_PL_DEVICE_ID 0x1000 > +#define C5000X_PL_SUBSYS_VENDOR_ID 0x8086 > +#define C5000X_PL_SUBSYS_DEVICE_ID 0x0001 > > #define IFCVF_SUPPORTED_FEATURES \ > ((1ULL << VIRTIO_NET_F_MAC) | \ > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index e501ee07de17..fd5befc5cbcc 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -480,10 +480,15 @@ static void ifcvf_remove(struct pci_dev *pdev) > } > > static struct pci_device_id ifcvf_pci_ids[] = { > - { PCI_DEVICE_SUB(IFCVF_VENDOR_ID, > - IFCVF_DEVICE_ID, > - IFCVF_SUBSYS_VENDOR_ID, > - IFCVF_SUBSYS_DEVICE_ID) }, > + { PCI_DEVICE_SUB(N3000_VENDOR_ID, > + N3000_DEVICE_ID, > + N3000_SUBSYS_VENDOR_ID, > + N3000_SUBSYS_DEVICE_ID) }, > + { PCI_DEVICE_SUB(C5000X_PL_VENDOR_ID, > + C5000X_PL_DEVICE_ID, > + C5000X_PL_SUBSYS_VENDOR_ID, > + C5000X_PL_SUBSYS_DEVICE_ID) }, > + > { 0 }, > }; > MODULE_DEVICE_TABLE(pci, ifcvf_pci_ids);