]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit107e37bb4f887a2078b9d484f1508c1e44d64985
tree641452bd016e943256f59589600c701445f50afa
parentdbc2d68edc987cd9941428c0845641c64737c3ee
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