diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-09-24 18:42:44 +0200 |
---|---|---|
committer | Patrice Buriez <patrice.buriez@intel.com> | 2019-10-08 19:33:55 +0000 |
commit | ca79a59426e4c462d786e602427cf9c29450d2b0 (patch) | |
tree | 531b27b81b52301ff4958a2fc9ed283a30533024 /VNFs | |
parent | b1857bf9f5a28b75227ac6393763eb9c952330b8 (diff) |
Fix setting mac address through [port] section
MAC address can be configured through the [port] section.
However this had only some effect on packets being transmitted.
For instance it was used to set the src mac address by the generator.
It had no effect on packets reception: when not in promiscuous mode
only the packets with the MAC originally set by the HW were received.
Now, when not in promiscuous mode, only packets with MAC as defined
in [port] section will be received.
Change-Id: I064817bf6727d098e89fbbb7a90412ed599f0fb6
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r-- | VNFs/DPPD-PROX/prox_port_cfg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index d6cede9e..c335ee10 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -718,6 +718,7 @@ void close_ports_atexit(void) void init_port_addr(void) { struct prox_port_cfg *port_cfg; + int rc; for (uint8_t port_id = 0; port_id < PROX_MAX_PORTS; ++port_id) { if (!prox_port_cfg[port_id].active) { @@ -733,6 +734,8 @@ void init_port_addr(void) eth_random_addr(port_cfg->eth_addr.addr_bytes); break; case PROX_PORT_MAC_SET: + if ((rc = rte_eth_dev_default_mac_addr_set(port_id, &port_cfg->eth_addr)) != 0) + plog_warn("port %u: failed to set mac address. Error = %d\n", port_id, rc); break; } } |