P4

P4 16中创建自己的hash函数


我在学习p4,除了v1model.p4中提供的crc32,crc16等hash函数之外,想要使用新的hash函数,应当如何添加呢。
已邀请:

applo - 生活不止眼前的苟且,还有。。。

赞同来自:


More advanced support for CRCs

We now support a long list of pre-defined crc algorithms, as well as
some custom string format to define new algorithms (string format lets
the user defined polynomial, initial remainder, etc).

可以参考这个
https://github.com/p4lang/beha ... f55fb

要回复问题请先登录注册