Received: by 10.223.185.116 with SMTP id b49csp1338585wrg; Sat, 3 Mar 2018 22:57:05 -0800 (PST) X-Google-Smtp-Source: AG47ELuxUfgbcBNL3VLLMO2pFgso3rpVqwJ3hVdvW8m8j6FP7tUHPhmxGQFPdeV0YOvDg74MgQ7/ X-Received: by 2002:a17:902:5a5:: with SMTP id f34-v6mr9800202plf.134.1520146625034; Sat, 03 Mar 2018 22:57:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520146624; cv=none; d=google.com; s=arc-20160816; b=twkuPZBWjEhRralS+5lKLiI9xH4/5OOEuB5rlcOJrgY5lJW+3FxykoIensnd4WLfTY IKA9sWEWcUcg97N+w7ojQZ7e12o9FF3z1nvSi3cZFYCScbDPl86C0vcR3VanHEVanopU oV5pcc6b/A7H/J3a/do6e8W4x/P0g4fx3nL9tTmWbs8ynCIF2KVVDVCQ2njssfL0mdAd yQecmZyomVUErPAP4lVz00L/g7xsIl+ZAK0Y3+LdoKAYirZqU+4IYt2UAnBY2dwWWmgm tEE5qTBaGlemiysE5x/5jU82aHJh3r3hTXGGXz634OOGekyldfG/9SpbaJ+TAkQvNyNQ G7Iw== 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=0JJCn/T772+jHkbbsGy3CjIyR1ie7rAtVOBFpBBFdco=; b=w0D9uBTOqkU4S17ZRWcCrB8q+UosOMqAiLie2pIA3OwJqsJNZWEBBwBqDAAgesFnJp HWekzkHGWfMKld6CSSp43UnKs0jNCQm6bgq3mske4EQqdogdsSIvg+sZRlQ2svNqiaaH NdDU7qgxvGBsDHW/ydFS37sd0Uj1Wdu2fxKR13ZzHMgwbLGIyStWokor4khORj3pXzi3 3A4IPX+FepNGyH8MLb6idNcFpXdTE6GNHwyL+fYNVks2XOC/Cgg6iCQvERidPTf82o6/ LLCsfiwudCVQjfNj1+kCacM/YStKQaawpya9UFYKu3ue6/oRfv0jSXiuEytW/5AZLm52 Bx2g== 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 q2si6592437pgc.727.2018.03.03.22.56.50; Sat, 03 Mar 2018 22:57:04 -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 S1752485AbeCDG4L convert rfc822-to-8bit (ORCPT + 99 others); Sun, 4 Mar 2018 01:56:11 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:42038 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751793AbeCDG4K (ORCPT ); Sun, 4 Mar 2018 01:56:10 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w246u54I002451; Sat, 3 Mar 2018 22:56:05 -0800 Received: from il-exch01.marvell.com ([199.203.130.101]) by mx0a-0016f401.pphosted.com with ESMTP id 2gfsxqa182-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 03 Mar 2018 22:56:05 -0800 Received: from IL-EXCH01.marvell.com (10.4.102.220) by IL-EXCH01.marvell.com (10.4.102.220) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 4 Mar 2018 08:56:02 +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 08:56:02 +0200 From: Stefan Chulski To: Thomas Petazzoni , Antoine Tenart CC: "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/daAgAKiLNA= Date: Sun, 4 Mar 2018 06:56:02 +0000 Message-ID: <31a2c6c988bd4d5190e1fb3332f3bc35@IL-EXCH01.marvell.com> References: <20180302154044.25204-1-antoine.tenart@bootlin.com> <20180302154044.25204-6-antoine.tenart@bootlin.com> <20180302171713.54beaad0@windsurf.lan> In-Reply-To: <20180302171713.54beaad0@windsurf.lan> 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_03:,, 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=853 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803040089 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > netdev_err(port->dev, "Invalid pool %d\n", pool); > > return NULL; > > } > > @@ -4596,11 +4604,24 @@ mvpp2_bm_pool_use(struct mvpp2_port > *port, int > > pool, int pkt_size) static int mvpp2_swf_bm_pool_init(struct > > mvpp2_port *port) { > > int rxq; > > + enum mvpp2_bm_pool_log_num long_log_pool, short_log_pool; > > + > > + /* If port pkt_size is higher than 1518B: > > + * HW Long pool - SW Jumbo pool, HW Short pool - SW Short pool > > The comment is wrong. In this case, the HW short pool is the SW long pool. You right. Comment is wrong. > > + if (port->pool_long->id == MVPP2_BM_JUMBO && port->id != 0) { > > Again, all over the place we hardcode the fact that Jumbo frames can only be > used on port 0. I know port 0 is the only one that can do 10G, but are there > possibly some use cases where you may want Jumbo frame on another port > ? > > This all really feels very hardcoded to me. > All ports support Jumbo frames. But only port 0 can do TX HW checksum offload(due to TX FIFO size). Packet processor 2.2 has only 19KB TX FIFO size. So in TX FIFO config code assign for Port 0 - 10KB, Port 1 - 3KB and Port 1 - 3KB. 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. > > + /* 9704 == 9728 - 20 and rounding to 8 */ > > + dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE; > > Is this correct for all ports ? Shouldn't the maximum MTU be different > between port 0 (that supports Jumbo frames) and the other ports ? This is correct for all ports. All ports can support Jumbo frames. Stefan.