From patchwork Fri Jan 8 05:30:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12005775 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B24C433E9 for ; Fri, 8 Jan 2021 05:31:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 621AC233EE for ; Fri, 8 Jan 2021 05:31:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbhAHFbn (ORCPT ); Fri, 8 Jan 2021 00:31:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:35764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727145AbhAHFbi (ORCPT ); Fri, 8 Jan 2021 00:31:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 920742343B; Fri, 8 Jan 2021 05:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610083857; bh=3OMEF2lY2e3KG2yS3rlIrF/fVnWCck/jj3EHH6R2dXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFD6hPO0n3ztFBLmtpcFWGTevFFTvels+L0F9j5sqTA/JikuuFaXff0iyZXQeabOy Ho03DXGmH0jyM3I5uybVWwH4Yqlt8msi264SNu7ouZkLIStHAZ7SNs4LIrU25Ow8dm wh5ImN84iD01AyzJq0hVp0OyuvEl/0IPF8stPUPa9vg3GEE5rhPrKUJHg1ZzyuJ8vr xFapE/uiTApJKV6/4hMFTOfkzO8lzc5wsAqGnE2SaysfaIeDV6XmzEkH4hGfNtFv8b 5Kk70EBf4FiYSGZZqp2PDX3vHbartKeBuDQBVFFxdcG7+WjldJE9C0WtXnLsCtNDJ5 SGn76RL9JjY3A== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Eli Cohen , Roi Dayan , Mark Bloch , Saeed Mahameed Subject: [net-next 03/15] net/mlx5: E-Switch, use new cap as condition for mpls over udp Date: Thu, 7 Jan 2021 21:30:42 -0800 Message-Id: <20210108053054.660499-4-saeed@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210108053054.660499-1-saeed@kernel.org> References: <20210108053054.660499-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Eli Cohen Use tunnel_stateless_mpls_over_udp instead of MLX5_FLEX_PROTO_CW_MPLS_UDP since new devices have native support for mpls over udp and do not rely on flex parser. Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c index 1f9526244222..3479672e84cf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c @@ -81,8 +81,8 @@ static int parse_tunnel(struct mlx5e_priv *priv, if (!enc_keyid.mask->keyid) return 0; - if (!(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) & - MLX5_FLEX_PROTO_CW_MPLS_UDP)) + if (!MLX5_CAP_ETH(priv->mdev, tunnel_stateless_mpls_over_udp) && + !(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) & MLX5_FLEX_PROTO_CW_MPLS_UDP)) return -EOPNOTSUPP; flow_rule_match_mpls(rule, &match);