[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGHK07COaxjj4WJvDKFLj=ev9j-jRxuw5bXh_zCZtL75Twu7rQ@mail.gmail.com>
Date: Wed, 18 Dec 2024 09:13:00 +1100
From: Jonathan Maxwell <jmaxwell37@...il.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [Intel-wired-lan] [net-next] ice: expose non_eop_descs to ethtool
On Wed, Dec 18, 2024 at 1:49 AM Alexander Lobakin
<aleksander.lobakin@...el.com> wrote:
>
> From: Jon Maxwell <jmaxwell37@...il.com>
> Date: Tue, 17 Dec 2024 10:48:50 +1100
>
> > The ixgbe driver exposes non_eop_descs to ethtool. Do the same for ice.
>
> Only due to that?
> Why would we need it in the first place?
>
Not just that. We had a critical ice bug we were diagnosing and saw this
counter in the Vmcore. When we set up a reproducer we needed to check that
counter was incrementing. I added this patch to do that and thought that
it may aid trouble-shooting in the future as well so I sent it upstream.
Regards
Jon
> >
> > With this patch:
> >
> > ethtool -S ens2f0np0 | grep non_eop_descs
> > non_eop_descs: 956719320
> >
> > Signed-off-by: Jon Maxwell <jmaxwell37@...il.com>
> > ---
> > drivers/net/ethernet/intel/ice/ice.h | 1 +
> > drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 +
> > drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
> > 3 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> > index 2f5d6f974185..8ff94400864e 100644
> > --- a/drivers/net/ethernet/intel/ice/ice.h
> > +++ b/drivers/net/ethernet/intel/ice/ice.h
> > @@ -345,6 +345,7 @@ struct ice_vsi {
> > u32 rx_buf_failed;
> > u32 rx_page_failed;
> > u16 num_q_vectors;
> > + u64 non_eop_descs;
> > /* tell if only dynamic irq allocation is allowed */
> > bool irq_dyn_alloc;
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> > index 3072634bf049..e85b664fa647 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> > @@ -65,6 +65,7 @@ static const struct ice_stats ice_gstrings_vsi_stats[] = {
> > ICE_VSI_STAT("tx_linearize", tx_linearize),
> > ICE_VSI_STAT("tx_busy", tx_busy),
> > ICE_VSI_STAT("tx_restart", tx_restart),
> > + ICE_VSI_STAT("non_eop_descs", non_eop_descs),
> > };
> >
> > enum ice_ethtool_test_id {
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index 0ab35607e5d5..948c38c0770b 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -6896,6 +6896,7 @@ static void ice_update_vsi_ring_stats(struct ice_vsi *vsi)
> > vsi->tx_linearize = 0;
> > vsi->rx_buf_failed = 0;
> > vsi->rx_page_failed = 0;
> > + vsi->non_eop_descs = 0;
> >
> > rcu_read_lock();
> >
> > @@ -6916,6 +6917,7 @@ static void ice_update_vsi_ring_stats(struct ice_vsi *vsi)
> > vsi_stats->rx_bytes += bytes;
> > vsi->rx_buf_failed += ring_stats->rx_stats.alloc_buf_failed;
> > vsi->rx_page_failed += ring_stats->rx_stats.alloc_page_failed;
> > + vsi->non_eop_descs += ring_stats->rx_stats.non_eop_descs;
> > }
> >
> > /* update XDP Tx rings counters */
>
> Thanks,
> Olek
Powered by blists - more mailing lists