aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHadar Hen Zion <hadarh@mellanox.com>2013-04-24 09:58:48 -0400
committerRoland Dreier <roland@purestorage.com>2013-04-24 20:51:30 -0400
commitc2c19dc3c9a1585e58804041e5a328cde425403a (patch)
tree9d869a0721ea8bae67f604aab06038eb5363e0e9 /include/linux
parentbcf372971d471f6cb4070adb7bfc987d8b3d21f2 (diff)
mlx4_core: Expose a few helpers to fill DMFS HW strucutures
Re-arrange some of code which fills DMFS HW structures so we can use it from within the core driver and from the IB driver too, e.g when verbs DMFS structures are transformed into mlx4 hardware structs. Also, add struct mlx4_flow_handle struct which will be of use by the DMFS verbs flow in the IB driver. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mlx4/device.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 08e5bc1387e1..ad4a53fbdddf 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -901,7 +901,7 @@ enum mlx4_net_trans_promisc_mode {
901 MLX4_FS_MC_DEFAULT, 901 MLX4_FS_MC_DEFAULT,
902 MLX4_FS_UC_SNIFFER, 902 MLX4_FS_UC_SNIFFER,
903 MLX4_FS_MC_SNIFFER, 903 MLX4_FS_MC_SNIFFER,
904 904 MLX4_FS_MODE_NUM, /* should be last */
905}; 905};
906 906
907struct mlx4_spec_eth { 907struct mlx4_spec_eth {
@@ -1044,6 +1044,11 @@ struct _rule_hw {
1044 }; 1044 };
1045}; 1045};
1046 1046
1047/* translating DMFS verbs sniffer rule to the FW API would need two reg IDs */
1048struct mlx4_flow_handle {
1049 u64 reg_id[2];
1050};
1051
1047int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, 1052int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn,
1048 enum mlx4_net_trans_promisc_mode mode); 1053 enum mlx4_net_trans_promisc_mode mode);
1049int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, 1054int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port,
@@ -1093,6 +1098,11 @@ void mlx4_counter_free(struct mlx4_dev *dev, u32 idx);
1093int mlx4_flow_attach(struct mlx4_dev *dev, 1098int mlx4_flow_attach(struct mlx4_dev *dev,
1094 struct mlx4_net_trans_rule *rule, u64 *reg_id); 1099 struct mlx4_net_trans_rule *rule, u64 *reg_id);
1095int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); 1100int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id);
1101int mlx4_map_sw_to_hw_steering_mode(struct mlx4_dev *dev,
1102 enum mlx4_net_trans_promisc_mode flow_type);
1103int mlx4_map_sw_to_hw_steering_id(struct mlx4_dev *dev,
1104 enum mlx4_net_trans_rule_id id);
1105int mlx4_hw_rule_sz(struct mlx4_dev *dev, enum mlx4_net_trans_rule_id id);
1096 1106
1097void mlx4_sync_pkey_table(struct mlx4_dev *dev, int slave, int port, 1107void mlx4_sync_pkey_table(struct mlx4_dev *dev, int slave, int port,
1098 int i, int val); 1108 int i, int val);