p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

XOR operation in P4_16

FM
Francisco Machado
Wed, Apr 21, 2021 2:12 PM

Hi,

I was trying to use other HashAlgorithms, defined in
p4c/p4include/v1model.p4
https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4, and I
can't use the xor16 operation. Is it not implemented? Are there similar
hash functions in v1model that can be used as XOR?
Thanks in advance

Hi, I was trying to use other HashAlgorithms, defined in p4c/p4include/v1model.p4 <https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4>, and I can't use the xor16 operation. Is it not implemented? Are there similar hash functions in v1model that can be used as XOR? Thanks in advance
NS
Nik Sultana
Wed, Apr 21, 2021 2:17 PM

On Wed, 21 Apr 2021, Francisco Machado wrote:

Hi,

I was trying to use other HashAlgorithms, defined in
p4c/p4include/v1model.p4
https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4, and I
can't use the xor16 operation. Is it not implemented? Are there similar
hash functions in v1model that can be used as XOR?
Thanks in advance


P4-dev mailing list -- p4-dev@lists.p4.org
To unsubscribe send an email to p4-dev-leave@lists.p4.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Can you say more about your setup -- presumably you're trying to run the
program on BMv2? If so, is it a recent version?

What's the indication that the operation can't be used -- do you get
complaints from the compiler, or the BMv2 runtime? Including the output
you're seeing will help people understand the problem better.

It might also help to share a snippet from the program you're running.

On Wed, 21 Apr 2021, Francisco Machado wrote: > Hi, > > I was trying to use other HashAlgorithms, defined in > p4c/p4include/v1model.p4 > <https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4>, and I > can't use the xor16 operation. Is it not implemented? Are there similar > hash functions in v1model that can be used as XOR? > Thanks in advance > _______________________________________________ > P4-dev mailing list -- p4-dev@lists.p4.org > To unsubscribe send an email to p4-dev-leave@lists.p4.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s Can you say more about your setup -- presumably you're trying to run the program on BMv2? If so, is it a recent version? What's the indication that the operation can't be used -- do you get complaints from the compiler, or the BMv2 runtime? Including the output you're seeing will help people understand the problem better. It might also help to share a snippet from the program you're running.