diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/dev_armada/pp2/port.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/dev_armada/pp2/port.c b/src/plugins/dev_armada/pp2/port.c index a14e15bf1f2..a42432ca648 100644 --- a/src/plugins/dev_armada/pp2/port.c +++ b/src/plugins/dev_armada/pp2/port.c @@ -211,6 +211,7 @@ mvpp2_port_cfg_change_validate (vlib_main_t *vm, vnet_dev_port_t *port, switch (req->type) { case VNET_DEV_PORT_CFG_PROMISC_MODE: + case VNET_DEV_PORT_CFG_CHANGE_PRIMARY_HW_ADDR: case VNET_DEV_PORT_CFG_ADD_SECONDARY_HW_ADDR: case VNET_DEV_PORT_CFG_REMOVE_SECONDARY_HW_ADDR: break; @@ -246,6 +247,19 @@ mvpp2_port_cfg_change (vlib_main_t *vm, vnet_dev_port_t *port, req->promisc); break; + case VNET_DEV_PORT_CFG_CHANGE_PRIMARY_HW_ADDR: + clib_memcpy (&addr, req->addr.eth_mac, sizeof (addr)); + mrv = pp2_ppio_set_mac_addr (mp->ppio, addr); + if (mrv) + { + log_err (port->dev, "pp2_ppio_set_mac_addr: failed, rv %d", mrv); + rv = VNET_DEV_ERR_INTERNAL; + } + else + log_debug (port->dev, "pp2_ppio_set_mac_addr: %U added", + format_ethernet_address, &addr); + break; + case VNET_DEV_PORT_CFG_ADD_SECONDARY_HW_ADDR: clib_memcpy (&addr, req->addr.eth_mac, sizeof (addr)); mrv = pp2_ppio_add_mac_addr (mp->ppio, addr); |