From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0053.outbound.protection.outlook.com [104.47.40.53]) by dpdk.org (Postfix) with ESMTP id 52A705598 for ; Thu, 1 Dec 2016 22:56:27 +0100 (CET) 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; bh=Ym/xG4XlkDL+T4cUM/kmuFuMtzPsB8HxjD+y49ckv+Y=; b=clEi6/B0aBP65SfTuF9rbq010n7rpUdS3s+WIwuCXC+SxmURmlC1a7p3rFHTkEvJXdNq/lnoFB2qg+76CT1ct9j7ifABHD6FZYDGY35doaJXvEaBwmkPBMP7Twu1f6DTR+AvNHOCX3QDT2pSrlvV5By41mg0xTlborWxppFWavw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from svelivela-lt.caveonetworks.com (50.233.148.156) by BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Thu, 1 Dec 2016 21:56:22 +0000 Date: Fri, 2 Dec 2016 03:26:16 +0530 From: Jerin Jacob To: Thomas Monjalon CC: "Kulasek, TomaszX" , , "Ananyev, Konstantin" , , "Richardson, Bruce" Message-ID: <20161201215616.GA10825@svelivela-lt.caveonetworks.com> References: <1477486575-25148-1-git-send-email-tomaszx.kulasek@intel.com> <1734448.0id6dCbsBT@xps13> <3042915272161B4EB253DA4D77EB373A14F57CAE@IRSMSX102.ger.corp.intel.com> <2505996.o0gdCe9Hsd@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2505996.o0gdCe9Hsd@xps13> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CO1PR06CA060.namprd06.prod.outlook.com (10.242.160.50) To BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 2:LX4RqypMBcERnFtHgl4J+ErdsLxGHxafNYDyD3WNdHull4cXdrjXxvNoGgdPp7r9OVBZaEV/kW3a9RJ3619X24tEG3PbKR4jWmhkkdwEgTd8fTzGyg1iT/Hchqkx1McjJ+hFAM6r7aRHQAimCk1wvuAvvo1RjSyPeIQcXNpmU3Y=; 3:NicHrGlhO4+Zv/2i+uTNsVQPi9zhnva3PkZgFOS9IKUSQuwg3V80SOKfzZFQCyfuytxYiBy6AB8g4af6LJZ2I2cfp7mNEpVwkr737UYUKfHIgKpWk/ZHFfzgxCUUYuGWPK30z4r3oczFb6uNiucTfdHhKfLyN0pUu4GaIyN7Yrw=; 25:evtfI+6HIEEIEOPC6+SUXf5DQFwok0sye8Drg/yZfwt00tY/osusLEf8SnuTDX5xCMiveb6Cz3AOe7cnHZVMS5wtk7QCpNTurTSy+eAbUi5LSiKPWmWHoseF6Z8DsQ6vkv0t7mv7XIiz/lSE4G/1eQXuU5xDZIkKFSNJZD6iUf2ApEGOEI2x6JILW5EetxUCR/Ayp3b0rySKJJaSUNl1lJbJOEJKnDNqaHS7Saxfw/nNTLazIPu9tQvwZGLibKz26xCU1A6eBN83aItLJ23lImE1Wya8AYbKpvB0xHFTOlcf5j0DEuhJVz+57wBxiL3RCvAkYLkRosihZK4Q8sweiB2eMG85+Rw5PVyXAbwBhE934oF1P0jxfDSZWhjg+sgdlXrSpsuezpZ5ldD1jLDB/PV3TeJJ+NCyWtOZoM4RMWSo5TXei9MhODSJtQU6wi2yO6ktPC1+iUXFhXKzbiaWeQ== X-MS-Office365-Filtering-Correlation-Id: 51390222-24fb-4fbb-8a4f-08d41a34e3e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 31:wOr38SnkECmZvstaSh8uyCHZBiZCe+tycttgfo8pFv60CMClKOL3mT6zBNo+dXvVuJszXYQ8dZcrOfZgwFNSAShZHJjzoNPUq9xitdYNT2jM58cVv5aeqtc5iWLaXRH03fc4HZKTPbyKVZ0YeV+RHp9zK61WyJhNQ9LSsu/fPvGSGSaLc8buklY8/xWC+wu9oOUxWP3KyiTn18UCB77bogxH/NtWfb2UJiZ1aWKmxVTln48I6n1fNNgovUAKZkCd5AssdCl+4h1zLGbSN9tlNg==; 20:0fyoyrZC2c6oezd4OcSGnyxe2ftiwblIDT5SGmQ137GxWCma/2lF5zLPiUVXK5IGbqbh4SE4hTx+xaWW7IL34WUudnKFu7veNeqkG8oxvVieN2hIStyiZc6WJM1SaVT6tg3z3iWn4awPMaX6+8CiZax5giY+GdgT4ei+2sJV6bNTxReRHF8spVn4IhCQtzx5BGKd0DOtGHOM6F5nzPk9N5z+hD4uNvz7s0cLQn45FPVclJEtxwyy19G58b71tWoDtjYWWllZIEPCU0spWG7LcH+CD3mJJvzLsBC+s4DuLsSFaFGcnfSNBXXCWHF+qy9Xw2AyQJ7zwsaklks1Nvr/SvSgjB5c1acbqWNgDNR6jhs097ygwofwtgLWO6uC6JY43Wku53IncDpWDjjq1Nw5b393xFeOi4ni9E13sObR0le/f+WdeMqEKwu0rZngb2RdrqliQ8JAHvNLO02p+TvYjl41j5y7jXULDPQn9XP5EYj8Fj57EWE2dH7h0ocmyuV3xxieA+vtwYvaArC5NdtNaoTowvMEDchnez3YueWnXCDK7XxHE47aBG0ioLMRpGrhv7CNW7WeRez+9me/RXoMiN3MVBkTblsPyVKzOnUYRHo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123558021)(20161123562025)(20161123560025)(6072148); SRVR:BLUPR0701MB1713; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 4:71QmfoZoMkuADN8tVfoGRokVqhiCjI9cw8nVhH2WDnxVMsIrf/w9sLujCjczby2LdtKUZCXet3WPeHxukjs/dD9dxQhw2nmRRn1XOIiq+AH5iaLZwRHMxuU85JywXAObz2zmSDvvk8HCfFfkQb4y74jyIkTPaBO/cZsaiof/d/tZTC5cCeKvn2F4mVZ3Qo3V7++z6GIDr7CW3Opko2z2rCzYHcltjdYWsim1037HWmA2xmadJ9Nj5eyykaglh3dfbeSTT0XsrHbfxwm+jq2/HwagftUjuP4XwVUxkMnTcRs8HV+Y7rcbbyfElr5Vm5OWV3ZWOhbX76UC4L7e6X+CcYR22o10FirZFkgtuC0aOg9vF93M1Hy6Sic+PXgZ5/zKNj8r5nks2lE7GwdJ/obeaysvNh8iqM4lCAeuD2AdUG1cRZahm2Y98MaWNyGugkFo7BwELOhFFzT27L2WuVS3TGn15yLJC0O5NGutoSHJsTcDFQRp9+/4uzifuteq/WxYFxGET+Dq1YW787LlpqcQUDUyoh4ErCaonJkEphdjsnr84S55GI2E8/8tZv7vrsmciv6LUOazmWtJaUES1TPNkm53B+BmjOp4nibvalQG1GI= X-Forefront-PRVS: 014304E855 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(377424004)(24454002)(189002)(199003)(38730400001)(81166006)(47776003)(5660300001)(6916009)(69596002)(92566002)(2906002)(9686002)(7846002)(4326007)(229853002)(83506001)(39410400001)(8676002)(50986999)(42882006)(97736004)(81156014)(189998001)(53416004)(39450400002)(6666003)(110136003)(46406003)(4001150100001)(76176999)(66066001)(54356999)(733004)(4001350100001)(93886004)(3846002)(6116002)(23726003)(50466002)(1076002)(2950100002)(101416001)(105586002)(7736002)(106356001)(68736007)(42186005)(97756001)(33656002)(305945005)(15395725005)(6506004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; H:svelivela-lt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1713; 23:6LaQ8+gyTD+60lJ5OaZWsJIOj34oYaC1z5BF2/v?= =?us-ascii?Q?pkK04Z6Xy+AJs4PaSkUTNYVcbLflcU1eIijXQYihWFgx9mw4PECDnqUFq4wK?= =?us-ascii?Q?Wkx52ssR75v0TiSaA2zNzMAEuy9C/4ocuPUQLxY7ggeGPdlrGe6PRobFfXqm?= =?us-ascii?Q?qOYUD9PSJrNsyY+xfzExFti8jvjRBD72JRrD1GExmTcU6Wg8jLsu1RinT5TU?= =?us-ascii?Q?3NC3xTYVuvfmXdEEMyUiitXfv/PA5/FmgO9UH2QcaiJdFaY5BEMOUlhWuGH4?= =?us-ascii?Q?+yv3qDQRbVvtAlvFXip6eCFFjIQrkvAMoZZxizT4OlyE5jQbdRMxGcvyPxz8?= =?us-ascii?Q?lF60EEVuZ6R4v0vPxBLCiNDoSTTDC4hyPEFxkrjdR8JUs1q3BfARreCHECv1?= =?us-ascii?Q?jHhQD/Hz99NVqutDWfFaBtT3NGsBw9adqpkr1qReAr8aBhktIanQzHR/zMXF?= =?us-ascii?Q?QdXQuGJ3d1DY9CDHZ1T15z0VuMIYLjmLRZFL9UaRBTcsODmeRy0l7feWHtPY?= =?us-ascii?Q?8OqMgtMjDtFpnmwH4iipd7J4FRUWt8rtARlZV8l5rsNRDUPbom9rh/gRM8sB?= =?us-ascii?Q?yn86jt544QgUOR7JDKJng+h1v8wFfnHOZl4lnyMTa34Z78GdMVTtoztVRqhP?= =?us-ascii?Q?v53pv3S8CqJYXUriEljBn/PmmYBkDbiPVO8quK2CDNE1QjiqUwJyqWKGC1xW?= =?us-ascii?Q?8cQNqyNuhP5NRHpjuyRTntQ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yPgMvGbUxvh+hctbfjanl8RRVUj2Qz3rcWX3znk2SFJwzH/dLUMy1odoJy8qITJo/kILF+67OpWSNaB5jt1ecOuh2tF6Z6P6VJhlCVdqgwIvCrHqC8Yaz9FYO40LqsYQyZ1uXZzcLqSd1Gsrd/6vrm2Byw0Y8uX3QoN2bCBH6f1dMx5XjnWwU4MyeHaMRD0ujJpmT3863duMX07ggkIaq1lLgJrIkTYU=; 5:RyqwjhjDyiPyNSgmWT+Utrlf6oCRTCQRl1ibQOdBlGtQzUFcnbhF0MsaUH+OF/o2QbpqqOiku3XGPh7PnCvhaInGi76JfeynpotK/apNHrcNPn0zmmAV2BWMbJD7/k/2NC5z3k7f8HT4V6ORrAjTgg==; 24:h90tGoLBPDYc/sKjJwjxEkj6qRxVKYJm1UZMG4cApTilUptaSHpb8ydJRDCmNV9o0i5AXnQUFsEVomuPACtfPk/mdfIpIFE75Q1lqMaPbUk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 7:EoFcP0o2sKIdMWkm0XxayVzkJdXIaSmSYU6267Gy3AlSrumFst2cuKQZTvWCOR+MSfyMFyf98YKrnE3VKEb5k6Fn3nu6Tsg9ULW8tAc6PooPma1jbL0EoAkrxr0+YHzbDEOVrGOeEGvLU7TH8CzcGfQapM+Qs0yxgw+pen92v21bwNfIqAXVePiAGUjvaQeM5ZwyrPlPNTp9e/QMsMPo5h7oA92f0cmOoipgWS0NLmC0zyf70V0WhsPAR6kK4PMGMa6ZOFwqXMHLRYGY1xRnSVpfOygKcBcFo/nLOyT6hxq0uMNnowTHVilULO9gE3v58DuPbQ69qYW2CHRBzialt8bykqBpyjHw/7mSFQp+5Yc= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 21:56:22.1845 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: Re: [dpdk-dev] [PATCH v12 1/6] ethdev: add Tx preparation 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: Thu, 01 Dec 2016 21:56:28 -0000 On Thu, Dec 01, 2016 at 08:52:22PM +0100, Thomas Monjalon wrote: > 2016-12-01 19:20, Kulasek, TomaszX: > > Hi Thomas, > > > > Sorry, I have answered for this question in another thread and I missed about this one. Detailed answer is below. > > Yes you already gave this answer. > And I will continue asking the question until you understand it. > > > > 2016-11-28 11:54, Thomas Monjalon: > > > > Hi, > > > > > > > > 2016-11-23 18:36, Tomasz Kulasek: > > > > > --- a/config/common_base > > > > > +++ b/config/common_base > > > > > @@ -120,6 +120,7 @@ CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 > > > > > CONFIG_RTE_LIBRTE_IEEE1588=n > > > > > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 > > > > > CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y > > > > > +CONFIG_RTE_ETHDEV_TX_PREPARE=y > > > > > > > > Please, remind me why is there a configuration here. > > > > It should be the responsibility of the application to call tx_prepare > > > > or not. If the application choose to use this new API but it is > > > > disabled, then the packets won't be prepared and there is no error code: > > > > > > > > > +#else > > > > > + > > > > > +static inline uint16_t > > > > > +rte_eth_tx_prepare(__rte_unused uint8_t port_id, __rte_unused > > > uint16_t queue_id, > > > > > + __rte_unused struct rte_mbuf **tx_pkts, uint16_t > > > > > +nb_pkts) { > > > > > + return nb_pkts; > > > > > +} > > > > > + > > > > > +#endif > > > > > > > > So the application is not aware of the issue and it will not use any > > > > fallback. > > > > tx_prepare mechanism can be turned off by compilation flag (as discussed with Jerin in http://dpdk.org/dev/patchwork/patch/15770/) to provide real NOOP functionality (e.g. for low-end CPUs, where even unnecessary memory dereference and check can have significant impact on performance). > > > > Jerin observed that on some architectures (e.g. low-end ARM with embedded NIC), just reading and comparing 'dev->tx_pkt_prepare' may cause significant performance drop, so he proposed to introduce this configuration flag to provide real NOOP when tx_prepare functionality is not required, and can be turned on based on the _target_ configuration. > > > > For other cases, when this flag is turned on (by default), and tx_prepare is not implemented, functional NOOP is used based on comparison (dev->tx_pkt_prepare == NULL). > > So if the application call this function and if it is disabled, it simply > won't work. Packets won't be prepared, checksum won't be computed. The use case I was referring was "integrated NIC" case where - DPDK target with no external NW PCI card support AND - The "integrated NIC" does not need tx_prepare