[dpdk-dev] [PATCH v1] ethdev: fix flow API item/action name conversion

Adrien Mazarguil adrien.mazarguil at 6wind.com
Tue Oct 9 15:54:06 CEST 2018


Jumping in although I cannot spend much time on rte_flow at the moment,
please see below.

On Tue, Oct 09, 2018 at 02:21:23PM +0100, Ferruh Yigit wrote:
> On 10/7/2018 5:31 PM, Ori Kam wrote:
> > 
> > 
> >> -----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>
> <...>
> > Acked-by: Ori Kam <orika at mellanox.com>
> Series applied to dpdk-next-net/master, thanks.
> (please confirm latest next-net head)

Please revert, it breaks something that didn't need to be fixed. I don't
think this patch was validated properly.


 @p src type:
   @code (const void *)enum rte_flow_item_type @endcode

With the following reminder in rte_flow_conv_name()'s Doxygen documentation:

 @param[in] src
   Depending on @p is_action, source pattern item or action type cast as a

Hence the original conversion results in the expected behavior while this
one is almost guaranteed to trigger a segfault:

 -       unsigned int type = (uintptr_t)src;
 +       unsigned int type = *(const unsigned int *)src;

This can be validated with testpmd. See what happens with "flow list".

Adrien Mazarguil

More information about the dev mailing list