From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30985C54EBE for ; Tue, 10 Jan 2023 06:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbjAJGMm (ORCPT ); Tue, 10 Jan 2023 01:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230361AbjAJGMI (ORCPT ); Tue, 10 Jan 2023 01:12:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F8043DA5 for ; Mon, 9 Jan 2023 22:11:52 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id EDD81B81114 for ; Tue, 10 Jan 2023 06:11:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8310BC433EF; Tue, 10 Jan 2023 06:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673331109; bh=bjrhiK+vaZg4iVsXupldSBQ1hTV2x8Hy5WVJRw6MjEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z/3skOsbNExStNPRdvg5G+AeUGTM8CCAoPyjtZEEP90fe1AnkDc03UAdiv56Bl+cM Z9aIls/lkQjgzI/+pa554dtw84BhRTwH9OsspRkhp8nQ+7kpu0QDy4AnWKEA9f+s1k pMt31UZowGPS0ao0zt4xqk6rPyGXSxlyPU3HU9GbzPn/+pryM03opx4nteZb+ra8Ct R3iD21EiYsGMZ9XOsS5lPAaJSF7q9Gi9rfGnATJCcVlpWw0/ME+0i6C9NE7655aMah G1Qp/jnbu62mNX1u14aosBCQJciVBofAMSWof/8UMbjZHFOdqQYL5vV8631hXw24kn bnYadJdX0i+GQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Gavin Li , Maor Dickman Subject: [net 13/16] net/mlx5e: Don't support encap rules with gbp option Date: Mon, 9 Jan 2023 22:11:20 -0800 Message-Id: <20230110061123.338427-14-saeed@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110061123.338427-1-saeed@kernel.org> References: <20230110061123.338427-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Gavin Li Previously, encap rules with gbp option would be offloaded by mistake but driver does not support gbp option offload. To fix this issue, check if the encap rule has gbp option and don't offload the rule Fixes: d8f9dfae49ce ("net: sched: allow flower to match vxlan options") Signed-off-by: Gavin Li Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c index fd07c4cbfd1d..1f62c702b625 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c @@ -88,6 +88,8 @@ static int mlx5e_gen_ip_tunnel_header_vxlan(char buf[], struct udphdr *udp = (struct udphdr *)(buf); struct vxlanhdr *vxh; + if (tun_key->tun_flags & TUNNEL_VXLAN_OPT) + return -EOPNOTSUPP; vxh = (struct vxlanhdr *)((char *)udp + sizeof(struct udphdr)); *ip_proto = IPPROTO_UDP; -- 2.39.0