[dts] [PATCH V1] fix FreeBSD get mac addr error

Liu, Yong yong.liu at intel.com
Wed Aug 30 10:44:09 CEST 2017


Gang,
Unload driver is very critical action, some cases will use this function to get mac address.
Thus will lead to all suites after these cases.

Please do this kind of action in upper layer which handler the overall execution.

Thanks,
Marvin


> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of xu,gang
> Sent: Wednesday, August 30, 2017 2:11 PM
> To: dts at dpdk.org
> Cc: Xu, GangX <gangx.xu at intel.com>
> Subject: [dts] [PATCH V1] fix FreeBSD get mac addr error
> 
> get mac addr need restore interface
> 
> Signed-off-by: xu,gang <gangx.xu at intel.com>
> ---
>  nics/net_device.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/nics/net_device.py b/nics/net_device.py
> index 4861145..9edf6f6 100644
> --- a/nics/net_device.py
> +++ b/nics/net_device.py
> @@ -330,6 +330,11 @@ class NetDevice(object):
>          """
>          Get the MAC by the default way on Freebsd.
>          """
> +        out = self.__send_expect('kldstat', '# ')
> +        if 'nic_uio.ko' in out:
> +            self.__send_expect('kldunload nic_uio.ko', '# ')
> +            self.__send_expect('kldunload contigmem.ko', '# ')
> +
>          out = self.__send_expect('ifconfig %s' % intf, '# ')
>          rexp = r"ether ([\da-f:]*)"
>          pattern = re.compile(rexp)
> --
> 1.9.3



More information about the dts mailing list