summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2026-09-23 13:38:25 +0300
committerJakub Kicinski <kuba@kernel.org>2026-09-28 17:17:13 -0700
commit9d608a40c2d400ef7529e13c165278053ea0d51c (patch)
tree5231729d76539e2a98e78b62c970d8a9f4e5b54a /include/linux
parent675956237b3818c3a9deeabf7be678cf31699e72 (diff)
net/mlx5e: TC, track peer flows in a vhca_id xarray
The per-peer reverse index lived in a fixed esw->offloads.peer_flows[] array of list heads indexed by the peer's LAG sequence number, capping a shared FDB at MLX5_MAX_PORTS members. Replace the array with an xarray keyed by the peer vhca_id. Each entry is a heap-allocated list head that chains the flows duplicated to that peer via their peer node. This lifts the MLX5_MAX_PORTS cap: the number of peers is bounded only by the number of distinct vhca_ids. The lifetime of the duplicated peer flows list_head follows the devcom pairing of the two eswitches: - pair (mlx5_esw_offloads_pair): kzalloc_obj + INIT_LIST_HEAD + xa_store the dup_peer_flows under the peer's vhca_id. - add (mlx5e_tc_add_fdb_peer_flow): xa_load the dup_peer_flows and list_add the duplicated flow's peer node. - del (mlx5e_tc_del_fdb_peer_flow): list_del that node. - flush (mlx5e_tc_clean_fdb_peer_flows): xa_for_each dup_peer_flows, drop every duplicated flow on it; called from unpair. - unpair (mlx5_esw_offloads_unpair): xa_erase + kfree the dup_peer_flows. So a dup_peer_flows is created when the local eswitch pairs with a peer over devcom and freed when they unpair. No functional change. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Akiva Goldberger <agoldberger@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260923103830.1183-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions