From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0065.outbound.protection.outlook.com [104.47.34.65]) by dpdk.org (Postfix) with ESMTP id 46F7F4D3A for ; Mon, 4 Jun 2018 07:11:28 +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=s3U/oOmPO3Nc3xGYTfqFyhBCOiWnShoBFnLSdSs6z+I=; b=f2lzmDz0B+ZSguaLe5jXwki1tF/AKHLtBiejvttg5+oWJrylRvPXm4ApAHnnmtf+h4NqL3RrApyqiDOMREuppMtBA2DBlYgT74tFvCdMnLzsNEyhgnygPjDLJNtXBYzL5knKUqR6qCc9YEsefqGCtMqpmyn79jX2x/nZ/qwMpiI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (223.227.47.250) by BN3PR07MB2514.namprd07.prod.outlook.com (2a01:111:e400:7bbf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Mon, 4 Jun 2018 05:11:21 +0000 Date: Mon, 4 Jun 2018 10:41:06 +0530 From: Jerin Jacob To: "Rao, Nikhil" Cc: hemant.agrawal@nxp.com, dev@dpdk.org, narender.vangati@intel.com, abhinandan.gujjar@intel.com, gage.eads@intel.com Message-ID: <20180604051058.GA1913@jerin> References: <1527260924-86922-1-git-send-email-nikhil.rao@intel.com> <20180530072633.GA2015@jerin> <72136c5d-64ba-247c-97a8-728054935e7c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72136c5d-64ba-247c-97a8-728054935e7c@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [223.227.47.250] X-ClientProxiedBy: MA1PR0101CA0072.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::34) To BN3PR07MB2514.namprd07.prod.outlook.com (2a01:111:e400:7bbf::11) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2514; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 3:B/yDuNmZrQi1vpW/sY8PLFmvx2q8ueKgJ9hwgXFewa3b5pV/YHQcopVcOSS42L9C8ibZDnNSIqC6MxSbZGjMKGYY54P334PtyfMXi2fLWESYyuke/7GEIpQ6pqxVQBBU6bZ8b6cVCvMVBFWW1AqoSExS+qFBH3xak4MXQHR478BGiE9e7ud+EitkegBeQsuK2o7KfG/VQhi3lRQkFnHVjGZ7bw1nT5fUR4jK0lszRQsfiuWgtDoWhfblNC+ul8/D; 25:orczTyDP/+RIru3iMEXj28lgtgwWnbHghv5biFynKKAOV7oFi+IhGvTbjBukuMJaijpW20gyfetHxvY5RuTo+8YluQTvhKwto3V+4q3aJwbyxQRIptmIGTO1qNyH9XzWmty+h8GgKWJxhiKvr/21HxR6MZeS4HxEbSLiI+sm9UHpVm8nXpipUD09sYxN2lkhLDbQgR6iu258culkiIdgNhGsFO1eblW0xP2yANWRtdHPemN9OBKhCEp1Iv8+TziPn87oKYvR6ztR1r1K+pjyQV7ocbsAQYfJl+xtVh2Y7cVbh6y0pIVxvVaEMrJxx3fd7PalAQzw8hU2jWpgrEFxLQ==; 31:kjSOXgJ365AQZpjCF0mPFX9KBKaJGRxmFqpQYsV7706fiCWl27AJ7dJNrYJR5Us5HzSw4kpwKB6hygcaUS/NXInyhtcs/22T+0I+hJzDy25Q+oyMhe3o7CQHoHy1oY+Xo/O09yD1O6MYx3KS9vreP4qWYSW38R121DP8KxRsKRIc9yCKN0dBQjRDQM2DZXg3JePakgSfm7jO4MEBbB+dV5pdo2cND/RzenHNpjKVtp4= X-MS-TrafficTypeDiagnostic: BN3PR07MB2514: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 20:a+6z5OapJbxgAu0PdnBJVTzSdY+hN9kXv/I/11nb9/V0j9+XwyG4f+DSemMB8xEixnAN8GGfG2XP5NT5d/RhQxxj3Y+hDt4zcIVr+QeXnaEgQRjBUvfQbYPePDzfx6ULiAlcZSFNqOtSd9lxpAckGRSA19DRm77VwbUO1q9Ej/BzzRc46Mu+UDhltlqG88J1Q+kTeONrnmkVRzZ83O4G9H93XoIpq87UJZLX+iUNx7uvpdi+jfsH7lFLwpIB18jo+zcVTpKV1N/Q0ea3QofIeiQA/SzorB1GB88J8LWOROWofd4tdlokVoDtW0V6zg0hJsmBaPt1KsEX5pO9WW3qbFLpMv9fQCcSsX5hLMh3/WNdM+vLn2DVrrjN19K2g7e6jZx05vL8byZq7/anAbAcIC/mT7fetH4JggP5OiLIQyBrtosZSLYjfxF92Gmv2bi52iX93sR/1QUdaQiXtMy7XGlIkVC2PmFAUGVAS2Xv571HkMncGSsHbyhNEScx820PgnRxl+uMylWFXFh96igbFGiy03Mm31lvzmYMQNUb1RfXMoiMisqQk0eBX1kwywTEflaMMCiyn0Ro/swM5+ye80cYqptj2zJsINDGk271w+g= 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)(10201501046)(3002001)(93006095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2514; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2514; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 4:ekyaCjkaIYG9JIJkAT6TtrlG9qtWWtRZ4A6mbUMvUOYqVnMBv8BnD4HNiCWhNXTcF00sWVUKNWciuE5xDKXPr3uZFBbf09gPa1yGRtLQevCMed7xcNgjcUcHI6gdH9sBHnMGsdAHVx6Tc2FcUZIgoQbOWFalUY1R2FL3JR3n+cMpLWNszVLqNfTb3V99mH6WGdnKqXoW968643TMmPNl4Ld8zhcgX8Y+q5jygw5P0srgg1qJFmgTByDXhp+etNpkQzHVy6ZW/xs0BLa0yxcRlWVALwcNLJOWJtfYhfU91TWVVUwn+/BRYL5p/5Q6k6rw52ds9KdEN3mqpGIHJjoq9tMKeNQ3UxqgHCXPFsklXCY= X-Forefront-PRVS: 069373DFB6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39850400004)(376002)(346002)(39380400002)(199004)(189003)(13464003)(7736002)(97736004)(16586007)(4326008)(68736007)(9686003)(33716001)(47776003)(66066001)(16526019)(53936002)(229853002)(50466002)(186003)(33656002)(6496006)(561944003)(52116002)(2906002)(305945005)(6916009)(6246003)(33896004)(1076002)(59450400001)(25786009)(478600001)(8676002)(81156014)(58126008)(81166006)(6116002)(5660300001)(3846002)(106356001)(26005)(44832011)(6666003)(8656006)(486006)(11346002)(72206003)(446003)(386003)(476003)(956004)(53546011)(316002)(55016002)(23726003)(55236004)(76176011)(42882007)(8936002)(105586002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2514; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2514; 23:Pnrslt5jBEmEp3GY+5wyqPv+SI0rSPo5/vfMNnUKi?= =?us-ascii?Q?vGX8BIKwGnSgOhV2H7IxU7Y+1hYCKZnIzrvO+v4yAzduTUge9W0DvOG4eTZU?= =?us-ascii?Q?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Chpp9TD96T1hV4DiHEw9OXih0gXVwQNm7F5/EONqTIdejIEhQ31xqWyAFouAXK8cbUVHf2AGrxzncl50le8qkXfBE6jFMm4Cu2UEhmAk49NmXB3D9uVioF7aHsMf3VzJRxDLSngRs4dIs3UOOkjpdpqvSK0+OCnS0qJa+ep1/0N73wa/yiuwae4R6SmnY9wtkG/AZHdJ5NWh085Y1KW64PpQx01CjCnCIaSf8ERfUFOkg==; 5:pEY9YG8sPI9lHfV+GTTeM2uY34poaGLbcSq2dP97aT+p2RNb7zPZQ94Yjm+fZFxXvuUdPcttjm0MAntBdAtGDHjazk5AJhrMpWXOnq5yoLPNAYm0mMiniDSC3YZdcixekMCzscqRS/EwUkToWJusIIbJqXyUnWYdpTnrsHPX/z4=; 24:k6R1rOR4Zr+JJFnckhe6sJGIy1mqAMJpbG3FgOvqlInkGF3SGZrd1yOuBSfeeOWdGsu4EQzb0fjmdd/9lgxZZ6CDC3Ina0gw3g+Law1Oy3U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 7:qtTZ2YjfFZjIbtGsK2AJwz23qUEZUcU25guRJtAs5IoYauqhiWAOdPQgGLDJEFzA3sRP8mycyCvlXzA6fHXNaNynqQWx2YqGYBZ2wG+M6SjuqLKSrjH63nFCo/EjgZ6CBqHm9+WhDSCj7iXxAFTLU89e2tCw+TFqq9S7VQgxTVhXzuwR2ekDyOh73kKZCNUKx1zLrSw8CRzRBiaH3ojdtfFKUdu2EV8/NmEAK+xEaJmPstA2cETvNn0DXAfEmGhK X-MS-Office365-Filtering-Correlation-Id: 58270cc8-03e9-4c3c-a1c5-08d5c9d99e61 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2018 05:11:21.0077 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58270cc8-03e9-4c3c-a1c5-08d5c9d99e61 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2514 Subject: Re: [dpdk-dev] [RFC] eventdev: event tx adapter APIs 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: Mon, 04 Jun 2018 05:11:29 -0000 -----Original Message----- > Date: Fri, 1 Jun 2018 23:47:00 +0530 > From: "Rao, Nikhil" > To: Jerin Jacob > CC: hemant.agrawal@nxp.com, dev@dpdk.org, narender.vangati@intel.com, > abhinandan.gujjar@intel.com, gage.eads@intel.com, nikhil.rao@intel.com > Subject: Re: [RFC] eventdev: event tx adapter APIs > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.8.0 > > > Hi Jerin, Hi Nikhil, > > On 5/30/2018 12:56 PM, Jerin Jacob wrote: > > -----Original Message----- > > Hi Nikhil, > > I think, it is reasonable to have Tx adapter. > > > > Some top level comments to starts with, > > > > 1) Slow path API looks fine. The only comment is, How about changing > > rte_event_eth_tx_adapter_queue_add() instead of rte_event_eth_tx_adapter_queue_start() > > to get align with Rx adapter? > OK. > > > > 2) This my understanding of fastpath > > > > a) Common code will have a extra port(given through adapter create) > > where all workers invoke rte_event_enqueue_burst() to that port and then common code > > dequeue from that port and send packet > > using rte_eth_tx_burst() and/or using tx buffering APIs > The workers invoke rte_event_enqueue_burst() to their local port not to the > extra port as you described. The queue ID specified when > enqueuing is linked to the the adapter's port, the adapter reads these > events and transmits mbufs on the > ethernet port and queue specified in these mbufs. The diagram below > illustrates what I just described. > > +------+ > | | +----+ > |Worker+-->+port+--+ > | | +----+ | +----+ > +------+ | +-->+eth0| > | +---------+ +-------+ | +----+ > +--+ | +----+ | +---+ +----+ > | Queue +-->+port+-->+Adapter|------>+eth1| > +--+ | +----+ | +---+ +----+ > +------+ | +---------+ +-------+ | +----+ > | | +----+ | +-->+eth2| > |Worker+-->+port+--+ +----+ > | | +----+ > +------+ Makes sense. One suggestion here, Since we have ALL type queue and normal queues, Can we move the queue change or sched_type change code from the application and move that down to function pointer abstraction(any way adapter knows which queues to enqueue for), that way we can have same final stage code for ALL type queues and Normal queues. > > > b) If the source queue or sched_type is ORDERED, When it enqueue to the extra port it > > will change to atomic/direct to maintain the the ingress order if need. > > > > Couple of issues and a minor change in RFC to fix the issues as a proposal. > > > > Issue 1) I think, Using mbuf private data for such purpose will be a problem as > > exiting application already may using for it own needs and there will be additional cache > > miss etc on fastpath to get private data. > Instead of using mbuf private data, the eth port and queue can be specified > in > the mbuf itself using mbuf:port and mbuf:hash respectively. Looks good to me. > > > Issue 2) At least on Cavium, We can do so optimization by introducing > > the same RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT schematics of Rx > > adapter. i.e we don't need extra port to converge all traffic from > > different workers and transmit. > OK. > > > > Considering above two issues2, We would like propose an fastpath API, > > which semantics is almost same rte_ethdev_tx_burst(). > > a) It will get ride of mbuf metadata need > > b) New fastpath API gives driver enough possibilities of optimization if > > possible.(address the issue (2)) > > > > The API can be like, > > > > uint16_t rte_event_eth_tx_adapter_enqueue(uint16_t eth_port_id, uint16_t > > eth_queue_id, uint8_t event_port_id, const struct rte_event ev[], uint16_t nb_events); > The worker core will receive events pointing to mbufs that need to be > transmitted to different > ports/queues, as described above. The port and the queue will be populated > in the mbuf and the > API can be as below > > uint16_t rte_event_eth_tx_adapter_enqueue(uint8_t instance_id, uint8_t event_port_id, const struct rte_event ev[], uint16_t nb_events); > > Let me know if that works for you. Yes. That API works for me. I think, we can leverage "struct rte_eventdev" area for adding new function pointer. Just like enqueue_new_burst, enqueue_forward_burst variants, we can add one more there, so that we can reuse that hot cacheline for all fastpath function pointer case. That would translate to adding "uint8_t dev_id" on the above API. > > > This API would land in driver as function pointer if device has > > RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT capability. > Agreed. > > If device does not have !RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT then > > common code can choose to ignore event_port_id in > > rte_event_eth_tx_adapter_enqueue() and select the port given in adapter > > create in common code. > The common code will still use the local worker port. > > So from the top-level, each worker lcore will look like > > > > while(1) > > { > > rte_event_dequeue_burst(..,worker[port],..); > > (process the packets) > > rte_event_eth_tx_adapter_enqueue(... worker[port],...); > > } > Agreed, with the API modification above Great. > > Nikhil