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 A48DDA00BE; Thu, 28 May 2020 16:41:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57A3F1DBC9; Thu, 28 May 2020 16:41:33 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id E9D991DBA8 for ; Thu, 28 May 2020 16:41:32 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id z13so24012538ljn.7 for ; Thu, 28 May 2020 07:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CVQNJ9aSsa2kNZXGdAkcJGS8OEYJmw3QTcRbctxKqlA=; b=Ig17rl91SS97tvQEq0EqH27flUCx6cKrM+nykXSeUUI2EeLoMuWJAZYoloH8dvyqok WRQbrtNqO5qNkzwZupXntCv8iEj0PNdRm652i9wIqB4pSFGAJnl1xsq8x6/Lqn8mE4yR KBwwgqlrE32ObGMa/tpIHS4aEzrcRnOAYkUfWHMGLvl7YaFvy67rH+353Din5qYs95bS qcgC3GBXTn30kQtVK/EeP7Fze55zZX9H81XqrIsNsz0jiq18pLyqcU05/jZHTCAkVNiV vANZGu5vugUNuSwuXrz/2mqEel+jLQ0IVRYVfWLCxrGW2km5FNeC11p5G2/4BUMpxZni ulqg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=CVQNJ9aSsa2kNZXGdAkcJGS8OEYJmw3QTcRbctxKqlA=; b=NttC4cSarvPEGxvH488++MffjbLQdUcmepFvbdC0VSmZNL3OHu4KIVyFKkemX/eGPc DByYO+04BngsioHEi6m6xofNQ3d7wslpFFvc34W5uQzKjy05OnTr7DA7DEJq1HZ2v/Ew TZEUx1DKziQlboflMAyAgT067sS/6oNeATXU/SuB1Eny2BLxhiG0C/AW3988fGFOVbEy KLixG3cWM0T+juirj39NvyrPXPQ0n4X4CRAGZYzAN1Rq1kLdWi2Xx+Yzf2WwzTtS6qER uPA6VUfhbaAKcMlb1vZ1IRHs+/+oinTdzr8bNd2+Uth50pTZj0GoPkSC9jYQwmuC0tSR OJlg== X-Gm-Message-State: AOAM531JGmAPLD8HOYmgyZdcBMZvLNpq+WBmYzbwjrihheINQchmFM+e orSz5ze2m620OKuA2o3LtkI= X-Google-Smtp-Source: ABdhPJym58mNHnipAZp17iDDHRZvOq1Qh1UxlM7z2s8jgpl62nFwy1NddqNl2go0yCDRT4sPhZPMJA== X-Received: by 2002:a2e:5446:: with SMTP id y6mr1691433ljd.8.1590676892475; Thu, 28 May 2020 07:41:32 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id c2sm1481423ljn.47.2020.05.28.07.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 07:41:31 -0700 (PDT) Date: Thu, 28 May 2020 17:41:31 +0300 From: Dmitry Kozlyuk To: "Burakov, Anatoly" Cc: dev@dpdk.org, Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Bruce Richardson Message-ID: <20200528174131.01d606bb@sovereign> In-Reply-To: References: <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-5-dmitry.kozliuk@gmail.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 04/11] eal/mem: extract common code for memseg list initialization 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 28 May 2020 12:46:49 +0100 "Burakov, Anatoly" wrote: > On 25-May-20 1:37 AM, Dmitry Kozlyuk wrote: > > All supported OS create memory segment lists (MSL) and reserve VA space > > for them in a nearly identical way. Move common code into EAL private > > functions to reduce duplication. > > > > Signed-off-by: Dmitry Kozlyuk > > --- > > > > > +eal_memseg_list_alloc(struct rte_memseg_list *msl, int reserve_flags) > > +{ > > + uint64_t page_sz; > > + size_t mem_sz; > > + void *addr; > > + > > + page_sz = msl->page_sz; > > + mem_sz = page_sz * msl->memseg_arr.len; > > + > > + addr = eal_get_virtual_area( > > + msl->base_va, &mem_sz, page_sz, 0, reserve_flags); > > + if (addr == NULL) { > > + if (rte_errno == EADDRNOTAVAIL) > > + RTE_LOG(ERR, EAL, "Cannot reserve %llu bytes at [%p] - " > > + "please use '--" OPT_BASE_VIRTADDR "' option\n", > > + (unsigned long long)mem_sz, msl->base_va); > > Do all OS's support this EAL option? Supported, yes; meaningful, not quite: for Windows, we start with address 0 (let the OS choose) and using the option can hardly help. Probably Linux and FreeBSD EALs should print this hint. For Windows, we can leave the option, but not print misleading hint. -- Dmitry Kozlyuk