Message ID | 20190111093929.10162-1-jfreimann@redhat.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 58D111B946; Fri, 11 Jan 2019 10:39:40 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A0AAA1B92C for <dev@dpdk.org>; Fri, 11 Jan 2019 10:39:38 +0100 (CET) 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 mx1.redhat.com (Postfix) with ESMTPS id 056152D7F1; Fri, 11 Jan 2019 09:39:38 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFB28179F8; Fri, 11 Jan 2019 09:39:30 +0000 (UTC) From: Jens Freimann <jfreimann@redhat.com> To: dev@dpdk.org Cc: tiwei.bie@intel.com, maxime.coquelin@redhat.com Date: Fri, 11 Jan 2019 10:39:27 +0100 Message-Id: <20190111093929.10162-1-jfreimann@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 11 Jan 2019 09:39:38 +0000 (UTC) Subject: [dpdk-dev] [PATCH v4 0/2] net/virtio-user: add packed vq support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/virtio-user: add packed vq support
|
|
Message
Jens Freimann
Jan. 11, 2019, 9:39 a.m. UTC
Patch 1 fixes a bug in virtio_pq_send_command(). When we wait for a descriptor to be marked as used we need to consider that the ring might have wrapped and use the previous wrap counter. Patch 2 reverts the patch to error out when cq is used with packed vq and add support for packed virtqueues in control virtqueue code. v3->v4: * it's enough to add to add packed vq feature bit to unsupported_features if packed_vq=0, no need to explicitly add it to device_features (Tiwei) v2->v3: * squash revert patch into patch 2 * add new patch 1 to fix a bug in driver code * fix wrap handling code in virtio_user_handle_cq_packed * in v2 I was using wrap counters and indexes from shared virtqueue, fixed this and added wrap counters and used index to virtio_user code * tested wrap around of ring v1->v2: * split into two patches * handle ring wrap correctly * add to unsupported_features when packed_vq is 0 Jens Freimann (2): net/virtio: check head desc with correct wrap counter net/virtio-user: ctrl vq support for packed drivers/net/virtio/virtio_ethdev.c | 11 +- .../net/virtio/virtio_user/virtio_user_dev.c | 102 ++++++++++++++++-- .../net/virtio/virtio_user/virtio_user_dev.h | 15 ++- drivers/net/virtio/virtio_user_ethdev.c | 56 +++++++++- drivers/net/virtio/virtqueue.h | 10 +- 5 files changed, 171 insertions(+), 23 deletions(-)
Comments
On 1/11/19 10:39 AM, Jens Freimann wrote: > Patch 1 fixes a bug in virtio_pq_send_command(). When we wait for > a descriptor to be marked as used we need to consider that the ring > might have wrapped and use the previous wrap counter. > > Patch 2 reverts the patch to error out when cq is used with packed vq and > add support for packed virtqueues in control virtqueue code. > > v3->v4: > * it's enough to add to add packed vq feature bit to > unsupported_features if packed_vq=0, no need to explicitly add > it to device_features (Tiwei) > > v2->v3: > * squash revert patch into patch 2 > * add new patch 1 to fix a bug in driver code > * fix wrap handling code in virtio_user_handle_cq_packed > * in v2 I was using wrap counters and indexes from shared virtqueue, > fixed this and added wrap counters and used index to virtio_user code > * tested wrap around of ring > > v1->v2: > * split into two patches > * handle ring wrap correctly > * add to unsupported_features when packed_vq is 0 > > Jens Freimann (2): > net/virtio: check head desc with correct wrap counter > net/virtio-user: ctrl vq support for packed > > drivers/net/virtio/virtio_ethdev.c | 11 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 102 ++++++++++++++++-- > .../net/virtio/virtio_user/virtio_user_dev.h | 15 ++- > drivers/net/virtio/virtio_user_ethdev.c | 56 +++++++++- > drivers/net/virtio/virtqueue.h | 10 +- > 5 files changed, 171 insertions(+), 23 deletions(-) > Applied to dpdk-next-virtio/master. Thanks, Maxime
On Fri, Jan 11, 2019 at 10:39:27AM +0100, Jens Freimann wrote: > Patch 1 fixes a bug in virtio_pq_send_command(). When we wait for > a descriptor to be marked as used we need to consider that the ring > might have wrapped and use the previous wrap counter. > > Patch 2 reverts the patch to error out when cq is used with packed vq and > add support for packed virtqueues in control virtqueue code. > > v3->v4: > * it's enough to add to add packed vq feature bit to > unsupported_features if packed_vq=0, no need to explicitly add > it to device_features (Tiwei) Sorry for not making myself clear previously. Just to make it clear to avoid more confusion: we shouldn't add it to device_features by ourselves because vhost backend may not support it. Otherwise, it's possible that the upper layer in virtio driver will see virtio-user's .get_features() report this feature while vhost backend doesn't support it. Thanks for the new version. > > v2->v3: > * squash revert patch into patch 2 > * add new patch 1 to fix a bug in driver code > * fix wrap handling code in virtio_user_handle_cq_packed > * in v2 I was using wrap counters and indexes from shared virtqueue, > fixed this and added wrap counters and used index to virtio_user code > * tested wrap around of ring > > v1->v2: > * split into two patches > * handle ring wrap correctly > * add to unsupported_features when packed_vq is 0 > > Jens Freimann (2): > net/virtio: check head desc with correct wrap counter > net/virtio-user: ctrl vq support for packed > > drivers/net/virtio/virtio_ethdev.c | 11 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 102 ++++++++++++++++-- > .../net/virtio/virtio_user/virtio_user_dev.h | 15 ++- > drivers/net/virtio/virtio_user_ethdev.c | 56 +++++++++- > drivers/net/virtio/virtqueue.h | 10 +- > 5 files changed, 171 insertions(+), 23 deletions(-) > > -- > 2.17.2 >