]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Enlarge the FDB size for the switchdev mode
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 20 Dec 2016 10:38:05 +0000 (12:38 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 24 Jan 2017 19:14:03 +0000 (21:14 +0200)
commit635179c0de9afe3ca8cc5eadd4dc9dc229b7dd33
tree10dcda1d2370d97910f21447b4f5857c8685ae8d
parentead57688fb7634316842b3b8d2e151d4a1a12d0c
net/mlx5: E-Switch, Enlarge the FDB size for the switchdev mode

The E-Switch FDB size was hard coded to 8k. Change it to be

  min(max eswitch table size, max flow counters * num flow groups)

where the max values are read from the firmware and the number of
flow groups is hard-coded as before this change.

We don't know upfront the division of flows to group. This setup allows
each group to be of size up to the where we want to support (we mandate
pairing of flows with counters for offloading). Thus, we don't expect
multiple occurences for a group which in turn adds steering hops.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Tested-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c