From: Simon Horman <horms@kernel.org>
To: Konrad Leszczynski <konrad.leszczynski@intel.com>
Cc: davem@davemloft.net, andrew+netdev@lunn.ch, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, cezary.rojewski@intel.com,
sebastian.basierski@intel.com,
Karol Jurczenia <karol.jurczenia@intel.com>
Subject: Re: [PATCH net-next 4/7] net: stmmac: enable ARP Offload on mac_link_up()
Date: Wed, 27 Aug 2025 20:28:16 +0100 [thread overview]
Message-ID: <20250827192816.GR10519@horms.kernel.org> (raw)
In-Reply-To: <20250826113247.3481273-5-konrad.leszczynski@intel.com>
On Tue, Aug 26, 2025 at 01:32:44PM +0200, Konrad Leszczynski wrote:
> From: Karol Jurczenia <karol.jurczenia@intel.com>
>
> Add Address Resolution Protocol (ARP) Offload support in
> stmmac_mac_link_up() to enable ARP Offload beside the selftests.
>
> Introduce STMMAC_FLAG_ARP_OFFLOAD_EN flag, which is used to enable the
> feature with the stmmac_set_arp_offload().
>
> Reviewed-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
> Reviewed-by: Sebastian Basierski <sebastian.basierski@intel.com>
> Signed-off-by: Karol Jurczenia <karol.jurczenia@intel.com>
Konrad,
AFAIK, as you are posting this patches, your SoB line needs to go here.
(And correspondingly, your Reviewed-by line should be removed.)
...
> @@ -1075,6 +1078,20 @@ static void stmmac_mac_link_up(struct phylink_config *config,
>
> if (priv->plat->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY)
> stmmac_hwtstamp_correct_latency(priv, priv);
> +
> + if (priv->plat->flags & STMMAC_FLAG_ARP_OFFLOAD_EN) {
> + in_dev = in_dev_get(priv->dev);
> + if (!in_dev)
> + return;
> +
> + ifa = in_dev->ifa_list;
ifa_list is protected by RCU, so I think the code needs to take that into
account. E.g. by doing the following and making sure that the RCU read lock
is held.
ifa = rcu_dereference(idev->ifa_list);
Flagged by Sparse.
> + if (!ifa)
> + return;
> +
> + stmmac_set_arp_offload(priv, priv->hw, true,
> + ntohl(ifa->ifa_address));
> + in_dev_put(in_dev);
> + }
> }
>
> static void stmmac_mac_disable_tx_lpi(struct phylink_config *config)
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 26ddf95d23f9..aae522f37710 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -185,6 +185,7 @@ struct dwmac4_addrs {
> #define STMMAC_FLAG_EN_TX_LPI_CLOCKGATING BIT(11)
> #define STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP BIT(12)
> #define STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY BIT(13)
> +#define STMMAC_FLAG_ARP_OFFLOAD_EN BIT(14)
I see that the following patch in this series also makes use of this bit.
But I don't see any thing (platform) that sets this bit. Perhaps I'm
missing something. But I think that would be best included in the patchset
that adds this bit.
>
> struct plat_stmmacenet_data {
> int bus_id;
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2025-08-27 19:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 11:32 [PATCH net-next 0/7] net: stmmac: fixes and new features Konrad Leszczynski
2025-08-26 11:32 ` [PATCH net-next 1/7] net: stmmac: replace memcpy with strscpy in ethtool Konrad Leszczynski
2025-08-27 19:13 ` Simon Horman
2025-08-26 11:32 ` [PATCH net-next 2/7] net: stmmac: correct Tx descriptors debugfs prints Konrad Leszczynski
2025-08-26 11:32 ` [PATCH net-next 3/7] net: stmmac: check if interface is running before TC block setup Konrad Leszczynski
2025-08-26 11:32 ` [PATCH net-next 4/7] net: stmmac: enable ARP Offload on mac_link_up() Konrad Leszczynski
2025-08-26 17:05 ` kernel test robot
2025-08-27 19:28 ` Simon Horman [this message]
2025-08-26 11:32 ` [PATCH net-next 5/7] net: stmmac: set TE/RE bits for ARP Offload when interface down Konrad Leszczynski
2025-08-26 11:32 ` [PATCH net-next 6/7] net: stmmac: enhance VLAN protocol detection for GRO Konrad Leszczynski
2025-08-27 19:35 ` Simon Horman
2025-08-26 11:32 ` [PATCH net-next 7/7] net: stmmac: add TC flower filter support for IP EtherType Konrad Leszczynski
2025-08-27 19:37 ` Simon Horman
2025-08-28 9:46 ` Konrad Leszczynski
2025-08-26 17:29 ` [PATCH net-next 0/7] net: stmmac: fixes and new features Vadim Fedorenko
2025-08-28 6:47 ` Konrad Leszczynski
2025-08-28 12:25 ` Andrew Lunn
2025-08-28 12:51 ` Konrad Leszczynski
2025-08-28 13:21 ` Vadim Fedorenko
2025-08-28 14:40 ` Andrew Lunn
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=20250827192816.GR10519@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=cezary.rojewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=karol.jurczenia@intel.com \
--cc=konrad.leszczynski@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sebastian.basierski@intel.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
all inboxes | Powered by JetHome®