[dpdk-dev,v2] test/virtual_pmd: add set MAC address dev op

Message ID 1517482137-29638-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:48 a.m. UTC
  Needed if used with net/bonding

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

 test/test/virtual_pmd.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit Feb. 5, 2018, 2:59 p.m. UTC | #1
On 2/1/2018 10:48 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, 3 p.m. UTC | #2
On 2/5/2018 2:59 PM, Ferruh Yigit wrote:
> On 2/1/2018 10:48 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/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
index 7a7adbb..2f5b31d 100644
--- a/test/test/virtual_pmd.c
+++ b/test/test/virtual_pmd.c
@@ -216,6 +216,11 @@  static void
 virtual_ethdev_promiscuous_mode_disable(struct rte_eth_dev *dev __rte_unused)
 {}
 
+static void
+virtual_ethdev_mac_address_set(__rte_unused struct rte_eth_dev *dev,
+			       __rte_unused struct ether_addr *addr)
+{
+}
 
 static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
 	.dev_configure = virtual_ethdev_configure_success,
@@ -228,13 +233,13 @@  static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
 	.rx_queue_release = virtual_ethdev_rx_queue_release,
 	.tx_queue_release = virtual_ethdev_tx_queue_release,
 	.link_update = virtual_ethdev_link_update_success,
+	.mac_addr_set = virtual_ethdev_mac_address_set,
 	.stats_get = virtual_ethdev_stats_get,
 	.stats_reset = virtual_ethdev_stats_reset,
 	.promiscuous_enable = virtual_ethdev_promiscuous_mode_enable,
 	.promiscuous_disable = virtual_ethdev_promiscuous_mode_disable
 };
 
-
 void
 virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success)
 {