examples/vhost: remove VLAN strip option
[dpdk.git] / examples / vhost / main.c
index 71f6d92..195b1db 100644 (file)
@@ -106,9 +106,6 @@ static uint32_t num_devices;
 static struct rte_mempool *mbuf_pool;
 static int mergeable;
 
-/* Do vlan strip on host, enabled on default */
-static uint32_t vlan_strip = 1;
-
 /* Enable VM2VM communications. If this is disabled then the MAC address compare is skipped. */
 typedef enum {
        VM2VM_DISABLED = 0,
@@ -469,7 +466,6 @@ us_vhost_usage(const char *prgname)
        "               --rx-retry-delay [0-N]: timeout(in usecond) between retries on RX. This makes effect only if retries on rx enabled\n"
        "               --rx-retry-num [0-N]: the number of retries on rx. This makes effect only if retries on rx enabled\n"
        "               --mergeable [0|1]: disable(default)/enable RX mergeable buffers\n"
-       "               --vlan-strip [0|1]: disable/enable(default) RX VLAN strip on host\n"
        "               --stats [0-N]: 0: Disable stats, N: Time in seconds to print stats\n"
        "               --socket-file: The path of the socket file.\n"
        "               --tx-csum [0|1] disable/enable TX checksum offload.\n"
@@ -494,7 +490,6 @@ us_vhost_parse_args(int argc, char **argv)
                {"rx-retry-delay", required_argument, NULL, 0},
                {"rx-retry-num", required_argument, NULL, 0},
                {"mergeable", required_argument, NULL, 0},
-               {"vlan-strip", required_argument, NULL, 0},
                {"stats", required_argument, NULL, 0},
                {"socket-file", required_argument, NULL, 0},
                {"tx-csum", required_argument, NULL, 0},
@@ -617,22 +612,6 @@ us_vhost_parse_args(int argc, char **argv)
                                }
                        }
 
-                       /* Enable/disable RX VLAN strip on host. */
-                       if (!strncmp(long_option[option_index].name,
-                               "vlan-strip", MAX_LONG_OPT_SZ)) {
-                               ret = parse_num_opt(optarg, 1);
-                               if (ret == -1) {
-                                       RTE_LOG(INFO, VHOST_CONFIG,
-                                               "Invalid argument for VLAN strip [0|1]\n");
-                                       us_vhost_usage(prgname);
-                                       return -1;
-                               } else {
-                                       vlan_strip = !!ret;
-                                       vmdq_conf_default.rxmode.hw_vlan_strip =
-                                               vlan_strip;
-                               }
-                       }
-
                        /* Enable/disable stats. */
                        if (!strncmp(long_option[option_index].name, "stats", MAX_LONG_OPT_SZ)) {
                                ret = parse_num_opt(optarg, INT32_MAX);
@@ -764,10 +743,7 @@ link_vmdq(struct vhost_dev *vdev, struct rte_mbuf *m)
                        "(%d) failed to add device MAC address to VMDQ\n",
                        vdev->vid);
 
-       /* Enable stripping of the vlan tag as we handle routing. */
-       if (vlan_strip)
-               rte_eth_dev_set_vlan_strip_on_queue(ports[0],
-                       (uint16_t)vdev->vmdq_rx_q, 1);
+       rte_eth_dev_set_vlan_strip_on_queue(ports[0], vdev->vmdq_rx_q, 1);
 
        /* Set device as ready for RX. */
        vdev->ready = DEVICE_RX;