|WARNING| pw126720 [PATCH] net/mana: implement RX CQE coalescing

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sat May 6 03:50:27 CEST 2023


Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/126720

_apply patch failure_

Submitter: Long Li <longli at linuxonhyperv.com>
Date: Saturday, May 06 2023 01:33:11 
Applied on: CommitID:d03446724972d2a1bb645ce7f3e64f5ef0203d61
Apply patch set 126720 failed:

Checking patch drivers/net/mana/mana.h...
error: while searching for:
	struct mana_gdma_queue gdma_cq;
	struct gdma_comp *gdma_comp_buf;

	struct mana_stats stats;
	struct mana_mr_btree mr_btree;


error: patch failed: drivers/net/mana/mana.h:429
Checking patch drivers/net/mana/rx.c...
Hunk #1 succeeded at 362 (offset 1 line).
error: while searching for:
	struct mana_priv *priv = rxq->priv;
	struct rte_mbuf *mbuf;
	int ret;
	uint32_t num_pkts;

	num_pkts = gdma_poll_completion_queue(&rxq->gdma_cq, rxq->gdma_comp_buf, pkts_n);
	for (uint32_t i = 0; i < num_pkts; i++) {
		struct mana_rx_comp_oob *oob = (struct mana_rx_comp_oob *)
			rxq->gdma_comp_buf[i].cqe_data;
		struct mana_rxq_desc *desc =
			&rxq->desc_ring[rxq->desc_ring_tail];

		rxq->gdma_rq.tail += desc->wqe_size_in_bu;
		mbuf = desc->pkt;

		switch (oob->cqe_hdr.cqe_type) {

error: patch failed: drivers/net/mana/rx.c:385
error: while searching for:
			goto drop;

		case CQE_RX_COALESCED_4:
			DP_LOG(ERR, "RX coalescing is not supported");
			continue;

		default:
			DP_LOG(ERR, "Unknown RX CQE type %d",

error: patch failed: drivers/net/mana/rx.c:409
error: while searching for:
			continue;
		}

		DP_LOG(DEBUG, "mana_rx_comp_oob CQE_RX_OKAY rxq %p", rxq);

		mbuf->data_off = RTE_PKTMBUF_HEADROOM;
		mbuf->nb_segs = 1;
		mbuf->next = NULL;
		mbuf->pkt_len = oob->packet_info[0].packet_length;
		mbuf->data_len = oob->packet_info[0].packet_length;
		mbuf->port = priv->port_id;

		if (oob->rx_ip_header_checksum_succeeded)

error: patch failed: drivers/net/mana/rx.c:418
error: while searching for:
		if (oob->rx_hash_type == MANA_HASH_L3 ||
		    oob->rx_hash_type == MANA_HASH_L4) {
			mbuf->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
			mbuf->hash.rss = oob->packet_info[0].packet_hash;
		}

		pkts[pkt_received++] = mbuf;
		rxq->stats.packets++;
		rxq->stats.bytes += mbuf->data_len;

drop:
		rxq->desc_ring_tail++;
		if (rxq->desc_ring_tail >= rxq->num_desc)
			rxq->desc_ring_tail = 0;

		/* Post another request */
		ret = mana_alloc_and_post_rx_wqe(rxq);
		if (ret) {
			DP_LOG(ERR, "failed to post rx wqe ret=%d", ret);

error: patch failed: drivers/net/mana/rx.c:447
Hunk #6 succeeded at 479 (offset -23 lines).
Applying patch drivers/net/mana/mana.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/mana/rx.c with 4 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Hunk #6 applied cleanly.
hint: Use 'git am --show-current-patch' to see the failed patch
diff a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h	(rejected hunks)
@@ -429,6 +429,10 @@ struct mana_rxq {
 	struct mana_gdma_queue gdma_cq;
 	struct gdma_comp *gdma_comp_buf;
 
+	uint32_t comp_buf_len;
+	uint32_t comp_buf_idx;
+	uint32_t backlog_idx;
+
 	struct mana_stats stats;
 	struct mana_mr_btree mr_btree;
 
diff a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c	(rejected hunks)
@@ -385,16 +389,29 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	struct mana_priv *priv = rxq->priv;
 	struct rte_mbuf *mbuf;
 	int ret;
-	uint32_t num_pkts;
+	uint32_t pkt_idx = rxq->backlog_idx;
+	uint32_t pkt_len;
+	uint32_t i;
+	int polled = 0;
+
+repoll:
+	/* Polling on new completions if we have no backlog */
+	if (rxq->comp_buf_idx == rxq->comp_buf_len) {
+		RTE_ASSERT(!pkt_idx);
+		rxq->comp_buf_len =
+			gdma_poll_completion_queue(&rxq->gdma_cq,
+						   rxq->gdma_comp_buf, pkts_n);
+		rxq->comp_buf_idx = 0;
+		polled = 1;
+	}
 
-	num_pkts = gdma_poll_completion_queue(&rxq->gdma_cq, rxq->gdma_comp_buf, pkts_n);
-	for (uint32_t i = 0; i < num_pkts; i++) {
+	i = rxq->comp_buf_idx;
+	while (i < rxq->comp_buf_len) {
 		struct mana_rx_comp_oob *oob = (struct mana_rx_comp_oob *)
 			rxq->gdma_comp_buf[i].cqe_data;
 		struct mana_rxq_desc *desc =
 			&rxq->desc_ring[rxq->desc_ring_tail];
 
-		rxq->gdma_rq.tail += desc->wqe_size_in_bu;
 		mbuf = desc->pkt;
 
 		switch (oob->cqe_hdr.cqe_type) {
@@ -409,8 +426,8 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			goto drop;
 
 		case CQE_RX_COALESCED_4:
-			DP_LOG(ERR, "RX coalescing is not supported");
-			continue;
+			/* Proceed to process mbuf */
+			break;
 
 		default:
 			DP_LOG(ERR, "Unknown RX CQE type %d",
@@ -418,13 +435,22 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			continue;
 		}
 
-		DP_LOG(DEBUG, "mana_rx_comp_oob CQE_RX_OKAY rxq %p", rxq);
+		DP_LOG(DEBUG, "mana_rx_comp_oob type %d rxq %p",
+		       oob->cqe_hdr.cqe_type, rxq);
+
+		pkt_len = oob->packet_info[pkt_idx].packet_length;
+		if (!pkt_len) {
+			/* Move on to the next completion */
+			pkt_idx = 0;
+			i++;
+			continue;
+		}
 
 		mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 		mbuf->nb_segs = 1;
 		mbuf->next = NULL;
-		mbuf->pkt_len = oob->packet_info[0].packet_length;
-		mbuf->data_len = oob->packet_info[0].packet_length;
+		mbuf->data_len = pkt_len;
+		mbuf->pkt_len = pkt_len;
 		mbuf->port = priv->port_id;
 
 		if (oob->rx_ip_header_checksum_succeeded)
@@ -447,19 +473,28 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		if (oob->rx_hash_type == MANA_HASH_L3 ||
 		    oob->rx_hash_type == MANA_HASH_L4) {
 			mbuf->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
-			mbuf->hash.rss = oob->packet_info[0].packet_hash;
+			mbuf->hash.rss = oob->packet_info[pkt_idx].packet_hash;
 		}
 
 		pkts[pkt_received++] = mbuf;
 		rxq->stats.packets++;
 		rxq->stats.bytes += mbuf->data_len;
 
+		pkt_idx++;
+		/* Move on the next completion if all packets are processed */
+		if (pkt_idx >= RX_COM_OOB_NUM_PACKETINFO_SEGMENTS) {
+			pkt_idx = 0;
+			i++;
+		}
+
 drop:
 		rxq->desc_ring_tail++;
 		if (rxq->desc_ring_tail >= rxq->num_desc)
 			rxq->desc_ring_tail = 0;
 
-		/* Post another request */
+		rxq->gdma_rq.tail += desc->wqe_size_in_bu;
+
+		/* Consume this request and post another request */
 		ret = mana_alloc_and_post_rx_wqe(rxq);
 		if (ret) {
 			DP_LOG(ERR, "failed to post rx wqe ret=%d", ret);

https://lab.dpdk.org/results/dashboard/patchsets/26174/

UNH-IOL DPDK Community Lab


More information about the test-report mailing list