From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71E02A04C1 for ; Mon, 10 Aug 2020 13:00:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6551C25D9; Mon, 10 Aug 2020 13:00:50 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 14C7825D9 for ; Mon, 10 Aug 2020 13:00:49 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id l2so7725351wrc.7 for ; Mon, 10 Aug 2020 04:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=oLpZ/rlBHqnLBr508FL1lLaDOy9Bmx9i+e4JJV5y2xU=; b=Hro/coJ+p8N3npRUktoUdvR7NlsWu4DyDy1cu38a+F8gYIuoq/yvvBZwT0LT9fhwTL /FbAMY3rtIwhooqzty3sm08BYpvh3xWf5M9KQqhzT81uegI0iTwurfRT2esxpqzPtLeG UjGLEhfeWswl/LBQIt/7Svd8IsEuh3JvhAl9KhZ+4fIXGPqVQZRsCl2Vuqa+we0wVgC6 dSz2N6zYfofjkm/alCTYYJOLCrk4fzLppkvUMWnijf2xAzd/mOZSybCS/Tx8xwy9oKnk EG91Hjj3iroxJyebNkzikoY/Jg7sevIoBn6nOmWXmZIvRvPPHpa2YnoxbEfHgmBj6LzS qUCg== X-Gm-Message-State: AOAM531eTZHpNFEtKH99EtEDhbEqbtkHDZe7hTTA4BAS875/I5vlnCli EqIotM4NPoVh8rH5EOMUQKo= X-Google-Smtp-Source: ABdhPJyUAr5CLwV0OVIlm52KwIgDvFJoBPkzeoR2R/E4Blfx0hK7Feq2RHgrNf4UJ+1J25rUgwhsog== X-Received: by 2002:a05:6000:1091:: with SMTP id y17mr25509819wrw.255.1597057248624; Mon, 10 Aug 2020 04:00:48 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id f15sm21090183wrt.80.2020.08.10.04.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 04:00:47 -0700 (PDT) Message-ID: From: Luca Boccassi To: Raslan Darawsheh Cc: Slava Ovsiienko , dpdk stable Date: Mon, 10 Aug 2020 12:00:47 +0100 In-Reply-To: References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> ,<20200806095411.774624-11-luca.boccassi@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, 2020-08-10 at 07:27 +0000, Raslan Darawsheh wrote: > Hi Luca, >=20 > please be noted that with this change you'll get a compilation failure wh= en debug is enabled for MLX5, > if we don't have this patch backported before it > http://patches.dpdk.org/patch/74534/ >=20 >=20 > Kindest regards > Raslan Darawsheh Thanks, that patch is included already as well, so everything should be good > From: luca.boccassi@gmail.com > Sent: Thursday, August 6, 2020 12:53 PM > To: Raslan Darawsheh > Cc: Slava Ovsiienko ; dpdk stable > Subject: patch 'net/mlx5: fix flow items size calculation' has been queue= d to stable release 19.11.4 > =20 > Hi, >=20 > FYI, your patch has been queued to stable release 19.11.4 >=20 > Note it hasn't been pushed to https://eur03.safelinks.protection.outlook.= com/?url=3Dhttp%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&data=3D02%7C01%= 7Crasland%40mellanox.com%7C1c9c6e447cb242871ce408d839ef3c65%7Ca652971c7d2e4= d9ba6a4d149256f461b%7C0%7C0%7C637323046965820421&sdata=3D%2Fxuhw7GFWJK3= JMQ5aLmI6Ml%2BXzpVNoJatg89ECB5XeM%3D&reserved=3D0 yet. > It will be pushed if I get no objections before 08/08/20. So please > shout if anyone has objections. >=20 > Also note that after the patch there's a diff of the upstream commit vs t= he > patch applied to the branch. This will indicate if there was any rebasing > needed to apply to the stable branch. If there were code changes for reba= sing > (ie: not only metadata diffs), please double check that the rebase was > correctly done. >=20 > Thanks. >=20 > Luca Boccassi >=20 > --- > From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001 > From: Raslan Darawsheh > Date: Thu, 16 Jul 2020 15:14:55 +0300 > Subject: [PATCH] net/mlx5: fix flow items size calculation >=20 > [ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ] >=20 > flow_dv_get_item_len returns the actual header size of > an rte_flow item. >=20 > Changing any of the structs for rte_flow items by adding > or removing some extra fields will break this function. >=20 > This fixes the behavior by returning the actual header size > of each item. >=20 > Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs") >=20 > Signed-off-by: Raslan Darawsheh > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow_dv.c | 31 ++++++++++++++----------------- > 1 file changed, 14 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c > index bfb27a602..e40cf3c2a 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -27,6 +27,7 @@ > #include > #include > #include > +#include > =20 > #include "mlx5.h" > #include "mlx5_defs.h" > @@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register > return 0; > } > /** > - * Get the size of specific rte_flow_item_type > + * Get the size of specific rte_flow_item_type hdr size > * > * @param[in] item_type > * Tested rte_flow_item_type. > @@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register > * sizeof struct item_type, 0 if void or irrelevant. > */ > static size_t > -flow_dv_get_item_len(const enum rte_flow_item_type item_type) > +flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type) > { > size_t retval; > =20 > switch (item_type) { > case RTE_FLOW_ITEM_TYPE_ETH: > - retval =3D sizeof(struct rte_flow_item_eth); > + retval =3D sizeof(struct rte_ether_hdr); > break; > case RTE_FLOW_ITEM_TYPE_VLAN: > - retval =3D sizeof(struct rte_flow_item_vlan); > + retval =3D sizeof(struct rte_vlan_hdr); > break; > case RTE_FLOW_ITEM_TYPE_IPV4: > - retval =3D sizeof(struct rte_flow_item_ipv4); > + retval =3D sizeof(struct rte_ipv4_hdr); > break; > case RTE_FLOW_ITEM_TYPE_IPV6: > - retval =3D sizeof(struct rte_flow_item_ipv6); > + retval =3D sizeof(struct rte_ipv6_hdr); > break; > case RTE_FLOW_ITEM_TYPE_UDP: > - retval =3D sizeof(struct rte_flow_item_udp); > + retval =3D sizeof(struct rte_udp_hdr); > break; > case RTE_FLOW_ITEM_TYPE_TCP: > - retval =3D sizeof(struct rte_flow_item_tcp); > + retval =3D sizeof(struct rte_tcp_hdr); > break; > case RTE_FLOW_ITEM_TYPE_VXLAN: > - retval =3D sizeof(struct rte_flow_item_vxlan); > + case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: > + retval =3D sizeof(struct rte_vxlan_hdr); > break; > case RTE_FLOW_ITEM_TYPE_GRE: > - retval =3D sizeof(struct rte_flow_item_gre); > - break; > case RTE_FLOW_ITEM_TYPE_NVGRE: > - retval =3D sizeof(struct rte_flow_item_nvgre); > - break; > - case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: > - retval =3D sizeof(struct rte_flow_item_vxlan_gpe); > + retval =3D sizeof(struct rte_gre_hdr); > break; > case RTE_FLOW_ITEM_TYPE_MPLS: > - retval =3D sizeof(struct rte_flow_item_mpls); > + retval =3D sizeof(struct rte_mpls_hdr); > break; > case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */ > default: > @@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_it= em *items, uint8_t *buf, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, "invalid empty data"); > for (; items->type !=3D RTE_FLOW_ITEM_TYPE_END; items++) { > - len =3D flow_dv_get_item_len(items->type); > + len =3D flow_dv_get_item_hdr_len(items->type); > if (len + temp_size > MLX5_ENCAP_MAX_LEN) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_AC= TION,