From: Paul Barker <paul.barker.ct@bp.renesas.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"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>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
netdev@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [net-next 2/6] ravb: Make it clear the information relates to maximum frame size
Date: Tue, 27 Feb 2024 10:25:09 +0000 [thread overview]
Message-ID: <98691004-d7f4-4223-af8b-aadb4f73d28f@bp.renesas.com> (raw)
In-Reply-To: <20240227014014.44855-3-niklas.soderlund+renesas@ragnatech.se>
[-- Attachment #1.1.1: Type: text/plain, Size: 3367 bytes --]
On 27/02/2024 01:40, Niklas Söderlund wrote:
> The struct member rx_max_buf_size was added before split descriptor
> support where added. It is unclear if the value describes the full skb
> frame buffer or the data descriptor buffer which can be combined into a
> single skb.
>
> Rename it to make it clear it referees to the maximum frame size and can
> cover multiple descriptors.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/net/ethernet/renesas/ravb.h | 2 +-
> drivers/net/ethernet/renesas/ravb_main.c | 10 +++++-----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index aecc98282c7e..7f9e8b2c012a 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -1059,7 +1059,7 @@ struct ravb_hw_info {
> int stats_len;
> size_t max_rx_len;
> u32 tccr_mask;
> - u32 rx_max_buf_size;
> + u32 rx_max_frame_size;
> unsigned aligned_tx: 1;
>
> /* hardware features */
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index c25a80f4d3b9..3c59e2c317c7 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2684,7 +2684,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> - .rx_max_buf_size = SZ_2K,
> + .rx_max_frame_size = SZ_2K,
> .internal_delay = 1,
> .tx_counters = 1,
> .multi_irqs = 1,
> @@ -2710,7 +2710,7 @@ static const struct ravb_hw_info ravb_gen2_hw_info = {
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> - .rx_max_buf_size = SZ_2K,
> + .rx_max_frame_size = SZ_2K,
> .aligned_tx = 1,
> .gptp = 1,
> .nc_queues = 1,
> @@ -2733,7 +2733,7 @@ static const struct ravb_hw_info ravb_rzv2m_hw_info = {
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats),
> .max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
> .tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
> - .rx_max_buf_size = SZ_2K,
> + .rx_max_frame_size = SZ_2K,
> .multi_irqs = 1,
> .err_mgmt_irqs = 1,
> .gptp = 1,
> @@ -2758,7 +2758,7 @@ static const struct ravb_hw_info gbeth_hw_info = {
> .stats_len = ARRAY_SIZE(ravb_gstrings_stats_gbeth),
> .max_rx_len = ALIGN(GBETH_RX_BUFF_MAX, RAVB_ALIGN),
> .tccr_mask = TCCR_TSRQ0,
> - .rx_max_buf_size = SZ_8K,
> + .rx_max_frame_size = SZ_8K,
> .aligned_tx = 1,
> .tx_counters = 1,
> .carrier_counters = 1,
> @@ -2967,7 +2967,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_buf_size - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
> + ndev->max_mtu = info->rx_max_frame_size - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
> ndev->min_mtu = ETH_MIN_MTU;
>
> /* FIXME: R-Car Gen2 has 4byte alignment restriction for tx buffer
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
--
Paul Barker
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3577 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2024-02-27 10:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 1:40 [net-next 0/6] ravb: Align Rx descriptor setup and maintenance Niklas Söderlund
2024-02-27 1:40 ` [net-next 1/6] ravb: Group descriptor types used in Rx ring Niklas Söderlund
2024-02-27 10:24 ` Paul Barker
2024-02-27 1:40 ` [net-next 2/6] ravb: Make it clear the information relates to maximum frame size Niklas Söderlund
2024-02-27 10:25 ` Paul Barker [this message]
2024-02-27 1:40 ` [net-next 3/6] ravb: Create helper to allocate skb and align it Niklas Söderlund
2024-02-27 10:21 ` Paul Barker
2024-02-27 20:56 ` Paul Barker
2024-02-27 1:40 ` [net-next 4/6] ravb: Use the max frame size from hardware info for RZ/G2L Niklas Söderlund
2024-02-27 10:31 ` Paul Barker
2024-02-27 1:40 ` [net-next 5/6] ravb: Move maximum Rx descriptor data usage to info struct Niklas Söderlund
2024-02-27 21:03 ` Paul Barker
2024-02-27 1:40 ` [net-next 6/6] ravb: Unify Rx ring maintenance code paths Niklas Söderlund
2024-02-27 21:11 ` Paul Barker
2024-02-27 22:16 ` Niklas Söderlund
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=98691004-d7f4-4223-af8b-aadb4f73d28f@bp.renesas.com \
--to=paul.barker.ct@bp.renesas.com \
--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-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=s.shtylyov@omp.ru \
--cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).