net/softnic: fix undefined device info fields
authorJasvinder Singh <jasvinder.singh@intel.com>
Tue, 20 Nov 2018 13:00:15 +0000 (13:00 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 21 Nov 2018 15:23:56 +0000 (16:23 +0100)
commit66cdfd67c5178ae5028aaf76fe500b61acfe313f
treebd600cead8fc26cb9838edf8865898ac5db28511
parent8461a5bb709020a6c437821b5bb143dca02ce111
net/softnic: fix undefined device info fields

The memcpy operation overwrites the device info fields set
by ethdev API and leaves the device field undefined.
Thus, replaces memcpy by only updating the required fields
at the driver layer.

error log: testpmd> show port info 1

**** Infos for port 1  ****
MAC address: 00:00:00:00:00:00
Device name: net_softnic0

Segmentation fault.
port_infos_display (port_id=1) at /dpdk/app/test-pmd/config.c:418
if (dev_info.device->devargs && dev_info.device->devargs->args)

Fixes: cc6d421574fe ("net/softnic: add softnic PMD")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/softnic/rte_eth_softnic.c