]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: generate merge flow rule
authorJohn Hurley <john.hurley@netronome.com>
Mon, 15 Apr 2019 14:56:01 +0000 (16:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2019 22:45:36 +0000 (15:45 -0700)
commit739b04dbb1f8e6649d3773c20192e6bba7cae02e
tree83f8d0087ddd468113f2068e69dcb24f1a489586
parent22b383e357ec7992c929a982e3fd5cfb2c6da6eb
nfp: flower: generate merge flow rule

When combining 2 sub_flows to a single 'merge flow' (assuming the merge is
valid), the merge flow should contain the same match fields as sub_flow 1
with actions derived from a combination of sub_flows 1 and 2. This action
list should have all actions from sub_flow 1 with the exception of the
output action that triggered the 'implicit recirculation' by sending to
an internal port, followed by all actions of sub_flow 2. Any pre-actions
in either sub_flow should feature at the start of the action list.

Add code to generate a new merge flow and populate the match and actions
fields based on the sub_flows. The offloading of the flow is left to
future patches.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/offload.c