[dpdk-dev,v2] net/null: add set MAC address dev op

Message ID 1517482027-29542-1-git-send-email-radu.nicolau@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Radu Nicolau Feb. 1, 2018, 10:47 a.m. UTC
  Needed if used with net/bonding

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: remove redundant memcpy

 drivers/net/null/rte_eth_null.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Ferruh Yigit Feb. 5, 2018, 2:40 p.m. UTC | #1
On 2/1/2018 10:47 AM, Radu Nicolau wrote:
> Needed if used with net/bonding
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit Feb. 5, 2018, 2:46 p.m. UTC | #2
On 2/5/2018 2:40 PM, Ferruh Yigit wrote:
> On 2/1/2018 10:47 AM, Radu Nicolau wrote:
>> Needed if used with net/bonding
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 9385ffd..d003b28 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -461,6 +461,12 @@  eth_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }
 
+static void
+eth_mac_address_set(__rte_unused struct rte_eth_dev *dev,
+		    __rte_unused struct ether_addr *addr)
+{
+}
+
 static const struct eth_dev_ops ops = {
 	.dev_start = eth_dev_start,
 	.dev_stop = eth_dev_stop,
@@ -472,6 +478,7 @@  static const struct eth_dev_ops ops = {
 	.tx_queue_release = eth_queue_release,
 	.mtu_set = eth_mtu_set,
 	.link_update = eth_link_update,
+	.mac_addr_set = eth_mac_address_set,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
 	.reta_update = eth_rss_reta_update,