From patchwork Mon Jan 29 14:23:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 34648 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 463A91B807; Mon, 29 Jan 2018 15:28:43 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E8BA41B3EB for ; Mon, 29 Jan 2018 15:28:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2018 06:28:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,431,1511856000"; d="scan'208";a="26323862" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by fmsmga001.fm.intel.com with ESMTP; 29 Jan 2018 06:28:39 -0800 From: Radu Nicolau To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, declan.doherty@intel.com, Radu Nicolau Date: Mon, 29 Jan 2018 14:23:24 +0000 Message-Id: <1517235804-24537-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Needed if used with net/bonding Signed-off-by: Radu Nicolau --- test/test/virtual_pmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c index 7a7adbb..2b5383a 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(struct rte_eth_dev *dev, struct ether_addr *addr) +{ + memcpy(dev->data->mac_addrs, addr, sizeof(struct ether_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) {