[dpdk-dev] [PATCH v1] ethdev: fix flow API item/action name conversion
Ori Kam
orika at mellanox.com
Sun Oct 7 18:31:55 CEST 2018
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Mordechay Haimovsky
> Sent: Sunday, October 7, 2018 7:22 PM
> To: Adrien Mazarguil <adrien.mazarguil at 6wind.com>; Shahaf Shuler
> <shahafs at mellanox.com>; orika at contextream.com
> Cc: dev at dpdk.org; Mordechay Haimovsky <motih at mellanox.com>
> Subject: [dpdk-dev] [PATCH v1] ethdev: fix flow API item/action name
> conversion
>
> This patch fixes a typecast bug found in rte_flow_conv_name routine
> used in rte_flow item/action name conversion.
>
> Fixes: 0c2640cbfa7a ("ethdev: add flow API item/action name conversion")
>
> Signed-off-by: Moti Haimovsky <motih at mellanox.com>
> ---
> v1:
> Fixed wrong hash number in "Fixes" message.
> ---
> lib/librte_ethdev/rte_flow.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
> index 9c56a97..21a4286 100644
> --- a/lib/librte_ethdev/rte_flow.c
> +++ b/lib/librte_ethdev/rte_flow.c
> @@ -767,7 +767,7 @@ enum rte_flow_conv_item_spec_type {
> { rte_flow_desc_action, RTE_DIM(rte_flow_desc_action), },
> };
> const struct desc_info *const info = &info_rep[!!is_action];
> - unsigned int type = (uintptr_t)src;
> + unsigned int type = *(const unsigned int *)src;
>
> if (type >= info->num)
> return rte_flow_error_set
> --
> 1.8.3.1
Acked-by: Ori Kam <orika at mellanox.com>
Thanks,
Ori
More information about the dev
mailing list