test: add procfs error message for multi-process launch
[dpdk.git] / app / test-pmd / config.c
index 03ce502..1d80470 100644 (file)
@@ -49,7 +49,6 @@
 #include <rte_pmd_bnxt.h>
 #endif
 #include <rte_gro.h>
-#include <cmdline_parse_etheraddr.h>
 #include <rte_config.h>
 
 #include "testpmd.h"
@@ -110,8 +109,8 @@ const struct rss_type_info rss_type_table[] = {
 static void
 print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
-       char buf[ETHER_ADDR_FMT_SIZE];
-       ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+       char buf[RTE_ETHER_ADDR_FMT_SIZE];
+       rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
        printf("%s%s", name, buf);
 }
 
@@ -2278,19 +2277,16 @@ pkt_fwd_config_display(struct fwd_config *cfg)
 void
 set_fwd_eth_peer(portid_t port_id, char *peer_addr)
 {
-       uint8_t c, new_peer_addr[6];
+       struct rte_ether_addr new_peer_addr;
        if (!rte_eth_dev_is_valid_port(port_id)) {
                printf("Error: Invalid port number %i\n", port_id);
                return;
        }
-       if (cmdline_parse_etheraddr(NULL, peer_addr, &new_peer_addr,
-                                       sizeof(new_peer_addr)) < 0) {
+       if (rte_ether_unformat_addr(peer_addr, &new_peer_addr) < 0) {
                printf("Error: Invalid ethernet address: %s\n", peer_addr);
                return;
        }
-       for (c = 0; c < 6; c++)
-               peer_eth_addrs[port_id].addr_bytes[c] =
-                       new_peer_addr[c];
+       peer_eth_addrs[port_id] = new_peer_addr;
 }
 
 int
@@ -3536,7 +3532,7 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
         * in the pool of multicast addresses.
         */
        for (i = 0; i < port->mc_addr_nb; i++) {
-               if (is_same_ether_addr(mc_addr, &port->mc_addr_pool[i])) {
+               if (rte_is_same_ether_addr(mc_addr, &port->mc_addr_pool[i])) {
                        printf("multicast address already filtered by port\n");
                        return;
                }
@@ -3544,7 +3540,7 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
 
        if (mcast_addr_pool_extend(port) != 0)
                return;
-       ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
+       rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
        eth_port_multicast_addr_list_set(port_id);
 }
 
@@ -3563,7 +3559,7 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)
         * Search the pool of multicast MAC addresses for the removed address.
         */
        for (i = 0; i < port->mc_addr_nb; i++) {
-               if (is_same_ether_addr(mc_addr, &port->mc_addr_pool[i]))
+               if (rte_is_same_ether_addr(mc_addr, &port->mc_addr_pool[i]))
                        break;
        }
        if (i == port->mc_addr_nb) {