Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171487396
D6229.id16199.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6229.id16199.diff
View Options
Index: sys/dev/vnic/nicvf_main.c
===================================================================
--- sys/dev/vnic/nicvf_main.c
+++ sys/dev/vnic/nicvf_main.c
@@ -1296,6 +1296,7 @@
static int
nicvf_allocate_net_interrupts(struct nicvf *nic)
{
+ u_int cpuid;
int irq, rid;
int qidx;
int ret = 0;
@@ -1332,6 +1333,20 @@
(irq - NICVF_INTR_ID_CQ), device_get_unit(nic->dev));
goto error;
}
+ cpuid = (device_get_unit(nic->dev) * CMP_QUEUE_CNT) + qidx;
+ cpuid %= mp_ncpus;
+ /*
+ * Save CPU ID for later use when system-wide RSS is enabled.
+ * It will be used to pit the CQ task to the same CPU that got
+ * interrupted.
+ */
+ nic->qs->cq[qidx].cmp_cpuid = cpuid;
+ if (bootverbose) {
+ device_printf(nic->dev, "bind CQ%d IRQ to CPU%d\n",
+ qidx, cpuid);
+ }
+ /* Bind interrupts to the given CPU */
+ bus_bind_intr(nic->dev, nic->msix_entries[irq].irq_res, cpuid);
}
/* Register RBDR interrupt */
Index: sys/dev/vnic/nicvf_queues.h
===================================================================
--- sys/dev/vnic/nicvf_queues.h
+++ sys/dev/vnic/nicvf_queues.h
@@ -296,6 +296,7 @@
struct task cmp_task;
struct taskqueue *cmp_taskq;
+ u_int cmp_cpuid; /* CPU to which bind the CQ task */
void *desc;
struct q_desc_mem dmem;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 12, 10:14 AM (14 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38784582
Default Alt Text
D6229.id16199.diff (1 KB)
Attached To
Mode
D6229: Bind CQ interrupts and tasks to separate CPUs in VNIC
Attached
Detach File
Event Timeline
Log In to Comment