nfp: flower: pass flow rule pointer directly to match functions
authorJohn Hurley <john.hurley@netronome.com>
Tue, 17 Dec 2019 21:57:16 +0000 (21:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Dec 2019 01:37:12 +0000 (17:37 -0800)
commit31c491e56ad1ad769e09f6971d267834bfc9bc39
treee5d45be9e2cf1443751745712685b37626c9579a
parenta886ca6fcfffd337482352f383c1002c72786b17
nfp: flower: pass flow rule pointer directly to match functions

In kernel 5.1, the flow offload API was introduced along with a helper
function to extract the flow_rule from the TC offload struct. Each of the
match helper functions are passed the offload struct and extract the flow
rule to a local variable.

Simplify the code while also removing the extra compat and local variable
calls by extracting the rule once in the main match handler, and passing
a reference to the rule direct to each helper.

This patch does not change driver functionality.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/match.c