From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D4BF11B830 for ; Wed, 31 Jan 2018 20:32:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 11:32:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,441,1511856000"; d="scan'208";a="23934943" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.19.13]) ([10.252.19.13]) by FMSMGA003.fm.intel.com with ESMTP; 31 Jan 2018 11:32:55 -0800 To: Radu Nicolau , dev@dpdk.org Cc: thomas@monjalon.net, declan.doherty@intel.com References: <1517235804-24537-1-git-send-email-radu.nicolau@intel.com> From: Ferruh Yigit Message-ID: <21870958-1b01-cc31-a42c-2c216f96c171@intel.com> Date: Wed, 31 Jan 2018 19:32:54 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1517235804-24537-1-git-send-email-radu.nicolau@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [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: , X-List-Received-Date: Wed, 31 Jan 2018 19:32:58 -0000 On 1/29/2018 2:23 PM, Radu Nicolau wrote: > 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)); Same comment here, memcpy not required. > +} > > 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) > { >