|
@@ -1002,6 +1002,11 @@ static inline int mlx4_is_slave(struct mlx4_dev *dev)
|
|
|
return dev->flags & MLX4_FLAG_SLAVE;
|
|
|
}
|
|
|
|
|
|
+static inline int mlx4_is_eth(struct mlx4_dev *dev, int port)
|
|
|
+{
|
|
|
+ return dev->caps.port_type[port] == MLX4_PORT_TYPE_IB ? 0 : 1;
|
|
|
+}
|
|
|
+
|
|
|
int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
|
|
|
struct mlx4_buf *buf, gfp_t gfp);
|
|
|
void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
|