From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Lior Margalit <lmargalit@nvidia.com>
Cc: dpdk stable <stable@dpdk.org>, Matan Azrad <matan@nvidia.com>,
Ori Kam <orika@nvidia.com>
Subject: Re: [dpdk-stable] [PATCH 19.11] net/mlx5: fix IPIP multi-tunnel validation
Date: Wed, 11 Aug 2021 13:22:46 +0200 [thread overview]
Message-ID: <CAATJJ0KDXEShAB9k2Xub9Ziq=t6a+qs9LrZz7TSa74kBmpq_Xw@mail.gmail.com> (raw)
In-Reply-To: <20210811101941.2001164-1-lmargalit@nvidia.com>
On Wed, Aug 11, 2021 at 12:20 PM Lior Margalit <lmargalit@nvidia.com> wrote:
>
> [ upstream commit fa06906a48 ]
Thank you, applied
> A flow rule must not include multiple tunnel layers.
> An attempt to create such a rule, for example:
> testpmd> flow create .../ vxlan / eth / ipv4 proto is 4 / end <actions>
> results in an unclear error.
>
> In the current implementation there is a check for
> multiple IPIP tunnels, but not for combination of IPIP
> and a different kind of tunnel, such as VXLAN. The fix
> is to enhance the above check to use MLX5_FLOW_LAYER_TUNNEL
> that consists of all the tunnel masks. The error message
> will be "multiple tunnel not supported".
>
> Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")
>
> Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 65064ffb0..005171d09 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -1589,7 +1589,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
> RTE_FLOW_ERROR_TYPE_ITEM, item,
> "IPv4 cannot follow L2/VLAN layer "
> "which ether type is not IPv4");
> - if (item_flags & MLX5_FLOW_LAYER_IPIP) {
> + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
> if (mask && spec)
> next_proto = mask->hdr.next_proto_id &
> spec->hdr.next_proto_id;
> @@ -1691,7 +1691,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
> RTE_FLOW_ERROR_TYPE_ITEM, item,
> "IPv6 cannot follow L2/VLAN layer "
> "which ether type is not IPv6");
> - if (item_flags & MLX5_FLOW_LAYER_IPV6_ENCAP) {
> + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
> if (mask && spec)
> next_proto = mask->hdr.proto & spec->hdr.proto;
> if (next_proto == IPPROTO_IPIP || next_proto == IPPROTO_IPV6)
> --
> 2.25.1
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
prev parent reply other threads:[~2021-08-11 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 10:19 Lior Margalit
2021-08-11 11:22 ` Christian Ehrhardt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAATJJ0KDXEShAB9k2Xub9Ziq=t6a+qs9LrZz7TSa74kBmpq_Xw@mail.gmail.com' \
--to=christian.ehrhardt@canonical.com \
--cc=lmargalit@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).