Skip to content

Commit 80a1e7b

Browse files
Nikolay Kuratovkuba-moo
authored andcommitted
cxgb4: add forgotten u64 ivlan cast before shift
It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match() There is no reason it should not be done here Found by Linux Verification Center (linuxtesting.org) with SVACE Signed-off-by: Nikolay Kuratov <[email protected]> Cc: [email protected] Fixes: 12b276f ("cxgb4: add support to create hash filters") Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c50e747 commit 80a1e7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,8 @@ static u64 hash_filter_ntuple(struct ch_filter_specification *fs,
12441244
* in the Compressed Filter Tuple.
12451245
*/
12461246
if (tp->vlan_shift >= 0 && fs->mask.ivlan)
1247-
ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
1247+
ntuple |= (u64)(FT_VLAN_VLD_F |
1248+
fs->val.ivlan) << tp->vlan_shift;
12481249

12491250
if (tp->port_shift >= 0 && fs->mask.iport)
12501251
ntuple |= (u64)fs->val.iport << tp->port_shift;

0 commit comments

Comments
 (0)