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 6EF63A00BE; Tue, 29 Oct 2019 15:28:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41DEB1BEB8; Tue, 29 Oct 2019 15:28:54 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id BB4BF1BEB7 for ; Tue, 29 Oct 2019 15:28:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572359332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iNU9Cc79lgN7cALR+LcxhIFPI0pqif5DfBOqh6ql7Ic=; b=QeTkzSlMb+JJipOPQUPvKdVn34O6vrTp7ifYrVnfTr4A1MgCP3xXfwu19XidkynKfh0iSv nR0nSQnSCWlagOnMtN+uTD+AG8urbp5eskAT5eUGvc86dDKS0+VwBgF/bWKzYWbCdZUMSy 0uy1d1EjmCMvuYr68OofHqUa3xHdUnE= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96-BAXwgzKnNE-KpvwmO0mnwQ-1; Tue, 29 Oct 2019 10:28:50 -0400 Received: by mail-vk1-f197.google.com with SMTP id z23so6574925vkb.3 for ; Tue, 29 Oct 2019 07:28:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ItxQc0ubdzlwnyIeH9v0gqestH9R6RZH2kcFTt77U64=; b=AuF314Wm5ERvT7O59lmuABNlN1EpW8ELZmX+9axm3nyNe16VaZhx5L0+0sVMNK0PsE vP4PO+Ds4td6oDHOPNqUaxW5jKPJuZJ9lukbWd4k0oVZrIXeR7RqKD/ylALf6T0al2Kh uuKvPb0ZO9ZVk1Iz3/MQdDknKotvYkdcrPKEyOx01R+6z0lBPWJl7msaaCFKEpLfOLqP b7r8gzquGuMNhOvtN/NNMatbeyJ/CaqpLlCf2wHYICUVyJbDYFZimbd4i43yf8UwI0fs QmvYpYf4fnxJjosqDt8RBGZvh93SaO6AVYvRjQbmK/GV65r1LEv9PqXSA4+f6u1TL5MT JjCw== X-Gm-Message-State: APjAAAXnZJSIMzL7w6eId3iH1CV9p6wfGA1hGf3zicTSWVCxEijPsk3Y KZfsAa+gbxyNidhEqwJap1s7Lu+1Z/Y3gEVZslbmsKtBzIDCEUCaVQp9YDIbN5oS3/t8rJHrZ8Y GCzedB0u1q+XMKuX6h0s= X-Received: by 2002:ab0:2716:: with SMTP id s22mr11768342uao.86.1572359329662; Tue, 29 Oct 2019 07:28:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnOHO6SnZUkXDzbzpjCpMM5QEZVdp/VVsmj0ba1LGXfAE8SBNF8nk4f0da/JJ4d/NPgw6QWXG16tZtq1o73Q4= X-Received: by 2002:ab0:2716:: with SMTP id s22mr11768318uao.86.1572359329183; Tue, 29 Oct 2019 07:28:49 -0700 (PDT) MIME-Version: 1.0 References: <20190709082254.12698-1-jgrajcia@cisco.com> <20190822081833.11203-1-jgrajcia@cisco.com> In-Reply-To: From: David Marchand Date: Tue, 29 Oct 2019 15:28:33 +0100 Message-ID: To: "Yigit, Ferruh" , Jakub Grajciar Cc: dev , "Burakov, Anatoly" X-MC-Unique: BAXwgzKnNE-KpvwmO0mnwQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5] net/memif: zero-copy slave 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 Fri, Oct 25, 2019 at 6:45 PM Yigit, Ferruh wrote: > > On 8/22/2019 9:18 AM, Jakub Grajciar wrote: > > Zero-copy slave support for memif PMD. > > Slave interface exposes DPDK memory to > > master interface. Only single file segments > > are supported (EAL option --single-file-segments). Do you really want this additional configuration in your driver or can't you enable/disable the functional > > > > Signed-off-by: Jakub Grajciar > > Reviewed-by: Ferruh Yigit > > Since bind() issue solved, we can continue with the patch. > > <...> > > > @@ -131,7 +132,7 @@ struct pmd_process_private { > > * @param proc_private > > * device process private data > > */ > > -void memif_free_regions(struct pmd_process_private *proc_private); > > +void memif_free_regions(struct rte_eth_dev *dev); > > > > /** > > * Finalize connection establishment process. Map shared memory file > > diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/c= ommon/eal_common_mcfg.c > > index 066549432..03d9d472d 100644 > > --- a/lib/librte_eal/common/eal_common_mcfg.c > > +++ b/lib/librte_eal/common/eal_common_mcfg.c > > @@ -161,3 +161,10 @@ rte_mcfg_timer_unlock(void) > > struct rte_mem_config *mcfg =3D rte_eal_get_configuration()->mem_= config; > > rte_spinlock_unlock(&mcfg->tlock); > > } > > + > > +uint32_t > > +rte_mcfg_get_single_file_segments(void) > > +{ > > + struct rte_mem_config *mcfg =3D rte_eal_get_configuration()->mem_= config; > > + return mcfg->single_file_segments; > > +} > > diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/li= brte_eal/common/include/rte_eal_memconfig.h > > index 34b0e44a0..9bb4a57f8 100644 > > --- a/lib/librte_eal/common/include/rte_eal_memconfig.h > > +++ b/lib/librte_eal/common/include/rte_eal_memconfig.h > > @@ -109,6 +109,16 @@ __rte_experimental > > void > > rte_mcfg_timer_unlock(void); > > > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Get the single_file_segments parameter value from memory configurat= ion. I would prefer you describe what this actually means. We don't really care about the value itself. > > + */ > > +__rte_experimental > > +uint32_t And a boolean is enough, this is a flag. > > +rte_mcfg_get_single_file_segments(void); > > + > > #ifdef __cplusplus > > } > > #endif > > diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_ea= l_version.map > > index 7cbf82d37..c2b9d473f 100644 > > --- a/lib/librte_eal/rte_eal_version.map > > +++ b/lib/librte_eal/rte_eal_version.map > > @@ -418,5 +418,6 @@ EXPERIMENTAL { > > rte_lcore_to_cpu_id; > > rte_mcfg_timer_lock; > > rte_mcfg_timer_unlock; > > + rte_mcfg_get_single_file_segments; > > This should be moved to 19.11 block in experimental +1 > cc'ed Dave for eal part, > @Dave, change looks straight forward but can you please check/comment? I don't like the name of this API, since it gives the impression it returns "segments".. But on the other hand, this is aligned with the mcfg field: people touching the internals have more chances to see there is an exported API. Cc: Anatoly (but I think he is off for this week). Other than that I am ok with this change. --=20 David Marchand