Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2177578ybm; Thu, 23 May 2019 12:38:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrYbYZYr6FJtpLcofHy9zAaw0hu1Yu8kDc12/SX2fhaRx+3G2vlT/BfvxRA2WxQo8EOhJq X-Received: by 2002:a63:2260:: with SMTP id t32mr62257231pgm.222.1558640285470; Thu, 23 May 2019 12:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640285; cv=none; d=google.com; s=arc-20160816; b=DxuYEN+rNobEQslEL3RpxqAsureB2ib35NIH2bSPoKcPxVRgEOR3YvSq8PA5jfHTpe KsmxLfUPOgFDRoacDr7LSSWM3XCUbb9jy197pJtJ2mnsR8kpzg2rmDs2DB0D2z10x6WW ztPBPCTYfPwEgKehYTA8ck30ldhNkrTHqERvqrW8EbOpL30cdoKCVL2Z+CI/ecdNU+0i WCTzcXOTwE7S8ewblmRIbdTtQiFyYl8VexzXhSI41UPdC01CdC6PL+5LeAhzbo/h2o3U /Acrb3jR4aRiV4YV/jspeT+61ScMcdBnVqdacKAzZawjwfX9+ftaBV8H7hz/NTOK3yMW ThXQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q6+I7NxWTuVXL5vIt5XQ8YpPzvJsWEsv42/yy/r36Pk=; b=iTLgBRoSrPKbUeFot22uwVgDoVWAffuuL1M1YV/2ND5onug0m/XpGqDYoZTSbveCmJ Qig19hAZafEPEO6/uIZyRvQpvx0bdzarhMQ4qCn7RfAisuRXM5c34BaF8ZJlG0/5X7Ou WlikMUheWf503/XKCUDbUQdOJtce9ZjiKpY6pyKT36kmGZ6rNgTXLBsfxaKkWBDu95zc uBc16otRNGu37U29m4PbmR8G3BT4T8B2HdbNx5nk2n7+61R+hCmwpOG8WIPJI9QjMigA mbeR6MvBGDNYfQM7+bKKwY1kCgTm5SXQ1dzakXVe3c6irl861yr5ENL0/rhI6M/BsQZN my9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pjS7/piV"; 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 h4si504475pgc.298.2019.05.23.12.37.50; Thu, 23 May 2019 12:38:05 -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; dkim=pass header.i=@kernel.org header.s=default header.b="pjS7/piV"; 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 S2391316AbfEWT0U (ORCPT + 99 others); Thu, 23 May 2019 15:26:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:38124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390636AbfEWT0T (ORCPT ); Thu, 23 May 2019 15:26:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F14C920868; Thu, 23 May 2019 19:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639578; bh=J41EuJLG+sXz2i4AKh/xVoeOsnYj33XSb3EDyOR4SOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjS7/piVzC6JoSPF4MeteIaG4LZWgT2nci9aXRLzPfieAgWwe5qsrFzl4CLoM40ac JvZElRO5Vvmg2VGQN3EtnIYLpIhK8Z8TmGq+VTLILBR6Up9ftkELcH8A2RaxBqFHkM edoTNwW7CVEH5LFFxWi0qUyoA/2Pr+W1bfNnZqo0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jianbo Liu , Edward Cree , "David S. Miller" Subject: [PATCH 5.1 017/122] net/mlx5e: Fix calling wrong function to get inner vlan key and mask Date: Thu, 23 May 2019 21:05:39 +0200 Message-Id: <20190523181707.134169459@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181705.091418060@linuxfoundation.org> References: <20190523181705.091418060@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 From: Jianbo Liu [ Upstream commit 12d5cbf89a6599f6bbd7b373dba0e74b5bd9c505 ] When flow_rule_match_XYZ() functions were first introduced, flow_rule_match_cvlan() for inner vlan is missing. In mlx5_core driver, to get inner vlan key and mask, flow_rule_match_vlan() is just called, which is wrong because it obtains outer vlan information by FLOW_DISSECTOR_KEY_VLAN. This commit fixes this by changing to call flow_rule_match_cvlan() after it's added. Fixes: 8f2566225ae2 ("flow_offload: add flow_rule and flow_match structures and use them") Signed-off-by: Jianbo Liu Signed-off-by: Edward Cree Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -1561,7 +1561,7 @@ static int __parse_cls_flower(struct mlx if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) { struct flow_match_vlan match; - flow_rule_match_vlan(rule, &match); + flow_rule_match_cvlan(rule, &match); if (match.mask->vlan_id || match.mask->vlan_priority || match.mask->vlan_tpid) {