+ if (!strncmp(long_option[option_index].name,
+ CMD_LINE_OPT_TX_CHECKSUM,
+ sizeof(CMD_LINE_OPT_TX_CHECKSUM))) {
+ ret = parse_num_opt(optarg, 1);
+ if (ret == -1) {
+ RTE_LOG(INFO, VHOST_CONFIG,
+ "Invalid argument for tx-checksum [0|1]\n");
+ tep_termination_usage(prgname);
+ return -1;
+ } else
+ tx_checksum = ret;
+ }
+
+ if (!strncmp(long_option[option_index].name,
+ CMD_LINE_OPT_FILTER_TYPE,
+ sizeof(CMD_LINE_OPT_FILTER_TYPE))) {
+ ret = parse_num_opt(optarg, 3);
+ if ((ret == -1) || (ret == 0)) {
+ RTE_LOG(INFO, VHOST_CONFIG,
+ "Invalid argument for filter type [1-3]\n");
+ tep_termination_usage(prgname);
+ return -1;
+ } else
+ filter_idx = ret - 1;
+ }
+
+ /* Enable/disable encapsulation on RX. */
+ if (!strncmp(long_option[option_index].name,
+ CMD_LINE_OPT_DECAP,
+ sizeof(CMD_LINE_OPT_DECAP))) {
+ ret = parse_num_opt(optarg, 1);
+ if (ret == -1) {
+ RTE_LOG(INFO, VHOST_CONFIG,
+ "Invalid argument for decap [0|1]\n");
+ tep_termination_usage(prgname);
+ return -1;
+ } else
+ rx_decap = ret;
+ }
+
+ /* Enable/disable encapsulation on TX. */
+ if (!strncmp(long_option[option_index].name,
+ CMD_LINE_OPT_ENCAP,
+ sizeof(CMD_LINE_OPT_ENCAP))) {
+ ret = parse_num_opt(optarg, 1);
+ if (ret == -1) {
+ RTE_LOG(INFO, VHOST_CONFIG,
+ "Invalid argument for encap [0|1]\n");
+ tep_termination_usage(prgname);
+ return -1;
+ } else
+ tx_encap = ret;
+ }
+