diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/device.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 244ba902ab72..6e1b0f973a03 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -798,6 +798,17 @@ enum mlx4_net_trans_rule_id { | |||
| 798 | 798 | ||
| 799 | extern const u16 __sw_id_hw[]; | 799 | extern const u16 __sw_id_hw[]; |
| 800 | 800 | ||
| 801 | static inline int map_hw_to_sw_id(u16 header_id) | ||
| 802 | { | ||
| 803 | |||
| 804 | int i; | ||
| 805 | for (i = 0; i < MLX4_NET_TRANS_RULE_NUM; i++) { | ||
| 806 | if (header_id == __sw_id_hw[i]) | ||
| 807 | return i; | ||
| 808 | } | ||
| 809 | return -EINVAL; | ||
| 810 | } | ||
| 811 | |||
| 801 | enum mlx4_net_trans_promisc_mode { | 812 | enum mlx4_net_trans_promisc_mode { |
| 802 | MLX4_FS_PROMISC_NONE = 0, | 813 | MLX4_FS_PROMISC_NONE = 0, |
| 803 | MLX4_FS_PROMISC_UPLINK, | 814 | MLX4_FS_PROMISC_UPLINK, |
