From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matej Vido Subject: Re: [PATCH 1/2] szedata2: new poll mode driver Date: Thu, 24 Mar 2016 18:52:29 +0100 Message-ID: <56F4295D.3000806@cesnet.cz> References: <1434702301-4509-1-git-send-email-vido@cesnet.cz> <1434702301-4509-2-git-send-email-vido@cesnet.cz> <20160321104508.2a318a69@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by dpdk.org (Postfix) with ESMTP id 543042904 for ; Thu, 24 Mar 2016 18:52:30 +0100 (CET) In-Reply-To: <20160321104508.2a318a69@xeon-e3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" D=C5=88a 21.03.2016 o 18:45 Stephen Hemminger nap=C3=ADsal(a): > On Fri, 19 Jun 2015 10:25:00 +0200 > Matej Vido wrote: > >> +static struct ether_addr eth_addr =3D { >> + .addr_bytes =3D { 0, 0, 0, 0x1, 0x2, 0x3 } >> +}; > ... > >> static int >> rte_szedata2_eth_dev_init(struct rte_eth_dev *dev) >> { > .. >> /* Allocate space for one mac address */ >> data->mac_addrs =3D rte_zmalloc(data->name, sizeof(struct ether_addr)= , >> RTE_CACHE_LINE_SIZE); >> if (data->mac_addrs =3D=3D NULL) { >> RTE_LOG(ERR, PMD, "Could not alloc space for MAC address!\n"); >> munmap(dev->pci_dev->mem_resource[PCI_RESOURCE_NUMBER].addr, >> dev->pci_dev->mem_resource[PCI_RESOURCE_NUMBER].len); >> return -EINVAL; >> } >> >> ether_addr_copy(ð_addr, data->mac_addrs); > If your hardware has no permanent MAC address, then please use eth_rand= om_addr() > to make one on boot, rather than having a bogus static value. Hi, I will use it. Thanks, Matej