net: mscc: ocelot: properly reject destination IP keys in VCAP IS1
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 4 Mar 2021 10:29:43 +0000 (12:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:15 +0000 (17:06 +0100)
commit719611e806deea598088541bd4509a3735d29c92
treeb216708b018fa630dd83298ba753e51d1d0e1ad1
parent2809a5ca962e96397d9504414a1140a69fe5e138
net: mscc: ocelot: properly reject destination IP keys in VCAP IS1

commit f1becbed411c6fa29d7ce3def3a1dcd4f63f2d74 upstream.

An attempt is made to warn the user about the fact that VCAP IS1 cannot
offload keys matching on destination IP (at least given the current half
key format), but sadly that warning fails miserably in practice, due to
the fact that it operates on an uninitialized "match" variable. We must
first decode the keys from the flow rule.

Fixes: 75944fda1dfe ("net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mscc/ocelot_flower.c