diff options
author | Damjan Marion <damjan.marion@gmail.com> | 2024-10-17 16:52:08 +0200 |
---|---|---|
committer | Mohammed HAWARI <momohawari@gmail.com> | 2024-10-23 11:09:12 +0000 |
commit | 3bd4e47a9ae8eb53f2441aa82e6f18148ee69c2a (patch) | |
tree | ebe52b7d72be1bc62623933a2bdcd88b61b80011 /src/plugins | |
parent | 66fcfb845b8e588901b4f663435e9e1b30499467 (diff) |
armada: set prinary address support
Type: improvement
Change-Id: I280cb3961ff4b18c6e02053c7526c19570add09d
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
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); |