Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp947799imm; Fri, 5 Oct 2018 14:53:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63xsuYf26+NhIS6+R6Zy9nJH/Ar+/kXqZrjzYXpqLnvKOMBxOzv0sSLi86j2SeUL9T9NkEU X-Received: by 2002:aa7:8598:: with SMTP id w24-v6mr14065129pfn.77.1538776419566; Fri, 05 Oct 2018 14:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538776419; cv=none; d=google.com; s=arc-20160816; b=QEL7Nd6xwYkxt01ShvK/tlQVPZAacAMW0JUKtzJdzB2uRTRckFG2K4jfb52n/nG3DQ ovIy353aEbOHREFzqG3JY6yjyGFVAQtfSXKrPHv02UynNrF95vljht9fIBlFhLMizomM 76VM3qjgyMwDJtB2zYBrwiYnTNr+ZAtAadtxW4Prmj0oAJbQBNVZNlTnR0WK//xv44iD pUUyUUjtvcv+aVH5NM75Ic12vhxXuDQ1smYNwpzc3SaTBfJVmQigVGbMJ4ZGqx8hUrqC fKJNfo28w0mg+AgMdZir8wetc/nNOHWl9rB0lCMKyVvX3QQ3sTsTGRz/7NwpWPTFrIe/ o15g== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=SSYPs3GsoE5AV3ZH9M63IQkJUgBj679zzQvageKrPig=; b=gPjqoUkX+j+yqM9R7lGYU44ck2H7wK6lDCVDjB9wa0coItTWoVDjHg1vl5xAsfYv5e /U+uba6qjZPtEq446XFY2lTor6dxCI+eOLgTDWMN2A50Uxvn0C3lHn60+oMKTTG/nYOF DQXNL4SITqJlkaWt6rWp4XwOPCIYlwqTshxoRQBMO3aHleDiqZlwgKMBCgDSAj4D/uCX GeLLw41/VPpn/e/Hdo6Zoo52oYFila1AdTQ/A5rK9V0pp5/1kJGjBNb0/RZdLczCBqzI CsQMauMYpfBVaUxoDNg3heXtv+CLD89pcLzguINgsjRtJvFmyzdnXsQaJ5X7A7h530wR auBw== 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 d33-v6si9607924pla.292.2018.10.05.14.53.23; Fri, 05 Oct 2018 14:53:39 -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 S1727123AbeJFEx4 (ORCPT + 99 others); Sat, 6 Oct 2018 00:53:56 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:46968 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbeJFEx4 (ORCPT ); Sat, 6 Oct 2018 00:53:56 -0400 Received: from localhost (c-67-183-145-105.hsd1.wa.comcast.net [67.183.145.105]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 928F513ADF96A; Fri, 5 Oct 2018 14:53:17 -0700 (PDT) Date: Fri, 05 Oct 2018 14:53:16 -0700 (PDT) Message-Id: <20181005.145316.1347310522019003432.davem@davemloft.net> To: maxime.chevallier@bootlin.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, antoine.tenart@bootlin.com, thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com Subject: Re: [PATCH net v2] net: mvpp2: Extract the correct ethtype from the skb for tx csum offload From: David Miller In-Reply-To: <20181005070440.3294-1-maxime.chevallier@bootlin.com> References: <20181005070440.3294-1-maxime.chevallier@bootlin.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 05 Oct 2018 14:53:18 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Chevallier Date: Fri, 5 Oct 2018 09:04:40 +0200 > When offloading the L3 and L4 csum computation on TX, we need to extract > the l3_proto from the ethtype, independently of the presence of a vlan > tag. > > The actual driver uses skb->protocol as-is, resulting in packets with > the wrong L4 checksum being sent when there's a vlan tag in the packet > header and checksum offloading is enabled. > > This commit makes use of vlan_protocol_get() to get the correct ethtype > regardless the presence of a vlan tag. > > Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") > Signed-off-by: Maxime Chevallier > --- > V2: Use htons on values that can be swapped at compile-time, following > Yan's comment. Fix the "Fixes" tag and a typo, following Sergei's comment. Applied and queued up for -stable.