[P4-dev] issue about p4-hlir
a86487817 at gmail.com
Fri Dec 30 08:22:23 EST 2016
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.
> >>> 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
Yi Tseng (a.k.a Takeshi)
Taiwan National Chiao Tung University
Department of Computer Science
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev