Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp823693ybd; Sat, 22 Jun 2019 16:21:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtw3ejxPiAFAn67hHwNQ0hCnrdhP9z9RbKj6o13TKn8rs7+pdIBy1GmD/82c3HqY/CiuIj X-Received: by 2002:a17:90a:23a4:: with SMTP id g33mr15862574pje.115.1561245671969; Sat, 22 Jun 2019 16:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561245671; cv=none; d=google.com; s=arc-20160816; b=g9OOheThLFf9UuaR4+QeYPbw/1DWG2R0XaC3ir4/XzzeHrN3wMsCxfDx4W4jgX9C7N oedcyMFKErfj4WV7c6nE8TlQ4bRbFp3wGVifFZ5XAQ16zmwSa9hHQd/prw/WW7+q1pry 8oxQILLf24ZHdYt7XjLbDFBh4JS/l7IirvBfkbjZg4OthI3eG1PYm08zqC3HEXOEh8un p1IvuQPDiG0fI7cfcLiZvWFouu//HophK0HoKSrohR8Xe4TeA23tTvrrFO2H6zstqaB0 hv6EiNLsRfnKa6fX6nLbL8FI24KFhWR3VBNFRFm2XFtZP4ciqFMCoZgdeKe954WntV6Y rL5A== 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=37u/RhBo7Nl51Lj2akFzJN3bQCLs1NBoIykvEglPBug=; b=Qn6xeHiP5jF1N257gIwQouawjMTUIs1hP/5Y9FiGnUfD5VYNgkxcigtBIAnyrcppxw I0zV0QgL6NY0Hd2AurmZ2Ze2/q+U9huONFYefsZnkFA1/wcbOQvOgWzRGrfQg/rrM4v/ 8DkRNmC/SB1RI/5LUfpwXw5Voz/ir89iFyVoFuJSBP7XQQxzExG+x2TLx7mQNH8C/AKH kcvB0a8WIXYpFcdWoFOjygKsRMzI/KJrxyBH0gzQYxHWw2TNVrX4HgNhTH/hxPiBfXnJ hHhFxZ+b5kmZoHTunbjBrb5fBDy3cpfJWnzWeh31S/UpesWQtzRKTub7xu1B4pqTzGjc 2rvw== 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 f12si6360389pfn.98.2019.06.22.16.20.53; Sat, 22 Jun 2019 16:21:11 -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 S1726431AbfFVXT4 (ORCPT + 99 others); Sat, 22 Jun 2019 19:19:56 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:60772 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbfFVXT4 (ORCPT ); Sat, 22 Jun 2019 19:19:56 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 DD98B153E7EA2; Sat, 22 Jun 2019 16:19:55 -0700 (PDT) Date: Sat, 22 Jun 2019 16:19:55 -0700 (PDT) Message-Id: <20190622.161955.2030310177158651781.davem@davemloft.net> To: yuehaibing@huawei.com Cc: sdf@google.com, jianbol@mellanox.com, jiri@mellanox.com, mirq-linux@rere.qmqm.pl, willemb@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] flow_dissector: Fix vlan header offset in __skb_flow_dissect From: David Miller In-Reply-To: <20190619160132.38416-1-yuehaibing@huawei.com> References: <20190619160132.38416-1-yuehaibing@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Sat, 22 Jun 2019 16:19:56 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing Date: Thu, 20 Jun 2019 00:01:32 +0800 > @@ -785,6 +785,9 @@ bool __skb_flow_dissect(const struct sk_buff *skb, > skb && skb_vlan_tag_present(skb)) { > proto = skb->protocol; > } else { > + if (dissector_vlan == FLOW_DISSECTOR_KEY_MAX) > + nhoff -= sizeof(*vlan); Even if this would have turned out to be the desired fix, you would need to get rid of the extra spaces in that last statement.