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 CDAC3A059A; Fri, 10 Apr 2020 10:23:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C9A01D168; Fri, 10 Apr 2020 10:23:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9ED111D167 for ; Fri, 10 Apr 2020 10:22:57 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03A8BUpk024398; Fri, 10 Apr 2020 01:22:57 -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=ER9diGI7IhZ6Oh1ur+Xq4jzYkTDyGmL45tXqQ2osaeY=; b=yaTo+Xg70cArdlFYXYHRSor+VNqhTOeGjdmrHjd+Y9BGjhbrp7tlpxFI/RSr/mlMRYR1 gJABCd270lybLL9ZVbr6iPVMqeh8oz5ZhqYfcam5Q61gCBINTxinfbXniCqCX3oDL4Lg d8QXqdAodc7+MKcGXaTppbovj/YKG68gSeCH1OgHG0PxxZiOljvpQHHVEqhV2WXNxrbZ IcioBaPgKX4hvJIOnQuJWWAGTkzl0npKoFNkCTwUQBoa0uH2WCGJdVqnG2grY8cmucIR d5R5ZqkkrgeGdd1Wbzg/fncdr2fEKPCyFqNVPhP7X8W3h5a9BrStSK0MxfQUPRImGEqf 6A== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3091jwmdpr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 10 Apr 2020 01:22:56 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Apr 2020 01:22:51 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Apr 2020 01:22:50 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.50) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 10 Apr 2020 01:22:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mD9yc9CtGRr6iYrlmTTJpsZ+7h50E199fs+yh1zM5ws8hCIB5F8yr2aNYijOFmTwRFDMc6QG0iqMG0YULOOCImjV8TK9JQdeZYx546REf+fPXkIyfX8SOeMrMkdbHZeMGPCoBavO7QfwIn8s86z0WSkGAnffGIJPxUG4dSKEx+pIHCaGLGOpAUIu50zvtNejswkU2u3/hNEkXfBDASp7LFKsrrNxDZYBaVMrAqvVaiSijL5LbUOSKknyOP/iShoTOBVUk5/oUY0A0LnhnPoPx63ZB48QuYdXuuY0SEJFa//PwIXitDCAsAgmBwndiQJ93/by7/v3cplhrt0R2KUTHQ== 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=ER9diGI7IhZ6Oh1ur+Xq4jzYkTDyGmL45tXqQ2osaeY=; b=BFlog7sD12i5fTw5GNEAa+Sv2S+jtThjIKP7LFSRm3fl01ZQfSaJ8r9mjb6hv5bTgJgq674h1egVaf3t71NO2emTKITrVBqlovd6UisxV1GCTp8yjY0JPVzHftvMtK5wznmZyTgFkVmzSLUSJvdw/5IWGxuuoC1Pv/8tcK+R2w/F1anpVjp+BRFY15tIrcMcILq6eLmhkQi1Z9H6ruMl/CngqnIeLlH/3DlO8JHGedKESojPIdPQ+xRUWhHnEX10AKVS/TL+yYyy2YrN91DCuDru5/BWnO/40NcDndW9Pc77FvydnGL5qUyYIwdUpioHIVQ0FNwd7Me2aewPhFO0tQ== 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=ER9diGI7IhZ6Oh1ur+Xq4jzYkTDyGmL45tXqQ2osaeY=; b=DronUrfMd+GRzHP0cr1OWTpvJWAaC7hTiVBvXqPfcsWXwlgwmKvb47BfcB5wVp7l6EDydttpLgDFFw5Ka64e5fAP8tvJUlj//8PMY3blwCnzbZjNApZdB+kddxTFoPu114LOUFKJVtQ1r0Zve3DyptQ2ZR0P3GMDw3t3Ezk1W9c= Received: from MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) by MWHPR1801MB1856.namprd18.prod.outlook.com (2603:10b6:301:6b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.21; Fri, 10 Apr 2020 08:22:48 +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 08:22:48 +0000 Date: Fri, 10 Apr 2020 13:52:37 +0530 From: Nithin Dabilpuram To: Andrzej Ostruszka CC: Message-ID: <20200410082237.GC23867@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: <20200410050944.GA17335@outlook.office365.com> User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: BM1PR01CA0121.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::15) 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 BM1PR01CA0121.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::15) 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 08:22:46 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd6ef311-0e2d-4594-f3ee-08d7dd285a4d X-MS-TrafficTypeDiagnostic: MWHPR1801MB1856: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; 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)(376002)(39860400002)(346002)(366004)(136003)(396003)(16526019)(66556008)(6666004)(2906002)(6916009)(186003)(26005)(6506007)(86362001)(316002)(66476007)(66946007)(55236004)(53546011)(8676002)(956004)(478600001)(52116002)(81156014)(1076003)(9686003)(8936002)(33656002)(5660300002)(7696005)(55016002)(4326008); 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: MTZ6SeUc/PPao6brOwexgKWGhUlFy49XMl1mlwmBCpXL7w5eI+EFMFTUN7aC9023wpL4FsH5aeQ56ZALqPwSVUPXtHR++vK1L0WO2GCkRUN0LR53nmehi6RdmR8zjscU/6lurG+C9dknJvUUTgR9OkFqydXrAAMoVcIOM9N02DXvyRAIeI5rksQxBWw909UwRwpjgVsP4S5l+bDUft55PRnuFTejvWoRcImHazntuj1sAP3AhTx6mIyxuIoFyiceo+sJRJNhb4/5Y2o6GpoKlQM9vt49r37qKAWREZ9cwtdkNp+O/kHPp3J6tQM7m2Gla07WVCFuxoUNCxKTmrLGI9peuM/4oacOi2Vc03Gh7zqYwTpRs7por1daqPExiTxUhCx9ie8Z22GkM+4jVAhZ/7YVcPgjZSMFwNFo4t69SD5lVrhvEsITm2OM8zaW4UU7 X-MS-Exchange-AntiSpam-MessageData: RqH3kFqdimbfaARwrfCr0ErkentKJJN1OyN22m5Qp2L5FC8EQtBY34LF4dCrRsSVk89YDPEVsYlN+YbBm/d4g0dLHOpM8LU698HeNrxEpKB60i5BFyi6Uyu3jTWYvguZJDuZa0YdEiEbAdq+cf89CA== X-MS-Exchange-CrossTenant-Network-Message-Id: fd6ef311-0e2d-4594-f3ee-08d7dd285a4d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 08:22:48.1312 (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: mHaD/ESBk21htjOCGSzxl+GEqqU35GER0UPdUyO1aqa+cXi4mzXFUr7TyyztShOZd1qr+aEk2VxFy8s81efpSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB1856 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-10_02:2020-04-07, 2020-04-10 signatures=0 Subject: Re: [dpdk-dev] [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 10:39:44AM +0530, Nithin Dabilpuram wrote: > On Fri, Apr 10, 2020 at 01:07:17AM +0200, Andrzej Ostruszka wrote: > > On 4/5/20 10:56 AM, jerinj@marvell.com wrote: > > > From: Nithin Dabilpuram > > > > > > Add ctrl api to setup ethdev_rx and ethdev_tx node. > > > This ctrl api clones 'N' number of ethdev_rx and ethdev_tx > > > nodes with specific (port, queue) pairs updated in their context. > > > All the ethdev ports and queues are setup before this api > > > is called. > > > > > > Signed-off-by: Nithin Dabilpuram > > > Signed-off-by: Pavan Nikhilesh > > > Signed-off-by: Kiran Kumar K > > > --- > > [...] > > > +struct rte_node_mbuf_priv1 { > > > + union { > > > + /* IP4 rewrite */ > > > + struct { > > > + uint16_t nh; > > > + uint16_t ttl; > > > + uint32_t cksum; > > > + }; > > > + > > > + uint64_t u; > > > + }; > > > +}; > > > + > > > +/** > > > + * @warning > > > + * @b EXPERIMENTAL: this API may change without prior notice > > > + * > > > + * Node mbuf private data to store crypto operation. > > > + */ > > > +struct rte_node_mbuf_priv2 { > > > + union { > > > + /* Sym crypto */ > > > + struct { > > > + struct rte_crypto_op op; > > > + }; > > > + }; > > > +} __rte_cache_aligned; > > > > Why such definition? > > 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. Just wanted to update that I'll also rename this structure and related api's to not start with "rte_" in next version as they are not visible outside this librte_node library. > > > > > With regards > > Andrzej Ostruszka