From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 216F513B2B8; Thu, 9 Jan 2025 18:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.154.21.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736447877; cv=none; b=ShKo/wuX1/ZaEtt4wCiwCAWs5N8a02hdzbky0u118ybQ7zWSyvFe+tGXs+jt4xjEs7sTsNFOPzzALND87hbZ5Jfh3YOOl8ERgxgs3s7pDn+oqM0UdiYdiP1dLNk2gk9OyE2nOnKPbpWElyJn6dRYiJsefpxKrNot/qjLHuEvxp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736447877; c=relaxed/simple; bh=jDKZZHjwM0ZVYhG0quFjVJNsgX1hy4Gswz2TQbrNtKY=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Pr7tomdrulSIFR80PO+hzEcWHDvUY13pJ47KCUD1J9wBhhlj5Eci4DRWDRx4FVZ6WWiARZpuWyUh3CHQpUCQTmo87tOJM9JHnNkGlw1ASnD8sjP2hxYciyL69xE4Eop2cqkT2AwU/raF+5sofgdTMeeXknhjjvIvby3ocSCTCyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru; spf=pass smtp.mailfrom=omp.ru; arc=none smtp.client-ip=90.154.21.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=omp.ru Received: from [192.168.2.102] (213.87.139.224) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Thu, 9 Jan 2025 21:37:34 +0300 Message-ID: <678cb572-0320-4cd2-9628-06dadebefbc1@omp.ru> Date: Thu, 9 Jan 2025 21:37:33 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [net PATCH] net: ravb: Fix max TX frame size for RZ/V2M To: Paul Barker , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni CC: Simon Horman , , , References: <20250109113706.1409149-1-paul.barker.ct@bp.renesas.com> Content-Language: en-US From: Sergey Shtylyov Organization: Open Mobile Platform In-Reply-To: <20250109113706.1409149-1-paul.barker.ct@bp.renesas.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.1.1, Database issued on: 01/09/2025 18:26:10 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 19 X-KSE-AntiSpam-Info: Lua profiles 190244 [Jan 09 2025] X-KSE-AntiSpam-Info: Version: 6.1.1.7 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 49 0.3.49 28b3b64a43732373258a371bd1554adb2caa23cb X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 213.87.139.224 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: omp.ru:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: ApMailHostAddress: 213.87.139.224 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 19 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 01/09/2025 18:28:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 1/9/2025 4:56:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit On 1/9/25 2:37 PM, Paul Barker wrote: > When tx_max_frame_size was added to struct ravb_hw_info, no value was > set in ravb_rzv2m_hw_info so the default value of zero was used. > > The maximum MTU is set by subtracting from tx_max_frame_size to allow > space for headers and frame checksums. As ndev->max_mtu is unsigned, > this subtraction wraps around leading to a ridiculously large positive > value that is obviously incorrect. > > Before tx_max_frame_size was introduced, the maximum MTU was based on > rx_max_frame_size. So, we can restore the correct maximum MTU by copying > the rx_max_frame_size value into tx_max_frame_size for RZ/V2M. Seems to be reviewers' fault as well? > Fixes: 1d63864299ca ("net: ravb: Fix maximum TX frame size for GbEth devices") > Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov MBR, Sergey