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

Re: [PATCH 3/3] Report IP network prefix in XenStore


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Tue, 28 Jul 2026 16:37:04 +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: Tue, 28 Jul 2026 14:37:11 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 28/07/2026 16:31, Owen Smith wrote:
> 
>> @@ -735,7 +761,7 @@ FrontendDumpIPv6Address(
>>       _In_ PXENVIF_ADDRESS            Entry
>>       )
>>   {
>> -    CHAR                            Node[sizeof ("ipv6/XXXXXXXXXX")];
>> +    CHAR                            Node[sizeof ("ipv6/XXXXXXXXXX/prefix")];
>>       ULONG                           Index;
>>       ULONG                           Count;
>>       ULONG                           ZeroIndex;
>> @@ -823,6 +849,26 @@ FrontendDumpIPv6Address(
>>       if (!NT_SUCCESS(status))
>>           return status;
>>
>> +    if (Entry->Prefix > 128)
>> +        return STATUS_SUCCESS;
>> +
>> +    status = RtlStringCbPrintfA(Node,
>> +                                sizeof (Node),
>> +                                "ipv6/%u/prefix",
>> +                                AddressIndex);
>> +    if (!NT_SUCCESS(status))
>> +        return status;
>> +
>> +    status = XENBUS_STORE(Printf,
>> +                          &Frontend->StoreInterface,
>> +                          Transaction,
>> +                          __FrontendGetPrefix(Frontend),
>> +                          Node,
>> +                          "%hhu",
>> +                          Entry->Prefix);
>> +    if (!NT_SUCCESS(status))
>> +        return status;
>> +
>>       return STATUS_SUCCESS;
>>   }
> 
> Is it intentional to potentially leave a 'prefix' value if Prefix <= 128?
> Should "ipv6/%u/prefix" value be removed if Entry->Prefix <= 128

StoreRemove is called on the entire ipv4/ipv6 key before writing to 
xenstore: 
https://github.com/xcp-ng/win-xenvif/blob/1982ec64f82bc157e6bf15dd19f9106ef01a59bd/src/xenvif/frontend.c#L800

So removing the prefix value shouldn't be needed in this case.

> 
> Owen



--
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®.