[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] receiver: Remove dependencies on HVM_MAX_VCPUS


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Fri, 9 Oct 2026 13:39:31 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Delivery-date: Fri, 09 Oct 2026 11:39:37 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 08/10/2026 12:32, Owen Smith wrote:
>> diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c
>> index 565d31b..91e344b 100644
>> --- a/src/xennet/receiver.c
>> +++ b/src/xennet/receiver.c
>> @@ -33,7 +33,6 @@
>>   #include <ndis.h>
>>   #include <procgrp.h>
>>   #include <tcpip.h>
>> -#include <xen.h>
>>   #include <ethernet.h>
>>
>>   #include "util.h"
>> @@ -53,8 +52,9 @@ struct _XENNET_RECEIVER {
>>       PXENNET_ADAPTER             Adapter;
>>       NDIS_HANDLE                 NetBufferListPool;
>>       PNET_BUFFER_LIST            PutList;
>> -    PNET_BUFFER_LIST            GetList[HVM_MAX_VCPUS];
>> -    XENNET_RECEIVER_QUEUE       Queue[HVM_MAX_VCPUS];
>> +    ULONG                       Count;
>> +    PNET_BUFFER_LIST            *GetList;
>> +    XENNET_RECEIVER_QUEUE       *Queue;
>>       LONG                        Indicated;
>>       LONG                        Returned;
>>       XENVIF_VIF_OFFLOAD_OPTIONS  OffloadOptions;
> 
> It may be useful to group all Queue related fields in the 
> XENNET_RECEIVER_QUEUE
> structure.
> A PutList, GetList, Indicated and Received specific to each queue would help 
> with multi-queue
> scaling, though it would require stashing the queue index in the NBL reserved 
> data.
> 
> Owen

I've done some initial prototyping, and realized that currently GetList 
is a per-CPU quantity, while Queue is a per-queue quantity. Moving 
GetList into a per-queue structure would change the semantics (per-queue 
instead of per-CPU as it currently is) and require synchronization using 
the XENNET_RECEIVER_QUEUE spinlock. I'll need to do some analysis to see 
if this will help or hurt performance.

I'd appreciate your input on this matter as well.


--
Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.