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 31807A04BC for ; Thu, 8 Oct 2020 10:13:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FCC91BA9F; Thu, 8 Oct 2020 10:13:45 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1EF1D1BA4B; Thu, 8 Oct 2020 10:13:40 +0200 (CEST) IronPort-SDR: M+5QyFR8yLXI4VAD1tuBlRPEk/kmauIptmOdVQTOugu7vNkBFi1I69Hl/3zfQdRmu6HbLEz95i JWSYmXlY8Nvw== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="229484688" X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="229484688" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 01:13:39 -0700 IronPort-SDR: /bfWgbHe3K+JOWV0OT+laD4KBsTyLDZ0gxuOOMsXJ7bFCnRrJ/G4ZtQj1/Ods2AajDjZa+Dqmz eufrG4uyX50w== X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="528399791" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.252.49.112]) ([10.252.49.112]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 01:13:37 -0700 To: Lukasz Wojciechowski , Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org References: <20200925224209.12173-1-l.wojciechow@partner.samsung.com> <20201008052323.11547-1-l.wojciechow@partner.samsung.com> <20201008052323.11547-4-l.wojciechow@partner.samsung.com> From: David Hunt Message-ID: <0c49fd28-adfe-004b-f9e9-f5108515ea0d@intel.com> Date: Thu, 8 Oct 2020 09:13:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201008052323.11547-4-l.wojciechow@partner.samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-stable] [PATCH v5 03/15] distributor: do not use oldpkt when not needed X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Lukasz, On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote: > rte_distributor_request_pkt and rte_distributor_get_pkt dereferenced > oldpkt parameter when in RTE_DIST_ALG_SINGLE even if number > of returned buffers from worker to distributor was 0. > > This patch passes NULL to the legacy API when number of returned > buffers is 0. This allows passing NULL as oldpkt parameter. > > Distributor tests are also updated passing NULL as oldpkt and > 0 as number of returned packets, where packets are not returned. > > Fixes: 775003ad2f96 ("distributor: add new burst-capable library") > Cc: david.hunt@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Lukasz Wojciechowski > --- Good edge-case catch, thanks. Acked-by: David Hunt