]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: make the match compilation functions reusable
authorYinjun Zhang <yinjun.zhang@corigine.com>
Thu, 22 Jul 2021 07:58:00 +0000 (09:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 09:22:22 +0000 (02:22 -0700)
commitb797e7213ff97f6c015d70560e6e951456ab6608
tree6e15af7f380d5df06f60ef02a3b9dc5ae919e2ed
parent1bf7227440610c069b9faa0dc728ef01e72cdad5
nfp: flower: make the match compilation functions reusable

Expose and refactor the match compilation functions so that they
can be invoked externally. Also update the functions so they can
be called multiple times with the results OR'd together. This is
applicable for the flows-merging scenario, in which there could be
overlapped and non-conflicting match fields. This will be used
in upcoming conntrack patches. This is safe to do in the in the
single call case as well since both unmasked_data and mask_data
gets initialised to 0.

Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/match.c