From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680067.outbound.protection.outlook.com [40.107.68.67]) by dpdk.org (Postfix) with ESMTP id 085C15B1A for ; Tue, 10 Jul 2018 16:08:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y3ICnFtt4koO9rDoPmn4tN1sWYoujwax9ES5EYEVt3o=; b=TnB4D+JXpT7lDOqcbGDE9yRW5TsXHpfB8wjgffxOlhASvBs9zB/54LUDcp8ECxz9meYomDJTRlrwmB6xC7sxwDHAGcfPqsaXkjxY38OhDHl50DtVSUFIHE+OP1T5gfMqaNEPONgRpP55UeNPHDaMF9lgwM9Hc9KlVfMyCz2X6js= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from [192.168.1.103] (183.82.131.183) by BYAPR07MB4904.namprd07.prod.outlook.com (2603:10b6:a02:ef::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Tue, 10 Jul 2018 14:08:46 +0000 To: "De Lara Guarch, Pablo" , "Doherty, Declan" Cc: Akhil Goyal , Ankur Dwivedi , Jerin Jacob , Narayana Prasad , "dev@dpdk.org" References: <1529389574-6643-1-git-send-email-anoob.joseph@caviumnetworks.com> <1530712550-18099-1-git-send-email-anoob.joseph@caviumnetworks.com> <1530712550-18099-3-git-send-email-anoob.joseph@caviumnetworks.com> <38fdd0af-1d77-a648-3bd3-ef7ab2899c40@caviumnetworks.com> From: Anoob Joseph Message-ID: <221733ca-6f8c-5e08-050a-db70fa950d11@caviumnetworks.com> Date: Tue, 10 Jul 2018 19:38:30 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [183.82.131.183] X-ClientProxiedBy: BM1PR0101CA0021.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::31) To BYAPR07MB4904.namprd07.prod.outlook.com (2603:10b6:a02:ef::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 328cfa8a-60f1-4e4f-d58e-08d5e66ea8b0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4904; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4904; 3:xBR1K1hAQsRxoahSZu5Q5+uFuo6klVCsgGWC+E0+ngUjFoUQPUMaYfp6SYJ0EIXkLTgqwZCRMuCeF4kwMxYvkKJgzbJVX9ZtKWKZ8lxxFwhsxhy0OfpPfpFrTWCN4ndqjld3EMcrat21cWnK5Oqo0E8DlfrvPzHNLnkE3cCeaKNOXf4zVjTMJkB07stuO57GLk3WvQJScOTev5u4jgiTs80RP0ZqSPlLFThYy/O/OXTdTHtJSvUhjwmNLHwdiAJx; 25:slGi29zrGE1c6UNekRRfAkVzPY1VSUks/ktXCPv+k5EZk+ddDU2G63u2wLepz89hRq6Jx541SJDQwFUSrxGZxXunVd17NJ2tVaiR9Gwqmxlqq1kIYg4doViYYyaMpbxkKhFIF1aHIscwDAIaIgq48QqW2a4ITF9cLM5Kz1ehxTrWscQ4inMsyV3CW8YsKVmjwGKCY+HnJ1ddYkicRKM8FitVmbUZWiueWSReehT0yh9DhONCYGLdv5eSW5/VkBHYF8QEM09fS+CUfmJfEgSb9jdQk6DlV9vEtp+KMK300u5MMZutGHMW1U2UEaz0N33NCLDr/qnWlF1ViygG0cL7HA==; 31:vgwKzrsVXrmyN4BzsOk1DxbsjgOMsiP0za04XuLNsWqdrt4xxbVf0TTwcmQBA937BKsgA1Y8fkFWgxx0ZAlDdoROCv8VGHjKhcO7ATGlMkkk6XKna7KvupFbgTgwWZDaZXif5PUzqwKvUARXrVuWWMOY8/OFwrDfZqpwAZd+IZEhAuCY/2JGMvnWDTloKcB1oJ/Pj5HqAJ/4sqhmH3MNWNS877vwV+oerKCvO/xbYBY= X-MS-TrafficTypeDiagnostic: BYAPR07MB4904: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4904; 20:xotWEqBvhePHlTG2KGpu4qe9JPcmK4VXQ96eszPjVpfAVqK+xX0LSW+BL5wvLo7EevYwb7kEQPAcmhNxDWuTu2p7zZeECOhes6GHEeo0NI8z8GXvF0jWNYHtlpw91etrO6bVdZrnOvd+PBXrtmqOn7Olx8nR1XJJSmzTmCFBuYr8UpYtJyFf+fFyNSyxe65oFPLUsqLlWxhVJIYgMLzH4bIwTvSJMrZu2KJ9qRqNmbKtnzJRIMQlfRbi62GROmThD9/Le7uM7Q9PtVhHPxPbnlwu85j6ztTbrsEQvN7DQMrqj/6hHi7laf6nsekLZ5Lv6iK66WvX4p39OGTamu93XBfLKKv7FFDj0PoEwhwieG4QCRlAUkMLaCTGBnn4t0Z09DhEr5qRKCNoWyDVZj2Gm3PaAVUrkCW0R5gslmPQAiaAXShnJjcAKWW2pBdMZAUfIDC3yD921AcXthzbx4QVwjo783ZSkRz3oODImi7p7F5KMdltz/wZnpG4kHcAEIbOpeZUBLW6T6MMSbjMZL/z5OOIP2DuZA5yg4Ph0v8HHrPcUq8C/gS8LOqiwxwPiHVHOGrPI8FmHYCwGIbQOd4mtbWwL4HUThmq2yOp0n0Ep1Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:BYAPR07MB4904; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4904; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4904; 4:N7iuBa6ZJCIVzBHKZwKJUE5BUIm2cqsNFGSO1wu4bBc1zm284i6CQKz2hCoQGSWnehmUY6UNiU7J9IDiAfueqkQ/YXytt06FSIKOv97J8ewzUc4oatMaxsGlLdy3me4MfzBkiZPLNKudWyOD1vJMS/+/VDwQ2U1oIGUxa03+tzlrON4O4OOGBwiq1OvjWO97P6B1jMSF/xMctivYXSUs4OkKfZFwhW2jqS0w2cU4aOvx7cRb4VVIfzdeLWA6cnK8btzfkBLarqtRJPNCwvJMw7nxEaNJHv3qCpOwcNDxYj/SFZur6tr6ux+dm4EejEA1VcF5uJqJxWUDirZdfvdHVIIdUE9T5AROtdc9xrHZ0iM= X-Forefront-PRVS: 0729050452 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(366004)(136003)(376002)(346002)(396003)(13464003)(52164004)(189003)(57704003)(199004)(53936002)(117156002)(53546011)(6666003)(93886005)(5660300001)(65826007)(26005)(4326008)(81156014)(8676002)(25786009)(2906002)(6246003)(52116002)(3260700006)(77096007)(106356001)(386003)(16526019)(186003)(3846002)(6116002)(81166006)(8936002)(23676004)(52146003)(2486003)(31686004)(305945005)(7736002)(105586002)(64126003)(68736007)(76176011)(229853002)(36756003)(65806001)(44832011)(6486002)(97736004)(47776003)(65956001)(478600001)(476003)(31696002)(956004)(67846002)(2616005)(486006)(72206003)(446003)(11346002)(66066001)(42882007)(50466002)(54906003)(16576012)(110136005)(316002)(58126008)(230700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4904; H:[192.168.1.103]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWUFQUjA3TUI0OTA0OzIzOmpJb3FyUk5nK3pIcmprUWg2UW9RbTk2VlVE?= =?utf-8?B?UHVtZlVRT1RrRk1ZTXRWYXQ1MGlTdUZ2SUpCSjRSSHJReUliSkwwbHlxeXN0?= =?utf-8?B?cjVnaThpZGR6UkorWW5ESDB4Q0pBc3pRU09KaTBuT0s0SW4wQUlRNWdTZ0pI?= =?utf-8?B?WlBXTVYzN216VGR6NG9oaHdMdWowc1hKZlErTEhIS3lEYkg2bGVoZEVLY0E4?= =?utf-8?B?LysyV2tSOGI5dWxFeXhaTHJud0VKOWVUNWJuZXpmcTMvRUtucjdYcFRNeUEz?= =?utf-8?B?R1Z2dzluUjBrenhsSU8rMkx4YzYxb3JSKzR2ZkpoaGN1NlZkUXF4alo3Rllt?= =?utf-8?B?enI0T2pGOHE1T3dxWGI5YXE1Y0hLeDVubTlVQndVa3ZtTXNzc2lzQ3VPMlRw?= =?utf-8?B?V1FkOXdod0NuVmtpYmFycUM2YXgxc0l5V3R5NGtJeHp3QVROdktCVndXRU9N?= =?utf-8?B?bVdwMk5oVWN1L3h0WmN6ZXQ5OWdwbmtUWDlKZ2lUZXJqRmhsK20zcDJaUTBK?= =?utf-8?B?VXZtV2p4eHJKZ1VXM24xYXF4Z29oRTlmUmcycU03TmR1eXQwUkJRSm9LRDVh?= =?utf-8?B?b04vVm1wTWFUR0NiSThmbHRtTDZTZ3BOdDFXMWJCd1JCWHNsUEpDUFhjSzdZ?= =?utf-8?B?djlXZVhoVEppblhoMzY0dTF2UFY0S2pMUUdXRFc3cGU5K2ZHTjJmZnE3UVNT?= =?utf-8?B?eHRHQ0lkQ0hZTzF6K1dHUUc1L3RaSVI4RkNlMDZpYzFRUnRzc3R3a0tZaG5h?= =?utf-8?B?dDR1cE0ra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atorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2018 14:08:46.3333 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 328cfa8a-60f1-4e4f-d58e-08d5e66ea8b0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4904 Subject: Re: [dpdk-dev] [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min headroom/tailroom 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: , X-List-Received-Date: Tue, 10 Jul 2018 14:08:51 -0000 Hi Pablo, On 10-07-2018 18:57, De Lara Guarch, Pablo wrote: > External Email > >> -----Original Message----- >> From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] >> Sent: Tuesday, July 10, 2018 1:23 PM >> To: De Lara Guarch, Pablo ; Doherty, Declan >> >> Cc: Akhil Goyal ; Ankur Dwivedi >> ; Jerin Jacob >> ; Narayana Prasad >> ; dev@dpdk.org >> Subject: Re: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min >> headroom/tailroom >> >> Hi Pablo, >> >> Please see inline. >> >> Thanks, >> Anoob >> On 10-07-2018 17:18, De Lara Guarch, Pablo wrote: >>> External Email >>> >>>> -----Original Message----- >>>> From: De Lara Guarch, Pablo >>>> Sent: Tuesday, July 10, 2018 12:17 PM >>>> To: 'Anoob Joseph' ; Doherty, Declan >>>> >>>> Cc: 'Akhil Goyal' ; 'Ankur Dwivedi' >>>> ; 'Jerin Jacob' >>>> ; 'Narayana Prasad' >>>> ; 'dev@dpdk.org' >>>> >>>> Subject: RE: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min >>>> headroom/tailroom >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: De Lara Guarch, Pablo >>>>> Sent: Tuesday, July 10, 2018 12:08 PM >>>>> To: 'Anoob Joseph' ; Doherty, >>>>> Declan >>>>> Cc: Akhil Goyal ; Ankur Dwivedi >>>>> ; Jerin Jacob >>>>> ; Narayana Prasad >>>>> ; dev@dpdk.org >>>>> Subject: RE: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min >>>>> headroom/tailroom >>>>> >>>>> >>>>> >>>>>> -----Original Message----- >>>>>> From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] >>>>>> Sent: Wednesday, July 4, 2018 2:56 PM >>>>>> To: Doherty, Declan ; De Lara Guarch, >>>>>> Pablo >>>>>> Cc: Anoob Joseph ; Akhil Goyal >>>>>> ; Ankur Dwivedi >>>>>> ; Jerin Jacob >>>>>> ; Narayana Prasad >>>>>> ; dev@dpdk.org >>>>>> Subject: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min >>>>>> headroom/tailroom >>>>>> >>>>>> Crypto dev would specify its headroom and tailroom requirement and >>>>>> the application is expected to honour this while creating buffers. >>>>>> >>>>>> Signed-off-by: Anoob Joseph >>>>> ... >>>>> >>>>>> --- a/app/test-crypto-perf/cperf_test_common.c >>>>>> +++ b/app/test-crypto-perf/cperf_test_common.c >>>>> ... >>>>> >>>>>> fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp, >>>>>> m->buf_iova = next_seg_phys_addr; >>>>>> next_seg_phys_addr += mbuf_hdr_size + segment_sz; >>>>>> m->buf_len = segment_sz; >>>>>> - m->data_len = segment_sz; >>>>>> + m->data_len = data_len; >>>>>> >>>>>> - /* No headroom needed for the buffer */ >>>>>> - m->data_off = 0; >>>>>> + /* Use headroom specified for the buffer */ >>>>>> + m->data_off = headroom; >>>>> Headroom is only applicable for the first segment/s. >>>>> This is adding headroom in all the segments, which looks wrong. >>>>> >>>> I think "max_size" needs to be recalculated in >>>> "cperf_alloc_common_memory", adding headroom and tailroom size, which >>>> will potentially increase the number of segments required. >>>> Then, headroom size needs to be checked in case it is bigger than >>>> segment size, so data might need to start in the next segment. >>>> Similar thing for tailroom. >>> Actually, forget about this. I have been thinking about it, and it looks artificial >> to do this. >>> Generally, in a mbuf pool, headroom is the same for all mbufs/segments. >> Do I need to revisit this patch? Or is this fine? > I'd say it is ok then. I might rework the app in the future, to deal better with the pool creation > (without needing to set the mbuf parameters manually). Agreed. >>> In any case, I have a concern though about this. Headroom size is got from a >> compile time option: >>> CONFIG_RTE_PKTMBUF_HEADROOM=128. PMDs generally use this value to >> set >>> "data_off", but they could use another different value. >>> So what happens if min_mbuf_headroom is more than this value? >>> since this is not configurable, this won't work. >> Since this is a PMD specific issue, we can have an extra check in the driver to >> make sure "CONFIG_RTE_PKTMBUF_HEADROOM">= min_mbuf_headroom for >> the PMD. If this check isn't satisfied, the driver probe would fail. >> Is this approach fine? > Probably ok, although eventually, a check in the actual headroom, per operation, will be required. > >> If application chooses to ignore CONFIG_RTE_PKTMBUF_HEADROOM >> altogether, then it will be a problem for most PMDs. With protocol offloads etc, >> headroom would be used internally, right? > I am not sure what can be done here. Headroom availability depends on the network driver, > but then the application can prepend data and make the headroom smaller. >>> Also, generally, headroom and tailroom are used for encapsulation, so I am >> not sure if this is the best place. >> Is your concern about whether there is enough space in headroom for >> encapsulation & PMD's usage? Application can probe the individual values and >> see if there is enough space, right? In our use case, the headroom requirement is >> 24 bytes & tailroom requirement is 8 bytes. > Right, although this will have to be done in data path, right? > Headroom and tailroom can only be known once packets are received. Ideally yes. But with spec change we can move this responsibility to the application, and could skip the check from PMD. Is that a reasonable approach? With this change we explicitly say the PMD needs this much headroom & tailroom. So application can be expected to honor that. > >>> What about using the private size of the mbuf? That is actually >>> configurable, even though that data is not necessarily contiguous to the mbuf >> data. >> That memory being non contiguous is the problem. We use the headroom to >> specify the command so that one single buffer can be sent to the h/w for >> processing. If there is a gap of 128 bytes (headroom which lies in between >> private space & data), it will not work. > Ok, I understand. Then I'd say this is the only way to do it. > >>> Sorry for the confusion and this last minute concern. >>> >>> Thanks, >>> Pablo >>> >>> >>>> Thanks, >>>> Pablo >>>> >>>>