From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v1] ethdev: fix flow API item/action name conversion Date: Tue, 9 Oct 2018 15:54:06 +0200 Message-ID: <20181009135406.GJ18937@6wind.com> References: <1538926667-23009-1-git-send-email-motih@mellanox.com> <1538929311-31815-1-git-send-email-motih@mellanox.com> <1b66f1f8-8eda-19ce-b7ca-04cc3463f3ab@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ori Kam , Mordechay Haimovsky , Shahaf Shuler , "orika@contextream.com" , "dev@dpdk.org" To: Ferruh Yigit Return-path: Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id B5DA51B561 for ; Tue, 9 Oct 2018 15:54:25 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id e187-v6so2113744wmf.0 for ; Tue, 09 Oct 2018 06:54:25 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1b66f1f8-8eda-19ce-b7ca-04cc3463f3ab@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, 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 On Behalf Of Mordechay Haimovsky > >> Sent: Sunday, October 7, 2018 7:22 PM > >> To: Adrien Mazarguil ; Shahaf Shuler > >> ; orika@contextream.com > >> Cc: dev@dpdk.org; Mordechay Haimovsky > >> 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 > <...> > > Acked-by: Ori Kam > > 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. As documented in RTE_FLOW_CONV_OP_ITEM_NAME, RTE_FLOW_CONV_OP_ACTION_NAME, RTE_FLOW_CONV_OP_ITEM_NAME_PTR and RTE_FLOW_CONV_OP_ACTION_NAME_PTR: @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 pointer. 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 6WIND