Changeset 98063 in vbox
- Timestamp:
- Jan 12, 2023 3:01:04 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/user_ChangeLogImpl.xml
r98060 r98063 82 82 83 83 <listitem> 84 <para> </para>84 <para>virtio-net: Follow up fixes for FreeBSD 12.3 and pfSense 2.6.0 (bug #21201)</para> 85 85 </listitem> 86 86 -
trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp
r97824 r98063 1061 1061 PVIRTIONET pThis = PDMDEVINS_2_DATA(pDevIns, PVIRTIONET); 1062 1062 1063 Log10Func(("[%s] uOffset: % d, cb: %d: %.*Rhxs\n", pThis->szInst, uOffset, cb, RT_MAX(cb, 8), pv));1063 Log10Func(("[%s] uOffset: %u, cb: %u: %.*Rhxs\n", pThis->szInst, uOffset, cb, cb, pv)); 1064 1064 RT_NOREF(pThis); 1065 1065 return virtioNetR3DevCfgAccess(PDMDEVINS_2_DATA(pDevIns, PVIRTIONET), uOffset, (void *)pv, cb, true /*fWrite*/); … … 3180 3180 * Dispatch to the handler for the queue this worker is set up to drive 3181 3181 */ 3182 3183 3184 3182 if (pVirtq->fCtlVirtq) 3183 { 3184 Log10Func(("[%s] %s worker woken. Fetching desc chain\n", pThis->szInst, pVirtq->szName)); 3185 3185 #ifdef VIRTIO_VBUF_ON_STACK 3186 3186 VIRTQBUF_T VirtqBuf; … … 3188 3188 int rc = virtioCoreR3VirtqAvailBufGet(pDevIns, &pThis->Virtio, pVirtq->uIdx, pVirtqBuf, true); 3189 3189 #else /* !VIRTIO_VBUF_ON_STACK */ 3190 3191 3190 PVIRTQBUF pVirtqBuf = NULL; 3191 int rc = virtioCoreR3VirtqAvailBufGet(pDevIns, &pThis->Virtio, pVirtq->uIdx, &pVirtqBuf, true); 3192 3192 #endif /* !VIRTIO_VBUF_ON_STACK */ 3193 3194 3193 if (rc == VERR_NOT_AVAILABLE) 3194 { 3195 3195 Log10Func(("[%s] %s worker woken. Nothing found in queue\n", pThis->szInst, pVirtq->szName)); 3196 3196 continue; 3197 3198 3197 } 3198 virtioNetR3Ctrl(pDevIns, pThis, pThisCC, pVirtqBuf); 3199 3199 #ifndef VIRTIO_VBUF_ON_STACK 3200 3200 virtioCoreR3VirtqBufRelease(&pThis->Virtio, pVirtqBuf); 3201 3201 #endif /* !VIRTIO_VBUF_ON_STACK */ 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3202 } 3203 else /* Must be Tx queue */ 3204 { 3205 Log10Func(("[%s] %s worker woken. Virtq has data to transmit\n", pThis->szInst, pVirtq->szName)); 3206 virtioNetR3TransmitPkts(pDevIns, pThis, pThisCC, pVirtq, false /* fOnWorkerThread */); 3207 } 3208 /* Note: Surprise! Rx queues aren't handled by local worker threads. Instead, the PDM network leaf driver 3209 * invokes PDMINETWORKDOWN.pfnWaitReceiveAvail() callback, which waits until woken by virtioNetVirtqNotified() 3210 * indicating that guest IN buffers have been added to Rx virt queue. 3211 */ 3212 3212 } 3213 3213 Log10(("[%s] %s worker thread exiting\n", pThis->szInst, pVirtq->szName)); … … 3254 3254 virtioCoreVirtqEnableNotify(&pThis->Virtio, pVirtq->uIdx, true /* fEnable */); 3255 3255 } 3256 3257 virtioNetWakeupRxBufWaiter(pThisCC->pDevIns); 3256 3258 } 3257 3259 else … … 3376 3378 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThisCC->ILeds); 3377 3379 return NULL; 3380 } 3381 3382 /** 3383 * @interface_method_impl{PDMDEVREGR3,pfnReset} 3384 */ 3385 static DECLCALLBACK(void) virtioNetR3Reset(PPDMDEVINS pDevIns) 3386 { 3387 PVIRTIONET pThis = PDMDEVINS_2_DATA(pDevIns, PVIRTIONET); 3388 PVIRTIONETCC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVIRTIONETCC); 3389 3390 virtioCoreR3ResetDevice(pDevIns, &pThis->Virtio, &pThisCC->Virtio); 3378 3391 } 3379 3392 … … 3702 3715 /* .pfnMemSetup = */ NULL, 3703 3716 /* .pfnPowerOn = */ NULL, 3704 /* .pfnReset = */ NULL,3717 /* .pfnReset = */ virtioNetR3Reset, 3705 3718 /* .pfnSuspend = */ virtioNetWakeupRxBufWaiter, 3706 3719 /* .pfnResume = */ NULL, -
trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp
r97530 r98063 590 590 PVIRTQUEUE pVirtq = &pVirtio->aVirtqueues[uVirtq]; 591 591 pVirtq->uVirtq = uVirtq; 592 pVirtq->uAvailIdxShadow = 0;593 pVirtq->uUsedIdxShadow = 0;594 592 pVirtq->fUsedRingEvent = false; 595 593 pVirtq->fAttached = true; … … 1014 1012 ("Guest driver not in ready state.\n"), VERR_INVALID_STATE); 1015 1013 1016 Log6Func((" Copying device data to %s, [desc:%u →used ring:%u]\n",1014 Log6Func((" Copying device data to %s, [desc:%u -> used ring:%u]\n", 1017 1015 VIRTQNAME(pVirtio, uVirtq), pVirtqBuf->uHeadIdx, pVirtq->uUsedIdxShadow)); 1018 1016 … … 1161 1159 ("Guest driver not in ready state.\n"), VERR_INVALID_STATE); 1162 1160 1163 Log6Func((" Sync %s used ring (%u →idx)\n",1161 Log6Func((" Sync %s used ring (%u -> idx)\n", 1164 1162 pVirtq->szName, pVirtq->uUsedIdxShadow)); 1165 1163 … … 1353 1351 pVirtioCC->pfnStatusChanged(pVirtio, pVirtioCC, 0 /* fDriverOk */); 1354 1352 virtioResetDevice(pDevIns, pVirtio); 1353 } 1354 1355 DECLHIDDEN(void) virtioCoreR3ResetDevice(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, PVIRTIOCORECC pVirtioCC) 1356 { 1357 virtioGuestR3WasReset(pDevIns, pVirtio, pVirtioCC); 1355 1358 } 1356 1359 #endif /* IN_RING3 */ -
trunk/src/VBox/Devices/VirtIO/VirtioCore.h
r96407 r98063 549 549 550 550 /** 551 * Resets the device state upon a VM reset for instance. 552 * 553 * @returns nothing. 554 * @param pVirtio Pointer to the virtio state. 555 * 556 * @note Calls back into the upper device when the status changes. 557 */ 558 DECLHIDDEN(void) virtioCoreR3ResetDevice(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, PVIRTIOCORECC pVirtioCC); 559 560 /** 551 561 * 'Attaches' host device-specific implementation's queue state to host VirtIO core 552 562 * virtqueue management infrastructure, informing the virtio core of the name of the
Note:
See TracChangeset
for help on using the changeset viewer.