diff options
author | 2021-01-25 15:23:01 +0200 | |
---|---|---|
committer | 2021-02-05 20:53:39 -0800 | |
commit | 8914add2c9e5518f6a864936658bba5752510b39 (patch) | |
tree | 254c79e2d20935d98a72903008e7a116f6bb3644 /net/ipv4/fib_trie.c | |
parent | net/mlx5e: Rename some encap-specific API to generic names (diff) | |
download | linux-8914add2c9e5518f6a864936658bba5752510b39.tar.gz linux-8914add2c9e5518f6a864936658bba5752510b39.tar.bz2 linux-8914add2c9e5518f6a864936658bba5752510b39.zip |
net/mlx5e: Handle FIB events to update tunnel endpoint device
Process FIB route update events to dynamically update the stack device
rules when tunnel routing changes. Use rtnl lock to prevent FIB event
handler from running concurrently with neigh update and neigh stats
workqueue tasks. Use encap_tbl_lock mutex to synchronize with TC rule
update path that doesn't use rtnl lock.
FIB event workflow for encap flows:
- Unoffload all flows attached to route encaps from slow or fast path
depending on encap destination endpoint neigh state.
- Update encap IP header according to new route dev.
- Update flows mod_hdr action that is responsible for overwriting reg_c0
source port bits to source port of new underlying VF of new route dev. This
step requires changing flow create/delete code to save flow parse attribute
mod_hdr_acts structure for whole flow lifetime instead of deallocating it
after flow creation. Refactor mod_hdr code to allow saving id of individual
mod_hdr actions and updating them with dedicated helper.
- Offload all flows to either slow or fast path depending on encap
destination endpoint neigh state.
FIB event workflow for decap flows:
- Unoffload all route flows from hardware. When last route flow is deleted
all indirect table rules for the route dev will also be deleted.
- Update flow attr decap_vport and destination MAC according to underlying
VF of new rote dev.
- Offload all route flows back to hardware creating new indirect table
rules according to updated flow attribute data.
Extract some neigh update code to helper functions to be used by both neigh
update and route update infrastructure.
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'net/ipv4/fib_trie.c')
0 files changed, 0 insertions, 0 deletions