• N
    mlxsw: spectrum_acl: Add Bloom filter handling · 7585cacd
    Nir Dotan 提交于
    Spectrum-2 HW uses Bloom filter in order to skip lookups on specific
    eRPs. It uses crc-16-Msbit-first calculation over a specific layout
    of a rule's key fields combined with eRP ID as well as region ID.
    Per potential lookup, iff the Bloom filter entry of the calculated
    index is empty, then the lookup can be skipped. Hence, the mlxsw
    driver should update the Bloom filter entry per each rule insertion
    or deletion when rules are part of an eRP.
    
    Add functions for adding and deleting entries in the Bloom filter.
    In order to do so also add crc-16 computation based on the specific
    Spectrum-2 polynomial and a function for encoding the crc-16 input
    in the manner dictated by HW implementation.
    Signed-off-by: NNir Dotan <nird@mellanox.com>
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    7585cacd
spectrum_acl_tcam.h 10.1 KB