* [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address
@ 2016-01-05 18:00 David Marchand
2016-01-05 18:00 ` [dpdk-dev] [PATCH 2/2] mlx5: " David Marchand
2016-01-06 8:50 ` [dpdk-dev] [PATCH 1/2] mlx4: " Adrien Mazarguil
0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2016-01-05 18:00 UTC (permalink / raw)
To: dev
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 207bfe2..acc76d7 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -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,
--
1.7.10.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] mlx5: add callback to set primary mac address
2016-01-05 18:00 [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address David Marchand
@ 2016-01-05 18:00 ` David Marchand
2016-01-06 8:50 ` Adrien Mazarguil
2016-01-06 8:50 ` [dpdk-dev] [PATCH 1/2] mlx4: " Adrien Mazarguil
1 sibling, 1 reply; 5+ messages in thread
From: David Marchand @ 2016-01-05 18:00 UTC (permalink / raw)
To: dev
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
drivers/net/mlx5/mlx5.c | 1 +
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_mac.c | 16 ++++++++++++++++
3 files changed, 18 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 821ee0f..30d88b5 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -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,
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index b84d31d..2f9a594 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -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 */
diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
index e37ce06..b1f34d9 100644
--- a/drivers/net/mlx5/mlx5_mac.c
+++ b/drivers/net/mlx5/mlx5_mac.c
@@ -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);
+}
--
1.7.10.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] mlx5: add callback to set primary mac address
2016-01-05 18:00 ` [dpdk-dev] [PATCH 2/2] mlx5: " David Marchand
@ 2016-01-06 8:50 ` Adrien Mazarguil
0 siblings, 0 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2016-01-06 8:50 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Tue, Jan 05, 2016 at 07:00:09PM +0100, David Marchand wrote:
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> ---
> 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 <adrien.mazarguil@6wind.com>
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address
2016-01-05 18:00 [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address David Marchand
2016-01-05 18:00 ` [dpdk-dev] [PATCH 2/2] mlx5: " David Marchand
@ 2016-01-06 8:50 ` Adrien Mazarguil
2016-02-08 15:50 ` Bruce Richardson
1 sibling, 1 reply; 5+ messages in thread
From: Adrien Mazarguil @ 2016-01-06 8:50 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Tue, Jan 05, 2016 at 07:00:08PM +0100, David Marchand wrote:
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> ---
> drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address
2016-01-06 8:50 ` [dpdk-dev] [PATCH 1/2] mlx4: " Adrien Mazarguil
@ 2016-02-08 15:50 ` Bruce Richardson
0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2016-02-08 15:50 UTC (permalink / raw)
To: David Marchand, dev
On Wed, Jan 06, 2016 at 09:50:19AM +0100, Adrien Mazarguil wrote:
> On Tue, Jan 05, 2016 at 07:00:08PM +0100, David Marchand wrote:
> > Signed-off-by: David Marchand <david.marchand@6wind.com>
> > ---
> > drivers/net/mlx4/mlx4.c | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
>
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
>
Patch-set applied to dpdk-next-net/rel_16_04
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-08 15:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 18:00 [dpdk-dev] [PATCH 1/2] mlx4: add callback to set primary mac address David Marchand
2016-01-05 18:00 ` [dpdk-dev] [PATCH 2/2] mlx5: " David Marchand
2016-01-06 8:50 ` Adrien Mazarguil
2016-01-06 8:50 ` [dpdk-dev] [PATCH 1/2] mlx4: " Adrien Mazarguil
2016-02-08 15:50 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).