From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8HizAY/uKKwn2Xx93byqCvFKKqy4F/nQ+CzrVk9f0x0=; b=Dqey173y7KLHJI9Qqm75UR95h0Si8lXdTa10sHg9j+cZqn43tRpOfpF4524UQ3WT6i bA5lV7IwHDGOfX8mYhI3bI3C6HxUkX170IMiOU/LWO5Fwqu+CTdnrD++U1kg7sVjow/o zv+mWPNuowoUL0or8BysseLMo5GwZfZdN9zDXKF+SXbYoIo+cxH1oODw10haAgdJPPbF Gfy2uEVHQ47qnDQ06BdP3Ndjdjn0cQtcHjIRdHhjiRh8/jzDm2c3FQptUZL0s+ijadvw renSiXcloezPmaiFqejZfaBzsk8z9AXpv8YrJ9onbdMbEBYzJO01RZdfnGNVUpJktUbc 4QCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8HizAY/uKKwn2Xx93byqCvFKKqy4F/nQ+CzrVk9f0x0=; b=pRSSY2BBEjtOrC0WalUabKkhB5laZ0dbFjeqvrUNXvsFt2fuD719J1i9zK1SI7ZaZw jymFQN13Dyj23fQ1gs+qdL1jmeaIqeS+gjhZStIq3isT2KTRX3Gycm0RsCYFkH9H+IPt aVVqtlrxH/4zyTdDGIlreRL4hZKl4/BFrtqehxr17BvC7juFBQ04Nvb8KYIkfSIa8OJv S1xaSEyNw9Q7ZCO1d8TnLP8dxwBZHyLunaKjjoSaPzWX3bqNzB9830JgbbzmWp81EnCy VKx5iX8KXBDTCFouyouEAkBvvAjVgMxNJZaORjegXqLGWZQYQpRBZSWl8cq8QE5ty/7u HXfg== X-Gm-Message-State: ABuFfohQs3haFUdQf+K9aPyhTWaQyqD71NAfBqfNxnIarVZpO8W3DsXn U1AxtJBDNfjqdkjkpm9LrMx9Zg== X-Google-Smtp-Source: ACcGV61qyIkEqw6jRWuK/hBg4QskUFFqsgFLC4mPxwcoCqS6ZT8fMWrz2wB1ssdFmcnK/4IGGb89IQ== X-Received: by 2002:a1c:790:: with SMTP id 138-v6mr2076843wmh.122.1539093265363; Tue, 09 Oct 2018 06:54:25 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g15-v6sm14335341wrp.56.2018.10.09.06.54.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 06:54:23 -0700 (PDT) Date: Tue, 9 Oct 2018 15:54:06 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: Ori Kam , Mordechay Haimovsky , Shahaf Shuler , "orika@contextream.com" , "dev@dpdk.org" 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 Content-Disposition: inline In-Reply-To: <1b66f1f8-8eda-19ce-b7ca-04cc3463f3ab@intel.com> Subject: Re: [dpdk-dev] [PATCH v1] ethdev: fix flow API item/action name conversion 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: Tue, 09 Oct 2018 13:54:26 -0000 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