From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id F21301B19 for ; Fri, 21 Sep 2018 12:05:50 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC168305BF1C; Fri, 21 Sep 2018 10:05:49 +0000 (UTC) Received: from localhost (dhcp-192-209.str.redhat.com [10.33.192.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE91A7F342; Fri, 21 Sep 2018 10:05:39 +0000 (UTC) Date: Fri, 21 Sep 2018 12:05:38 +0200 From: Jens Freimann To: "Gavin Hu (Arm Technology China)" Cc: "dev@dpdk.org" , "tiwei.bie@intel.com" , "maxime.coquelin@redhat.com" Message-ID: <20180921100538.ulbm4l2qrvmeda56@jenstp.localdomain> References: <20180906181947.20646-1-jfreimann@redhat.com> <20180906181947.20646-7-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 21 Sep 2018 10:05:49 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v5 06/11] net/virtio-user: add option to use packed queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2018 10:05:51 -0000 On Mon, Sep 10, 2018 at 06:32:09AM +0000, Gavin Hu (Arm Technology China) wrote: > > >> -----Original Message----- >> From: dev On Behalf Of Jens Freimann >> Sent: Friday, September 7, 2018 2:20 AM >> To: dev@dpdk.org >> Cc: tiwei.bie@intel.com; maxime.coquelin@redhat.com >> Subject: [dpdk-dev] [PATCH v5 06/11] net/virtio-user: add option to use >> packed queues >> >> From: Yuanhan Liu >> >> Add option to enable packed queue support for virtio-user devices. >> >> Signed-off-by: Yuanhan Liu >> --- >> drivers/net/virtio/virtio_user/virtio_user_dev.c | 10 ++++++++-- >> drivers/net/virtio/virtio_user/virtio_user_dev.h | 2 +- >> drivers/net/virtio/virtio_user_ethdev.c | 14 +++++++++++++- >> 3 files changed, 22 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c >> b/drivers/net/virtio/virtio_user/virtio_user_dev.c >> index 7df600b02..9979bea0d 100644 >> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c >> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c >> @@ -372,12 +372,13 @@ virtio_user_dev_setup(struct virtio_user_dev *dev) >> 1ULL << VIRTIO_NET_F_GUEST_TSO4|\ >> 1ULL << VIRTIO_NET_F_GUEST_TSO6|\ >> 1ULL << VIRTIO_F_IN_ORDER|\ >> - 1ULL << VIRTIO_F_VERSION_1) >> + 1ULL << VIRTIO_F_VERSION_1|\ >> + 1ULL << VIRTIO_F_RING_PACKED) >> >> int >> virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, >> int cq, int queue_size, const char *mac, char **ifname, >> - int mrg_rxbuf, int in_order) >> + int mrg_rxbuf, int in_order, int packed_vq) >> { >> pthread_mutex_init(&dev->mutex, NULL); >> snprintf(dev->path, PATH_MAX, "%s", path); @@ -432,6 +433,11 >> @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int >> queues, >> dev->unsupported_features |= (1ull << >> VIRTIO_F_IN_ORDER); >> } >> >> +if (packed_vq) >> +dev->device_features |= (1ull << VIRTIO_F_RING_PACKED); >> +else >> +dev->device_features &= ~(1ull << >> VIRTIO_F_RING_PACKED); >> + > >unsupported_features should be initialized also like following F_MAC. Fixed it. Thanks! regards, Jens