On Thu, 9 Sep 2021 10:45:31 +0800 Qiming Chen <chenqiming_hua...@163.com> wrote:
> In the receiving direction, if alloc mbuf or jumbo process failed, there > is no err_pkts count, which makes it difficult to locate the problem. > Because alloc mbuf failed, the rx_nombuf field is counted. > > Signed-off-by: Qiming Chen <chenqiming_hua...@163.com> > --- > v2: > Clear coding style issues. > v3: > 1) Send direction does not release mbuf. > 2) Failed to alloc mbuf is counted to the rx_nombuf field. Looks good, the field "err_pkts" is a confusing name for me. On Tx it means packets dropped because pcap_sendpacket() returned error. Looking inside libpcap that means send() failed. On Linux this is a send on a PF_PACKET socket and it appears to be a blocking socket(). So these errors are not transient conditions. On Rx it means packets dropped because out of mbufs. Perhaps a comment or renaming the field would helped.