]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit329bd4a66ffd6d97f6650a7ce0e58343acc6ca17
treee5d45be9e2cf1443751745712685b37626c9579a
parente66d16dbfde55f62a2eb53bd8c37ac44c07c0400
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