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 9927DA00BE; Fri, 15 May 2020 19:01:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 758651DB0B; Fri, 15 May 2020 19:01:04 +0200 (CEST) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id 3A84B1DB03 for ; Fri, 15 May 2020 19:01:03 +0200 (CEST) Received: by mail-il1-f196.google.com with SMTP id w18so3202095ilm.13 for ; Fri, 15 May 2020 10:01:03 -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=3833vuvbXCdGOUuf5ZRHlMjz8HzEALzemuHAityP7CE=; b=Dw6GxfsJ04M72dsrt4Sdh9GaS2p0ncb9oQnwIWeK8CHn2SLx+Rxy8mxI7vx1g+6szd +B9sSA/Qeo3QrySGHYiBRWmo92n+G3SMmGdS/ZA8e4Ht6dD8Q3576hXUxJKSUUINDIc3 yzBoVZoPn9nI9uH8IHtHM550iLjpogZcKGL7Kr5VvjQ4+PUyzNtlpEBvLJHBxY3/t3+v H2599bZDMZWwdU7IBKpC/advss+F2Drt3OAhr+4PSCdqDKHO+Axi5njapt7IPwx1wwLZ NsBcFMndBleS2GbxJRFqYVIapxAhiwlImpbeVdc2ZbWCvo9GCyYEN5RRFEugh8RwdUbN MJKw== 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=3833vuvbXCdGOUuf5ZRHlMjz8HzEALzemuHAityP7CE=; b=hjdI5tcDQDiWBaWEMvGAXOA+m7jkWBJ20z8qc76AO6Ye9KkNEpWQnzzkkRJ9eDXNT/ 12L0J7uR3xw/8y7sTd2E4jgRH5RDhTtdhuWVRXWQzU7PWELBeuyGKDdVAhdaQLqts0B5 0JvF5UhjpFir0V3nRZ3ZConygKz8SRYbvN6P/FbQZKDQSx8IeyfrMvz8NcNW7luhPNrI LbDkLFz6U7+av67+EYsGqXC9kJfYeOmbnTAsRckgT4q6i+kc1wi3MOUlMgHr67iFIC8u 2I453X2tsQQyeHfnh8ltsPSUIqDfh77LH9aXeWmBGk8vPDNKDHXR8kQU6R22qjZ5w7SE 78fg== X-Gm-Message-State: AOAM533cyz4tYzvQ3IqJHdaoSwnxrq1MNkBXVYXT71G7D/mjP+POt6m7 PwG2Y2am1+ESPeOFQBjXeTe6/d/eanhSfJFYX18= X-Google-Smtp-Source: ABdhPJzoCbYFvqeZlFoL0gnXyfaVhvUgGZfGNcDoz6WmBkQyVOk172DzKYZdyvVeCi9P+VaaE/Km7E/jLVN9AKCWaL0= X-Received: by 2002:a05:6e02:1341:: with SMTP id k1mr4386426ilr.162.1589562062271; Fri, 15 May 2020 10:01:02 -0700 (PDT) MIME-Version: 1.0 References: <20200417072254.11455-1-nithind1988@gmail.com> <16221090.5WZRyvrzyv@thomas> <2370081.kdYZ1jHi8b@thomas> In-Reply-To: <2370081.kdYZ1jHi8b@thomas> From: Jerin Jacob Date: Fri, 15 May 2020 22:30:46 +0530 Message-ID: To: Thomas Monjalon Cc: Nithin Dabilpuram , Olivier Matz , Nithin Dabilpuram , Ferruh Yigit , Andrew Rybchenko , Ori Kam , Cristian Dumitrescu , Anatoly Burakov , John McNamara , Marko Kovacevic , dpdk-dev , Jerin Jacob , Krzysztof Kanas Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 1/3] mbuf: add Tx offloads for packet marking 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, May 15, 2020 at 10:22 PM Thomas Monjalon wrote: > > 15/05/2020 18:26, Jerin Jacob: > > On Fri, May 15, 2020 at 8:40 PM Thomas Monjalon wrote: > > > 15/05/2020 15:44, Nithin Dabilpuram: > > > > On Fri, May 15, 2020 at 03:12:59PM +0200, Thomas Monjalon wrote: > > > > > 15/05/2020 12:08, Nithin Dabilpuram: > > > > > > On Thu, May 14, 2020 at 10:29:31PM +0200, Olivier Matz wrote: > > > > > > > I don't see any better approach than having a mbuf flag. However, I'm > > > > > > > still not fully convinced that a dynamic flag won't do the job. Taking > > > > > > > 3 additional flags (among 18 remaing) for this feature also means that > > > > > > > we have 3 flags less for dynamic flags for all applications, even for > > > > > > > applications that will not use this feature. > > > > > > > > > > > > > > Would it be a problem to use a dynamic flag in this case? > > > > > > Since packet marking feature itself is already part of spec, > > > > > > if we move the flags to PMD specific dynamic flag, then it creates a confusion. > > > > > > > > > > > > It is not the case of a custom feature supported by a specific PMD. > > > > > > I believe when other PMD's implement packet marking, the same flags will > > > > > > suffice. > > > > > > > > > > A dynamic flag is not necessarily PMD-specific. > > > > > It is just avoiding consuming bits if the feature is not used by the application. > > > > > We must move more existing flags and fields to be dynamic. > > > > > > > > > > In general, all new flags and fields in mbuf should be dynamic. > > > > > And a work must be done to move existing stuff to free more space > > > > > for more dynamic features. > > > > > > > > My bad, I thought dynamic flags can only be used for PMD specific thing. > > > > > > > > There is however a cost of using dynamic flag which I think should be avoided > > > > for DPDK spec defined offloads, though it's fine for PMD specific things. > > > > > > > > Dynamic offload flags causes application and PMD to use non constant offset > > > > or shift which are looked up at init, instead of having a constant shift or > > > > offset. This indirection costs some cycles due to extra loads in fast path. > > > > > > Yes there is a cost. We described it quite clearly last year. > > > The default rule is now to add new flags and fields as dynamic. > > > In case the rule was not clear, I will send a patch to insert some > > > notes in the code and the doc. > > > > Yes. Please send a patch to document the rule. That makes life easy > > for everyone to make a boolean decision. > > Yes, I will work on it. Thanks. > > > Here is the comment from mbuf: support dynamic fields and flags commit > > when accepted this patch. > > > > " The typical use case is a PMD that registers space for an offload > > feature, when the application requests to enable this feature. As > > the space in mbuf is limited, the space should only be reserved if it > > is going to be used (i.e when the application explicitly asks for it). > > " > > OK, there is probably a documentation gap. Obviously :-) > > > If you are pushing this feature to dynamic mbuf filed then rte_tm > > subsystem needs to register dynamic field > > not the PMD as the feature is part of rte_tm spec. > > Is there a function in rte_tm which initializes or configure the feature? See rte_tm_mark_* > > > > > If you disagree with this new rule, you will have to give very good arguments. > > > > What would the definition of a good argument? as the same logic can be > > implemented with dynamic vs > > static at the cost of dynamic indirection. > > I think the only exception to add a static flag or field is to demonstrate > how basic is the feature. > But I think all basic features are already integrated for years. Yes. That's the path then let have a rule to not add any "new fields" and "flags" to mbuf and everything should be through dynamic. > >