examples/vhost: remove dequeue zero-copy support
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 28 Sep 2020 09:17:11 +0000 (11:17 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 21:16:56 +0000 (23:16 +0200)
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 <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
examples/vhost/main.c

index e1578e7..959c0c2 100644 (file)
@@ -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;