]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:58 +0000 (12:29 +0200)
commit00c3aa70c712c5f7758370e0cd719ac5e401305e
tree307298d43784f747cd34530da65fcc211b851026
parentecf976d7d06211345705bce88c4da7c410a2d8f9
cxgb4: Correct ntuple mask validation for hash filters

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 849a742c59a3d597473c0232f9c2506c69eeef14 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c