Home | History | Annotate | Download | only in MnpDxe

Lines Matching refs:Nbuf

68   NET_BUF     *Nbuf;

75 Nbuf = NetbufAlloc (MnpDeviceData->BufferLength + MnpDeviceData->PaddingSize);
76 if (Nbuf == NULL) {
87 NetbufAllocSpace (Nbuf, MnpDeviceData->PaddingSize, NET_BUF_TAIL);
88 NetbufTrim (Nbuf, MnpDeviceData->PaddingSize, NET_BUF_HEAD);
91 NetbufQueAppend (&MnpDeviceData->FreeNbufQue, Nbuf);
117 NET_BUF *Nbuf;
136 Nbuf = NULL;
155 Nbuf = NetbufQueRemove (FreeNbufQue);
160 if (Nbuf != NULL) {
161 NET_GET_REF (Nbuf);
167 return Nbuf;
172 Try to reclaim the Nbuf into the buffer pool.
175 @param[in, out] Nbuf Pointer to the NET_BUF to free.
181 IN OUT NET_BUF *Nbuf
187 ASSERT (Nbuf->RefCnt > 1);
191 NET_PUT_REF (Nbuf);
193 if (Nbuf->RefCnt == 1) {
195 // Trim all buffer contained in the Nbuf, then append it to the NbufQue.
197 NetbufTrim (Nbuf, Nbuf->TotalSize, NET_BUF_TAIL);
199 if (NetbufAllocSpace (Nbuf, NET_VLAN_TAG_LEN, NET_BUF_HEAD) != NULL) {
203 NetbufTrim (Nbuf, NET_VLAN_TAG_LEN, NET_BUF_TAIL);
206 NetbufQueAppend (&MnpDeviceData->FreeNbufQue, Nbuf);