Bug 5454 - igb: fix bit_shift to be in [1..8] range
Summary: igb: fix bit_shift to be in [1..8] range
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-15
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-07 19:42 UTC by inspursand
Modified: 2023-06-07 19:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description inspursand inspur_group 2023-06-07 19:42:13 UTC
Description of problem:
In igb_hash_mc_addr() the expression:
"mc_addr[4] >> 8 - bit_shift", right shifting "mc_addr[4]"
shift by more than 7 bits always yields zero, so hash becomes not so different.
Add initialization with bit_shift = 1 and add a loop condition to ensure 
bit_shift will be always in [1..8] range.

Version-Release number of selected component (if applicable):
5.10

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 小龙 admin 2023-06-07 19:58:12 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1713