Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp155574ybi; Fri, 26 Jul 2019 07:37:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsa8fwlv9TDcIJ4DlquXDj34/aGMFyPx0/Cj1XUjwUbDDyj/ZkktUSRIfeHhevTZ7iJKEL X-Received: by 2002:a65:4189:: with SMTP id a9mr64777067pgq.399.1564151864728; Fri, 26 Jul 2019 07:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564151864; cv=none; d=google.com; s=arc-20160816; b=vqXgk99dfEaNgCQc0ZTD3NT43J62EyqA0V6/Q6V7wpYRiWyqPufG5aTDb9bUbLyY4a FtESj5z+0DGWhRbg+MEYHPoOx9w0KOcJ057IxVjmt0TDAVfbq5ALgoIM07mBdkO/8vIM xDMnLyh6ESQ+Fa0XdISKKmc41OBu9jfNuTDUzgZRUPRWsnyFP1nfRPYYr+babM4uAL+9 ly6eHZ61w6q5BTH1pE5nDXqrxlageRI95VOYQ1OYupuRojQbooUw5rprjv1otwAFP3qk riyevRKxXV1JwT5n6ZStIvePD7Iht7cIOdPpngS2KUyiqEFN6DoFwBJG8dQRgn38I2eS jBPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Hif4SIrzuUIm+1BRpiXOzy66jyZV1noFCOZ71T+uSEw=; b=Y6PRds1nxNHyIUB7PtP86VG9I1OMwO2CgR+Rcn8rlOcppNX4Ei5xduZH60Yno6MPtv SniF4yNeGpZVzo7PvhhV9vXJp/RfEtadsRjanJmGSzC5J2cpbGWs5dATv/WSsLQdbVtY n/eXwkfbffbxeK5Oj2ahgw+z2PnrZcCCHE0uujDlg4EViUFbnfDGDYlEiXSDQ3noEFMG l3F6JcEl+pEqbOyxdDAFlHWI1VhUNWlYP3kibfe1jPM/+TibbfbNXgQA1jbkyXrkDKbo VOYMSdWTsUory/CYxFQSaa4PBAZ1sKAnJMczo4ZO/GnC+FzayYAGDVwFWp58S70PvvJo SPvw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h99si17832027pje.83.2019.07.26.07.37.27; Fri, 26 Jul 2019 07:37:44 -0700 (PDT) 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbfGZOgh convert rfc822-to-8bit (ORCPT + 99 others); Fri, 26 Jul 2019 10:36:37 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40959 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbfGZOgh (ORCPT ); Fri, 26 Jul 2019 10:36:37 -0400 Received: by mail-lj1-f195.google.com with SMTP id m8so18100683lji.7 for ; Fri, 26 Jul 2019 07:36:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ESrjKMJPqUK9pinmPi7bcie4M3UhRDC8HVVE4OSwOk8=; b=WMT9WU8oLxRw6kIAX7I+JAyy5PsEp5qCpKgAY+sxMtmPjhkKZcyfAykczz7TPq09Ie zo9CVy+2ZcXqE3haWdNt/3K7M/zPXYaIxrrLLLIPyWW1ivpTLPs74HHuc9/N9PQBEtpv frJEwAf4jXBV13lR9lt6sOkR5jMwtBXXsbw0Z/KiG8LbEFs38YN2yzTEtihucg/S4Ed9 VRiyI7FJ94XCw4hqm6syp+D2r1Fimjz0q93/bxnFDQh0ItiERdH0INrpfxlLGQK3wiQQ XVc09nswV48LqoNMp3uAosJGT88Lp6joxFxW9NJccIvdXa6VE/RvLwRG7lwbhDxqRH3D A1DQ== X-Gm-Message-State: APjAAAV3cO7H7onKqTb+vC8jl7DLn2SPbNh7hkCPw/CIQDf0e6vzYUh2 PByE5oYF3+NZdYAFN8HzqvHk+Ct6hoczqqvHu130wA== X-Received: by 2002:a2e:8756:: with SMTP id q22mr50549544ljj.108.1564151795781; Fri, 26 Jul 2019 07:36:35 -0700 (PDT) MIME-Version: 1.0 References: <20190725231546.23878-1-mcroce@redhat.com> <20190726125715.GB5031@kwain> In-Reply-To: <20190726125715.GB5031@kwain> From: Matteo Croce Date: Fri, 26 Jul 2019 16:35:59 +0200 Message-ID: Subject: Re: [PATCH net-next] mvpp2: document HW checksum behaviour To: Antoine Tenart Cc: netdev , Maxime Chevallier , Marcin Wojtas , Stefan Chulski , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 2:57 PM Antoine Tenart wrote: > > Hi Matteo, > > On Fri, Jul 26, 2019 at 01:15:46AM +0200, Matteo Croce wrote: > > The hardware can only offload checksum calculation on first port due to > > the Tx FIFO size limitation. Document this in a comment. > > > > Fixes: 576193f2d579 ("net: mvpp2: jumbo frames support") > > Signed-off-by: Matteo Croce > > Looks good. Please note there's a similar code path in the probe. You > could also add a comment there (or move this check/comment in a common > place). > > Thanks! > Antoine > > > --- > > drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > index d8e5241097a9..2f7286bd203b 100644 > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > @@ -843,7 +843,10 @@ static int mvpp2_bm_update_mtu(struct net_device *dev, int mtu) > > /* Add port to new short & long pool */ > > mvpp2_swf_bm_pool_init(port); > > > > - /* Update L4 checksum when jumbo enable/disable on port */ > > + /* Update L4 checksum when jumbo enable/disable on port. > > + * Only port 0 supports hardware checksum offload due to > > + * the Tx FIFO size limitation. > > + */ > > if (new_long_pool == MVPP2_BM_JUMBO && port->id != 0) { > > dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); > > dev->hw_features &= ~(NETIF_F_IP_CSUM | > > -- > > 2.21.0 > > > > -- > Antoine Ténart, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com I see, there is a similar statement in mvpp2_port_probe(). What about adding a static function which sets the flag, and add the comment there instead of duplicating the comment? -- Matteo Croce per aspera ad upstream