[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <F5F360A04D1E1CAA+20251018144230.GA4362@nic-Precision-5820-Tower>
Date: Sat, 18 Oct 2025 22:42:30 +0800
From: Yibo Dong <dong100@...se.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
horms@...nel.org, corbet@....net, andrew+netdev@...n.ch,
danishanwar@...com, vadim.fedorenko@...ux.dev,
netdev@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v14 3/5] net: rnpgbe: Add basic mbx ops support
Hi, Jakub:
On Fri, Oct 17, 2025 at 05:07:03PM -0700, Jakub Kicinski wrote:
> On Tue, 14 Oct 2025 15:27:09 +0800 Dong Yibo wrote:
> > +struct mucse_mbx_stats {
> > + u32 msgs_tx; /* Number of messages sent from PF to fw */
> > + u32 msgs_rx; /* Number of messages received from fw to PF */
> > + u32 acks; /* Number of ACKs received from firmware */
> > + u32 reqs; /* Number of requests sent to firmware */
> > +};
>
> Probably no point adding these stats until you can expose them to the
> user..
>
Ok, I will remove this for this patch.
By the way, I think there is a similar situation in patch5 (about
tx_dropped), just bellow:
+ * rnpgbe_xmit_frame - Send a skb to driver
+ * @skb: skb structure to be sent
+ * @netdev: network interface device structure
+ *
+ * Return: NETDEV_TX_OK
+ **/
+static netdev_tx_t rnpgbe_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
+{
+ struct mucse *mucse = netdev_priv(netdev);
+
+ dev_kfree_skb_any(skb);
+ mucse->stats.tx_dropped++;
+
+ return NETDEV_TX_OK;
+}
tx_dropped stats is sugguested by MD Danish Anwar <danishanwar@...com> here:
https://lore.kernel.org/netdev/94eeae65-0e4b-45ef-a9c0-6bc8d37ae789@ti.com/
----
> +static netdev_tx_t rnpgbe_xmit_frame(struct sk_buff *skb,
> + struct net_device *netdev)
> +{
> + dev_kfree_skb_any(skb);
> + return NETDEV_TX_OK;
> +}
Extra indentation on these two lines. Also, the function just drops all
packets without any actual transmission. This should at least increment
the drop counter statistics.
----
And update to my own stats here:
https://lore.kernel.org/netdev/20250923181639.6755cca4@kernel.org/
And I am not sure how to deal with it since 'mucse->stats.tx_dropped' is
not exposed to the user just like mbx_stats.
Please give me some sugguestion, thanks.
Powered by blists - more mailing lists