Re: [PATCH net-next v7 1/5] net: move ARFS rmap management to core

From
Jakub Kicinski <kuba@kernel.org>
Date
2025-02-07 02:29:43
Also in
intel-wired-lan
Reply to
Ahmed Zaki, 2025-02-04
On Tue,  4 Feb 2025 15:06:18 -0700 Ahmed Zaki wrote:
quoted hunk ↗ jump to hunk
+void netif_napi_set_irq_locked(struct napi_struct *napi, int irq)
+{
+	int rc;
+
+	/* Remove existing rmap entries */
+	if (napi->dev->rx_cpu_rmap_auto &&
+	    napi->irq != irq && napi->irq > 0)
this condition gets a bit hairy by the end of the series.
could you add a napi state bit that indicates that a notifier is
installed? Then here:

	if (napi->irq == irq)
		return;

	if (test_and_clear_bit(NAPI_STATE_HAS_NOTIFIER, &napi->state))
		irq_set_affinity_notifier(napi->irq, NULL);
	if (irq < 0)
		return;

And you can similarly simplify napi_disable_locked().

Speaking of which, why do the auto-removal in napi_disable()
rather than netif_napi_del() ? We don't reinstall on napi_enable()
and doing a disable() + enable() is fairly common during driver
reconfig.
quoted hunk ↗ jump to hunk
+		irq_set_affinity_notifier(napi->irq, NULL);
+
+	napi->irq = irq;
+	if (irq > 0) {
+		rc = napi_irq_cpu_rmap_add(napi, irq);
+		if (rc)
+			netdev_warn(napi->dev, "Unable to update ARFS map (%d)\n",
nit: not sure I'd grasp this message as a user, maybe:

	"Unable to install aRFS CPU to Rx queue mapping"

? Not great either, I guess.
Thread (15 messages) 15 messages, 3 authors, last reply 2025-02-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help