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 2A38AA32A3 for ; Fri, 25 Oct 2019 13:18:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 576771C199; Fri, 25 Oct 2019 13:18:00 +0200 (CEST) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id 703441C13B for ; Fri, 25 Oct 2019 13:17:59 +0200 (CEST) Received: by mail-il1-f193.google.com with SMTP id d83so1491168ilk.7 for ; Fri, 25 Oct 2019 04:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HO/oEkV0Z+vWqoOwAPdzW/WBzGTQfOftyttmLKswovk=; b=Zv/rTRndzn7KxFWVi2bdWBVStjHiDhy8rnf1zshWVNdChktVgHjEP6NEuzPncFaJQV C1uP9WyMfuY2oJ+tK+FEJ6BMwTBCiyb/vDhSEdw2XP8mPif05uladGbaTxHAxcKHX1tM t0IrHiKM/yBTaPhN3VgxYfaeEuqAy4zaKO3V0FOGLswHyT3+/mbWahfcJNt6npD+j+7F pzbs9W4HcGtx6NF//U82f+Jpberfj1ixzjQ4yjrhfJHGZQZAxGcUW07+68Y49fgywQSB GF6gbdOl/hmChBudIfy5/yDaUFYvdfKrldsaA0wUldPs0oh/g0JLjCl0WOtLqYzvYO9h 9Oag== 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=HO/oEkV0Z+vWqoOwAPdzW/WBzGTQfOftyttmLKswovk=; b=T6GfG+NLyui1KLrwb0oxbnUODdTYgzRt5Afv0CJY3KIn0LnmJmLKwVrNQupNUt9Hkz MLhn83DkLXhZn2GeeErdxhUa/+vh9tMhRIzlVda52TSD+a1yD6byfqJFUQWvLlUjzjzg Qegrhu0hc+Hmg7Hxkx5llfzwCwl37NAU34Zx3ql+XlQpUATE9oJNKc3td4IVEX5IkSBc hZTLfkAtp6m0eZVffR0TZOanZn4vJdeljFoIYBFyR97U8xc/zrNTtlFryuHM5cyACziD ueX38AN604SyCYUtHiKpr5AnKkQtrYEjl5DAg6uzqvQ9ewWG/HRBhrhdIQXrUKeRG0FZ M1rw== X-Gm-Message-State: APjAAAX1ImOgsQ7FuzTYPePike+rGeP/R8SvV24zl6btluYAk/iUtXNM PU6viyJOLqNwl5w/35HWsmeWNZsxg+pneqCskFM4JO2Y+T0= X-Google-Smtp-Source: APXvYqx0YHRavd7ZaJdt7gnfJqzpKNDvvSSeuWS/o4KiyqePHQdgDJN63vFEEwFIM9ku1qyexyZtpMCIHMZ3BO20X+8= X-Received: by 2002:a92:d78f:: with SMTP id d15mr1215455iln.294.1572002278262; Fri, 25 Oct 2019 04:17:58 -0700 (PDT) MIME-Version: 1.0 References: <20191017072723.36509-1-shahafs@mellanox.com> In-Reply-To: From: Jerin Jacob Date: Fri, 25 Oct 2019 16:47:41 +0530 Message-ID: To: Shahaf Shuler Cc: "dev@dpdk.org" , Thomas Monjalon , "olivier.matz@6wind.com" , "wwasko@nvidia.com" , "spotluri@nvidia.com" , Asaf Penso , Slava Ovsiienko Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [RFC PATCH 20.02] mbuf: hint PMD not to inline packet 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 Wed, Oct 23, 2019 at 4:54 PM Shahaf Shuler wrote: > > Tuesday, October 22, 2019 6:17 PM, Jerin Jacob: > > > > Subject: Re: [dpdk-dev] [RFC PATCH 20.02] mbuf: hint PMD not to inline > > packet > > [...] > > > > > I think, pushing this logic to the application is bad idea. But if > > > > you are writing some custom application and the per packet-level you > > > > need to control then this flag may be the only way. > > > > > > Yes. This flag is for custom application who do unique acceleration (by doing > > Zero copy for compute/compression/encryption accelerators) on specific > > platforms. > > > Such application is fully aware to the platform and the location where the > > data resides hence it is very simple for it to know how to set this flag. > > > > # if it is per packet, it will be an implicit requirement to add it mbuf. > > > > If so, > > # Does it makes sense to add through dynamic mbuf? Maybe it is not worth it > > for a single bit. > > You mean > 1. expose PMD cap for it > 2. application enables it on dev offloads > 3. PMD register bitfield to the dynamic mbuf flags (rte_mbuf_dynflag_register) > 4. application register same flag to get the bit offset > > It can be OK, if the community don't see common use for such flag. Any scheme based on dynamic mbuf flags should be fine. > > > > > > Since we have only 17 bits (40 - 23) remaining for Rx and Tx and it is custom > > application requirement, how about adding PKT_PMD_CUSTOM1 flags so > > that similar requirement by other PMDs can leverage the same bit for such > > custom applications.(We have a similar use case for smart NIC (not so make > > much sense for generic > > applications) but needed for per packet) > > > > > > > > Note, This flag is 0 by default - meaning no hint and generic application > > works same as today. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > To support a mixed traffic pattern (some buffers from local > > > > > > > DRAM, some buffers from other devices) with high BW, a hint > > > > > > > flag is introduced in the mbuf. > > > > > > > Application will hint the PMD whether or not it should try to > > > > > > > inline the given mbuf data buffer. PMD should do best effort > > > > > > > to act upon this request. > > > > > > > > > > > > > > Signed-off-by: Shahaf Shuler > > > > > > > --- > > > > > > > lib/librte_mbuf/rte_mbuf.h | 9 +++++++++ > > > > > > > 1 file changed, 9 insertions(+) > > > > > > > > > > > > > > diff --git a/lib/librte_mbuf/rte_mbuf.h > > > > > > > b/lib/librte_mbuf/rte_mbuf.h index 98225ec80b..5934532b7f > > > > > > > 100644 > > > > > > > --- a/lib/librte_mbuf/rte_mbuf.h > > > > > > > +++ b/lib/librte_mbuf/rte_mbuf.h > > > > > > > @@ -203,6 +203,15 @@ extern "C" { > > > > > > > /* add new TX flags here */ > > > > > > > > > > > > > > /** > > > > > > > + * Hint to PMD to not inline the mbuf data buffer to device > > > > > > > + * rather let the device use its DMA engine to fetch the data > > > > > > > +with the > > > > > > > + * provided pointer. > > > > > > > + * > > > > > > > + * This flag is a only a hint. PMD should enforce it as best effort. > > > > > > > + */ > > > > > > > +#define PKT_TX_DONT_INLINE_HINT (1ULL << 39) > > > > > > > + > > > > > > > +/** > > > > > > > * Indicate that the metadata field in the mbuf is in use. > > > > > > > */ > > > > > > > #define PKT_TX_METADATA (1ULL << 40) > > > > > > > -- > > > > > > > 2.12.0 > > > > > > >