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 <malleshx.koujal...@intel.com>
<...> > @@ -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. <...>