nfp: flower: rework tunnel neighbour configuration
authorLouis Peens <louis.peens@corigine.com>
Thu, 5 May 2022 05:43:45 +0000 (14:43 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 May 2022 10:21:34 +0000 (11:21 +0100)
commitf1df7956c11f93b2a90ceae78cdc4bfc00f5e38d
tree0d33534b182283cfcc43b5eab67400647596b7e7
parent9ee7c42183d1eaa7d559a7c20cbbf7803a25523e
nfp: flower: rework tunnel neighbour configuration

This patch updates the way in which the tunnel neighbour entries
are handled. Previously they were mostly send-and-forget, with
just the destination IP's cached in a list. This update changes
to a scheme where the neighbour entry information is stored in
a hash table.

The reason for this is that the neighbour table will now also
be used on the decapsulation path, whereas previously it was
only used for encapsulation. We need to save more of the neighbour
information in order to link them with flower flows in follow
up patches.

Updating of the neighbour table is now also handled by the same
function, instead of separate  *_write_neigh_vX functions.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@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/tunnel_conf.c