datapath: Backport for architecture hash library.