RE: [PATCH v2] net/af_packet: provide packet drop stats

2025-01-21 Thread Stefan Lässer
> -Original Message- > From: Stephen Hemminger > Sent: Tuesday, January 21, 2025 4:48 PM > To: Stefan Lässer > Cc: dev@dpdk.org > Subject: Re: [PATCH v2] net/af_packet: provide packet drop stats > > On Tue, 21 Jan 2025 13:26:16 +0100

Re: [PATCH v2] net/af_packet: provide packet drop stats

2025-01-21 Thread Stephen Hemminger
On Tue, 21 Jan 2025 13:26:16 +0100 Stefan Laesser wrote: > + /* query dropped packets counter from socket */ > + if (internal->rx_queue[i].sockfd != -1 && > + getsockopt(internal->rx_queue[i].sockfd, SOL_PACKET, > +

[PATCH v2] net/af_packet: provide packet drop stats

2025-01-21 Thread Stefan Laesser
The Linux kernel provides the ability to query the packet drop counter of a socket. This information can be provided when the user requests stats. It is important to note that each call to getsockopt with PACKET_STATISTICS resets the internal counters. So the caller needs to keep track of the tota