From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent JARDIN Subject: Re: [PATCH v4 02/16] net/mrvl: add mrvl net pmd driver skeleton Date: Thu, 12 Oct 2017 09:59:49 +0200 Message-ID: <6bfe47de-c5b4-2b01-7991-2ac48913b2c3@6wind.com> References: <1507031500-11473-1-git-send-email-tdu@semihalf.com> <1507561244-20115-1-git-send-email-tdu@semihalf.com> <1507561244-20115-3-git-send-email-tdu@semihalf.com> <9041127.34t6OW5FrT@xps> <20171012065104.GC19106@tdu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@linaro.org, Jacek Siuda To: Tomasz Duszynski , Thomas Monjalon Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 725081D90 for ; Thu, 12 Oct 2017 09:59:55 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id u138so10887195wmu.4 for ; Thu, 12 Oct 2017 00:59:55 -0700 (PDT) In-Reply-To: <20171012065104.GC19106@tdu> 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" +1 with Thomas, see below, Le 12/10/2017 à 08:51, Tomasz Duszynski a écrit : >> What is MUSDK_DMA_MEMSIZE? >> If the value cannot change, it must be a constant in the code. >> If it can change, it should be a run-time driver option. > It's up to the user what MUSDK_DMA_MEMSIZE is going to be. Currently it's > set to value that should work it all cases. > > Except that, MUSDK_DMA_MEMSIZE is used as synchronization point for net > and crypto (on condition they are used together i.e ipsec-secgw). > > Suppose we have two different MUSDK_DMA_MEMSIZE defined for net/crypto then > dma memsize allocated will depend on driver probing sequence which might > confuse user. It does not make sense, + /* + * ret == -EEXIST is correct, it means DMA + * has been already initialized (by another PMD). + */ + ret = mv_sys_dma_mem_init(RTE_MRVL_MUSDK_DMA_MEMSIZE int mv_sys_dma_mem_init(u64 size) { struct sys_dma *i_sys_dma; int err; if (sys_dma) { pr_err("Dma object already exits.\n"); return -EEXIST; } So, I do not understand why you cannot add some checks into the drivers to assert that users must have set the same value for both when calling: ret = mv_sys_dma_mem_init(my_best_size); maybe, you need to fix and improve musdk first to avoid DPDK from getting such compilation issues. best regards, Vincent