From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 1986C4F9A for ; Tue, 6 Mar 2018 12:40:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 03:40:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,431,1515484800"; d="scan'208";a="23325033" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by orsmga006.jf.intel.com with ESMTP; 06 Mar 2018 03:40:23 -0800 To: Mallesh Koujalagi , dev@dpdk.org Cc: mtetsuyah@gmail.com References: <1517623898-53443-1-git-send-email-malleshx.koujalagi@intel.com> <1520307314-25049-1-git-send-email-malleshx.koujalagi@intel.com> From: Ferruh Yigit Message-ID: <6c6d62cd-0b30-c68a-8036-ebe621f996bc@intel.com> Date: Tue, 6 Mar 2018 11:40:23 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1520307314-25049-1-git-send-email-malleshx.koujalagi@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] net/null:Different mac address support 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: Tue, 06 Mar 2018 11:40:26 -0000 On 3/6/2018 3:35 AM, Mallesh Koujalagi wrote: > After attaching two Null device to ovs, seeing "00.00.00.00.00.00" mac > address for both null devices. Fix this issue, by setting different mac > address. > > Signed-off-by: Mallesh Koujalagi <...> > @@ -514,12 +524,21 @@ eth_dev_null_create(struct rte_vdev_device *dev, > if (!data) > return -ENOMEM; > > + eth_addr = rte_zmalloc_socket(rte_vdev_device_name(dev), > + sizeof(*eth_addr), 0, dev->device.numa_node); > + if (eth_addr == NULL) { > + rte_free(data); > + return -ENOMEM; > + } > + > eth_dev = rte_eth_vdev_allocate(dev, sizeof(*internals)); > if (!eth_dev) { > + rte_free(eth_addr); > rte_free(data); > return -ENOMEM; > } Same comment from previous version, why not put "eth_addr" inside "struct pmd_internals"? "struct pmd_internals" is already allocated/freed in the code, so you don't need to manage "eth_addr" if you put it into "struct pmd_internals" it will come free. <...>