- Timestamp:
- Aug 14, 2008 6:26:29 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34788
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r11284 r11436 4386 4386 PCNetState *pThis = INETWORKPORT_2_DATA(pInterface); 4387 4387 int rc; 4388 static bool firstBigFrameLoss = true; 4388 4389 4389 4390 STAM_PROFILE_ADV_START(&pThis->StatReceive, a); … … 4391 4392 AssertReleaseRC(rc); 4392 4393 4393 if (cb > 70) /* unqualified guess */ 4394 pThis->Led.Asserted.s.fReading = pThis->Led.Actual.s.fReading = 1; 4395 pcnetReceiveNoSync(pThis, (const uint8_t *)pvBuf, cb); 4396 pThis->Led.Actual.s.fReading = 0; 4394 /* 4395 * Determine max ethernet frame size with vlan tag (TPID == 0x8100) or without it 4396 * (excluding CRC which is not transferred). 4397 * It consists of 14-byte header [+ 4-byte vlan tag] + 1500-byte body. 4398 */ 4399 register maxFrameSize = ((uint16_t*)pvBuf)[6] == 0x81 ? 1518 : 1514; 4400 if (RT_UNLIKELY(cb > maxFrameSize)) 4401 { 4402 if (RT_UNLIKELY(firstBigFrameLoss)) 4403 { 4404 firstBigFrameLoss = false; 4405 Log(("#%d Received frame exceeds max size (%u > %u). " 4406 "Further frame losses will be reported at level5\n", 4407 PCNET_INST_NR, (unsigned)cb, (unsigned)maxFrameSize)); 4408 } 4409 else 4410 Log5(("#%d Received frame exceeds max size (%u > %u)\n", 4411 PCNET_INST_NR, (unsigned)cb, (unsigned)maxFrameSize)); 4412 } 4413 else 4414 { 4415 if (cb > 70) /* unqualified guess */ 4416 pThis->Led.Asserted.s.fReading = pThis->Led.Actual.s.fReading = 1; 4417 pcnetReceiveNoSync(pThis, (const uint8_t *)pvBuf, cb); 4418 pThis->Led.Actual.s.fReading = 0; 4419 } 4397 4420 4398 4421 PDMCritSectLeave(&pThis->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.