diff mbox

[07/10] query the steer capabilities of mlx4 device

Message ID 4C5C91DE.1080301@mellanox.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Vu Pham Aug. 6, 2010, 10:51 p.m. UTC
None
diff mbox

Patch

Add API to query the steer capabilities of mlx4 device
    
Signed-off-by: Oren Duer <oren@mellanox.co.il>
Signed-off-by: Vu Pham <vu@mellanx.com>

diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 4408b96..1777965 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -396,6 +394,14 @@  struct mlx4_init_port_param {
 	u64			si_guid;
 };
 
+static inline void mlx4_query_steer_cap(struct mlx4_dev *dev, int *log_mac,
+					int *log_vlan, int *log_prio)
+{
+	*log_mac = dev->caps.log_num_macs;
+	*log_vlan = dev->caps.log_num_vlans;
+	*log_prio = dev->caps.log_num_prios;
+}
+
 #define mlx4_foreach_port(port, dev, type)				\
 	for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++)	\
 		if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \