]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Set correct CHAIN_ID and slice number mask
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 30 Nov 2017 18:45:26 +0000 (10:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Nov 2017 19:21:35 +0000 (14:21 -0500)
commita491a9b0756136ce9bffea22681e71a51375aaf6
tree53fcc3ae46ba6293e514ca7ca17e21a6d5a649d1
parentd04cdd3ea1118f8d34776c6b0b9ac13a840b60f4
net: dsa: bcm_sf2: Set correct CHAIN_ID and slice number mask

When configuring an IPv6 address mask, we should use SLICE_NUM_MASK as
the mask in order to make sure all bits are masked by the hardware.
Also, we want matching entries to have a CHAIN_ID value set to the same
value as the rule index we return to user-space for convenience, so fix
that too.

Fixes: 9d66d4cb11ee ("net: dsa: bcm_sf2: Add support for IPv6 CFP rules")
Fixes: b8b6bd4d99d2 ("net: dsa: bcm_sf2: Allow matching arbitrary IPv6 masks/lengths")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2_cfp.c