From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Paul Barker <paul.barker.ct@bp.renesas.com>
Cc: Sergey Shtylyov <s.shtylyov@omp.ru>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 1/2] net: ravb: Fix maximum MTU for GbEth devices
Date: Sat, 15 Jun 2024 14:38:49 +0200 [thread overview]
Message-ID: <20240615123849.GL382677@ragnatech.se> (raw)
In-Reply-To: <20240615103038.973-2-paul.barker.ct@bp.renesas.com>
Hi Paul,
Thanks for your work.
On 2024-06-15 11:30:37 +0100, Paul Barker wrote:
> The datasheets for all SoCs using the GbEth IP specify a maximum
> transmission frame size of 1.5 kByte. I've confirmed through internal
> discussions that support for 1522 byte frames has been validated, which
> allows us to support the default MTU of 1500 bytes after reserving space
> for the Ethernet header, frame checksums and an optional VLAN tag.
>
> Fixes: 2e95e08ac009 ("ravb: Add rx_max_buf_size to struct ravb_hw_info")
> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/net/ethernet/renesas/ravb.h | 1 +
> drivers/net/ethernet/renesas/ravb_main.c | 6 +++++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index 6b2444d31fcc..e592e89b0d96 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -1051,6 +1051,7 @@ struct ravb_hw_info {
> netdev_features_t net_features;
> int stats_len;
> u32 tccr_mask;
> + u32 tx_max_frame_size;
> u32 rx_max_frame_size;
> u32 rx_buffer_size;
> u32 rx_desc_size;
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index c1546b916e4e..02cbf850bd85 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2664,6 +2664,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
> .net_features = NETIF_F_RXCSUM,
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> + .tx_max_frame_size = SZ_2K,
> .rx_max_frame_size = SZ_2K,
> .rx_buffer_size = SZ_2K +
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
> @@ -2689,6 +2690,7 @@ static const struct ravb_hw_info ravb_gen2_hw_info = {
> .net_features = NETIF_F_RXCSUM,
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> + .tx_max_frame_size = SZ_2K,
> .rx_max_frame_size = SZ_2K,
> .rx_buffer_size = SZ_2K +
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
> @@ -2711,6 +2713,7 @@ static const struct ravb_hw_info ravb_rzv2m_hw_info = {
> .net_features = NETIF_F_RXCSUM,
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> + .tx_max_frame_size = SZ_2K,
> .rx_max_frame_size = SZ_2K,
> .rx_buffer_size = SZ_2K +
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
> @@ -2735,6 +2738,7 @@ static const struct ravb_hw_info gbeth_hw_info = {
> .net_features = NETIF_F_RXCSUM | NETIF_F_HW_CSUM,
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats_gbeth),
> .tccr_mask = TCCR_TSRQ0,
> + .tx_max_frame_size = 1522,
> .rx_max_frame_size = SZ_8K,
> .rx_buffer_size = SZ_2K,
> .rx_desc_size = sizeof(struct ravb_rx_desc),
> @@ -2946,7 +2950,7 @@ static int ravb_probe(struct platform_device *pdev)
> priv->avb_link_active_low =
> of_property_read_bool(np, "renesas,ether-link-active-low");
>
> - ndev->max_mtu = info->rx_max_frame_size -
> + ndev->max_mtu = info->tx_max_frame_size -
> (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
> ndev->min_mtu = ETH_MIN_MTU;
>
> --
> 2.39.2
>
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2024-06-15 12:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-15 10:30 [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Paul Barker
2024-06-15 10:30 ` [net-next PATCH 1/2] net: ravb: Fix maximum MTU for GbEth devices Paul Barker
2024-06-15 12:38 ` Niklas Söderlund [this message]
2024-06-17 19:38 ` Sergey Shtylyov
2024-06-17 19:45 ` Sergey Shtylyov
2024-08-13 13:37 ` Paul Barker
2024-06-18 0:07 ` Jakub Kicinski
2024-08-13 12:53 ` Paul Barker
2024-06-15 10:30 ` [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit Paul Barker
2024-06-15 13:04 ` Niklas Söderlund
2024-06-17 14:20 ` Paul Barker
2024-06-16 1:23 ` Andrew Lunn
2024-06-17 14:03 ` Paul Barker
2024-06-17 14:29 ` Andrew Lunn
2024-08-13 13:29 ` Paul Barker
2024-08-13 14:06 ` Andrew Lunn
2024-08-15 9:10 ` Paul Barker
2024-06-17 20:18 ` Sergey Shtylyov
2024-06-16 19:22 ` [net-next PATCH 0/2] Fix maximum TX/RX frame sizes in ravb driver Sergey Shtylyov
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=20240615123849.GL382677@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mitsuhiro.kimura.kc@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul.barker.ct@bp.renesas.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=s.shtylyov@omp.ru \
/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;
as well as URLs for NNTP newsgroup(s).