net/mlx5e: Introduce tc offload support
authorAmir Vadai <amir@vadai.me>
Tue, 8 Mar 2016 10:42:36 +0000 (12:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Mar 2016 21:24:02 +0000 (16:24 -0500)
commite8f887ac6a45ecb7f881f278a3fed1fbf002ef0b
tree9697ce4e5e8af43e6c988fafb1977e31205b1b72
parentb6172aac71e9fba0981e013839ced5fcd97746fb
net/mlx5e: Introduce tc offload support

Extend ndo_setup_tc() to support ingress tc offloading. Will be used by
later patches to offload tc flower filter.

Feature is off by default and could be enabled by issuing:
 # ethtool  -K eth0 hw-tc-offload on

Offloads flow table is dynamically created when first filter is
added.
Rules are saved in a hash table that is maintained by the consumer (for
example - the flower offload in the next patch).
When last filter is removed and no filters exist in the hash table, the
offload flow table is destroyed.

Signed-off-by: Amir Vadai <amir@vadai.me>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h [new file with mode: 0644]