aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/qp.h
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.com>2014-10-02 05:19:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-03 18:42:32 -0400
commit5903325a64834211daf63a62db3b35ee580cb8bf (patch)
tree74a608cedc17732bbc607d157ddfd3c01e9757f5 /include/linux/mlx5/qp.h
parentb775516b042f9e35f856bd2914afefd9d23021d7 (diff)
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 'include/linux/mlx5/qp.h')
-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 {
342}; 342};
343 343
344struct mlx5_core_qp { 344struct mlx5_core_qp {
345 struct mlx5_core_rsc_common common; /* must be first */
345 void (*event) (struct mlx5_core_qp *, int); 346 void (*event) (struct mlx5_core_qp *, int);
346 int qpn; 347 int qpn;
347 atomic_t refcount;
348 struct completion free;
349 struct mlx5_rsc_debug *dbg; 348 struct mlx5_rsc_debug *dbg;
350 int pid; 349 int pid;
351}; 350};