@@ -65,7 +65,7 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
65
65
cq -> buf_size = cq -> size * mdev -> dev -> caps .cqe_size ;
66
66
67
67
cq -> ring = ring ;
68
- cq -> is_tx = mode ;
68
+ cq -> type = mode ;
69
69
cq -> vector = mdev -> dev -> caps .num_comp_vectors ;
70
70
71
71
/* Allocate HW buffers on provided NUMA node.
@@ -104,7 +104,7 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
104
104
* cq -> mcq .arm_db = 0 ;
105
105
memset (cq -> buf , 0 , cq -> buf_size );
106
106
107
- if (cq -> is_tx == RX ) {
107
+ if (cq -> type == RX ) {
108
108
if (!mlx4_is_eq_vector_valid (mdev -> dev , priv -> port ,
109
109
cq -> vector )) {
110
110
cq -> vector = cpumask_first (priv -> rx_ring [cq -> ring ]-> affinity_mask );
@@ -141,11 +141,11 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
141
141
cq -> vector = rx_cq -> vector ;
142
142
}
143
143
144
- if (! cq -> is_tx )
144
+ if (cq -> type == RX )
145
145
cq -> size = priv -> rx_ring [cq -> ring ]-> actual_size ;
146
146
147
- if ((cq -> is_tx && priv -> hwtstamp_config .tx_type ) ||
148
- (! cq -> is_tx && priv -> hwtstamp_config .rx_filter ))
147
+ if ((cq -> type != RX && priv -> hwtstamp_config .tx_type ) ||
148
+ (cq -> type == RX && priv -> hwtstamp_config .rx_filter ))
149
149
timestamp_en = 1 ;
150
150
151
151
err = mlx4_cq_alloc (mdev -> dev , cq -> size , & cq -> wqres .mtt ,
@@ -154,10 +154,10 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
154
154
if (err )
155
155
goto free_eq ;
156
156
157
- cq -> mcq .comp = cq -> is_tx ? mlx4_en_tx_irq : mlx4_en_rx_irq ;
157
+ cq -> mcq .comp = cq -> type != RX ? mlx4_en_tx_irq : mlx4_en_rx_irq ;
158
158
cq -> mcq .event = mlx4_en_cq_event ;
159
159
160
- if (cq -> is_tx )
160
+ if (cq -> type != RX )
161
161
netif_tx_napi_add (cq -> dev , & cq -> napi , mlx4_en_poll_tx_cq ,
162
162
NAPI_POLL_WEIGHT );
163
163
else
@@ -181,7 +181,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
181
181
182
182
mlx4_free_hwq_res (mdev -> dev , & cq -> wqres , cq -> buf_size );
183
183
if (mlx4_is_eq_vector_valid (mdev -> dev , priv -> port , cq -> vector ) &&
184
- cq -> is_tx == RX )
184
+ cq -> type == RX )
185
185
mlx4_release_eq (priv -> mdev -> dev , cq -> vector );
186
186
cq -> vector = 0 ;
187
187
cq -> buf_size = 0 ;
@@ -193,7 +193,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
193
193
void mlx4_en_deactivate_cq (struct mlx4_en_priv * priv , struct mlx4_en_cq * cq )
194
194
{
195
195
napi_disable (& cq -> napi );
196
- if (! cq -> is_tx ) {
196
+ if (cq -> type == RX ) {
197
197
napi_hash_del (& cq -> napi );
198
198
synchronize_rcu ();
199
199
}
0 commit comments