> > On Fri, 10 May 2024 10:03:57 +0000 > Ciara Loftus <ciara.lof...@intel.com> wrote: > > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > > index fee0d5d5f3..968bbf6d45 100644 > > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > > @@ -124,6 +124,7 @@ struct rx_stats { > > uint64_t rx_pkts; > > uint64_t rx_bytes; > > uint64_t rx_dropped; > > + uint64_t alloc_failed; > > }; > > You don't have to use local statistic for this, there already is one in the > dev > struct > i.e dev->data->rx_mbuf_alloc_failed. The problem is you need the DPDK port > number to find > what dev is.
We now have the port number from the first patch in this series so that's no longer an issue. > > And the code in ethdev for stats get will put it in the right place. > > > PS: what is the point of rxq->stats.rx_dropped? It is never incremented. Looks pointless indeed. Will add another patch to the series and remove it. > > PPS: Looks like AF_XDP considers kernel full as an error (ie tx_dropped gets > counted as error). > This is not what real hardware does.