]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: validate merge hint flows
authorJohn Hurley <john.hurley@netronome.com>
Mon, 15 Apr 2019 14:56:00 +0000 (16:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2019 22:45:36 +0000 (15:45 -0700)
commit85d45d11d15c73a6986b4fe2143d1abe81e93fe3
tree641452bd016e943256f59589600c701445f50afa
parent57f362af24bac3facd55f5ac094a51dc42d9a841
nfp: flower: validate merge hint flows

Two flows can be merged if the second flow (after recirculation) matches
on bits that are either matched on or explicitly set by the first flow.
This means that if a packet hits flow 1 and recirculates then it is
guaranteed to hit flow 2.

Add a 'can_merge' function that determines if 2 sub_flows in a merge hint
can be validly merged to a single flow.

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/offload.c