Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp47549ybi; Fri, 26 Jul 2019 05:58:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDtkBS6I9kyT7ylzHcmCA2afjpPKjawUmToFDMWjEDmAFDcw6bJOwvclEiXtXFZMN7PtgQ X-Received: by 2002:a17:902:6a88:: with SMTP id n8mr96447496plk.70.1564145923649; Fri, 26 Jul 2019 05:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564145923; cv=none; d=google.com; s=arc-20160816; b=Ta20EkRNkL8IAl8s0/uJmm6yfQ2VDnvvJjUykct0bS9g/sh9dJ4L15Ih5xMaDOqsV2 BJGJckMJhgbZqkFU6uscDCwca7CY5ALVmSgg9WYMWmhX9w2bS8gAR6HjKduZHT5vZonJ c0Ofs8szH67WJzMGqppsiHaGQBGh5uMz2SogGpVopHkyI7Qgjyy/j3vJKCfHmP2OMy2r TxuAV3LiQvDCYLrTredx0CuDj6wod4iz/S9mcthQ6qzoXRa1zTSX7mRMBl9ZQwcERgHb pBiHq4wBTGUBKxyseh3FREdIv9f0HqYH5sSG+SOuQyx3nUJyzqOlc1SLYyR9a1Gt91PK fUgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OKX6beAdruSzL1SV3dk4PrI0SwvUSWjilvkWIQs2H0o=; b=VIcYZU38qgiL1Z8t0pvWOY5Sj5/8aloVtoygkiGZoh4xlzxpVnVGceEuFb/56NOnko jnDxn+z2touShh9g7ZqGpqcrbx73XZEp782BoYOQhAufLrDiqpOq5CLY0cjNfKpNBuh2 Z+pLttKOQk+XHJ+jyrXSXYyqcEZ/xNXZswK10EK8pwnUIcs0vib4jsXKVMWtucX3mbxF vu1hzl4xoxXWASZ93qOIuwQLGDu8NJ1z+ciuX6lf1nErq2RQDhKTSz8CPF8n+7RZA78G agF57dDVThWHCxcVYeKCYXZsBgFIAKaRAunnG5jvKbT8vcIoSVpBCYsJRVvrNzYar65r Gc6g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si19615469plo.104.2019.07.26.05.58.27; Fri, 26 Jul 2019 05:58:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbfGZM5T (ORCPT + 99 others); Fri, 26 Jul 2019 08:57:19 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:42517 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726863AbfGZM5R (ORCPT ); Fri, 26 Jul 2019 08:57:17 -0400 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: antoine.tenart@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id A0EAA100002; Fri, 26 Jul 2019 12:57:15 +0000 (UTC) Date: Fri, 26 Jul 2019 14:57:15 +0200 From: Antoine Tenart To: Matteo Croce Cc: netdev@vger.kernel.org, Antoine Tenart , Maxime Chevallier , Marcin Wojtas , Stefan Chulski , LKML Subject: Re: [PATCH net-next] mvpp2: document HW checksum behaviour Message-ID: <20190726125715.GB5031@kwain> References: <20190725231546.23878-1-mcroce@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190725231546.23878-1-mcroce@redhat.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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