Skip to content

Commit

Permalink
netkvm: report correct TX queue size via WMI
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Benditovich <[email protected]>
  • Loading branch information
ybendito authored and YanVugenfirer committed Jan 22, 2024
1 parent f25ede1 commit c21e0ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NetKVM/Common/ParaNdis-TX.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ class CParaNdisTX : public CParaNdisTemplatePath<CTXVirtQueue>, public CNdisAllo
ULONG GetFreeTXDescriptors()
{ return m_VirtQueue.GetFreeTXDescriptors(); }

ULONG GetActualQueueSize() const
{ return m_VirtQueue.GetActualQueueSize(); }

//TODO: Needs review/temporary?
ULONG GetFreeHWBuffers()
{ return m_VirtQueue.GetFreeHWBuffers(); }
Expand Down
5 changes: 5 additions & 0 deletions NetKVM/Common/ParaNdis-VirtQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ class CTXVirtQueue : public CVirtQueue
ULONG GetFreeHWBuffers()
{ return m_FreeHWBuffers; }

ULONG GetActualQueueSize() const
{
return m_TotalDescriptors;
}

//TODO: Needs review
void Shutdown();

Expand Down
2 changes: 1 addition & 1 deletion NetKVM/wlh/ParaNdis6_Oid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static NDIS_STATUS ParaNdis_OidQuery(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
ulSize = sizeof(u.WmiConfig);
u.WmiConfig.NumOfQueues = pContext->nPathBundles;
u.WmiConfig.RxQueueSize = pContext->NetMaxReceiveBuffers;
u.WmiConfig.TxQueueSize = pContext->maxFreeTxDescriptors;
u.WmiConfig.TxQueueSize = pContext->pPathBundles[0].txPath.GetActualQueueSize();
u.WmiConfig.RscEnabledv4 = pContext->ReportedOffloadConfiguration.Rsc.IPv4.Enabled;
u.WmiConfig.RscEnabledv6 = pContext->ReportedOffloadConfiguration.Rsc.IPv6.Enabled;
u.WmiConfig.Standby = !!virtio_is_feature_enabled(pContext->u64GuestFeatures, VIRTIO_NET_F_STANDBY);
Expand Down

0 comments on commit c21e0ac

Please sign in to comment.