]> git.ipfire.org Git - thirdparty/linux.git/commit - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
net/mlx5: Enlarge the NIC TC offload table size
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 12 Jan 2017 14:19:29 +0000 (16:19 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 5 Nov 2017 04:27:01 +0000 (21:27 -0700)
commit21b9c1449d21f347e57ba5e69eec460066e5182a
treece380637b085137f9e32ebcee322ee8b1bf402ae
parent5da8bc3effb61f0f165ca45c80f4818a234c9f91
net/mlx5: Enlarge the NIC TC offload table size

The NIC TC offload table size was hard coded to 1k. Change it to be

      min(max NIC RX table size,
  min(max flow counters, 64k) * 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 groups (== different masks).
This setup allows each group to be of size up to the where we want to go
(when supported, all offloaded flows use counters). Thus, we don't expect
multiple occurences for a group which in turn would add steering hops.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c