Commit 94103e5d authored by 's avatar

Added dropped packets counting into mapi_stats for Napatech cards....

Added dropped packets counting into mapi_stats for Napatech cards. Successfully tested with software 8.1.0 and firmware 36.01; not with older sw/fw.


git-svn-id: file:///home/svn/mapi/trunk@1503 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent a49e3f48
......@@ -208,8 +208,6 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
PacketExtDescriptorType05_t *pExtDescr = (PacketExtDescriptorType05_t*)(((uint8_t*)descriptor) + sizeof(PacketDescriptorType2_t));
frame = ((uint8_t*)descriptor);
mhdr.ts = ((4503599*(descriptor->Timestamp>>32))>>20)|(descriptor->Timestamp<<32) ;
mhdr.ifindex = descriptor->Channel;
......@@ -304,8 +302,7 @@ mapidrv_proc_loop (void *arg)
return;
}
while (1)
{
while (1) {
// DEBUG_CMD(Debug_Message("napatechdrv: mapidrv_proc_loop; i->napatechhandle: %d; i->packetfeedhandle: %d", i->napatechhandle, i->packetfeedhandle));
......@@ -317,20 +314,23 @@ mapidrv_proc_loop (void *arg)
&bufferInformation);
if(result == NTCI_ERRCODE_SUCCESS) {
if(bufferInformation.numDescriptorsAvailable > 0) process_pkts(&bufferInformation, i);
i->hwinfo.pkt_drop += bufferInformation.numDroppedFrames;
if(bufferInformation.numDescriptorsAvailable > 0) process_pkts(&bufferInformation, i);
NTCI_ReleaseBuffer(i->napatechhandle,
i->packetfeedhandle,
STID_BUFFER_INFORMATION_SECTION_TYPE1,
&bufferInformation);
} else if(result != NTCI_STATUSCODE_NO_PACKETS_AVAILABLE) {
}
else if(result != NTCI_STATUSCODE_NO_PACKETS_AVAILABLE) {
DEBUG_CMD(Debug_Message("Failed to get buffers. Error code %d\n", result)); //stderr
break;
}
}
}
}
}
int
mapidrv_read_results (int devid,int fd, int fid, mapid_result_t** result)
......@@ -533,7 +533,7 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
feedConfig.timestampType = TIMESTAMP_PCAP_NANOTIME;
/* do not deliver corrupted packets */
feedConfig.dropErroredPacketsFlag = 0;
//feedConfig.dropErroredPacketsFlag = 1;
/* slicing is disabled */
feedConfig.sliceLength = 0;
......@@ -719,3 +719,4 @@ mapidrv_stats (int devid, char **devtype, struct mapi_stat *stats)
return MAPI_STATS_ERROR;
}
/* vim: set shiftwidth=2 tabstop=2 smarttab expandtab : */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment