octeon: sync mac address to cgx/rpm table
This patch syncs mac address to cgx/rpm table at initialization, which sets interface in unicast mode. Type: fix Change-Id: Icf64b91ce5c74cc399cad3d3358b951fb2a65297 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
This commit is contained in:

committed by
Damjan Marion

parent
1fb7ae3440
commit
9b6df541e5
@ -58,6 +58,7 @@ oct_port_init (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
vnet_dev_t *dev = port->dev;
|
||||
oct_device_t *cd = vnet_dev_get_data (dev);
|
||||
oct_port_t *cp = vnet_dev_get_port_data (port);
|
||||
u8 mac_addr[PLT_ETHER_ADDR_LEN];
|
||||
struct roc_nix *nix = cd->nix;
|
||||
vnet_dev_rv_t rv;
|
||||
int rrv;
|
||||
@ -75,6 +76,22 @@ oct_port_init (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
}
|
||||
cp->lf_allocated = 1;
|
||||
|
||||
if (!roc_nix_is_vf_or_sdp (nix))
|
||||
{
|
||||
if ((rrv = roc_nix_npc_mac_addr_get (nix, mac_addr)))
|
||||
{
|
||||
oct_port_deinit (vm, port);
|
||||
return oct_roc_err (dev, rrv, "roc_nix_npc_mac_addr_get failed");
|
||||
}
|
||||
|
||||
/* Sync MAC address to CGX/RPM table */
|
||||
if ((rrv = roc_nix_mac_addr_set (nix, mac_addr)))
|
||||
{
|
||||
oct_port_deinit (vm, port);
|
||||
return oct_roc_err (dev, rrv, "roc_nix_mac_addr_set failed");
|
||||
}
|
||||
}
|
||||
|
||||
if ((rrv = roc_nix_tm_init (nix)))
|
||||
{
|
||||
oct_port_deinit (vm, port);
|
||||
|
Reference in New Issue
Block a user