Thread (42 messages) 42 messages, 8 authors, 2020-09-09

Re: [PATCH v2 net-next 5/9] net: mvneta: add multi buffer support to XDP_TX

From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: 2020-09-06 08:43:52
Also in: bpf

Lorenzo Bianconi [off-list ref] writes:
[...]
quoted
-	buf->xdpf = xdpf;
-	tx_desc->command = MVNETA_TXD_FLZ_DESC;
-	tx_desc->buf_phys_addr = dma_addr;
-	tx_desc->data_size = xdpf->len;
+	/*last descriptor */
+	if (tx_desc)
+		tx_desc->command |= MVNETA_TXD_L_DESC | MVNETA_TXD_Z_PAD;
       When is this condition not taken ? You initialize tx_desc        to
NULL, but it seems to me like you always set it inside        the for loop
to the output of mvneta_txq_next_desc_get()        which doesn't look like
it returns NULL. The for loop runs 1 iteration or `sinfo->nr_frage + 1`
iterations (which also equals or larger than 1).
ack, right. I will fix it in v3.

Regards,
Lorenzo
quoted
-	mvneta_txq_inc_put(txq);
-	txq->pending++;
-	txq->count++;
+	txq->pending += num_frames;
+	txq->count += num_frames;
 	return MVNETA_XDP_TX;
 }

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help