]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Fix IP fragment location and behavior
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 20 Dec 2019 19:24:21 +0000 (11:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Dec 2019 00:08:49 +0000 (16:08 -0800)
commit915f43537e40f7d8e90c513457c1c72a2f89ef22
treee75001e29581e7d2e59b9af719c27ffa3b8546e3
parentf691418f2cdea932e12daa5e72fa1196ebc2a88f
net: dsa: bcm_sf2: Fix IP fragment location and behavior

The IP fragment is specified through user-defined field as the first
bit of the first user-defined word. We were previously trying to extract
it from the user-defined mask which could not possibly work. The ip_frag
is also supposed to be a boolean, if we do not cast it as such, we risk
overwriting the next fields in CFP_DATA(6) which would render the rule
inoperative.

Fixes: 8d74278c0f50 ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc")
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