Lines Matching refs:Dev
74 VNET_DEV *Dev; in VirtioNetReceive() local
90 Dev = VIRTIO_NET_FROM_SNP (This); in VirtioNetReceive()
92 switch (Dev->Snm.State) { in VirtioNetReceive()
107 RxCurUsed = *Dev->RxRing.Used.Idx; in VirtioNetReceive()
110 if (Dev->RxLastUsed == RxCurUsed) { in VirtioNetReceive()
115 UsedElemIdx = Dev->RxLastUsed % Dev->RxRing.QueueSize; in VirtioNetReceive()
116 DescIdx = Dev->RxRing.Used.UsedElem[UsedElemIdx].Id; in VirtioNetReceive()
117 RxLen = Dev->RxRing.Used.UsedElem[UsedElemIdx].Len; in VirtioNetReceive()
122 ASSERT (RxLen >= Dev->RxRing.Desc[DescIdx].Len); in VirtioNetReceive()
123 RxLen -= Dev->RxRing.Desc[DescIdx].Len; in VirtioNetReceive()
127 ASSERT (RxLen <= Dev->RxRing.Desc[DescIdx + 1].Len); in VirtioNetReceive()
137 if (RxLen < Dev->Snm.MediaHeaderSize) { in VirtioNetReceive()
143 *HeaderSize = Dev->Snm.MediaHeaderSize; in VirtioNetReceive()
146 RxPtr = (UINT8 *)(UINTN) Dev->RxRing.Desc[DescIdx + 1].Addr; in VirtioNetReceive()
167 ++Dev->RxLastUsed; in VirtioNetReceive()
172 AvailIdx = *Dev->RxRing.Avail.Idx; in VirtioNetReceive()
173 Dev->RxRing.Avail.Ring[AvailIdx++ % Dev->RxRing.QueueSize] = in VirtioNetReceive()
177 *Dev->RxRing.Avail.Idx = AvailIdx; in VirtioNetReceive()
180 NotifyStatus = Dev->VirtIo->SetQueueNotify (Dev->VirtIo, VIRTIO_NET_Q_RX); in VirtioNetReceive()