]> 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)
commit22b383e357ec7992c929a982e3fd5cfb2c6da6eb
tree641452bd016e943256f59589600c701445f50afa
parent201fa5ed42de31ca919423f3a230010604f02e7c
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