mlx4: add callback to set primary mac address
PATCH 1/2 mlx4: add callback to set primary mac address
Signed-off-by David Marchand <[email protected]>
--- drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/net/mlx4/mlx4.c +17 -0
@@ -4432,6 +4432,22 @@ end: }/** +* DPDK callback to set the primary MAC address. +* +* @param dev +* Pointer to Ethernet device structure. +* @param mac_addr +* MAC address to register. +*/ +static void +mlx4_mac_addr_set (struct rte_eth_dev *dev,struct ether_addr *mac_addr) +{ +DEBUG ("%p: setting primary MAC address" , (void *)dev); +mlx4_mac_addr_remove (dev,0 ); +mlx4_mac_addr_add (dev, mac_addr,0 ,0 ); +} + +/** * DPDK callback to enable promiscuous mode. * * @param dev
@@ -5004,6 +5020,7 @@ static const struct eth_dev_ops mlx4_dev_ops = { .priority_flow_ctrl_set = NULL, .mac_addr_remove = mlx4_mac_addr_remove, .mac_addr_add = mlx4_mac_addr_add, + .mac_addr_set = mlx4_mac_addr_set, .mtu_set = mlx4_dev_set_mtu, .udp_tunnel_add = NULL, .udp_tunnel_del = NULL,
Signature · 1 line
1.7.10.4
PATCH 2/2 mlx5: add callback to set primary mac address
Signed-off-by David Marchand <[email protected]>
--- drivers/net/mlx5/mlx5.c | 1 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_mac.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+)
drivers/net/mlx5/mlx5.c +1 -0
@@ -162,6 +162,7 @@ static const struct eth_dev_ops mlx5_dev_ops = { .flow_ctrl_set = mlx5_dev_set_flow_ctrl, .mac_addr_remove = mlx5_mac_addr_remove, .mac_addr_add = mlx5_mac_addr_add, + .mac_addr_set = mlx5_mac_addr_set, .mtu_set = mlx5_dev_set_mtu, .reta_update = mlx5_dev_rss_reta_update, .reta_query = mlx5_dev_rss_reta_query,
drivers/net/mlx5/mlx5.h +1 -0
@@ -179,6 +179,7 @@ int priv_mac_addr_add(struct priv *, unsigned int,int priv_mac_addrs_enable (struct priv *);void mlx5_mac_addr_add (struct rte_eth_dev *,struct ether_addr *,uint32_t ,uint32_t ); +void mlx5_mac_addr_set (struct rte_eth_dev *,struct ether_addr *);/* mlx5_rss.c */
drivers/net/mlx5/mlx5_mac.c +16 -0
@@ -488,3 +488,19 @@ mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr, end:priv_unlock (priv); } + +/** +* DPDK callback to set primary MAC address. +* +* @param dev +* Pointer to Ethernet device structure. +* @param mac_addr +* MAC address to register. +*/ +void +mlx5_mac_addr_set (struct rte_eth_dev *dev,struct ether_addr *mac_addr) +{ +DEBUG ("%p: setting primary MAC address" , (void *)dev); +mlx5_mac_addr_remove (dev,0 ); +mlx5_mac_addr_add (dev, mac_addr,0 ,0 ); +}
Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] mlx5: add callback to set primary mac address
Quoted 6 lines · David Marchand
Signed-off-by David Marchand <[email protected]>--- drivers/net/mlx5/mlx5.c | 1 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_mac.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+)
Acked-by Adrien Mazarguil <[email protected]>
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 4 lines · David Marchand
Signed-off-by David Marchand <[email protected]>--- drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Acked-by Adrien Mazarguil <[email protected]>
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 8 lines · Adrien Mazarguil
Quoted 4 lines · David Marchand
Signed-off-by David Marchand <[email protected]>--- drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)Acked-by Adrien Mazarguil <[email protected]>
Patch-set applied to dpdk-next-net/rel_16_04
Thanks,
/Bruce