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 EF320A00BE; Fri, 15 May 2020 20:08:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D54DA1DA15; Fri, 15 May 2020 20:08:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D97CD1D958 for ; Fri, 15 May 2020 20:08:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04FI6J5C027126; Fri, 15 May 2020 11:08:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=6HUq0RPGXXDVCmWQydk+E6JR+/uYQrc51qfihzlowdc=; b=IG2TAsrX3GSdzU5NqQRiakMsjWnrgDG3xpaTCaDRriKW8SOZ7zE6Hc0I0Cyswbt4WiUA TqQqhVna3SyXminyaDErC/GqQ6FjC0mk0c7zLUOVHMiy8a0AeUlcKdz2QwWgaTERBZH9 NHSmBwwCHAwyKu7nZ6X9qTriNn7Qi8rzAXXddXpvMPdIT4Rk58jiexYRSJFswHKNb3gQ f735kpQvCg3AsxsHLnsexxrtWdLXdHv5F2kqSza/NSJGfF3DRzlgLlZVwtQC/Mq7Zm9x zt1xk8xsNxyrklvgBBM81VRCpjsjidtfp1XIH+OFwEk5I+K3fzlGHPUZpGpba3Md7i6Z GQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3100xk95r3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 May 2020 11:08:11 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 May 2020 11:08:09 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 15 May 2020 11:08:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S9QpehF+NtNEmmIIhbp8I3X9PqMiS9W2agUFpr5JJbbqikKgmv9CrQkJdv2mDNmbr6EV5uNxPMAuyTOjGZVeGwdFhOyVgCXT1Jk5WXlr2PIEBgUzGpnD4+FMs+W/KCGeDQYOTxpjN0h62SM5PMz+zVTItelSiGK/PmlODnBW2X2gHmBWzUPHYEf3rnKQ4LqW1SFeeX73KLeYzfEbRS+p2EpS9Ecc53wlygT6/IXvUU1bT5Tq67wlpZ9eid4ZpR7f+QRuZ03gG/zl6HTP+ET/QKzVG/0AWBPh2MW9krrVuggr064tJgCz7d2Pz+EKRP92lRo9pxA7Flek/1peGwpa9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HUq0RPGXXDVCmWQydk+E6JR+/uYQrc51qfihzlowdc=; b=OoPDNaH5h81C9vsPD7XTuyHNrNgSqFD6Hi6qEP+GW3HlkMORT+bRwEaIeOY6oVIPilX4T5d68N9H3OS3e+tvYcdgK26g68akII5DVi01R3WdqAtRAnOQBPdVDeLzivQDLSEIc+LOh7I2K8k2SPUzdWVICs/F2EBJHxzOZBBEeZR0IeSddNsXXGfZhvBy8egp/b3Og9CSjEp4o/7GpfDdIn//7bKgMkZ2B8jFpORjvhQYI0nYFkRm5aluGYTd0GHl3E0shZ5QEs7u6nCCgbeMpC+/wxE5KXT+dRn3RqPHZU6Ly8N29/A1ylkEW4QB2fPWCDjbzN4ljr51tF+ndQG4gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HUq0RPGXXDVCmWQydk+E6JR+/uYQrc51qfihzlowdc=; b=X1ekVuf5Trmlot9i+jW66GaAD80RjwrmkkfsdWGmYH8c5BFmc9128zTNAa+6G9ZOETkdopz9WYWw3G2tbAJ5/iRtVpIFEY9HdPT+xOamc8cpG7knVcveQ4fUrTKoBoRVA9eJyq4pEYBPRxRgccgvTXGprLDoGG6Psi1PpzpUY+8= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=marvell.com; Received: from BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) by BYAPR18MB2933.namprd18.prod.outlook.com (2603:10b6:a03:10e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 18:08:07 +0000 Received: from BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58]) by BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58%5]) with mapi id 15.20.3000.022; Fri, 15 May 2020 18:08:07 +0000 Date: Fri, 15 May 2020 23:37:54 +0530 From: Nithin Dabilpuram To: Thomas Monjalon CC: Jerin Jacob , Olivier Matz , Nithin Dabilpuram , Ferruh Yigit , Andrew Rybchenko , Ori Kam , Cristian Dumitrescu , Anatoly Burakov , John McNamara , Marko Kovacevic , dpdk-dev , Jerin Jacob , Krzysztof Kanas Message-ID: <20200515180754.GC9696@outlook.office365.com> References: <20200417072254.11455-1-nithind1988@gmail.com> <16221090.5WZRyvrzyv@thomas> <2370081.kdYZ1jHi8b@thomas> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2370081.kdYZ1jHi8b@thomas> User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: PN1PR01CA0088.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::28) To BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by PN1PR01CA0088.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 18:08:03 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac833218-307d-4ae0-744a-08d7f8faeb85 X-MS-TrafficTypeDiagnostic: BYAPR18MB2933: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0OhWvYRydYhTrFjMBCJQ2QgVJKIEzCw0w0FIJFGbHjYGcO9lRi7CYWZo/DWXj9qLxYi/SPTxHhp2ODB/PKIFLi8jZyk+hoBc4Z77Pxak5vaEex5X6pT4eiVyW2PIJlW1xkBPzTA2FYsniek7L1/W00mOr4tQ2PoVa0YGhdxC0GdtWn4ltQeMP0/d6XLRWY6GKeCw3qmUg+V1AdCJuXDi0DdisXIrmuop/U7abBS19NB7TTIFhsS0L2sZGsvs7MPhE0yOjGKrf8f+zMqDWOC5uYOO/iiyyki1U6Fqn+ab4TIg/Hnskcn7WNksu3e5+CbGh5uF0AjnkLMtOMU9M+nOv5izODbCMvKQ8KI0ZpC2jTD2KBt1MKVQ2dUJJi3dMCSyD71fcxdZsaE9+fCKIjAJOeTD1WGUt2eVOVWGtlgdP6tFtmYWa5r6gG0xhIBrMa8X X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2917.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(39860400002)(366004)(136003)(396003)(53546011)(6506007)(55236004)(6916009)(9686003)(1076003)(478600001)(26005)(8676002)(186003)(956004)(55016002)(8936002)(7696005)(33656002)(54906003)(16526019)(7416002)(52116002)(316002)(5660300002)(6666004)(66476007)(66946007)(66556008)(86362001)(4326008)(107886003)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zd771vVrpxIW6Q9NqpHZDs1bS4KqxvDqi+pkUm8kTqOX43V2h9knm4o0kSeVcWvYrHR5Atr5UlJioT28RQ6LshAujS/TX++fHGWWx6d8teXTn8LpzoKmiGg73QI75TiD0MUZ8Pk81/mYYOit2ZftejPaWHqhUBneHCK7SfJ5SnNAQ3K8vAZi24JontWOD1KbhibX+JzaGAVcRGYvoBgcH+8nuJjWM6OKCz0LrOPx78CCOU1EWINyn/qMNxXsLupK/5r+xcxZ0p3mRcveCcyDdE/qnLBhjKJHrJ0isFO23kpF+8lJASRi+lkUiHqc4XYuOreSoU2Tjo86O4JvmXRSw9Y8Eue/NEoitcZoeZdLo4xpcAHuvhlxA3V17XLYGqYRVIlPe0t6zKsi5p1liMoT3jHw1emM5L5O2YKg9KYnSbV8vbWdZg80/uNVsXeeU28L9FXlS0DpWda2FokfpvfAUBjvXRslVqZzwIjkxY3Nwn8= X-MS-Exchange-CrossTenant-Network-Message-Id: ac833218-307d-4ae0-744a-08d7f8faeb85 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 18:08:07.6766 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9yfvisWJwvWs1EztiflmA7r7s8C6RfRsiEV+QgDeqWeqYvRy3m4e5yfeqh0ZYYoYC+ETJTt1qAv0zCoKLk3DGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2933 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-15_07:2020-05-15, 2020-05-15 signatures=0 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 06:52:23PM +0200, 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. > > > 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. > > > 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? > > > > > 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. > Vector implementations will always have huge cost due to dynamic offload flags. Ofcourse, I don't have a vector implementation for packet marking but, in future if there is such an offload flag with vector implementation then hard enforcement will not work. >