OSDN Git Service

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)
commit16416d37f0e7b274b425ad5636a10a5c85ad4ab5
tree6e15af7f380d5df06f60ef02a3b9dc5ae919e2ed
parent802a76affb09263ab6bca9a6ff4765b3a0c40137
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