Thread (8 messages) 8 messages, 3 authors, 2019-09-27

Re: [dpdk-dev] [PATCH 2/3] net/af_xdp: support pinning of IRQs

From: Loftus, Ciara <hidden>
Date: 2019-09-27 13:23:30

[snip]
quoted
+
+static void
+configure_irqs(struct pmd_internals *internals, uint16_t rx_queue_id)
+{
+	int coreid = internals->queue_irqs[rx_queue_id];
+	char driver[NAME_MAX];
+	uint16_t netdev_qid = rx_queue_id + internals->start_queue_idx;
+	regex_t r;
+	int interrupt;
+
+	if (coreid < 0)
+		return;
+
+	if (coreid > (get_nprocs() - 1)) {
+		AF_XDP_LOG(ERR, "Affinitisation failed - invalid coreid %i\n",
+					coreid);
+		return;
+	}
I think we can combine above 2 sanity checks together.
Hi Xiaolong,

Thanks for your review. I agree with all of your feedback except this one.

configure_irqs() is called for every queue. The queues with no affinity have a coreid initialized to -1. So coreid < 0 is a valid value and we should return with no error. However for the case where coreid > nprocs, this is an actual error and we should report that with a log.
What do you think?

Thanks,
Ciara

[snip]
quoted
@@ -697,6 +996,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
		goto err;
	}

+	configure_irqs(internals, rx_queue_id);
+
	rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
	rxq->fds[0].events = POLLIN;
@@ -834,6 +1135,39 @@ parse_name_arg(const char *key __rte_unused,
	return 0;
}
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help