summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorQingfang Deng <qingfang.deng@linux.dev>2026-04-29 10:38:46 +0800
committerJakub Kicinski <kuba@kernel.org>2026-05-01 18:45:16 -0700
commitff393252f99f261ba885f05fbfdfe89807c7ffd3 (patch)
tree0a4bbd3b77e2f96400ad557f4a053d264508ed4d /include/linux
parent286efd34d1a1ef5d83f9441b5e59421a26738169 (diff)
pppoe: optimize hash with word access
Currently, hash_item() processes the 6-byte Ethernet address and the 2-byte session ID byte-wise to compute a hash. Optimize this by using 16-bit word operations: XOR three 16-bit words from the Ethernet address and the 16-bit session ID, then fold the result. This reduces the total number of loads and XORs. The Ethernet addresses in a skb and struct pppoe_addr are both 2-byte aligned, so the u16 pointer cast is safe. Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Link: https://patch.msgid.link/20260429023848.153425-1-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions