From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00070.outbound.protection.outlook.com [40.107.0.70]) by dpdk.org (Postfix) with ESMTP id DD7DD5B2E; Wed, 17 Apr 2019 07:03:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mprf7Oryomaev71Gu2UCkA/jxlvYi7oqyN9Ct5kowbg=; b=WoKdNyi4BtTZzXUOxmFFJEzCM8MSKlwK4fQ78Nufpd+JKJTm0bdoHLrr5FjjEIksakwGy768XBnLleBuVdxrQlObTNA1C7DFY3E7TBJ6jSIJwkVb3S+PsWNmP2hOOM6WLNOx1NYoqGXPB3P7T+vpl7p4qWsssHnyXkbOf7ES8lg= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3443.eurprd05.prod.outlook.com (10.170.125.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Wed, 17 Apr 2019 05:03:22 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8%6]) with mapi id 15.20.1813.011; Wed, 17 Apr 2019 05:03:22 +0000 From: Ori Kam To: Yongseok Koh CC: Shahaf Shuler , "dev@dpdk.org" , Dekel Peled , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix modify header action position Thread-Index: AQHU9K3uA0vwGKERqEiY0Bwijsn6z6Y/y9sw Date: Wed, 17 Apr 2019 05:03:22 +0000 Message-ID: References: <1555273197-1949-1-git-send-email-orika@mellanox.com> <20190416234126.GC21044@mtidpdk.mti.labs.mlnx> In-Reply-To: <20190416234126.GC21044@mtidpdk.mti.labs.mlnx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b97dfaa4-88f2-44ef-620c-08d6c2f20432 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600140)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3443; x-ms-traffictypediagnostic: AM4PR05MB3443: x-microsoft-antispam-prvs: x-forefront-prvs: 0010D93EFE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(396003)(39850400004)(366004)(13464003)(189003)(199004)(105586002)(106356001)(33656002)(97736004)(6506007)(5660300002)(53546011)(14444005)(256004)(6436002)(74316002)(7736002)(305945005)(71190400001)(71200400001)(8676002)(8936002)(81156014)(81166006)(186003)(52536014)(446003)(486006)(476003)(11346002)(26005)(478600001)(9686003)(102836004)(55016002)(4326008)(25786009)(450100002)(53936002)(6862004)(6246003)(99286004)(7696005)(54906003)(229853002)(2906002)(76176011)(6636002)(68736007)(14454004)(316002)(6116002)(3846002)(86362001)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3443; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: imq5+S6xbQXAMujGa7c21PkElqhMSguE7TzR15UtS45UoLfojiRYSSz6nFTlXPOjLwIG9pCO+FYssRJZ28QHcxuuKZAGchcu/wPuKwG5QTUVqwfh0n5W+bqG3KfBB1Lf49HxvHYFYvDqY0jqyWnyIuHlf6kokgWVumU/3lt/v/9QLqfoi6nj8OJzjRShxUsbePJDaT2XTtEMN52N8fKWVSyZ0Yx8oHHrgYNlt3RSnfmCIwEK0QDfOrCpJP9MGWjpmeYhwhDjr2UoHqZM8qPj2Ow7Vmfu35QfaKMToePbcL3IhTslKStDq70iHDEHbVvFaRsbP5knPkT04HFmC514Eb39ERzpn27jDh3Bv4LJeVEgqSIfwb0L0jf7nILwfTl1eI4IHlad7+sQY2au7bg3TvLrftH7bmaporKOyzQHZbc= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b97dfaa4-88f2-44ef-620c-08d6c2f20432 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2019 05:03:22.5757 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3443 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix modify header action position X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 05:03:24 -0000 PSB > -----Original Message----- > From: Yongseok Koh > Sent: Wednesday, April 17, 2019 2:42 AM > To: Ori Kam > Cc: Shahaf Shuler ; dev@dpdk.org; Dekel Peled > ; stable@dpdk.org > Subject: Re: [PATCH] net/mlx5: fix modify header action position >=20 > On Sun, Apr 14, 2019 at 08:19:57PM +0000, Ori Kam wrote: > > According to RTE flow the action order should be the order that the > > actions were given. > > In the case of modify actions the position of the action was always > > last. > > > > This commit solves this issue by saving the position of the first modif= y > > action, and then adds to this position the pointer to the modify action= . > > > > Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verb= s") > > Cc: dekelp@mellanox.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Ori Kam > > --- > > drivers/net/mlx5/mlx5_flow_dv.c | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > > index 3862b26..7b5eab7 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -3235,6 +3235,7 @@ struct field_modify_info modify_tcp[] =3D { > > }; > > union flow_dv_attr flow_attr =3D { .attr =3D 0 }; > > struct mlx5_flow_dv_tag_resource tag_resource; > > + uint32_t modify_action_position =3D UINT32_MAX; >=20 > How about modify_action_idx and setting negative value as invalid? I don'= t > force > it but it is just your choice. >=20 That was my first thought, but it gave warning when int is used as index to= array. > int modify_action_idx =3D -1; >=20 > > if (priority =3D=3D MLX5_FLOW_PRIO_RSVD) > > priority =3D priv->config.flow_prio - 1; > > @@ -3419,6 +3420,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ? > > MLX5_FLOW_ACTION_SET_MAC_SRC > : > > MLX5_FLOW_ACTION_SET_MAC_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; >=20 > Even though this does right thing, I hope it to be neater. Same lines are > repeating before 'break', so you can move it just out of this switch-case= . > For example, >=20 > for(..) { > switch(..) { > case .. > default: > break; > } > /* Check if a modify action is firstly seen. */ > if (modify_action_idx < 0 && > (action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS)) > modify_action_idx =3D actions_n++; > } >=20 > thanks, > Yongseok >=20 I like your idea, will change. > > break; > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST: > > @@ -3429,6 +3432,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ? > > MLX5_FLOW_ACTION_SET_IPV4_SRC : > > MLX5_FLOW_ACTION_SET_IPV4_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: > > @@ -3439,6 +3444,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ? > > MLX5_FLOW_ACTION_SET_IPV6_SRC : > > MLX5_FLOW_ACTION_SET_IPV6_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST: > > @@ -3450,6 +3457,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_TP_SRC ? > > MLX5_FLOW_ACTION_SET_TP_SRC : > > MLX5_FLOW_ACTION_SET_TP_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_DEC_TTL: > > if (flow_dv_convert_action_modify_dec_ttl(&res, > items, > > @@ -3457,6 +3466,8 @@ struct field_modify_info modify_tcp[] =3D { > > error)) > > return -rte_errno; > > action_flags |=3D MLX5_FLOW_ACTION_DEC_TTL; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_TTL: > > if (flow_dv_convert_action_modify_ttl(&res, actions, > > @@ -3464,6 +3475,8 @@ struct field_modify_info modify_tcp[] =3D { > > error)) > > return -rte_errno; > > action_flags |=3D MLX5_FLOW_ACTION_SET_TTL; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_END: > > actions_end =3D true; > > @@ -3474,7 +3487,7 @@ struct field_modify_info modify_tcp[] =3D { > > dev_flow, > > error)) > > return -rte_errno; > > - dev_flow->dv.actions[actions_n++] =3D > > + dev_flow->dv.actions[modify_action_position] > =3D > > dev_flow->dv.modify_hdr- > >verbs_action; > > } > > break; > > -- > > 1.8.3.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D0AF1A00E6 for ; Wed, 17 Apr 2019 07:03:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B78535F27; Wed, 17 Apr 2019 07:03:24 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00070.outbound.protection.outlook.com [40.107.0.70]) by dpdk.org (Postfix) with ESMTP id DD7DD5B2E; Wed, 17 Apr 2019 07:03:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mprf7Oryomaev71Gu2UCkA/jxlvYi7oqyN9Ct5kowbg=; b=WoKdNyi4BtTZzXUOxmFFJEzCM8MSKlwK4fQ78Nufpd+JKJTm0bdoHLrr5FjjEIksakwGy768XBnLleBuVdxrQlObTNA1C7DFY3E7TBJ6jSIJwkVb3S+PsWNmP2hOOM6WLNOx1NYoqGXPB3P7T+vpl7p4qWsssHnyXkbOf7ES8lg= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3443.eurprd05.prod.outlook.com (10.170.125.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Wed, 17 Apr 2019 05:03:22 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::a4d7:6c70:9829:2cc8%6]) with mapi id 15.20.1813.011; Wed, 17 Apr 2019 05:03:22 +0000 From: Ori Kam To: Yongseok Koh CC: Shahaf Shuler , "dev@dpdk.org" , Dekel Peled , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix modify header action position Thread-Index: AQHU9K3uA0vwGKERqEiY0Bwijsn6z6Y/y9sw Date: Wed, 17 Apr 2019 05:03:22 +0000 Message-ID: References: <1555273197-1949-1-git-send-email-orika@mellanox.com> <20190416234126.GC21044@mtidpdk.mti.labs.mlnx> In-Reply-To: <20190416234126.GC21044@mtidpdk.mti.labs.mlnx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b97dfaa4-88f2-44ef-620c-08d6c2f20432 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600140)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3443; x-ms-traffictypediagnostic: AM4PR05MB3443: x-microsoft-antispam-prvs: x-forefront-prvs: 0010D93EFE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(396003)(39850400004)(366004)(13464003)(189003)(199004)(105586002)(106356001)(33656002)(97736004)(6506007)(5660300002)(53546011)(14444005)(256004)(6436002)(74316002)(7736002)(305945005)(71190400001)(71200400001)(8676002)(8936002)(81156014)(81166006)(186003)(52536014)(446003)(486006)(476003)(11346002)(26005)(478600001)(9686003)(102836004)(55016002)(4326008)(25786009)(450100002)(53936002)(6862004)(6246003)(99286004)(7696005)(54906003)(229853002)(2906002)(76176011)(6636002)(68736007)(14454004)(316002)(6116002)(3846002)(86362001)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3443; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: imq5+S6xbQXAMujGa7c21PkElqhMSguE7TzR15UtS45UoLfojiRYSSz6nFTlXPOjLwIG9pCO+FYssRJZ28QHcxuuKZAGchcu/wPuKwG5QTUVqwfh0n5W+bqG3KfBB1Lf49HxvHYFYvDqY0jqyWnyIuHlf6kokgWVumU/3lt/v/9QLqfoi6nj8OJzjRShxUsbePJDaT2XTtEMN52N8fKWVSyZ0Yx8oHHrgYNlt3RSnfmCIwEK0QDfOrCpJP9MGWjpmeYhwhDjr2UoHqZM8qPj2Ow7Vmfu35QfaKMToePbcL3IhTslKStDq70iHDEHbVvFaRsbP5knPkT04HFmC514Eb39ERzpn27jDh3Bv4LJeVEgqSIfwb0L0jf7nILwfTl1eI4IHlad7+sQY2au7bg3TvLrftH7bmaporKOyzQHZbc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b97dfaa4-88f2-44ef-620c-08d6c2f20432 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2019 05:03:22.5757 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3443 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix modify header action position X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190417050322.pdpwpMCZXe1gC7v9nyaMahbJilHo6ESfEPw9ckjQ3bk@z> PSB > -----Original Message----- > From: Yongseok Koh > Sent: Wednesday, April 17, 2019 2:42 AM > To: Ori Kam > Cc: Shahaf Shuler ; dev@dpdk.org; Dekel Peled > ; stable@dpdk.org > Subject: Re: [PATCH] net/mlx5: fix modify header action position >=20 > On Sun, Apr 14, 2019 at 08:19:57PM +0000, Ori Kam wrote: > > According to RTE flow the action order should be the order that the > > actions were given. > > In the case of modify actions the position of the action was always > > last. > > > > This commit solves this issue by saving the position of the first modif= y > > action, and then adds to this position the pointer to the modify action= . > > > > Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verb= s") > > Cc: dekelp@mellanox.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Ori Kam > > --- > > drivers/net/mlx5/mlx5_flow_dv.c | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > > index 3862b26..7b5eab7 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -3235,6 +3235,7 @@ struct field_modify_info modify_tcp[] =3D { > > }; > > union flow_dv_attr flow_attr =3D { .attr =3D 0 }; > > struct mlx5_flow_dv_tag_resource tag_resource; > > + uint32_t modify_action_position =3D UINT32_MAX; >=20 > How about modify_action_idx and setting negative value as invalid? I don'= t > force > it but it is just your choice. >=20 That was my first thought, but it gave warning when int is used as index to= array. > int modify_action_idx =3D -1; >=20 > > if (priority =3D=3D MLX5_FLOW_PRIO_RSVD) > > priority =3D priv->config.flow_prio - 1; > > @@ -3419,6 +3420,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ? > > MLX5_FLOW_ACTION_SET_MAC_SRC > : > > MLX5_FLOW_ACTION_SET_MAC_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; >=20 > Even though this does right thing, I hope it to be neater. Same lines are > repeating before 'break', so you can move it just out of this switch-case= . > For example, >=20 > for(..) { > switch(..) { > case .. > default: > break; > } > /* Check if a modify action is firstly seen. */ > if (modify_action_idx < 0 && > (action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS)) > modify_action_idx =3D actions_n++; > } >=20 > thanks, > Yongseok >=20 I like your idea, will change. > > break; > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST: > > @@ -3429,6 +3432,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ? > > MLX5_FLOW_ACTION_SET_IPV4_SRC : > > MLX5_FLOW_ACTION_SET_IPV4_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: > > @@ -3439,6 +3444,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ? > > MLX5_FLOW_ACTION_SET_IPV6_SRC : > > MLX5_FLOW_ACTION_SET_IPV6_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST: > > @@ -3450,6 +3457,8 @@ struct field_modify_info modify_tcp[] =3D { > > > RTE_FLOW_ACTION_TYPE_SET_TP_SRC ? > > MLX5_FLOW_ACTION_SET_TP_SRC : > > MLX5_FLOW_ACTION_SET_TP_DST; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_DEC_TTL: > > if (flow_dv_convert_action_modify_dec_ttl(&res, > items, > > @@ -3457,6 +3466,8 @@ struct field_modify_info modify_tcp[] =3D { > > error)) > > return -rte_errno; > > action_flags |=3D MLX5_FLOW_ACTION_DEC_TTL; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_SET_TTL: > > if (flow_dv_convert_action_modify_ttl(&res, actions, > > @@ -3464,6 +3475,8 @@ struct field_modify_info modify_tcp[] =3D { > > error)) > > return -rte_errno; > > action_flags |=3D MLX5_FLOW_ACTION_SET_TTL; > > + if (modify_action_position =3D=3D UINT32_MAX) > > + modify_action_position =3D actions_n++; > > break; > > case RTE_FLOW_ACTION_TYPE_END: > > actions_end =3D true; > > @@ -3474,7 +3487,7 @@ struct field_modify_info modify_tcp[] =3D { > > dev_flow, > > error)) > > return -rte_errno; > > - dev_flow->dv.actions[actions_n++] =3D > > + dev_flow->dv.actions[modify_action_position] > =3D > > dev_flow->dv.modify_hdr- > >verbs_action; > > } > > break; > > -- > > 1.8.3.1 > >