OSDN Git Service

net/mlx5e: Use macro for TC header re-write offload field mapping
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 13 Jun 2017 08:30:01 +0000 (11:30 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 22 Jun 2017 11:30:13 +0000 (14:30 +0300)
commita8e4f0c4ced7cd41c61ebe5b8fef37f8a5fda8b5
tree65110486ae4125ca3fec698060150e0bac3e3d4e
parenta8ade55ffd1c1acef053a2d05f30e91a1c114f58
net/mlx5e: Use macro for TC header re-write offload field mapping

Use a macro for the static mapping between the enumeration of field
supported by the firmware for header re-write to the corresponding
network header field. This improves the readability of the code and
doesn't change any functionality.

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