[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff6c57ba-ff35-d7b4-482e-99673d202790@ti.com>
Date: Tue, 2 Jan 2024 15:23:37 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Sanjuán García, Jorge
<Jorge.SanjuanGarcia@...gon.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com"
<edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>,
<s-vadapalli@...com>
Subject: Re: [PATCH 1/3] net: ethernet: ti: am65-cpsw: Fix max mtu to fit
ethernet frames
Hello,
On 02-01-2024 13:49, Sanjuán García, Jorge wrote:
> The value of AM65_CPSW_MAX_PACKET_SIZE represents the maximum length
> of a received frame. This value is written to the register
> AM65_CPSW_PORT_REG_RX_MAXLEN.
>
> The maximum MTU configured on the network device should then leave
> some room for the ethernet headers and frame check. Otherwise, if
> the network interface is configured to its maximum mtu possible,
> the frames will be larger than AM65_CPSW_MAX_PACKET_SIZE and will
> get dropped as oversized.
>
> Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth
> subsystem driver")
> Signed-off-by: Jorge Sanjuan Garcia <jorge.sanjuangarcia@...gon.com>
Please use [PATCH net] as the subject prefix for patches which are
posted as Bug Fixes. Apart from that, this patch looks good to me.
Reviewed-by: Siddharth Vadapalli <s-vadapalli@...com>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> index 7651f90f51f2..378d69b8cb14 100644
> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> @@ -2196,7 +2196,8 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common
> *common, u32 port_idx)
> eth_hw_addr_set(port->ndev, port->slave.mac_addr);
>
> port->ndev->min_mtu = AM65_CPSW_MIN_PACKET_SIZE;
> - port->ndev->max_mtu = AM65_CPSW_MAX_PACKET_SIZE;
> + port->ndev->max_mtu = AM65_CPSW_MAX_PACKET_SIZE -
> + (VLAN_ETH_HLEN + ETH_FCS_LEN);
> port->ndev->hw_features = NETIF_F_SG |
> NETIF_F_RXCSUM |
> NETIF_F_HW_CSUM |
...
--
Regards,
Siddharth.
Powered by blists - more mailing lists