]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
cxgb4: Correct ntuple mask validation for hash filters
authorKumar Sanghvi <kumaras@chelsio.com>
Mon, 14 May 2018 10:57:34 +0000 (16:27 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 May 2018 02:41:29 +0000 (22:41 -0400)
commit849a742c59a3d597473c0232f9c2506c69eeef14
treeedd3a5cbada000d8b145352858aedec6048578af
parentd49baa7e12ee70c0a7b821d088a770c94c02e494
cxgb4: Correct ntuple mask validation for hash filters

Earlier code of doing bitwise AND with field width bits was wrong.
Instead, simplify code to calculate ntuple_mask based on supplied
fields and then compare with mask configured in hw - which is the
correct and simpler way to validate ntuple mask.

Fixes: 3eb8b62d5a26 ("cxgb4: add support to create hash-filters via tc-flower offload")
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c