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 E9A64A0528; Mon, 20 Jan 2020 14:03:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 40E631252; Mon, 20 Jan 2020 14:03:24 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20040.outbound.protection.outlook.com [40.107.2.40]) by dpdk.org (Postfix) with ESMTP id 00A9F11A4; Mon, 20 Jan 2020 14:03:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c2PZIV9LM1r4WLj0YbeWGA7TXkIYBn5nRQPvjvJvGoNcovNkye+pO8wtvFOkfGk6ADCTK+AtuWSs2NBkOjTMzA0LivI22a6hb9vPISHGPB3+HfTug8DQcnrB6vdQyJ6X+fk9wKmpPObxlDKmkPoIFbxfa4irqc5Yrlv5ExUOy+jOrx0cE0POI3zg4V70FxpHDEGqs4QQqMHPebM98dpj7cDBBa0yGU3fHtI15LXP60u4/4kNLnWanjYS6F160TmWTn/JpfdCaM833Z5k8PBQZzVrEYYSxvjl/zwzzTp80rhBNPOXs+ZgK4iYspu9X8yBoe7qoydlbu3WlwaPueqbSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J3Bfxkyeu9SX50SOAO7Di1zwwCfpa8RxdVoRa+mWyjo=; b=dEEa7Q8/7wQob2V2/8df2Li4H+MiAh7rxgY9ex99AozEJ4DwBHoHF11qF01Njg5vu3N3hlirAkfkLzgQMMrABv06A8KIQiOfjxDbgDAoyh2lqCAIdrLOY6kRjEzVEPSbq2DEtoifqwpn5zOuuOGC1qKhR4vst4U9BGBxC6O2vUqwLvataV4syPCNsYdu6uw08we27nF6Jk//oAgKHFu0HY8jm2SlJIyI8mzWpMNrOag3+AkZtHNOirDIU1/3L37ucyVbUoAQoUK9Rz5i21oFRlKmEW/ZNSKmYAwA6kZBzl36e6d+FjwaCLdK6E8Ab2+PMOVnyXMH0HaEpzsgYxAk/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=J3Bfxkyeu9SX50SOAO7Di1zwwCfpa8RxdVoRa+mWyjo=; b=EM4rmrY681gKM8yvrtZWIz9Shh8IBsCTgOcwzzEKFc3ts8WVERe7EBrec2WhBGXvoVx/Q5h1aMfLR4dKl7oELGiz08SZ1AcQWOjQwWfZAbUV3vFKHvwGm0emNUNQFCg6Yy76l42MvZO2rl0dqXWWSKavkjfy0gcHFdhW6QFI6lY= Received: from AM5PR0501MB2579.eurprd05.prod.outlook.com (10.169.150.151) by AM5PR0501MB2385.eurprd05.prod.outlook.com (10.169.148.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.24; Mon, 20 Jan 2020 13:03:21 +0000 Received: from AM5PR0501MB2579.eurprd05.prod.outlook.com ([fe80::189a:c6d4:a60d:9a19]) by AM5PR0501MB2579.eurprd05.prod.outlook.com ([fe80::189a:c6d4:a60d:9a19%8]) with mapi id 15.20.2644.026; Mon, 20 Jan 2020 13:03:21 +0000 From: Ori Kam To: Bing Zhao , Slava Ovsiienko , Raslan Darawsheh , Matan Azrad CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v3] net/mlx5: fix modify actions support limitation Thread-Index: AQHVz3YNR1XXri3ITk+wkfG31iYFyqfzhPVw Date: Mon, 20 Jan 2020 13:03:21 +0000 Message-ID: References: <1578844612-153139-1-git-send-email-bingz@mellanox.com> <1579513387-138985-1-git-send-email-bingz@mellanox.com> In-Reply-To: <1579513387-138985-1-git-send-email-bingz@mellanox.com> 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-ht: Tenant x-ms-office365-filtering-correlation-id: 9a529cc0-fea2-4af3-c7d0-08d79da92098 x-ms-traffictypediagnostic: AM5PR0501MB2385:|AM5PR0501MB2385: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3044; x-forefront-prvs: 0288CD37D9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(39860400002)(396003)(366004)(346002)(199004)(189003)(52536014)(8676002)(53546011)(86362001)(6506007)(71200400001)(30864003)(55016002)(7696005)(5660300002)(9686003)(33656002)(186003)(2906002)(26005)(316002)(54906003)(6636002)(478600001)(66476007)(66556008)(66446008)(66946007)(64756008)(8936002)(450100002)(110136005)(4326008)(81166006)(81156014)(76116006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2385; H:AM5PR0501MB2579.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +Bst3SXGFgNwCKU3UsWQ3NIwb1MCyLbBaCxV8W/9fZV2moa9BZ4cwF6NbaRT8PH4r4A2lyeArZpqtG7c2jpyUsTtWLm7++Y43zgj5BSuX4wXRh0B7A7Afa4nrxeXyEvxdIUy5z7apNBFEB/uOkkXkf2rukTe6sn/2MohmurnSr5CxNUumudKBpFBgZyEW6wyqb4bwxiQDsMU/mFMLI/gSuiEdCRHC3OC3IOKxkcHO14X/wisU4deeHCMGZwzDnYjWywMHPdKrlUuwCu6TW4rFvWBj3jbTK0AGomIRa/CoDVWMn93UFxSYi+w5TjJ5OH353l2I8cfHwGVZwda94w7RIqCyrKhi3A0mA/Xcf58BTQ9CRL0a/0k3Xknu6rLMLFKMAn3z2RjFowbv4ITxXlkNCGHZaMHn/2WFuPdVcZe/wNLIuywNVJYqNI7UzayKSRb 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: 9a529cc0-fea2-4af3-c7d0-08d79da92098 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2020 13:03:21.6652 (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-CrossTenant-userprincipalname: d4Py8Wl3XHwB8jgzopMsyZ4jHffInmMSNHQgNLLApl9xbcfmyS+so6wyPIQ2S83zUnwbBWxb1WzUYQndqEVE0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2385 Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: fix modify actions support limitation 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" > -----Original Message----- > From: Bing Zhao > Sent: Monday, January 20, 2020 11:43 AM > To: Ori Kam ; Slava Ovsiienko > ; Raslan Darawsheh ; > Matan Azrad > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH v3] net/mlx5: fix modify actions support limitation >=20 > In the root table, there is some limitation of total number of header > modify actions, 16 or 8 for each. But in other tables, there is no > such strict limitation. In an IPv6 case, the IP fields modifying > will occupy more actions than that in IPv4, so the total support > number should be increased in order to support as many actions as > possible for an IPv6 + TCP packet. > And in the meanwhile, the memory consumption should also be taken > into consideration because sometimes only several actions are needed. > The root table checking could also be done in low layer driver and > the error code will be returned if the actions number is over the > maximal supported value. >=20 > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions number") > Signed-off-by: Bing Zhao > --- Acked-by: Ori Kam Thanks, Ori > drivers/net/mlx5/mlx5_flow.h | 15 +++--- > drivers/net/mlx5/mlx5_flow_dv.c | 108 ++++++++++++++++++++++--------- > --------- > 2 files changed, 68 insertions(+), 55 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index e42c98a..2e94371 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -389,11 +389,14 @@ struct mlx5_flow_dv_tag_resource { >=20 > /* > * Number of modification commands. > - * If extensive metadata registers are supported > - * the maximal actions amount is 16 and 8 otherwise. > + * If extensive metadata registers are supported, the maximal actions > amount is > + * 16 and 8 otherwise on root table. The validation could also be done i= n the > + * lower driver layer. > + * On non-root table, there is no limitation, but 32 is enough right now= . > */ > -#define MLX5_MODIFY_NUM 16 > -#define MLX5_MODIFY_NUM_NO_MREG 8 > +#define MLX5_MAX_MODIFY_NUM 32 > +#define MLX5_ROOT_TBL_MODIFY_NUM 16 > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8 >=20 > /* Modify resource structure */ > struct mlx5_flow_dv_modify_hdr_resource { > @@ -404,9 +407,9 @@ struct mlx5_flow_dv_modify_hdr_resource { > /**< Verbs modify header action object. */ > uint8_t ft_type; /**< Flow table type, Rx or Tx. */ > uint32_t actions_num; /**< Number of modification actions. */ > - struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM]; > - /**< Modification actions. */ > uint64_t flags; /**< Flags for RDMA API. */ > + struct mlx5_modification_cmd actions[]; > + /**< Modification actions. */ > }; >=20 > /* Jump action resource structure. */ > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index c02517a..eec4c72 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -365,7 +365,7 @@ struct field_modify_info modify_tcp[] =3D { > uint32_t mask; > uint32_t data; >=20 > - if (i >=3D MLX5_MODIFY_NUM) > + if (i >=3D MLX5_MAX_MODIFY_NUM) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, NULL, > "too many items to modify"); > @@ -406,11 +406,11 @@ struct field_modify_info modify_tcp[] =3D { > ++i; > ++field; > } while (field->size); > - resource->actions_num =3D i; > - if (!resource->actions_num) > + if (resource->actions_num =3D=3D i) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "invalid modification flow item"); > + resource->actions_num =3D i; > return 0; > } >=20 > @@ -571,7 +571,7 @@ struct field_modify_info modify_tcp[] =3D { > struct mlx5_modification_cmd *actions =3D &resource->actions[i]; > struct field_modify_info *field =3D modify_vlan_out_first_vid; >=20 > - if (i >=3D MLX5_MODIFY_NUM) > + if (i >=3D MLX5_MAX_MODIFY_NUM) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, NULL, > "too many items to modify"); > @@ -904,7 +904,7 @@ struct field_modify_info modify_tcp[] =3D { > struct mlx5_modification_cmd *actions =3D resource->actions; > uint32_t i =3D resource->actions_num; >=20 > - if (i >=3D MLX5_MODIFY_NUM) > + if (i >=3D MLX5_MAX_MODIFY_NUM) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "too many items to modify"); > @@ -916,10 +916,6 @@ struct field_modify_info modify_tcp[] =3D { > actions[i].data1 =3D rte_cpu_to_be_32(conf->data); > ++i; > resource->actions_num =3D i; > - if (!resource->actions_num) > - return rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > - "invalid modification flow item"); > return 0; > } >=20 > @@ -2334,7 +2330,6 @@ struct field_modify_info modify_tcp[] =3D { > domain =3D sh->rx_domain; > else > domain =3D sh->tx_domain; > - > /* Lookup a matching resource from cache. */ > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) { > if (resource->reformat_type =3D=3D cache_resource- > >reformat_type && > @@ -3445,21 +3440,27 @@ struct field_modify_info modify_tcp[] =3D { > * > * @param dev > * Pointer to rte_eth_dev structure. > + * @param flags > + * Flags bits to check if root level. > * > * @return > * Max number of modify header actions device can support. > */ > static unsigned int > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev) > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev, uint64_t flags) > { > /* > * There's no way to directly query the max cap. Although it has to be > * acquried by iterative trial, it is a safe assumption that more > * actions are supported by FW if extensive metadata register is > - * supported. > + * supported. (Only in the root table) > */ > - return mlx5_flow_ext_mreg_supported(dev) ? > MLX5_MODIFY_NUM : > - > MLX5_MODIFY_NUM_NO_MREG; > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL)) > + return MLX5_MAX_MODIFY_NUM; > + else > + return mlx5_flow_ext_mreg_supported(dev) ? > + MLX5_ROOT_TBL_MODIFY_NUM : > + > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG; > } >=20 > /** > @@ -3618,8 +3619,12 @@ struct field_modify_info modify_tcp[] =3D { > struct mlx5_ibv_shared *sh =3D priv->sh; > struct mlx5_flow_dv_modify_hdr_resource *cache_resource; > struct mlx5dv_dr_domain *ns; > + uint32_t actions_len; >=20 > - if (resource->actions_num > > flow_dv_modify_hdr_action_max(dev)) > + resource->flags =3D > + dev_flow->group ? 0 : > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL; > + if (resource->actions_num > flow_dv_modify_hdr_action_max(dev, > + resource->flags)) > return rte_flow_error_set(error, EOVERFLOW, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "too many modify header items"); > @@ -3629,17 +3634,15 @@ struct field_modify_info modify_tcp[] =3D { > ns =3D sh->tx_domain; > else > ns =3D sh->rx_domain; > - resource->flags =3D > - dev_flow->group ? 0 : > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL; > /* Lookup a matching resource from cache. */ > + actions_len =3D resource->actions_num * sizeof(resource->actions[0]); > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) { > if (resource->ft_type =3D=3D cache_resource->ft_type && > resource->actions_num =3D=3D cache_resource->actions_num > && > resource->flags =3D=3D cache_resource->flags && > !memcmp((const void *)resource->actions, > (const void *)cache_resource->actions, > - (resource->actions_num * > - sizeof(resource->actions[0])))) { > + actions_len)) { > DRV_LOG(DEBUG, "modify-header resource %p: > refcnt %d++", > (void *)cache_resource, > rte_atomic32_read(&cache_resource- > >refcnt)); > @@ -3649,18 +3652,18 @@ struct field_modify_info modify_tcp[] =3D { > } > } > /* Register new modify-header resource. */ > - cache_resource =3D rte_calloc(__func__, 1, sizeof(*cache_resource), > 0); > + cache_resource =3D rte_calloc(__func__, 1, > + sizeof(*cache_resource) + actions_len, 0); > if (!cache_resource) > return rte_flow_error_set(error, ENOMEM, >=20 > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, > "cannot allocate resource > memory"); > *cache_resource =3D *resource; > + rte_memcpy(cache_resource->actions, resource->actions, > actions_len); > cache_resource->verbs_action =3D > mlx5_glue->dv_create_flow_action_modify_header > - (sh->ctx, cache_resource->ft_type, > - ns, cache_resource->flags, > - cache_resource->actions_num * > - sizeof(cache_resource->actions[0]), > + (sh->ctx, cache_resource->ft_type, > ns, > + cache_resource->flags, actions_len, > (uint64_t *)cache_resource- > >actions); > if (!cache_resource->verbs_action) { > rte_free(cache_resource); > @@ -6911,10 +6914,13 @@ struct field_modify_info modify_tcp[] =3D { > }; > int actions_n =3D 0; > bool actions_end =3D false; > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res =3D { > - .ft_type =3D attr->egress ? > MLX5DV_FLOW_TABLE_TYPE_NIC_TX : > - > MLX5DV_FLOW_TABLE_TYPE_NIC_RX > - }; > + union { > + struct mlx5_flow_dv_modify_hdr_resource res; > + uint8_t len[sizeof(struct > mlx5_flow_dv_modify_hdr_resource) + > + sizeof(struct mlx5_modification_cmd) * > + (MLX5_MAX_MODIFY_NUM + 1)]; > + } mhdr_dummy; > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res =3D > &mhdr_dummy.res; > union flow_dv_attr flow_attr =3D { .attr =3D 0 }; > uint32_t tag_be; > union mlx5_flow_tbl_key tbl_key; > @@ -6926,15 +6932,19 @@ struct field_modify_info modify_tcp[] =3D { > uint32_t table; > int ret =3D 0; >=20 > + mhdr_res->ft_type =3D attr->egress ? > MLX5DV_FLOW_TABLE_TYPE_NIC_TX : > + > MLX5DV_FLOW_TABLE_TYPE_NIC_RX; > ret =3D mlx5_flow_group_to_table(attr, dev_flow->external, attr- > >group, > &table, error); > if (ret) > return ret; > dev_flow->group =3D table; > if (attr->transfer) > - mhdr_res.ft_type =3D MLX5DV_FLOW_TABLE_TYPE_FDB; > + mhdr_res->ft_type =3D MLX5DV_FLOW_TABLE_TYPE_FDB; > if (priority =3D=3D MLX5_FLOW_PRIO_RSVD) > priority =3D dev_conf->flow_prio - 1; > + /* number of actions must be set to 0 in case of dirty stack. */ > + mhdr_res->actions_num =3D 0; > for (; !actions_end ; actions++) { > const struct rte_flow_action_queue *queue; > const struct rte_flow_action_rss *rss; > @@ -6972,7 +6982,7 @@ struct field_modify_info modify_tcp[] =3D { > }; >=20 > if (flow_dv_convert_action_mark(dev, > &mark, > - &mhdr_res, > + mhdr_res, > error)) > return -rte_errno; > action_flags |=3D > MLX5_FLOW_ACTION_MARK_EXT; > @@ -6994,7 +7004,7 @@ struct field_modify_info modify_tcp[] =3D { > actions->conf; >=20 > if (flow_dv_convert_action_mark(dev, mark, > - &mhdr_res, > + mhdr_res, > error)) > return -rte_errno; > action_flags |=3D > MLX5_FLOW_ACTION_MARK_EXT; > @@ -7015,7 +7025,7 @@ struct field_modify_info modify_tcp[] =3D { > break; > case RTE_FLOW_ACTION_TYPE_SET_META: > if (flow_dv_convert_action_set_meta > - (dev, &mhdr_res, attr, > + (dev, mhdr_res, attr, > (const struct rte_flow_action_set_meta *) > actions->conf, error)) > return -rte_errno; > @@ -7023,7 +7033,7 @@ struct field_modify_info modify_tcp[] =3D { > break; > case RTE_FLOW_ACTION_TYPE_SET_TAG: > if (flow_dv_convert_action_set_tag > - (dev, &mhdr_res, > + (dev, mhdr_res, > (const struct rte_flow_action_set_tag *) > actions->conf, error)) > return -rte_errno; > @@ -7123,7 +7133,7 @@ struct field_modify_info modify_tcp[] =3D { > mlx5_update_vlan_vid_pcp(actions, &vlan); > /* If no VLAN push - this is a modify header action */ > if (flow_dv_convert_action_modify_vlan_vid > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D > MLX5_FLOW_ACTION_OF_SET_VLAN_VID; > break; > @@ -7222,7 +7232,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC: > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST: > if (flow_dv_convert_action_modify_mac > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D >=20 > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ? > @@ -7232,7 +7242,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC: > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST: > if (flow_dv_convert_action_modify_ipv4 > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D >=20 > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ? > @@ -7242,7 +7252,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC: > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: > if (flow_dv_convert_action_modify_ipv6 > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D >=20 > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ? > @@ -7252,7 +7262,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > case RTE_FLOW_ACTION_TYPE_SET_TP_DST: > if (flow_dv_convert_action_modify_tp > - (&mhdr_res, actions, items, > + (mhdr_res, actions, items, > &flow_attr, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D > @@ -7262,13 +7272,13 @@ struct field_modify_info modify_tcp[] =3D { > break; > case RTE_FLOW_ACTION_TYPE_DEC_TTL: > if (flow_dv_convert_action_modify_dec_ttl > - (&mhdr_res, items, &flow_attr, > error)) > + (mhdr_res, items, &flow_attr, error)) > return -rte_errno; > action_flags |=3D MLX5_FLOW_ACTION_DEC_TTL; > break; > case RTE_FLOW_ACTION_TYPE_SET_TTL: > if (flow_dv_convert_action_modify_ttl > - (&mhdr_res, actions, items, > + (mhdr_res, actions, items, > &flow_attr, error)) > return -rte_errno; > action_flags |=3D MLX5_FLOW_ACTION_SET_TTL; > @@ -7276,7 +7286,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ: > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ: > if (flow_dv_convert_action_modify_tcp_seq > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D >=20 > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ? > @@ -7287,7 +7297,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK: > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK: > if (flow_dv_convert_action_modify_tcp_ack > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D actions->type =3D=3D >=20 > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ? > @@ -7296,13 +7306,13 @@ struct field_modify_info modify_tcp[] =3D { > break; > case MLX5_RTE_FLOW_ACTION_TYPE_TAG: > if (flow_dv_convert_action_set_reg > - (&mhdr_res, actions, error)) > + (mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D MLX5_FLOW_ACTION_SET_TAG; > break; > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG: > if (flow_dv_convert_action_copy_mreg > - (dev, &mhdr_res, actions, error)) > + (dev, mhdr_res, actions, error)) > return -rte_errno; > action_flags |=3D MLX5_FLOW_ACTION_SET_TAG; > break; > @@ -7326,23 +7336,23 @@ struct field_modify_info modify_tcp[] =3D { > action_flags |=3D MLX5_FLOW_ACTION_METER; > break; > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP: > - if > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res, > + if > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res, > actions, error)) > return -rte_errno; > action_flags |=3D > MLX5_FLOW_ACTION_SET_IPV4_DSCP; > break; > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP: > - if > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res, > + if > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res, > actions, error)) > return -rte_errno; > action_flags |=3D > MLX5_FLOW_ACTION_SET_IPV6_DSCP; > break; > case RTE_FLOW_ACTION_TYPE_END: > actions_end =3D true; > - if (mhdr_res.actions_num) { > + if (mhdr_res->actions_num) { > /* create modify action if needed. */ > if (flow_dv_modify_hdr_resource_register > - (dev, &mhdr_res, dev_flow, error)) > + (dev, mhdr_res, dev_flow, error)) > return -rte_errno; > dev_flow- > >dv.actions[modify_action_position] =3D > dev_flow->dv.modify_hdr- > >verbs_action; > @@ -7351,7 +7361,7 @@ struct field_modify_info modify_tcp[] =3D { > default: > break; > } > - if (mhdr_res.actions_num && > + if (mhdr_res->actions_num && > modify_action_position =3D=3D UINT32_MAX) > modify_action_position =3D actions_n++; > } > -- > 1.8.3.1