[dts] [patch V1] alter the regular expression format of hostfwd value

Zhang, YanX A yanx.a.zhang at intel.com
Mon May 13 09:58:02 CEST 2019


tested-by:  Zhang, YanX A <yanx.a.zhang at intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lihong
> Sent: Monday, May 13, 2019 8:29 AM
> To: dts at dpdk.org
> Cc: Ma, LihongX <lihongx.ma at intel.com>
> Subject: [dts] [patch V1] alter the regular expression format of hostfwd value
> 
> Signed-off-by: lihong <lihongx.ma at intel.com>
> ---
>  framework/qemu_kvm.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index
> c3e8f37..80a39c8 100644
> --- a/framework/qemu_kvm.py
> +++ b/framework/qemu_kvm.py
> @@ -562,7 +562,7 @@ class QEMUKvm(VirtBase):
>          Use regular expression to check if hostfwd value format is correct.
>          """
>          regx_ip = '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
> -        regx_hostfwd = r'["tcp" | "udp"]?:%s?:\d+-%s?:\d+' % (regx_ip,
> regx_ip)
> +        regx_hostfwd = r'(tcp|udp)?:(%s)?:\d+-(%s)?:\d+' % (regx_ip,
> + regx_ip)
>          if not re.match(regx_hostfwd, opt_hostfwd):
>              raise Exception("Option opt_hostfwd format is not correct,\n"
> +
>                              "it is %s,\n " % opt_hostfwd +
> --
> 2.7.4



More information about the dts mailing list