From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Michal Kubecek <mkubecek@suse.cz>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Rui Sousa <rui.sousa@nxp.com>,
Ferenc Fejes <ferenc.fejes@ericsson.com>
Subject: Re: [RFC PATCH net-next 0/7] 802.1Q Frame Preemption and 802.3 MAC Merge support via ethtool
Date: Sat, 1 Oct 2022 15:53:38 +0000 [thread overview]
Message-ID: <20221001155337.ycodmomj7wz4s5rx@skbuf> (raw)
In-Reply-To: <20220817114642.4de48b52@kernel.org>
On Wed, Aug 17, 2022 at 11:46:42AM -0700, Jakub Kicinski wrote:
> > > When we have separate set of stats for pMAC the normal stats are sum of
> > > all traffic, right? So normal - pMAC == eMAC, everything that's not
> > > preemptible is express?
> >
> > Actually not quite, or at least not for the LS1028A ENETC and Felix switch.
> > The normal counters report just what the eMAC sees, and the pMAC counters
> > just what the pMAC sees. After all, only the eMAC was enabled up until now.
> > Nobody does the addition currently.
>
> I see. And the netdev stats are the total?
dev->stats reports the aggregate of express and preemptable packets seen
by software, yes. I got the hint though, I should also report the
aggregate. The summation seems like a generic problem which ethtool
should be able to do internally, yet a generic implementation is riddled
with problems that must be dealt with (RMON histograms reported by eMAC
and pMAC can be different; some counters could be implemented by the
eMAC but not the pMAC or vice versa, and that needs to be handled, etc).
Additionally, the summation of counters must also be done for ndo_get_stats64(),
when those come from hardware as well. So I'd incline to do it in the
driver rn.
> > > Did you consider adding an attribute for switching between MAC and pMAC
> > > for stats rather than duplicating things?
> >
> > No. Could you expand on that idea a little? Add a netlink attribute
> > where, and this helps reduce duplication where, and how?
>
> Add a attribute to ETHTOOL_MSG_STATS_GET, let's call it
> ETHTOOL_A_STATS_EXPRESS, a flag.
I'll add this to the UAPI and to internal data structures, ok?
enum ethtool_stats_src {
ETHTOOL_STATS_SRC_AGGREGATE = 0,
ETHTOOL_STATS_SRC_EMAC,
ETHTOOL_STATS_SRC_PMAC,
};
> Plumb thru to all the stats callback an extra argument
> (a structure for future extensibility) with a bool pMAC;
>
> Add a capability field to ethtool_ops to announce that
> driver will pay attention to the bool pMAC / has support.
You mean capability field as in ethtool_ops::supported_coalesce_params,
right? (we discussed about this separately).
This won't fit the enetc driver very well. Some enetc ports on the NXP
LS1028A support the MM layer (port 0, port 2) and some don't (port 1,
port 3). Yet they share the same PF driver. So populating mm_supported =
true in the const struct enetc_pf_ethtool_ops isn't going to cover both.
I can, however, key on my ethtool_ops :: get_mm_state() function which
lets the driver report a "bool supported". Is this ok?
> We can then use the existing callbacks.
>
> Am I making sense?
Yes, thanks.
next prev parent reply other threads:[~2022-10-01 15:53 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 22:29 [RFC PATCH net-next 0/7] 802.1Q Frame Preemption and 802.3 MAC Merge support via ethtool Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 1/7] net: ethtool: netlink: introduce ethnl_update_bool() Vladimir Oltean
2022-08-17 11:27 ` Michal Kubecek
2022-08-17 11:52 ` Vladimir Oltean
2022-08-17 12:00 ` Vladimir Oltean
2022-08-17 12:05 ` Michal Kubecek
2022-08-16 22:29 ` [RFC PATCH net-next 2/7] net: ethtool: add support for Frame Preemption and MAC Merge layer Vladimir Oltean
2022-08-17 3:22 ` Jakub Kicinski
2022-08-17 11:41 ` Vladimir Oltean
2022-08-17 18:35 ` Jakub Kicinski
2022-08-17 23:15 ` Vinicius Costa Gomes
2022-08-19 16:12 ` Vladimir Oltean
2022-08-24 0:35 ` Vinicius Costa Gomes
2022-09-07 20:57 ` Vladimir Oltean
2022-09-10 0:19 ` Vinicius Costa Gomes
2022-09-10 16:36 ` Vladimir Oltean
2022-09-14 2:59 ` Vinicius Costa Gomes
2022-09-15 14:14 ` Vladimir Oltean
2022-11-10 10:33 ` 回复: " Xiaoliang Yang
2022-11-14 15:42 ` Vladimir Oltean
2022-11-15 3:01 ` 回复: " Xiaoliang Yang
2022-11-16 12:36 ` Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 3/7] net: ethtool: stats: make stats_put_stats() take input from multiple sources Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 4/7] net: ethtool: stats: replicate standardized counters for the pMAC Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 5/7] net: enetc: parameterize port MAC stats to also cover " Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 6/7] net: enetc: expose some standardized ethtool counters Vladimir Oltean
2022-08-16 22:29 ` [RFC PATCH net-next 7/7] net: enetc: add support for Frame Preemption and MAC Merge layer Vladimir Oltean
2022-08-17 3:34 ` [RFC PATCH net-next 0/7] 802.1Q Frame Preemption and 802.3 MAC Merge support via ethtool Jakub Kicinski
2022-08-17 11:50 ` Vladimir Oltean
2022-08-17 18:46 ` Jakub Kicinski
2022-10-01 15:53 ` Vladimir Oltean [this message]
2022-10-03 14:36 ` Jakub Kicinski
2022-10-03 14:51 ` Vladimir Oltean
2022-08-17 22:47 ` Vinicius Costa Gomes
2022-08-19 8:16 ` Kurt Kanzenbach
2022-08-19 16:59 ` Vladimir Oltean
2022-08-23 10:50 ` Kurt Kanzenbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221001155337.ycodmomj7wz4s5rx@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ferenc.fejes@ericsson.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rui.sousa@nxp.com \
--cc=vinicius.gomes@intel.com \
--cc=xiaoliang.yang_1@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox