Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2905298iog; Mon, 27 Jun 2022 05:29:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vg5bAbfT+ZgP0AAHe5tGZ/uIFVL/iLQOX1nPYaz2VgFmGst5LWIj2piC5QEndB+MI8Uf7r X-Received: by 2002:a05:6402:43c7:b0:435:8a92:e8d0 with SMTP id p7-20020a05640243c700b004358a92e8d0mr16511088edc.174.1656332981129; Mon, 27 Jun 2022 05:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656332981; cv=none; d=google.com; s=arc-20160816; b=lEdP7HaPDgIyx+Or951/Lg0tuJjthAYwYl24d+8kTTQoIHnECx6EgQ6FyImeaSCwdd aSZqw/VPdif8hHHMwUE8q+jC7jgk4QoQxdwerJuY01/T1n3yShf9BWg3t3YE40y8Wx8l F+M/RiI0adxKi5uPTMDTsQpFPjGz0c8HhenKdBmqmoyYaiX34xBc8hy0cVho1QMw+wcw oAs2J5ITemBzSqxs8TvoSkjT8oycyte7NaKP7I95B+nv+/RDEROns43cbS6T2YDXFsdE tbz2LkCsXF2zSAQpcXtF0EvE8W9DmXokvEIQQNiI1+fMpmm/gbBsjRca1fa7SPWpWeYX vzHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HKr/aERxSLohBGDpdkDP6rSoQrVY5B+aPUORj2xSBC0=; b=n3yHH/M4p1N/bTy+iuYKWssGAotnvhmGw8p46zJ45zPoXp+aBNVTU7hrTFCGFZH1in vKQShzP69FIj3uxPIUsGr8jniM7hzmOs9fF3IiMudqwqm/5WEaww295fLR9keF/vSRHF hsoKDo8YZbsCXiZ+BFXaEcsOE1SCvFxOlKmiHPPE6Sb8QrIV+JKiTg+mT8uIW/uPBGBH 3HdmVYX1RueLmeuZ0yKP9ZrCZ6PE7MHdDEvDvDakWt3VURjva1Jp6L505qJF939PQ2Og kMqAGiukyGynl5zAXc3AI/akyCFYb9mxqv/c+pHYjOca2vLwaXOo79/OO8r8EVGZpMxN wMjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2E4BoDJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a509344000000b0042ddac25209si13211061eda.92.2022.06.27.05.29.15; Mon, 27 Jun 2022 05:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2E4BoDJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238875AbiF0Lyf (ORCPT + 99 others); Mon, 27 Jun 2022 07:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238483AbiF0Lsb (ORCPT ); Mon, 27 Jun 2022 07:48:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204B0BF59; Mon, 27 Jun 2022 04:41:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B217861192; Mon, 27 Jun 2022 11:41:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFED4C3411D; Mon, 27 Jun 2022 11:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330110; bh=viIllrMNqwwOM5W6eSKdS3DEUhpKz86OL8D4zf+4BfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2E4BoDJiX8qJpb265i0hmGLhkyNic70+faB43q2GtmVJX2sw8i+6kNi7GtXb2tPwJ JXUGWCIYso8yxuvm4Eg48b/Dx9dxsRuyG7iiWe5Ev5sdF+XkEB6X+HChbdqfbmSbJK ak/cuqPJrzuVZgJsu+qLNxB3lKQwADdi7Ad1q47I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marcin Szycik , Sandeep Penigalapati , Tony Nguyen , Sasha Levin Subject: [PATCH 5.18 085/181] ice: ignore protocol field in GTP offload Date: Mon, 27 Jun 2022 13:20:58 +0200 Message-Id: <20220627111947.025128170@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcin Szycik [ Upstream commit d4ea6f6373ef56d1d795a24f1f5874f4a6019199 ] Commit 34a897758efe ("ice: Add support for inner etype in switchdev") added the ability to match on inner ethertype. A side effect of that change is that it is now impossible to add some filters for protocols which do not contain inner ethtype field. tc requires the protocol field to be specified when providing certain other options, e.g. src_ip. This is a problem in case of GTP - when user wants to specify e.g. src_ip, they also need to specify protocol in tc command (otherwise tc fails with: Illegal "src_ip"). Because GTP is a tunnel, the protocol field is treated as inner protocol. GTP does not contain inner ethtype field and the filter cannot be added. To fix this, ignore the ethertype field in case of GTP filters. Fixes: 9a225f81f540 ("ice: Support GTP-U and GTP-C offload in switchdev") Signed-off-by: Marcin Szycik Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_tc_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c index 3acd9f921c44..734bfa121e24 100644 --- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c @@ -994,7 +994,9 @@ ice_parse_cls_flower(struct net_device *filter_dev, struct ice_vsi *vsi, n_proto_key = ntohs(match.key->n_proto); n_proto_mask = ntohs(match.mask->n_proto); - if (n_proto_key == ETH_P_ALL || n_proto_key == 0) { + if (n_proto_key == ETH_P_ALL || n_proto_key == 0 || + fltr->tunnel_type == TNL_GTPU || + fltr->tunnel_type == TNL_GTPC) { n_proto_key = 0; n_proto_mask = 0; } else { -- 2.35.1