@@ -65,7 +65,7 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
6565 cq -> buf_size = cq -> size * mdev -> dev -> caps .cqe_size ;
6666
6767 cq -> ring = ring ;
68- cq -> is_tx = mode ;
68+ cq -> type = mode ;
6969 cq -> vector = mdev -> dev -> caps .num_comp_vectors ;
7070
7171 /* 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,
104104 * cq -> mcq .arm_db = 0 ;
105105 memset (cq -> buf , 0 , cq -> buf_size );
106106
107- if (cq -> is_tx == RX ) {
107+ if (cq -> type == RX ) {
108108 if (!mlx4_is_eq_vector_valid (mdev -> dev , priv -> port ,
109109 cq -> vector )) {
110110 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,
141141 cq -> vector = rx_cq -> vector ;
142142 }
143143
144- if (! cq -> is_tx )
144+ if (cq -> type == RX )
145145 cq -> size = priv -> rx_ring [cq -> ring ]-> actual_size ;
146146
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 ))
149149 timestamp_en = 1 ;
150150
151151 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,
154154 if (err )
155155 goto free_eq ;
156156
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 ;
158158 cq -> mcq .event = mlx4_en_cq_event ;
159159
160- if (cq -> is_tx )
160+ if (cq -> type != RX )
161161 netif_tx_napi_add (cq -> dev , & cq -> napi , mlx4_en_poll_tx_cq ,
162162 NAPI_POLL_WEIGHT );
163163 else
@@ -181,7 +181,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
181181
182182 mlx4_free_hwq_res (mdev -> dev , & cq -> wqres , cq -> buf_size );
183183 if (mlx4_is_eq_vector_valid (mdev -> dev , priv -> port , cq -> vector ) &&
184- cq -> is_tx == RX )
184+ cq -> type == RX )
185185 mlx4_release_eq (priv -> mdev -> dev , cq -> vector );
186186 cq -> vector = 0 ;
187187 cq -> buf_size = 0 ;
@@ -193,7 +193,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
193193void mlx4_en_deactivate_cq (struct mlx4_en_priv * priv , struct mlx4_en_cq * cq )
194194{
195195 napi_disable (& cq -> napi );
196- if (! cq -> is_tx ) {
196+ if (cq -> type == RX ) {
197197 napi_hash_del (& cq -> napi );
198198 synchronize_rcu ();
199199 }
0 commit comments