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 DCB3AA0353; Thu, 6 Aug 2020 20:10:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 477A81C036; Thu, 6 Aug 2020 20:10:20 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id ECE2B1BFF5 for ; Thu, 6 Aug 2020 20:10:18 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id l60so7274753pjb.3 for ; Thu, 06 Aug 2020 11:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GimnJb8DFtZJ+HfRHEX6mZwjhViyOvB4kJevobNnlB8=; b=d1HTGq1uEMlsqmaJYX6zpGUxTE/KSzhTibZy6cLq3p2EAT6g+TkextqtEm7Mk56iyX ke/W2aumzQAYN6hGlv7lXOWeVBYAwEnA+qHwfFHB3Sv2rX8iJwqZtUejALXutt/NvbPK Q4wZykfbIHoXy+bSznI/rCH8Qv9VDCiIh+honk/7m5gZl50Kj5DW1o6ZXg0G/S1kpBJO /K4kK4cU0fDBAvoQxxPnTyyWljHMYznFRU1eJNBBT/RXfBszLrlOMtYYsCLWiSr8GTuG GvX+lhnux+5/45uskSIYy+CX8munoaFPe1GI44sWtLQp7FxzKFWhBaPMGG/XWETRw0Pk u5sQ== 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=GimnJb8DFtZJ+HfRHEX6mZwjhViyOvB4kJevobNnlB8=; b=BPx810vS22nmokAU30E3YrcRYqvCp0Gn/nAaCZEdN82hGl6ATWIumyTEK3E/yZ8fCo J3+5jBO9wUClj5zM3dRtAjTgT3SYwa7M0s+Whxo7uFwk2KbwvjX5XqQRsJo6vwE8zv5c 1TcN4fqD/0MWw61L+PQ/KfgiVy45OJ779yvKn0WTKTL2fJ3IE/UznV/7mcbljohmLfRl pe7m8LQ5IMi9DF9p9CIoVvycDHt2vXYhmopBMW9dkOmCklVZAZ1VBvdLvXXCkTbguNOu Rl0zfEBtnAi8JGwJ3M+vStOFy8wUSB8VmsO2bnt6im3P1Ph3tT7oSJh6e5nwwfEV9wnX 6oSA== X-Gm-Message-State: AOAM531Hu/TcdYicuwlQZaGZ4V3ydQP9Wfr7IfFFNvfH+zDw/a44v+oR Wu9VJPNLtrmuJMkZGLheaEaFYw== X-Google-Smtp-Source: ABdhPJybW+H0DsQPF11d64++yGIRQGy/DnHDybzefd2GBaf0b5FqvhTlITIwX+WaH29P0uTe/CVO1Q== X-Received: by 2002:a17:902:d206:: with SMTP id t6mr8981934ply.131.1596737417872; Thu, 06 Aug 2020 11:10:17 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c192sm9334184pfc.154.2020.08.06.11.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 11:10:17 -0700 (PDT) Date: Thu, 6 Aug 2020 11:10:08 -0700 From: Stephen Hemminger To: Slava Ovsiienko Cc: Ferruh Yigit , Jerin Jacob , dpdk-dev , Matan Azrad , Raslan Darawsheh , Thomas Monjalon , Andrew Rybchenko , Ajit Khaparde , Maxime Coquelin , Olivier Matz , David Marchand Message-ID: <20200806111008.1905c576@hermes.lan> In-Reply-To: References: <1596452291-25535-1-git-send-email-viacheslavo@mellanox.com> <20200806092559.614ae91f@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] doc: announce changes to ethdev rxconf structure 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, 6 Aug 2020 17:03:31 +0000 Slava Ovsiienko wrote: > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Thursday, August 6, 2020 19:26 > > To: Ferruh Yigit > > Cc: Jerin Jacob ; Slava Ovsiienko > > ; dpdk-dev ; Matan Azrad > > ; Raslan Darawsheh ; > > Thomas Monjalon ; Andrew Rybchenko > > ; Ajit Khaparde > > ; Maxime Coquelin > > ; Olivier Matz ; > > David Marchand > > Subject: Re: [PATCH] doc: announce changes to ethdev rxconf structure > > > > On Thu, 6 Aug 2020 16:58:22 +0100 > > Ferruh Yigit wrote: > > > > > On 8/4/2020 2:32 PM, Jerin Jacob wrote: > > > > On Mon, Aug 3, 2020 at 6:36 PM Slava Ovsiienko > > wrote: > > > >> > > > >> Hi, Jerin, > > > >> > > > >> Thanks for the comment, please, see below. > > > >> > > > >>> -----Original Message----- > > > >>> From: Jerin Jacob > > > >>> Sent: Monday, August 3, 2020 14:57 > > > >>> To: Slava Ovsiienko > > > >>> Cc: dpdk-dev ; Matan Azrad ; > > > >>> Raslan Darawsheh ; Thomas Monjalon > > > >>> ; Ferruh Yigit ; > > > >>> Stephen Hemminger ; Andrew > > Rybchenko > > > >>> ; Ajit Khaparde > > > >>> ; Maxime Coquelin > > > >>> ; Olivier Matz > > > >>> ; David Marchand > > > >>> > > > >>> Subject: Re: [PATCH] doc: announce changes to ethdev rxconf > > > >>> structure > > > >>> > > > >>> On Mon, Aug 3, 2020 at 4:28 PM Viacheslav Ovsiienko > > > >>> wrote: > > > >>>> > > > >>>> The DPDK datapath in the transmit direction is very flexible. > > > >>>> The applications can build multisegment packets and manages > > > >>>> almost all data aspects - the memory pools where segments are > > > >>>> allocated from, the segment lengths, the memory attributes like > > external, registered, etc. > > > >>>> > > > >>>> In the receiving direction, the datapath is much less flexible, > > > >>>> the applications can only specify the memory pool to configure > > > >>>> the receiving queue and nothing more. In order to extend the > > > >>>> receiving datapath capabilities it is proposed to add the new > > > >>>> fields into rte_eth_rxconf structure: > > > >>>> > > > >>>> struct rte_eth_rxconf { > > > >>>> ... > > > >>>> uint16_t rx_split_num; /* number of segments to split */ > > > >>>> uint16_t *rx_split_len; /* array of segment lengthes */ > > > >>>> struct rte_mempool **mp; /* array of segment memory pools */ > > > >>> > > > >>> The pool has the packet length it's been configured for. > > > >>> So I think, rx_split_len can be removed. > > > >> > > > >> Yes, it is one of the supposed options - if pointer to array of > > > >> segment lengths is NULL , the queue_setup() could use the lengths from > > the pool's properties. > > > >> But we are talking about packet split, in general, it should not > > > >> depend on pool properties. What if application provides the single > > > >> pool and just wants to have the tunnel header in the first dedicated > > mbuf? > > > >> > > > >>> > > > >>> This feature also available in Marvell HW. So it not specific to one > > vendor. > > > >>> Maybe we could just the use case mention the use case in the > > > >>> depreciation notice and the tentative change in rte_eth_rxconf and > > > >>> exact details can be worked out at the time of implementation. > > > >>> > > > >> So, if I understand correctly, the struct changes in the commit > > > >> message should be marked as just possible implementation? > > > > > > > > Yes. > > > > > > > > We may need to have a detailed discussion on the correct abstraction > > > > for various HW is available with this feature. > > > > > > > > On Marvell HW, We can configure TWO pools for given eth Rx queue. > > > > One pool can be configured as a small packet pool and other one as > > > > large packet pool. > > > > And there is a threshold value to decide the pool between small and > > large. > > > > For example: > > > > - The small pool is configured 2k > > > > - The large pool is configured with 10k > > > > - And if the threshold value is configured as 2k. > > > > Any packet size <=2K will land in small pool and others in a large pool. > > > > The use case, we are targeting is to save the memory space for jumbo > > frames. > > > > > > Out of curiosity, do you provide two different buffer address in the > > > descriptor and HW automatically uses one based on the size, or driver > > > uses one of the pools based on the configuration and possible largest > > > packet size? > > > > I am all for allowing more configuration of buffer pool. > > But don't want that to be exposed as a hardware specific requirement in the > > API for applications. The worst case would be if your API changes required: > > > > if (strcmp(dev->driver_name, "marvell") == 0) { > > // make another mempool for this driver > > > I thought about adding some other segment attributes, vendor specific. > We could describe the segments with some descriptor structure (size, pool) > and add flags field to one. The proposals from other vendors are welcome. > Please no snowflake API's "are driver is special"... Think of how it can fit into a general model. Also, just because your hardware has a special feature does not mean the DPDK has to support it!