[P4-dev] issue about p4-hlir

Yi Tseng a86487817 at gmail.com
Fri Dec 30 08:22:23 EST 2016


Hi

Maybe you need to use "string"

h = HLIR(*"*simple_router.p4*"*)




2016-12-29 23:39 GMT+08:00 <dida_327 at sina.com>:

>   I am learning p4-hlir doc.  and try to use it according to the
> introduction. but it seems doesn't work
>
> log info:
> dida at ubuntu:~/P4/P4factory/p4factory/targets/simple_router/p4src$
> p4-shell simple_router.p4
> parsing successful
> semantic checking successful
> Header type standard_metadata_t not byte-aligned, adding padding
> HLIR successfully constructed, access with variable 'h'
> Python 2.7.6 (default, Oct 26 2016, 20:30:19)
> [GCC 4.8.4] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> from p4_hlir.main import HLIR
> >>> h = HLIR(simple_router.p4)
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> NameError: name 'simple_router' is not defined
>
> I think i do it following the doc . but maybe the format in "HLIR()" is
> wrong,  does any one know how to input it correclly?
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



-- 
Yi Tseng (a.k.a Takeshi)
Taiwan National Chiao Tung University
Department of Computer Science
W2CNLab

https://takeshi.tw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20161230/64d096f8/attachment-0002.html>


More information about the P4-dev mailing list