]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
qed: Reimplement qed_mcast_bin_from_mac() using library functions
authorEric Biggers <ebiggers@kernel.org>
Mon, 16 Mar 2026 22:14:53 +0000 (15:14 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Mar 2026 02:07:37 +0000 (19:07 -0700)
commitd5516452a362aab2c136ab815967c4417c92d228
tree38d427245948d60fb748367dc8179e471ebfc2f3
parent4455a30b043ac2e20369b400a2132aaf127735e3
qed: Reimplement qed_mcast_bin_from_mac() using library functions

The calculation done by qed_calc_crc32c() is the standard
least-significant-bit-first CRC-32C except it uses
most-significant-bit-first order for the actual CRC variable.  That is
equivalent to bit-reflecting the input and output CRC.  Replace it with
equivalent calls to the corresponding library functions.

Tested with a simple userspace program which tested that the old and new
implementations of qed_mcast_bin_from_mac() produce the same outputs.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20260316221453.66078-1-ebiggers@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_l2.c