Open
Description
- Slide 78 of
P4D2_2017_Fall/P4_tutorial_labs.pdf
has information on the signature ofhash()
that should be copied intoload_balancing.p4
. - Comments for
ecmp_base
andecmp_count
are needed inload_balancing p4
. (Otherwise, I wouldn't know to use them forbase
andmax
in the call tohash()
.) - Hash algorithm is unspecified. (Need to say CRC16 somewhere.)
- Attempts based on example usage in PSA spec didn't work. My attempt:
Hash<bit<14>>(HashAlgorithm_t.CRC16) h;
meta.ecmp_select =
h.get_hash({hdr.ipv4.srcAddr, hdr.ipv4.dstAddr,
hdr.ipv4.protocol, hdr.tcp.srcPort, hdr.tcp.dstPort});
Resulting error:
syntax error, unexpected IDENTIFIER, expecting ;
Hash<bit<14>>(HashAlgorithm_t.CRC16) h
^
Metadata
Metadata
Assignees
Labels
No labels