欢迎来到 DPDK交流社区 ,有什么问题可以尽管在这里提问,您将会收到社区其他成员的回答;也可以将您的总结写在这里,为社区其他成员提供帮助。 (QQ交流群:127163755)

rte_eth_stats_get 获取到的 rx_nombuf 和 ierrors各有什么含义

+2 投票
使用dpdk获取设备状态,获得的结构体中有连个成员变量不知道是什么含义。

ierrors 头文件中注释说“Total number of erroneous received packets” 其中的erroneous指的是什么错误?是packet不符合规范吗?在接收端有没有办法屏蔽这些erroneous?

rx_nombuf 注释中描述“Total number of RX mbuf allocation failoures” 这个成员变量的单位是字节吗?有没有办法能获得因为“mbuf allocation failoures”而被丢弃的packets数?
最新提问 12月 8, 2015 分类:DPDK API问答 | 用户: zhang945 (140 分)

1个回答

+1 投票
这个东西最好在datasheet里面去找找看,每个都有详细的介绍的
最新回答 12月 9, 2015 用户: oops (2,170 分)
我搜索了
intel-dpdk-sample-applications-user-guide.pdf
intel-dpdk-Programmer's-Guide.pdf
intel-dpdk-getting-started-guide.pdf
intel-dpdk-api-reference.pdf
上述四本手册除了第四本有一句和代码注释中一样的描述之外,剩余三本均没有提及相关内容。请问是否还有其他的参考手册?有的话能否提供一个下载地址。
82599-10-gbe-controller-datasheet这个里面有rte_eth_stats_get 获取到的所有值的解释http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/82599-10-gbe-controller-datasheet.pdf
感谢回复,通过分析dpdk源码,rte_eth_stats_get 通过调用 ixgbe_read_stats_regeisters 来获取网卡状态, 通过对照82599-10-gbe-controller-datasheet 和dpdk源码 ierrors是下面几项数据的和
CRC Error Count
    Counts the number of receive packets with CRC errors. In order for a packet to be
    counted in this register, it must be 64 bytes or greater (from <Destination Address>
    through <CRC>, inclusively) in length. This register counts all packets received,
    regardless of L2 filtering and receive enablement.
 
Receive Length Error Count
    Number of packets with receive length errors.
    A length error occurs if an incoming packet length field in the MAC header doesn't match
    the packet length. To enable the receive length error count, the HLREG.RXLNGTHERREN
    bit needs to be set to 1b. This registers counts all packets received, regardless of L2
    filtering and receive enablement.
 
Receive Undersize Count
    Receive Undersize Error.
    This register counts the number of received frames that are shorter than minimum size
    (64 bytes from <Destination Address> through <CRC>, inclusively), and had a valid
    CRC. This register counts packets regardless of L2 filtering and receive enablement.
 
Receive Oversize Count
    Receive Oversize Error. This register counts the number of received frames that are
    longer than maximum size as defined by MAXFRS.MFS (from <Destination Address>
    through <CRC>, inclusively) and have valid CRC. This register counts packets regardless
    of L2 filtering and receive enablement.
 
total_missed_rx
    Rx Missed Packets Count — RXMPC[n] (0x03FA0 + 4*n,n=0...7; RC)
 
Illegal Byte Error Count
    Illegal Byte Error Count.
    Counts the number of receive packets with illegal bytes errors (such as there is an illegal
    symbol in the packet). This registers counts all packets received, regardless of L2 filtering
    and receive enablement.
 
Error Byte Count
    Error Byte Count.
    Counts the number of receive packets with error bytes (such as there is an error symbol
    in the packet). This registers counts all packets received, regardless of L2 filtering and
    receive enablement.
 
XSUM Error Count
    Number of receive IPv4, TCP, UDP or SCTP XSUM errors.
 
MAC Local Fault Count
    Number of faults in the local MAC.
    This register is valid only when the link speed is 10 Gb/s.
 
MAC Remote Fault Count
    Number of faults in the remote MAC.
    This register is valid only when the link speed is 10 Gb/s.
 
Receive Fragment Count
    Number of receive fragment errors (frame shorted than 64 bytes from <Destination
    Address> through <CRC>, inclusively) that have bad CRC (this is slightly different from
    the Receive Undersize Count register).
    This register counts packets regardless of L2 filtering and receive enablement.
 
Receive Jabber Count
    Number of receive jabber errors.
    This register counts the number of received packets that are greater than maximum size
    and have bad CRC (this is slightly different from the Receive Oversize Count register).
    The packets length is counted from <Destination Address> through <CRC>, inclusively.
    This register counts packets regardless of L2 filtering and receive enablement.
 
FC CRC Error Count
    FC CRC Count.
    Count the number of packets with good Ethernet CRC and bad FC CRC.
 
FC Last Error Count
    Number of packets received to valid FCoE contexts while their user buffers are
    exhausted.

关于rx_nombuf datasheet里并没有提及,从源码来看似乎每次从mempool里分配内存失败,概数值自增32.具体含义有待进一步分析源码。
rte_mempool_get_bulk这个地方是从hugepage里面申请内存,如果内存不够RTE_IXGBE_RXQ_REARM_THRESH(32)的话就失败,因为收包的时候每次bulk32个
...