Incorrect output when using HashAlgorithm.crc16_custom consecutive times

Dear all,

We have been using the bmv2 simple_switch to test some research proposals that explore the hash operation with the HashAlgorithm.crc16_custom algorithm.

Our most recent proposal needs to perform consecutive hash operations, but we are getting an incorrect output from the hash function if a custom CRC polynomial is configured.

For reproducing the issue, we extended a basic calculator from P4 tutorials: GitHub - giancarloliver/hash-custom: hash-custom

This tutorial shows a simple example that reproduces the issue when executing consecutive hash operations with custom CRC.

Could you please help us to understand this behavior? Are we using the hash extern in an incorrect manner? Is it a bug in the simple_switch library?

Thank you,
Cristina Klippel Dominicini

For anyone else that finds this question and wonders about a resolution, I believe the answer was arrived at here: Incorrect output when using HashAlgorithm.crc16_custom consecutive times · Issue #1192 · p4lang/behavioral-model · GitHub