aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/qp.h
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.com>2014-10-02 12:19:45 +0300
committerDavid S. Miller <davem@davemloft.net>2014-10-03 15:42:32 -0700
commit5903325a64834211daf63a62db3b35ee580cb8bf (patch)
tree74a608cedc17732bbc607d157ddfd3c01e9757f5 /include/linux/mlx5/qp.h
parentnet/mlx5_core: use set/get macros in device caps (diff)
downloadlinux-dev-5903325a64834211daf63a62db3b35ee580cb8bf.tar.xz
linux-dev-5903325a64834211daf63a62db3b35ee580cb8bf.zip
net/mlx5_core: Identify resources by their type
This patch puts a common part as the first field of mlx5_core_qp. This field is used to identify which resource generated an event. This is required since upcoming new resource types such as DC targets are allocated for the same numerical space as regular QPs and may generate the same events. By searching the resource in the same table we can then look at the common field to identify the resource. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/linux/mlx5/qp.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index 9709b30e2d69..7c4c0f1f5805 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -342,10 +342,9 @@ struct mlx5_stride_block_ctrl_seg {
};
struct mlx5_core_qp {
+ struct mlx5_core_rsc_common common; /* must be first */
void (*event) (struct mlx5_core_qp *, int);
int qpn;
- atomic_t refcount;
- struct completion free;
struct mlx5_rsc_debug *dbg;
int pid;
};