From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: Re: [PATCH v2] compress/qat: enable dynamic huffman encoding Date: Fri, 12 Oct 2018 17:09:49 +0530 Message-ID: References: <1532108791-20683-1-git-send-email-fiona.trahe@intel.com> <1538756310-13472-1-git-send-email-fiona.trahe@intel.com> <348A99DA5F5B7549AA880327E580B43589646AF8@IRSMSX101.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Jozwiak, TomaszX" To: "Trahe, Fiona" , "dev@dpdk.org" Return-path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20089.outbound.protection.outlook.com [40.107.2.89]) by dpdk.org (Postfix) with ESMTP id 429511B39A for ; Fri, 12 Oct 2018 13:40:08 +0200 (CEST) In-Reply-To: <348A99DA5F5B7549AA880327E580B43589646AF8@IRSMSX101.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/9/2018 7:39 PM, Trahe, Fiona wrote: > Hi Akhil, > >> -----Original Message----- >> From: Akhil Goyal [mailto:akhil.goyal@nxp.com] >> Sent: Tuesday, October 9, 2018 12:02 PM >> To: Trahe, Fiona ; dev@dpdk.org >> Cc: Jozwiak, TomaszX >> Subject: Re: [dpdk-dev] [PATCH v2] compress/qat: enable dynamic huffman encoding >> >> >> >> On 10/5/2018 9:48 PM, Fiona Trahe wrote: >>> Enable dynamic huffman encoding in the QAT comp PMD. >>> >>> Signed-off-by: Tomasz Jozwiak >>> Signed-off-by: Fiona Trahe >>> --- >>> v2 changes: >>> - allocate 2 buffers per intermediate buffer sgl >>> - Compile out trace for debugging intermediate buffers >>> >>> Depends on: >>> https://patches.dpdk.org/patch/45794/ >>> >> //snip >>> +#if 1 >>> + QAT_LOG(DEBUG, " : phys addr of sgl[%i] in array_of_pointers" >>> + "= %lx", i, array_of_pointers->pointer[i]); >>> + QAT_LOG(DEBUG, " : virt address of sgl[%i] = %p", i, sgl); >>> + QAT_LOG(DEBUG, " : sgl->buffers[0].addr = %lx, len=%d", >>> + sgl->buffers[0].addr, sgl->buffers[0].len); >>> + QAT_LOG(DEBUG, " : sgl->buffers[1].addr = %lx, len=%d", >>> + sgl->buffers[1].addr, sgl->buffers[1].len); >>> +#endif >>> + } >>> +#if 0 >>> + QAT_DP_HEXDUMP_LOG(DEBUG, "IM buffer memzone:", mz_start, 1504); >>> +#endif >> I believe #if 0 and #if 1 should be replaced with some debug macros, or >> else dynamic logging shall take care of that. > [Fiona] These are not on the data path, so I didn't think it appropriate to wrap with the DP log level compile option. > And they generate a lot of trace, so make it impossible to see the other debug trace enabled with > dynamic logging using level 8/DEBUG. Really a level 9 would be useful here, but I think this is overkill. > I could have removed this code, but it's handy for debugging. > How about if I add a local QAT define for it? > #define QAT_IM_BUFFER_DEBUG 0 > #if QAT_IM_BUFFER_DEBUG > ... > #endif I think local define would be better.