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 809F9A059F; Fri, 10 Apr 2020 14:52:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 799141D554; Fri, 10 Apr 2020 14:52:37 +0200 (CEST) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id D23911D552 for ; Fri, 10 Apr 2020 14:52:35 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id m8so1876370lji.1 for ; Fri, 10 Apr 2020 05:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=FJA16lMzcxOGkFbJarft3O7cyT3sFc7aDwp6A95+IN8=; b=V1JPQoh090R8SNOsVmEFFRIISdih1Huz5gUSz8loIWaq7TFcjhahc1sLnrI8YRMxbq wSBXDYQINRfu6773Byel7iYA1eHhq9j3Qs+icQXAwZlWw6TKo33hPte9yiKOXQhHj21P luGiHf7QrE4aZWE9zPg1Ql850LZuvCpYHkw5Bui1lyN+hIATXyo75csJwb33P7Fcy3si UnIOQm5JOGxTtji50Lf61vAMPhRYguAK0GAUpQSVs6T26UjlfqsPhOw+EC9iYE5D6fBu bZfx0aUOcdHw1dpBOzSdy3RyXAxokZcAFQe3atzQd5p8CvKXidqohsUg11cUw+RsB+8N eIJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FJA16lMzcxOGkFbJarft3O7cyT3sFc7aDwp6A95+IN8=; b=mchYMFG4KsSNKenyuU5u5ldBjw8/QqVYZXBnWsTtmFEDfJHYuVe69AGH2//OtOkZ26 /SGPqPmYEqGDQNrFbkheM22quSVP4vOFDuam3WzzkyLOL5Kpvuc+1ij12AW+8h48Uy5c x9tJGWu/vfuVunFUuxqNj3+f50D9QkNIt4JoPqHxEi1K5YJnkBX1LcXNiRseM6X92AWm OYiLiWne094lnieyqeBXsCjHBJZ7gygFku/+7l/uT32IrWMghKmFD1+dXVZ5SBm5yQF+ PiYF4yAYLOwZvbMd9w+mumYDtGwuK+a6MwSB7A7vXgqu698Rrr/oiHeljAKuQxHWAQTu yZuA== X-Gm-Message-State: AGi0Puacbdc4itMRbT10D9CZAXDViPyldR/1O5GmKvUVqZA1EYGERaS6 X5Islm3WBeYDYZ7kZ3R0uoh+L3lIjro= X-Google-Smtp-Source: APiQypJpClEHDR4Ymn8aKKdXXYr9cXceVoe0MF/BUieav2GHZLKrnknjppFTDwmJzGlRihSvu8PXXQ== X-Received: by 2002:a05:651c:552:: with SMTP id q18mr3086502ljp.1.1586523155097; Fri, 10 Apr 2020 05:52:35 -0700 (PDT) Received: from [192.168.8.100] (user-5-173-33-152.play-internet.pl. [5.173.33.152]) by smtp.gmail.com with ESMTPSA id e1sm1036538ljo.16.2020.04.10.05.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Apr 2020 05:52:34 -0700 (PDT) To: Nithin Dabilpuram Cc: dev@dpdk.org References: <20200331192945.2466880-1-jerinj@marvell.com> <20200405085613.1336841-1-jerinj@marvell.com> <20200405085613.1336841-19-jerinj@marvell.com> <20200410050944.GA17335@outlook.office365.com> From: Andrzej Ostruszka Message-ID: Date: Fri, 10 Apr 2020 14:52:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200410050944.GA17335@outlook.office365.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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? > 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