From patchwork Tue Sep 15 13:35:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 77739 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FF13A04C7; Tue, 15 Sep 2020 15:36:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BF231C10D; Tue, 15 Sep 2020 15:36:18 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 01B0B1C10C for ; Tue, 15 Sep 2020 15:36:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600176975; 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=icHryGAFrgeiXkcertsfPEGnJ18Z+rP8jMsvLFuJkcQ=; b=ThsPyV/s0hb2r7FFPs0kkK3PmIIutE4p3ixoo4DmvN32peCrLLcfF+Cj8v+M8JIDZlKCdO yGE8gD09P+WmZxZ9b5JvsnFKjUmffgh7z21UvXc8SWFNBXC59Kw7rT1cI3YGm89m5fiHJG Q9L7Rg0yuqrFkPfKjselUfa8hsGnVyI= 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-149-kEyVGD3pPteaebyrgkEB_Q-1; Tue, 15 Sep 2020 09:36:13 -0400 X-MC-Unique: kEyVGD3pPteaebyrgkEB_Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 975371074650; Tue, 15 Sep 2020 13:36:12 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.110.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9E397512C; Tue, 15 Sep 2020 13:36:08 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, ian.stokes@intel.com Cc: Maxime Coquelin Date: Tue, 15 Sep 2020 15:35:57 +0200 Message-Id: <20200915133558.210639-4-maxime.coquelin@redhat.com> In-Reply-To: <20200915133558.210639-1-maxime.coquelin@redhat.com> References: <20200915133558.210639-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 3/4] examples/vhost: remove dequeue zero-copy support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Dequeue zero-copy feature is being removed from the Vhost library. This preliminary patch removes its uses in the Vhost example application. Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- examples/vhost/main.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index e1578e7956..959c0c2838 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -92,7 +92,6 @@ static uint32_t enable_tx_csum; static uint32_t enable_tso; static int client_mode; -static int dequeue_zero_copy; static int builtin_net_driver; @@ -247,16 +246,6 @@ port_init(uint16_t port) rx_ring_size = RTE_TEST_RX_DESC_DEFAULT; tx_ring_size = RTE_TEST_TX_DESC_DEFAULT; - /* - * When dequeue zero copy is enabled, guest Tx used vring will be - * updated only when corresponding mbuf is freed. Thus, the nb_tx_desc - * (tx_ring_size here) must be small enough so that the driver will - * hit the free threshold easily and free mbufs timely. Otherwise, - * guest Tx vring would be starved. - */ - if (dequeue_zero_copy) - tx_ring_size = 64; - tx_rings = (uint16_t)rte_lcore_count(); /* Get port configuration. */ @@ -457,8 +446,7 @@ us_vhost_usage(const char *prgname) " --socket-file: The path of the socket file.\n" " --tx-csum [0|1] disable/enable TX checksum offload.\n" " --tso [0|1] disable/enable TCP segment offload.\n" - " --client register a vhost-user socket as client mode.\n" - " --dequeue-zero-copy enables dequeue zero copy\n", + " --client register a vhost-user socket as client mode.\n", prgname); } @@ -483,7 +471,6 @@ us_vhost_parse_args(int argc, char **argv) {"tx-csum", required_argument, NULL, 0}, {"tso", required_argument, NULL, 0}, {"client", no_argument, &client_mode, 1}, - {"dequeue-zero-copy", no_argument, &dequeue_zero_copy, 1}, {"builtin-net-driver", no_argument, &builtin_net_driver, 1}, {NULL, 0, 0, 0}, }; @@ -1510,9 +1497,6 @@ main(int argc, char *argv[]) if (client_mode) flags |= RTE_VHOST_USER_CLIENT; - if (dequeue_zero_copy) - flags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY; - /* Register vhost user driver to handle vhost messages. */ for (i = 0; i < nb_sockets; i++) { char *file = socket_files + i * PATH_MAX;