Support packets in flight
[samplevnf.git] / VNFs / DPPD-PROX / commands.c
index df5e69c..a8953a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-// Copyright (c) 2010-2017 Intel Corporation
+// Copyright (c) 2010-2020 Intel Corporation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -113,8 +113,8 @@ static inline int wait_command_handled(struct lcore_cfg *lconf)
 static inline void start_l3(struct task_args *targ)
 {
        if (!task_is_master(targ)) {
-               if ((targ->nb_txrings != 0) || (targ->nb_txports != 0)) {
-                       if (targ->flags & TASK_ARG_L3)
+               if ((targ->nb_txports != 0)) {
+                       if (targ->flags & (TASK_ARG_L3|TASK_ARG_NDP))
                                task_start_l3(targ->tbase, targ);
                }
        }
@@ -895,7 +895,7 @@ void cmd_portinfo(int port_id, char *dst, size_t max_len)
                        dst += snprintf(dst, end - dst,
                                        "%2d:%10s; "MAC_BYTES_FMT"; %s\n",
                                        port_id,
-                                       port_cfg->name,
+                                       port_cfg->names[0],
                                        MAC_BYTES(port_cfg->eth_addr.addr_bytes),
                                        port_cfg->pci_addr);
                }
@@ -909,7 +909,7 @@ void cmd_portinfo(int port_id, char *dst, size_t max_len)
        struct prox_port_cfg* port_cfg = &prox_port_cfg[port_id];
 
        dst += snprintf(dst, end - dst, "Port info for port %u\n", port_id);
-       dst += snprintf(dst, end - dst, "\tName: %s\n", port_cfg->name);
+       dst += snprintf(dst, end - dst, "\tName: %s\n", port_cfg->names[0]);
        dst += snprintf(dst, end - dst, "\tDriver: %s\n", port_cfg->driver_name);
        dst += snprintf(dst, end - dst, "\tMac address: "MAC_BYTES_FMT"\n", MAC_BYTES(port_cfg->eth_addr.addr_bytes));
        dst += snprintf(dst, end - dst, "\tLink speed: %u Mbps\n", port_cfg->link_speed);
@@ -1004,7 +1004,7 @@ void cmd_set_vlan_offload(uint8_t port_id, unsigned int val)
        }
 
        plog_info("setting vlan offload to %d\n", val);
-       if (val & ~(ETH_VLAN_STRIP_OFFLOAD | ETH_VLAN_FILTER_OFFLOAD | ETH_VLAN_EXTEND_OFFLOAD)) {
+       if (val & ~(RTE_ETH_VLAN_STRIP_OFFLOAD | RTE_ETH_VLAN_FILTER_OFFLOAD | RTE_ETH_VLAN_EXTEND_OFFLOAD)) {
                plog_info("wrong vlan offload value\n");
        }
        int ret = rte_eth_dev_set_vlan_offload(port_id, val);