Lines Matching defs:txq_pcpu

299 static void mvpp2_txq_inc_get(struct mvpp2_txq_pcpu *txq_pcpu)
301 txq_pcpu->txq_get_index++;
302 if (txq_pcpu->txq_get_index == txq_pcpu->size)
303 txq_pcpu->txq_get_index = 0;
307 struct mvpp2_txq_pcpu *txq_pcpu,
313 txq_pcpu->buffs + txq_pcpu->txq_put_index;
322 txq_pcpu->txq_put_index++;
323 if (txq_pcpu->txq_put_index == txq_pcpu->size)
324 txq_pcpu->txq_put_index = 0;
2532 struct mvpp2_txq_pcpu *txq_pcpu,
2538 if (txq_pcpu->reserved_num >= num)
2555 req = max(MVPP2_CPU_DESC_CHUNK, num - txq_pcpu->reserved_num);
2562 txq_pcpu->reserved_num += mvpp2_txq_alloc_reserved_desc(port, txq, req);
2565 if (txq_pcpu->reserved_num < num)
2811 struct mvpp2_txq_pcpu *txq_pcpu, int num)
2822 txq_pcpu->buffs + txq_pcpu->txq_get_index;
2824 if (!IS_TSO_HEADER(txq_pcpu, tx_buf->dma) &&
2834 mvpp2_txq_inc_get(txq_pcpu);
2859 struct mvpp2_txq_pcpu *txq_pcpu)
2864 if (txq_pcpu->thread != mvpp2_cpu_to_thread(port->priv, smp_processor_id()))
2870 mvpp2_txq_bufs_free(port, txq, txq_pcpu, tx_done);
2872 txq_pcpu->count -= tx_done;
2875 if (txq_pcpu->count <= txq_pcpu->wake_threshold)
2883 struct mvpp2_txq_pcpu *txq_pcpu;
2891 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
2893 if (txq_pcpu->count) {
2894 mvpp2_txq_done(port, txq, txq_pcpu);
2895 tx_todo += txq_pcpu->count;
3096 struct mvpp2_txq_pcpu *txq_pcpu;
3152 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
3153 txq_pcpu->size = txq->size;
3154 txq_pcpu->buffs = kmalloc_array(txq_pcpu->size,
3155 sizeof(*txq_pcpu->buffs),
3157 if (!txq_pcpu->buffs)
3160 txq_pcpu->count = 0;
3161 txq_pcpu->reserved_num = 0;
3162 txq_pcpu->txq_put_index = 0;
3163 txq_pcpu->txq_get_index = 0;
3164 txq_pcpu->tso_headers = NULL;
3166 txq_pcpu->stop_threshold = txq->size - MVPP2_MAX_SKB_DESCS;
3167 txq_pcpu->wake_threshold = txq_pcpu->stop_threshold / 2;
3169 txq_pcpu->tso_headers =
3171 txq_pcpu->size * TSO_HEADER_SIZE,
3172 &txq_pcpu->tso_headers_dma,
3174 if (!txq_pcpu->tso_headers)
3185 struct mvpp2_txq_pcpu *txq_pcpu;
3189 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
3190 kfree(txq_pcpu->buffs);
3192 if (txq_pcpu->tso_headers)
3194 txq_pcpu->size * TSO_HEADER_SIZE,
3195 txq_pcpu->tso_headers,
3196 txq_pcpu->tso_headers_dma);
3198 txq_pcpu->tso_headers = NULL;
3225 struct mvpp2_txq_pcpu *txq_pcpu;
3259 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
3262 mvpp2_txq_bufs_free(port, txq, txq_pcpu, txq_pcpu->count);
3265 txq_pcpu->count = 0;
3266 txq_pcpu->txq_put_index = 0;
3267 txq_pcpu->txq_get_index = 0;
3643 struct mvpp2_txq_pcpu *txq_pcpu;
3648 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
3652 txq_pcpu->reserved_num -= nxmit;
3653 txq_pcpu->count += nxmit;
3660 if (txq_pcpu->count >= txq_pcpu->stop_threshold)
3664 if (!port->has_tx_irqs && txq_pcpu->count >= txq->done_pkts_coal)
3665 mvpp2_txq_done(port, txq, txq_pcpu);
3676 struct mvpp2_txq_pcpu *txq_pcpu;
3684 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
3689 mvpp2_txq_reserved_desc_num_proc(port, txq, txq_pcpu, 1)) {
3726 mvpp2_txq_inc_put(port, txq_pcpu, xdpf, tx_desc, buf_type);
4085 struct mvpp2_txq_pcpu *txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
4091 if (!IS_TSO_HEADER(txq_pcpu, buf_dma_addr))
4191 struct mvpp2_txq_pcpu *txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
4219 mvpp2_txq_inc_put(port, txq_pcpu, skb, tx_desc, MVPP2_TYPE_SKB);
4223 mvpp2_txq_inc_put(port, txq_pcpu, NULL, tx_desc, MVPP2_TYPE_SKB);
4244 struct mvpp2_txq_pcpu *txq_pcpu,
4255 addr = txq_pcpu->tso_headers_dma +
4256 txq_pcpu->txq_put_index * TSO_HEADER_SIZE;
4262 mvpp2_txq_inc_put(port, txq_pcpu, NULL, tx_desc, MVPP2_TYPE_SKB);
4269 struct mvpp2_txq_pcpu *txq_pcpu,
4292 mvpp2_txq_inc_put(port, txq_pcpu, skb, tx_desc, MVPP2_TYPE_SKB);
4299 mvpp2_txq_inc_put(port, txq_pcpu, NULL, tx_desc, MVPP2_TYPE_SKB);
4306 struct mvpp2_txq_pcpu *txq_pcpu)
4314 mvpp2_txq_reserved_desc_num_proc(port, txq, txq_pcpu,
4323 char *hdr = txq_pcpu->tso_headers +
4324 txq_pcpu->txq_put_index * TSO_HEADER_SIZE;
4330 mvpp2_tso_put_hdr(skb, dev, txq, aggr_txq, txq_pcpu, hdr_sz);
4338 txq_pcpu, sz, left, len == 0))
4359 struct mvpp2_txq_pcpu *txq_pcpu;
4372 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
4379 frags = mvpp2_tx_tso(skb, dev, txq, aggr_txq, txq_pcpu);
4386 mvpp2_txq_reserved_desc_num_proc(port, txq, txq_pcpu, frags)) {
4415 mvpp2_txq_inc_put(port, txq_pcpu, skb, tx_desc, MVPP2_TYPE_SKB);
4420 mvpp2_txq_inc_put(port, txq_pcpu, NULL, tx_desc, MVPP2_TYPE_SKB);
4434 txq_pcpu->reserved_num -= frags;
4435 txq_pcpu->count += frags;
4442 if (txq_pcpu->count >= txq_pcpu->stop_threshold)
4455 if (!port->has_tx_irqs && txq_pcpu->count >= txq->done_pkts_coal)
4456 mvpp2_txq_done(port, txq, txq_pcpu);
4459 if (!port->has_tx_irqs && txq_pcpu->count <= frags &&
4460 txq_pcpu->count > 0) {
5971 struct mvpp2_txq_pcpu *txq_pcpu;
6029 txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
6030 txq_pcpu->thread = thread;