Received: by 10.223.185.116 with SMTP id b49csp1441438wrg; Sun, 4 Mar 2018 01:51:12 -0800 (PST) X-Google-Smtp-Source: AG47ELsIXgZ7ZQdXyaGW41cQ1Xzo1ibQ/rPtT4QvuoUz3aTlT31sSYitCK7f9qq8L775YhPZpUBJ X-Received: by 10.99.125.79 with SMTP id m15mr9144675pgn.428.1520157072313; Sun, 04 Mar 2018 01:51:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520157072; cv=none; d=google.com; s=arc-20160816; b=1BSztXIj1RIXF3mmZg+pYSIQF7B+1M1aRkDMTOMw+XdwfVGe3jHzaWEz8QsYMaMpQH YqxsIlEJZfEmo7AOS1JaeZCDcCzv4x/XeffxfFH6JBntR+8w2dUx0BG9ZsDfOoMhVTYZ iZzJC8HgI2GM0iDDqE6zx846letF+izxjHSC9vqh1l90Ma1oHphsb+7oIc7MWHtK25z0 x+o5bmQuyXkCvumwly2YqfQl2ji2gTwElyMuxRo8AX7NkADC5MBy9U19bCrQorplvxs9 S4fY3ECDbYAPhYKBjCnavfxWhXn3FvFeNjj+GR8lXOtxOe6ANIwEDIqd19kCnAu00DIl AkSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=1N3sQ7qR7clzisKk0UZj422jemsb8aDLOvryILVx65E=; b=dN1MaLy/+169gjMFILSdXjII8ufHHdDLtf4kvD32GqqZlAm/MD3NzZCUx7F5H8tJL4 R9+7CJr47fKnEKTD7DagJSdSou4KFRIfkITQeHN1XRuPeihJfOd0bqH+egSw2Un7XPK9 BUeQjHxJA93rmTBgzrXrZQplWCLpNldG8B/YkSolE6c9Y21T9FV63FLi8UPgjjQxhGU/ nG6p9U1O7syFGEOIlIs+O2laHgZugtGS7quTeCxcHPkcWkNeViWTjSP2k4jnya4rc+tz fDT+BNyTOkp8yXBGKIBeWFMhydC4dBExxdN1g6SZ+uoT0XLfw9LGRaM6o0QxFDpPGAjq Ca8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si6796034pgr.57.2018.03.04.01.50.57; Sun, 04 Mar 2018 01:51:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbeCDJmt convert rfc822-to-8bit (ORCPT + 99 others); Sun, 4 Mar 2018 04:42:49 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:49130 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbeCDJmr (ORCPT ); Sun, 4 Mar 2018 04:42:47 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w249dXBZ028947; Sun, 4 Mar 2018 01:42:43 -0800 Received: from il-exch02.marvell.com ([199.203.130.102]) by mx0b-0016f401.pphosted.com with ESMTP id 2gfv3n9mt1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 04 Mar 2018 01:42:43 -0800 Received: from IL-EXCH01.marvell.com (10.4.102.220) by IL-EXCH02.marvell.com (10.4.102.221) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 4 Mar 2018 11:42:40 +0200 Received: from IL-EXCH01.marvell.com ([fe80::5d63:81cd:31e2:fc36]) by IL-EXCH01.marvell.com ([fe80::5d63:81cd:31e2:fc36%20]) with mapi id 15.00.1210.000; Sun, 4 Mar 2018 11:42:40 +0200 From: Stefan Chulski To: Thomas Petazzoni CC: Antoine Tenart , "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "maxime.chevallier@bootlin.com" , "gregory.clement@bootlin.com" , "miquel.raynal@bootlin.com" , Nadav Haklai , Yan Markman , "mw@semihalf.com" Subject: RE: [PATCH net-next 5/5] net: mvpp2: jumbo frames support Thread-Topic: [PATCH net-next 5/5] net: mvpp2: jumbo frames support Thread-Index: AQHTsj18um8XkydR1EKUeFQympSTGqO8/daAgAKiLNCAABBKAIAAItKg Date: Sun, 4 Mar 2018 09:42:39 +0000 Message-ID: <7d2e6deeb8a8435593b5c08615b192e1@IL-EXCH01.marvell.com> References: <20180302154044.25204-1-antoine.tenart@bootlin.com> <20180302154044.25204-6-antoine.tenart@bootlin.com> <20180302171713.54beaad0@windsurf.lan> <31a2c6c988bd4d5190e1fb3332f3bc35@IL-EXCH01.marvell.com> <20180304102828.1437fbc3@windsurf.home> In-Reply-To: <20180304102828.1437fbc3@windsurf.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.5.102.207] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-04_05:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=756 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803040124 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > To perform checksum in HW, HW obviously should work in store and > forward mode. Store all frame in TX FIFO and then check checksum. > > If mtu 1500B, everything fine and all port can do this. > > > > If mtu is 9KB and 9KB frame transmitted, Port 0 still can do HW checksum. > But ports 1 and 2 doesn't has enough FIFO for this. > > So we cannot offload this feature and SW should perform checksum. > > So perhaps the real check should not be "port 0", but whether the MTU is > higher or lower than the TX FIFO size assigned to the current port. > This would express in much better way the reason why HW checksum can be > used or not. I really don't want involve MTU size here, for each packet we should add to MTU overhead added by HW(offset, CRC, DSA tags and etc). I prefer just to check: port TX FIFO size is 10KB -> port can support HW checksum offload. Do you suggest to keep some shadow table with ports TX FIFO sizes for this? Thanks, Stefan.