]> git.baikalelectronics.ru Git - kernel.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)
commitbb5bfefa451ec30b114837f6f057b92a43856cce
treeedd3a5cbada000d8b145352858aedec6048578af
parentc876a2574f39e9cda91fcefe0912b2ca8602595c
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: d0fd7ac43dd0 ("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