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 6C22EA059F; Fri, 10 Apr 2020 16:54:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8836C1D58F; Fri, 10 Apr 2020 16:54:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 6C0171D54D for ; Fri, 10 Apr 2020 16:54:47 +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 03AEsk8V003825; Fri, 10 Apr 2020 07:54:46 -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=+yvBFgX6VVA7t+CVVLnSKHT4b49bpf02t2sAe/2Vq3g=; b=DP4YuhyMD2QaC8RE9oiSsnMjPEuIqOi209P6ovLA9bKDU+U/oJIQ0vP0iQxa2mleYdkx sOfYKkWjnpD8xG5TIBqxm5PJkIGQwocOUvFuzfgEGk8ijpOMa60yg4ofIMxt+6qSRFSt XJdHbzeLEILh2ljHO5BDsLX/Cf63IWTRhMcDvMWc1dHB29laGN52g/TC8s3W12qnVFz2 Udvt6YtBlQ/LVq3jLWYgcE4TWUpAlfmLhqFOI2Gn24XtzWyHBPuRrMzs8NdNLKqNgHv9 Uo4ZMe89ScfGCO3wXJP7KCPsiA8zE5kdbB7uIS/0s+v18d3lURf2br+rpasiaKSY237c 5w== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 3091medhhc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 10 Apr 2020 07:54:46 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Apr 2020 07:54:42 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.59) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 10 Apr 2020 07:54:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HbybFwVLW4A5JJQHOzOGE1MSiEsu8B1BeMBhOtmuurrHrQZGDc2Od7SzalUSSjrzSUqgrg96UBWHjkSwwq9qs2aU9BMUM3mwkqz5SZhyhh8naQWCfjPdq0T4CuKuJYZBmHDgyF3vY2X07nuWTjkHAbfkBF9wF0FExyCmyPN1xlX/cjh9PKLF7G/5yEVZBdIU5dnyOsJoTdyyU5h1qdnFtmOS1JbojzxwcqCxjvcNdXdcNIvggqTZCHSZxF5w2UsRDiuAEzc+XHtR837w5bgbLsmSh8bChVAaun7jdZRN7torO9rS6NSpPX1vDRfzUuFAzuZ4dXCBZdaCJM0hp4QiYw== 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=+yvBFgX6VVA7t+CVVLnSKHT4b49bpf02t2sAe/2Vq3g=; b=g9recgAUjQTefFP6NAk2JYE/ozxYMcpQ8N5ewVaWIHK4jaOGkZlB6shNdp+z6Eudx8POjhUK0Jq1J+pImHswG6yzO5j3FntffJ7gvfVhs+C0YnYfkwqAM+wzDctHH0FH56TWjA6vS8K9kTH3Z1xwHCJoozEPThCVJCn87EHGoRbzaNUaz+OpsOpsje6UrmhUDFcxjs8uc1cAZLqhWjCohj+D82b4pusCOcF1EpiinrQRqBEHsI9ZYz1R43YFm22PIL1UeCM2nLdE1ro30Ncqe86b1vfK6LarOXmFHRoPoyV2aAVJ+vIBQff66fZiY/LaWHXwbdqBYky1GybwjLDzNQ== 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=+yvBFgX6VVA7t+CVVLnSKHT4b49bpf02t2sAe/2Vq3g=; b=UnRB915QcqVRkrjHYqzQuq86bGEmdDPtnEGWyYHaospoYx86Qv5olPQpgAr/QzNASDjndovnqhhjVN/LNBcqykspxGlpTfJW9enRT3X6dzSLPClmDI84EMcs0pzslvnRBJtQ4vD9iiRlwmXWK75syiTVYi5e8zXwwxXcX5wl0cY= Received: from MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) by MWHPR1801MB2077.namprd18.prod.outlook.com (2603:10b6:301:6a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Fri, 10 Apr 2020 14:54:40 +0000 Received: from MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586]) by MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586%7]) with mapi id 15.20.2856.027; Fri, 10 Apr 2020 14:54:40 +0000 Date: Fri, 10 Apr 2020 20:24:29 +0530 From: Nithin Dabilpuram To: Andrzej Ostruszka CC: Message-ID: <20200410145429.GB4537@outlook.office365.com> References: <20200331192945.2466880-1-jerinj@marvell.com> <20200405085613.1336841-1-jerinj@marvell.com> <20200405085613.1336841-19-jerinj@marvell.com> <20200410050944.GA17335@outlook.office365.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: BMXPR01CA0018.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::28) To MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by BMXPR01CA0018.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 14:54:39 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c58a7bb-0b6c-4bad-267f-08d7dd5f18ce X-MS-TrafficTypeDiagnostic: MWHPR1801MB2077: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1801MB2063.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(346002)(39850400004)(396003)(366004)(136003)(376002)(478600001)(52116002)(55236004)(9686003)(7696005)(86362001)(33656002)(81156014)(55016002)(8676002)(53546011)(6506007)(4326008)(956004)(2906002)(66556008)(5660300002)(16526019)(8936002)(186003)(26005)(1076003)(6916009)(316002)(6666004)(66946007)(66476007); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TyI8Rh4H1CDpAPLlXmfmDydWQHGd1WJ1GSGbRs5PIttS1foUvh43oTRJInpEoOvDlg17YVEtlOIQiYYb0eaqb1lBfby782CBjPYsTPfRPZTe73vCan3R4mY/V6+4H3ND5F9Tm7e5KYYsNhUWd9rLVnpUczDwnwF+ppMlSPNbNos6wV3VcwuVjx+RNX7AyVknSpE8XmPoOFxafSR5AUM9IqYa96vbZzDluGg8fqZPG/ww6hQc7Zn53Yubob8SiH+MhKwsNAGJAACMa81CetRg13uZ4LQun7jOtZ5BIF9Zsp/C/1ERKWk/J33G5bNvBlfqsUbLsZz6Q0NhJo99L1i8FLB+cxTTHcPsPgzFoy5Rg4S6ca3HkCN7obp7OhhrDn0nbeDm0Y3cb/Kkx1ZB9dOhQZG40uwk4VgJ9Q6mjKg7ZqdhQnpJFBjwMVMTDsG5Qdz2 X-MS-Exchange-AntiSpam-MessageData: qYfAu9zEnm8IRAo4VInQZZbsleKiIrjIgi4nYNugNZ2qECZfATdspou7GaHgraI66soklV8rUJBIwHeQMUewoow0VJ0S8b/xlSn3EdTQMqkLnc6vCOljYADqqzV40TmF4V8KTZrd99ylEXlj+PDBlw== X-MS-Exchange-CrossTenant-Network-Message-Id: 1c58a7bb-0b6c-4bad-267f-08d7dd5f18ce X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 14:54:40.6128 (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: xH+BJtPhWTBK0oAH8KgnH1pz8YehSzd6q1KvWrBs+oiOLvFaCLWl2OREktpbykFTmlggblzPz/IHszuNKEGRAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB2077 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-10_05:2020-04-09, 2020-04-10 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v4 18/29] node: add ethdev Rx and Tx node ctrl API 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, Apr 10, 2020 at 02:52:33PM +0200, Andrzej Ostruszka wrote: > External Email > > ---------------------------------------------------------------------- > On 4/10/20 7:09 AM, Nithin Dabilpuram wrote: > > On Fri, Apr 10, 2020 at 01:07:17AM +0200, Andrzej Ostruszka wrote: > [...] > >>> +struct rte_node_mbuf_priv2 { > >>> + union { > >>> + /* Sym crypto */ > >>> + struct { > >>> + struct rte_crypto_op op; > >>> + }; > >>> + }; > >>> +} __rte_cache_aligned; > >> > >> Why such definition? > > The question was more on "technicalities" - you have struct with anon > union with anon struct with a struct. Why such deep nesting - I guess > the union is there for the possible future extensions but the next anon > struct - what is it for? I think inner struct helps in collecting together a specific node's data like priv1. For example struct node_mbuf_priv2 { union { /* Sym crypto */ struct { struct rte_crypto_op op; uint64_t extra_session_info; }; /* Reassembly info */ struct { uint64_t reassembly_info; uint64_t pad; }; }; uint8_t data[64]; } __rte_cache_aligned; Another thing is given that currently there is no crypto support, I'm removing the current content of struct node_mbuf_priv2 and just leaving a pad field for future expansion purpose. > > > For communication b/w nodes, we need some per mbuf private space. > > We defined it into two halfs for performance reasons as > > #1 rte_node_mbuf_priv1(8 bytes) mapped to mbuf->udata64 > > #2 rte_node_mbuf_priv2(RTE_CACHE_LINE_SIZE bytes) mapped to mbuf private area. > > > > #1 is smaller area and will not have a cache miss when accessed as mbuf > > is already in cache. > > #2 is larger area and probably good enough for many use cases like ipsec, crypto > > etc, and there will be an extra cost of cache miss to access it. > > > > Atleast in OCTEONTX2, we are able to see 27% performance drop, if use single > > private area #2 for everything instead. > > > > Since pkt_mbuf pool are created by application, we these structures are defined > > here have a check in ctrl api if the pkt_mbuf pool meets the mbuf private area > > size requirement. > > Thank you for explanations. > > With regards > Andrzej Ostruszka