From: Vladimir Oltean <olteanv@gmail.com>
To: Furong Xu <0x1207@gmail.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>,
Serge Semin <fancer.lancer@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Joao Pinto <jpinto@synopsys.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, rmk+kernel@armlinux.org.uk,
linux@armlinux.org.uk, xfr@outlook.com,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next v8 3/7] net: stmmac: refactor FPE verification process
Date: Thu, 5 Sep 2024 17:58:01 +0300 [thread overview]
Message-ID: <20240905145801.hyhjalu3bjfh5gs5@skbuf> (raw)
In-Reply-To: <0b72fd0463b662796fd3eaa996211f1a5d0a4341.1725518135.git.0x1207@gmail.com>
On Thu, Sep 05, 2024 at 03:02:24PM +0800, Furong Xu wrote:
> struct stmmac_fpe_cfg {
> - bool enable; /* FPE enable */
> - bool hs_enable; /* FPE handshake enable */
> - enum stmmac_fpe_state lp_fpe_state; /* Link Partner FPE state */
> - enum stmmac_fpe_state lo_fpe_state; /* Local station FPE state */
> + /* Serialize access to MAC Merge state between ethtool requests
> + * and link state updates.
> + */
> + spinlock_t lock;
> +
> u32 fpe_csr; /* MAC_FPE_CTRL_STS reg cache */
> + struct timer_list verify_timer;
> + struct ethtool_mm_state state;
I don't know what to say about keeping a full-blown struct
ethtool_mm_state copy in struct stmmac_fpe_cfg.
You don't populate two of its members: tx_active and tx_min_frag_size,
and thus they would be invalid if anyone tried to access them. And two
more of its member variables are populated with driver-constant values:
max_verify_time and rx_min_frag_size.
This leaves only verify_time, verify_status, pmac_enabled, tx_enabled,
verify_enabled. Maybe it would be better to just open-code these
variables directly in struct stmmac_fpe_cfg.
next prev parent reply other threads:[~2024-09-05 14:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 7:02 [PATCH net-next v8 0/7] net: stmmac: FPE via ethtool + tc Furong Xu
2024-09-05 7:02 ` [PATCH net-next v8 1/7] net: stmmac: move stmmac_fpe_cfg to stmmac_priv data Furong Xu
2024-09-05 7:02 ` [PATCH net-next v8 2/7] net: stmmac: drop stmmac_fpe_handshake Furong Xu
2024-09-05 7:02 ` [PATCH net-next v8 3/7] net: stmmac: refactor FPE verification process Furong Xu
2024-09-05 13:54 ` Vladimir Oltean
2024-09-05 14:58 ` Vladimir Oltean [this message]
2024-09-05 7:02 ` [PATCH net-next v8 4/7] net: stmmac: configure FPE via ethtool-mm Furong Xu
2024-09-05 7:02 ` [PATCH net-next v8 5/7] net: stmmac: support fp parameter of tc-mqprio Furong Xu
2024-09-05 14:02 ` Vladimir Oltean
2024-09-05 7:02 ` [PATCH net-next v8 6/7] net: stmmac: support fp parameter of tc-taprio Furong Xu
2024-09-05 14:52 ` Vladimir Oltean
2024-09-05 7:02 ` [PATCH net-next v8 7/7] net: stmmac: silence FPE kernel logs Furong Xu
2024-09-05 14:53 ` Vladimir Oltean
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=20240905145801.hyhjalu3bjfh5gs5@skbuf \
--to=olteanv@gmail.com \
--cc=0x1207@gmail.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=joabreu@synopsys.com \
--cc=jpinto@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vladimir.oltean@nxp.com \
--cc=xfr@outlook.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