From: Jason Wang <jasowang@redhat.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>, mst@redhat.com
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 2/2] vDPA/ifcvf: enable multiqueue and control vq
Date: Thu, 19 Aug 2021 12:09:58 +0800 [thread overview]
Message-ID: <ecb03725-ecae-89bf-e8bc-b47859b75d4e@redhat.com> (raw)
In-Reply-To: <20210818095714.3220-3-lingshan.zhu@intel.com>
在 2021/8/18 下午5:57, Zhu Lingshan 写道:
> This commit enbales multi-queue and control vq
> features for ifcvf
>
> Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> drivers/vdpa/ifcvf/ifcvf_base.h | 9 ---------
> drivers/vdpa/ifcvf/ifcvf_main.c | 11 +++--------
> 2 files changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
> index 97d9019a3ec0..09918af3ecf8 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_base.h
> +++ b/drivers/vdpa/ifcvf/ifcvf_base.h
> @@ -22,15 +22,6 @@
> #define N3000_DEVICE_ID 0x1041
> #define N3000_SUBSYS_DEVICE_ID 0x001A
>
> -#define IFCVF_NET_SUPPORTED_FEATURES \
> - ((1ULL << VIRTIO_NET_F_MAC) | \
> - (1ULL << VIRTIO_F_ANY_LAYOUT) | \
> - (1ULL << VIRTIO_F_VERSION_1) | \
> - (1ULL << VIRTIO_NET_F_STATUS) | \
> - (1ULL << VIRTIO_F_ORDER_PLATFORM) | \
> - (1ULL << VIRTIO_F_ACCESS_PLATFORM) | \
> - (1ULL << VIRTIO_NET_F_MRG_RXBUF))
> -
> /* Max 8 data queue pairs(16 queues) and one control vq for now. */
> #define IFCVF_MAX_QUEUES 17
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index e34c2ec2b69b..b99283a98177 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -174,17 +174,12 @@ static u64 ifcvf_vdpa_get_features(struct vdpa_device *vdpa_dev)
> struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev);
> struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev);
> struct pci_dev *pdev = adapter->pdev;
> -
> + u32 type = vf->dev_type;
> u64 features;
>
> - switch (vf->dev_type) {
> - case VIRTIO_ID_NET:
> - features = ifcvf_get_features(vf) & IFCVF_NET_SUPPORTED_FEATURES;
> - break;
> - case VIRTIO_ID_BLOCK:
> + if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK)
> features = ifcvf_get_features(vf);
> - break;
> - default:
> + else {
> features = 0;
> IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type);
> }
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Jason Wang <jasowang@redhat.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>, mst@redhat.com
Cc: virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] vDPA/ifcvf: enable multiqueue and control vq
Date: Thu, 19 Aug 2021 12:09:58 +0800 [thread overview]
Message-ID: <ecb03725-ecae-89bf-e8bc-b47859b75d4e@redhat.com> (raw)
In-Reply-To: <20210818095714.3220-3-lingshan.zhu@intel.com>
在 2021/8/18 下午5:57, Zhu Lingshan 写道:
> This commit enbales multi-queue and control vq
> features for ifcvf
>
> Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> drivers/vdpa/ifcvf/ifcvf_base.h | 9 ---------
> drivers/vdpa/ifcvf/ifcvf_main.c | 11 +++--------
> 2 files changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
> index 97d9019a3ec0..09918af3ecf8 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_base.h
> +++ b/drivers/vdpa/ifcvf/ifcvf_base.h
> @@ -22,15 +22,6 @@
> #define N3000_DEVICE_ID 0x1041
> #define N3000_SUBSYS_DEVICE_ID 0x001A
>
> -#define IFCVF_NET_SUPPORTED_FEATURES \
> - ((1ULL << VIRTIO_NET_F_MAC) | \
> - (1ULL << VIRTIO_F_ANY_LAYOUT) | \
> - (1ULL << VIRTIO_F_VERSION_1) | \
> - (1ULL << VIRTIO_NET_F_STATUS) | \
> - (1ULL << VIRTIO_F_ORDER_PLATFORM) | \
> - (1ULL << VIRTIO_F_ACCESS_PLATFORM) | \
> - (1ULL << VIRTIO_NET_F_MRG_RXBUF))
> -
> /* Max 8 data queue pairs(16 queues) and one control vq for now. */
> #define IFCVF_MAX_QUEUES 17
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index e34c2ec2b69b..b99283a98177 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -174,17 +174,12 @@ static u64 ifcvf_vdpa_get_features(struct vdpa_device *vdpa_dev)
> struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev);
> struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev);
> struct pci_dev *pdev = adapter->pdev;
> -
> + u32 type = vf->dev_type;
> u64 features;
>
> - switch (vf->dev_type) {
> - case VIRTIO_ID_NET:
> - features = ifcvf_get_features(vf) & IFCVF_NET_SUPPORTED_FEATURES;
> - break;
> - case VIRTIO_ID_BLOCK:
> + if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK)
> features = ifcvf_get_features(vf);
> - break;
> - default:
> + else {
> features = 0;
> IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type);
> }
next prev parent reply other threads:[~2021-08-19 4:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 9:57 [PATCH 0/2] vDPA/ifcvf: enable multiqueue and control vq Zhu Lingshan
2021-08-18 9:57 ` [PATCH 1/2] vDPA/ifcvf: detect and use the onboard number of queues directly Zhu Lingshan
2021-08-19 4:09 ` Jason Wang
2021-08-19 4:09 ` Jason Wang
2021-08-18 9:57 ` [PATCH 2/2] vDPA/ifcvf: enable multiqueue and control vq Zhu Lingshan
2021-08-19 4:09 ` Jason Wang [this message]
2021-08-19 4:09 ` Jason Wang
2021-08-19 4:11 ` [PATCH 0/2] " Jason Wang
2021-08-19 4:11 ` Jason Wang
2021-08-19 6:49 ` Zhu, Lingshan
2021-08-19 7:15 ` Jason Wang
2021-08-19 7:15 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ecb03725-ecae-89bf-e8bc-b47859b75d4e@redhat.com \
--to=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lingshan.zhu@intel.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.