Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6443148rdb; Tue, 2 Jan 2024 01:54:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6vNm0XUqTAbrOgyp9dsFD5FNYPCvkN6gKK/oPCGOx9/dK/pTjfCXPiKy7iEv6pkF3rucq X-Received: by 2002:a17:902:ea04:b0:1d4:55e0:bd0e with SMTP id s4-20020a170902ea0400b001d455e0bd0emr7499561plg.18.1704189256865; Tue, 02 Jan 2024 01:54:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704189256; cv=none; d=google.com; s=arc-20160816; b=g47k9dg7jeVlkAR156JgZ6KaqzJJ/eUP9zv/r3BpYkUeX80W6EE2UhAw++YVKKLk+z ZClKc69sqBEylFLgtsc4lBbTJZJdZ/PVcmxSIziCQSm6l3tJxaribuzrWnDA/4D8wsxX 315klcls158aVTi6pOnV4NTsYNaoBfZUMkhHA5+gZbEdEyb4TDzUA3VAI3crO8bw6Q0V dJkDkVZwltybhc15NSh90NoODgRuwzFEC0cwatN0cXUx4s6jXfkJc8GPSc2jqAcFtF90 5vY13AT4ozwNE5F8GfUuaU+g9GI5+uCkedRpP2neETDnIQ5sLHyCPM+GE5Y0QJjYeWbR l42A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=74sdqSkVGxGgwTNR2R1XLLsqkxdGTod/LNAm1GoA48s=; fh=u44LvmWqXhlb6jWCwoKbLQbmr06zsjVrQXBAgbfqGkI=; b=d7Yl8lqBTEfAognSnjgmtZjkI42ZxKVGl4IepT/FKOZyTDa7f0fdjkwBiiS/6Xnnvs K8urYnwWtekd5AyCb/w6mtp59MgGclRDM/Jta+aql7LKlp5GpFgwjmgxm8kc+XmQrNTd l5zXieTKT48z9Gba1VC8hFSn+NGadWTM7aF0c5W00k4kYvkzdl8srVSjOiIS7oBSruC3 d3tGVRFRh7JiUf28e0JKKf8weg9lot3ZXyW7CzboezmhMnJ9RwUq0/RRQQTK2GcTYFFn ZT1rDNjPbIJ65lO/l3XkftMjyYC5d3V/NckYUt8bCB+43sP4L8DtAOo9Yt5k+C3A738i VgMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OGJCQe8X; spf=pass (google.com: domain of linux-kernel+bounces-14213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b8-20020a170902a9c800b001d2e3004f98si18032924plr.593.2024.01.02.01.54.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 01:54:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OGJCQe8X; spf=pass (google.com: domain of linux-kernel+bounces-14213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7BB50281295 for ; Tue, 2 Jan 2024 09:54:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 524CCCA6F; Tue, 2 Jan 2024 09:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="OGJCQe8X" X-Original-To: linux-kernel@vger.kernel.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDA33C8C4; Tue, 2 Jan 2024 09:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4029rfb8004461; Tue, 2 Jan 2024 03:53:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1704189221; bh=74sdqSkVGxGgwTNR2R1XLLsqkxdGTod/LNAm1GoA48s=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=OGJCQe8XSEJCKH187sP5V1JSoPpmqXv5QSaqH0w+uL79w3Qn/pevMwAD2ima0ji7B YBxZ3RVnGnkp4JaNUgIxZHPpZLmr5YoDkyGQbxT2c78xiaoh/R4DqsDi9Rw73RL6nF Z0KTo0uq+KjfRnpsiyu0NxCEyzkqHVEB+TMPSwbg= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4029rfDx070659 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Jan 2024 03:53:41 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 2 Jan 2024 03:53:41 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 2 Jan 2024 03:53:41 -0600 Received: from [10.249.131.186] ([10.249.131.186]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4029rbpD033320; Tue, 2 Jan 2024 03:53:38 -0600 Message-ID: Date: Tue, 2 Jan 2024 15:23:37 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 CC: "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Subject: Re: [PATCH 1/3] net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames Content-Language: en-US To: =?UTF-8?B?U2FuanXDoW4gR2FyY8OtYSwgSm9yZ2U=?= References: <20240102081825.14635-1-jorge.sanjuangarcia@duagon.com> <20240102081825.14635-2-jorge.sanjuangarcia@duagon.com> From: Siddharth Vadapalli In-Reply-To: <20240102081825.14635-2-jorge.sanjuangarcia@duagon.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 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 > --- > 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.