[dpdk-dev] [PATCH v3] net/pcap: improve rx statistics
Ferruh Yigit
ferruh.yigit at intel.com
Thu Sep 9 12:20:18 CEST 2021
On 9/9/2021 4:29 AM, Stephen Hemminger wrote:
> On Thu, 9 Sep 2021 10:45:31 +0800
> Qiming Chen <chenqiming_huawei at 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_huawei at 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.
>
In later versions of the pathc, out of mbufs updates the 'rx_nombuf' value, and
pcap Rx API error updates the 'err_pkts'.
> Perhaps a comment or renaming the field would helped.
>
More information about the dev
mailing list