From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0074.outbound.protection.outlook.com [104.47.41.74]) by dpdk.org (Postfix) with ESMTP id 2F77B2D13 for ; Wed, 30 May 2018 09:26:56 +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=oee6+7X3BcWEgRkFHrVZ6EGwEuWZUwj6l2+rXKlDYIE=; b=ovUpD30QNgquhWGZT18kG1p04qkv3KuePvyX0ADJR7/5rc8UKKnEMT0+r5TcOIOl4QgPyI7BcENfh9n2rNj6j5J1BqA1VPUQ8Y8yZijOclgut0exUTrqtnA0A3tAArusfwtSsY6qEEadm7497ffZC4Q/Hzkc28LxQjAq7GAEzxw= Received: from jerin (122.167.70.44) by CO2PR07MB2518.namprd07.prod.outlook.com (2603:10b6:102:12::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Wed, 30 May 2018 07:26:52 +0000 Date: Wed, 30 May 2018 12:56:37 +0530 From: Jerin Jacob To: Nikhil Rao Cc: hemant.agrawal@nxp.com, dev@dpdk.org, narender.vangati@intel.com, abhinandan.gujjar@intel.com, gage.eads@intel.com Message-ID: <20180530072633.GA2015@jerin> References: <1527260924-86922-1-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527260924-86922-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [122.167.70.44] X-ClientProxiedBy: MA1PR0101CA0052.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::14) To CO2PR07MB2518.namprd07.prod.outlook.com (2603:10b6:102:12::24) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CO2PR07MB2518; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 3:Ryf2gkRtEmj4e3HaePb6a7BWd9Ui0TVCjeQFp/Uh7x9SHVtifj0zTf8ADL6tnap7hso/tV9lem9qo3Vkb1jXMUXIOOnn/buMhbfAma+i0DvPCFc99xs5esXSpcpVhKwk0vMq89p/E3/C25WrDmMEb/xOG6KKZ6Mkki87EWefoELYaP/Y14ARhFAIb7jCJMY2T3xZ4AXY2vf5kXw19valMbzKQRsOMMfWFkb8WjLoEEP6831LAOQIj+OD6TDDMy1S; 25:eZ3FUi4O3HtqiYKgvLDRFmN1MTJv9QeC0nY4LQ+zlGL8RQzlBuZ+H/iM/LjzsBhp2AqCMbOK5vVBe7GpkeEvs0O1ceYgAflR10DMnz8ydcTNoZ0U6zGXh0YUaLapsy7QvFJhnJP7zaAKsLKjoiT4Ib83/hpNj9UfDyrDK7i0bkSyVRzhzptpJi7EJ8HuR2Bu2MNveHaDuTEmAX4AFcyKOOnc9e5HuI6uZQ7h0LCi65jugLQOL4O/tA8dCoPSVOenY/ldUlW6BJhqtjAFYfk4IM9ujgSK1xzE+6/kVIA8EJRUU0qUDvlmVj5sTFkfOJwykfI2paf2evvaiWMd58OWJg==; 31:s9eVMs8D/nL9NKqhKlrsD52I9QLY+mYjjvuGbEUpxNPzM2l5BhU294fa90bLTtUqh+DpNiorc/IzSMBF+9Rm3JTvoMJfav/GsLJwQzcF+IdCWyyCU+z8B3e7k8kVPr7WZmNoV2vl96lHGD/PDwdjFDFUtBksLFWdzpA8KtH65vT+qcaIi880T3vg48qkwdEt4yS9hoomC+7bilqtz2M4MG5eMDY4gBAp3RdRLKwskaw= X-MS-TrafficTypeDiagnostic: CO2PR07MB2518: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 20:nobf/JItAwV2TCOcpEdJLRC05DEjVQCxkfP/H1fi2K7nMqVBErhx2z59eKCyPz/CCbSfgkmgYvhCJ0uX2m9qCmPoFQCHpSCZyJLWPTAXbgoOAZN24H7ABHixc3NtDVCoftN7X7RRQivS+ph9DmxoLyyv56YCTuRH7C0i15DYsmrpmFscIGzOA0Saw0MM8U/Xh8frMoSZsWM5bmpS0OFrIIQYP62afk3Ba1xK+rcTHf0l06rjon8kO4bAFaFvfeCw5rp9EHnZqua3B5TPg8KOZgr83n736rnO1soNFIaOChx5N+dym+YHaOSxtEuhTxOQkhz8loD9afae57Hp2pbT/U/JtnOsK0xldbs8olUmTau77sczyF2JIYTRhdA/zPL8crxZGESQ0x8cUzCKzhnbRAZS5KMYPhaNxf/1bjQIOx4VAi5br0yTSIy3xnVjfN2ioHjx76EsoJP0d87FbIYrCDPs/9XQDXdKbBrSQv59WNSuMA8ww9AAtfqb1pVqK77pe4hsOKdyRKWE7/6hXaawbkTYPOBJUdCH6Hs7a70Y/5+AIh/c6Fv1BJszapxQYZgiZgM/US4cJ+tmUOr1VqwXbyub5DLUl4Ip3QRFhCjLMVw= 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)(93006095)(10201501046)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2518; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2518; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 4:bi6b92rRMYhsyIUvMqUy+T37t86GhnCVVI8Vb2gkwS+YILBSD9rxStGmRdzIRvBmeK7n9MlvzB8ZF5v1Kkp9eUVvLmmPI9bOQu/5xQFUt2ptC9/fJYBxv5GDX2zBdTNAdyOSR/eBg5BLif5DyHMHpLspasFnBmQYmwK5qn6GhJPbeja+BkROSGzVrJr5nKHzaWFrYAgCo955Os6K5uXKAK/HESoOK4tgpBk5MRngVSS/5hvbT2hjy1+NVs2PAMKrxH1h2cgBh/YuYeKZxd0vwd25YoBcjwLZMFGPz/6utbhoIUyBaQ0AZdLRPYBfvqKwAtK6JUaKbXNiFsithcUvhoAwMEQetmiJld6OxUiTvP0= X-Forefront-PRVS: 0688BF9B46 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(346002)(396003)(39860400002)(13464003)(189003)(199004)(33716001)(478600001)(72206003)(3846002)(6116002)(23726003)(1076002)(2906002)(16526019)(33656002)(81156014)(81166006)(26005)(186003)(561944003)(8936002)(8676002)(59450400001)(7736002)(305945005)(68736007)(386003)(44832011)(486006)(446003)(33896004)(52116002)(11346002)(476003)(6496006)(956004)(76176011)(16586007)(229853002)(58126008)(316002)(8656006)(25786009)(9686003)(5660300001)(53936002)(6246003)(106356001)(105586002)(47776003)(42882007)(66066001)(6916009)(6666003)(50466002)(97736004)(55016002)(4326008)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2518; H:jerin; 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: =?us-ascii?Q?1; CO2PR07MB2518; 23:9EJ9iPuCepkj3aFhJT3F8lEEbKErKl3on6s98nOGM?= =?us-ascii?Q?1hu19VA9JSDcphcNhbzlBLLn6Wy3fdw16Ezm1s5YR97sLlH2XS5KR6DQedb5?= =?us-ascii?Q?hgctWxyz9jEThChM46HD/IFGx82i8nmav7thY269DdLz4GA1RUTynHkA9BHE?= =?us-asc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peMiMPETPj9+CA9FlaisZVjtxNPGLvfRFkvT348WzXIuJSi1iRi58rlHnYVvQh90A2FpueZ4Fht9fHyk36qZA==; 5:9vStRZQRcwiZeRtBvLgVBQ+nSU0hVl4Qh72+K/sZOohJYsMLxDJq9oIzjORr4qn4DaqN+mhAe5GabBGxEoqU7hhEFvJ1AEfgM4iIKZVyU8Z5ymz1qsHS4oa4arw3t4VeAWo8lBCUNBoa2uutbyolM00aQImG9y1ugHF3uHEh03U=; 24:urpeX9OmpqwBHLT0gsrVAyFGd8E3rUKOLFr/bQWITYIk+i3rXfmweoHDQmTLU1kadzRxpM/Fh9TvBdgnjz9muv8/MckWZuitWh50lCRhOvk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 7:Ca9JkJkIJ40azGZadpLCC4hadkf0c8TK8xjPhZ+AqDXC/T1gTsoarPNkDIgZ68kFkNGveFSkk0GKja1PmNU/KrdQfnCcNzeiK9XLckhXl6zlPS9j6XHomtqkFXXb+C7Bc//LLhgWsY0hXWMSfdnciv2bgJN3OfBV5Au8ZgCjPl8SsTRlo0Qf8f6zIphr/bNRDPspdF7BFUXXM29cZL4kAB/lacIEaW/wvGamB0SBvtrmj4DjOzm4VZzrbGcExhlZ X-MS-Office365-Filtering-Correlation-Id: d9aa5648-4ca8-4fe3-74b7-08d5c5feb7e5 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2018 07:26:52.1060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9aa5648-4ca8-4fe3-74b7-08d5c5feb7e5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2518 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: Wed, 30 May 2018 07:26:56 -0000 -----Original Message----- > Date: Fri, 25 May 2018 20:38:44 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com > CC: dev@dpdk.org, narender.vangati@intel.com, abhinandan.gujjar@intel.com, > gage.eads@intel.com, Nikhil Rao > Subject: [RFC] eventdev: event tx adapter APIs > X-Mailer: git-send-email 1.8.3.1 > > The patch below introduces the event tx adapter APIs that encapsulate common > code for the tx stage of a packet processing pipeline. These APIs allow > the application to configure a rte_service function that reads mbuf events > from an event queue and sends mbufs on the transmit queue and ethernet > port specified in the mbuf private area. > 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? 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 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. 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. 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); This API would land in driver as function pointer if device has RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT capability. 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. 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],...); } Thoughts?