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)
commit264d7bf3c1cfd3a128d621b367f57b81d038ba10
tree10dcda1d2370d97910f21447b4f5857c8685ae8d
parentce99f6b97fcdcb4e7f6f7e2fe5e5fe6c65585cab
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