From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0088.outbound.protection.outlook.com [104.47.36.88]) by dpdk.org (Postfix) with ESMTP id B9677DE3 for ; Mon, 12 Jun 2017 13:46:55 +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; bh=sd4irVTT9wz2kDGZrPckZbfq1+vZhwFmG7nMziN30cY=; b=XhRr0rtiPNnXv+0EQw5mJJYw0yB4OVfg8Pn43bGrX6yIBv97Jf+BGPHaG0eMLQRDcC364xGWhhWoqSenL6aKhvrrAZw6pgWvGBNaWNlF+QAj5SKC+VA6wQTC320++0Em/gbxTrqRpTGklsAak+8sIijPRSZx0xpGJTmrpqCUUY8= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Mon, 12 Jun 2017 11:46:49 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, nikhil.rao@intel.com, Jerin Jacob Date: Mon, 12 Jun 2017 17:16:27 +0530 Message-Id: <20170612114627.18893-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0081.INDPRD01.PROD.OUTLOOK.COM (10.174.56.21) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1716: X-MS-Office365-Filtering-Correlation-Id: 248c36b3-c361-4b5f-98e1-08d4b188b7db X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:znDtKwL7nMnUL4h4xy+DeiFHprJqaZs3cUcvWM1C2e4Oc2EaOqydGjD2WxRUv06tJzHieNQzE7jU1fpH9CRgGqipyMohnvRmp9uBYj7tfGo5QQD0HtioT1d1H3k7om+c5U89NMDhEUhXgHlZqA+AKzKv6mqsh6fLaMFDPgfxc6/w9pHNsxuXIbsWKmLKd46YHKkfj4RWVBpVQv+He9LCnGZoDMRdNvzluYot2NI8muqvzgNmftwz51hweNBW0SM4H+ED0wwXLiKDlI/il52UYJbe5ZA7VDOh/OsScZnnHKJJBse0uBFVM74/JDH67QFrjYBWmi0sBdg/uMwl7xki+w==; 25:SpJeBAPKYkKDSXuMSuRw2NUb9L7abOIb5Xl9jwUny5py3vLE7/U0yRwxNqZr329PFcwiikKeTWIzfpr0Vuq3fsL06lTkKqnK5drr/9dWfuVGibz18FmMNxUV9A/KIXwZw/ycLpRpDFkb5Z85UL0VSF+pRC7AG5UljWM4DJ2CZOGwcKaJ0U6yGLxIizn/W79Js/FULfjTSkmyGSbxiuX1PGro6nSeuvvMHdNNk/m+gG0n01rto2kMF3B/I0FRDqJK25F2ehusfhHaDQK6U4erYJlz55xaqyFldEUWpjbYgxwcqSe+25YSPZg3fNbPNf+ek4GVnFHE3voPegI+SshfPc8NbLTeWCByVY8hI29sPhDxdihwWr3jRpnTsJRB/UX2Tk55NaI0WPMrMOzsK9YAyD8FqIz2BfFp9JG5SIfzNo8tYIy0OCo4MVkPcnUAjHtBhSzpAywVRQZdtRA/22ngNsdwj2MsviW8X6FLagE9MvE= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:z8hfjvLmve/LdR7BHM/7x/698ncAWtUw5q9S4yQeIfbur7ZQOy4OY4klB4VDqGYZ9LLky0D2THrGhJYyHy6i/WG3RobhQyV/wsw7fuocEIizAAcrAt4WHnfYve4FtSokEhH9hnxvDXfgtYGlJJaqUrlGr8Y/08d9wn2IOjaypxj278ONObqJSsbSTcNdyoLTsOhdXFzqM9EFLuETg9HLjV4ylzWxStFhAe4kiKbCQBc=; 20:S1vDpN+WU2KG7cPibu4qbIN+tXhm3TReJ601vIWDru4j+unaKqnbDAZVNPdnpdi6iBdpKVdlgYlQJRbM/GLiagiwCIfZvVM+8pSn/0lGT2b+ZKuTWEEekkOjC/0NrXfBAjmczsQcqREOLpqwEdmxT033LalTFNuFCAUar4PBGyqzz57QhDshtdpFOXyQKEmmdfFpXzY4smrlMM45peKtUWSQxYEvYrhQXLgygboCsbbcDbVI2lJgiwYe9I3BPRN6KRJMmlRvyfP2AiI/V+G+X3dsWfJGs/3M+wo23+ig6K+C3BItNzvpXkWg4UYnDb+AqRq7x4zVkcTRcrTHOlgWTmwDEaX489kcXfy00sQtQaViyaNUh7DAaWPBBe2pOSQkjcQnzcbLa23azKr11vIp0Pe4MllUpNmM/XeultQcwRXUIbU8B5aBIlaM8K+jPGAX+d3fwGZyLls91kd2siaIzxL3oGMhv6OxopD8b+nEFU7TWKB1ZPX6UWr/sppkvwjP2pjuXAyqSySsGPGRXFUWc3HUWUxKSYt3llJy+R606yi6ygx+pa9+ROs4RFs5dqWxYu2z2lWTubqVeBm9onspSD5AFcM3ptCTT+0CnIrXboU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 4:NS7zkksP4oycla0hJvX+FYvBZmkENK9chu18mg8+?= =?us-ascii?Q?erUU6PhVXezJGlqDxICOPcO0lKQKIE02PaOGzuV3R7FxW/5Jkjy2SP7ogHmD?= =?us-ascii?Q?eZNQMiZm8dg6F/T55W1DCF0sfXqaxX/b2q3i3FWt2wOg05kQmC4JlkKYM2LN?= =?us-ascii?Q?esUU3G8Yn+lnGlxoNT1LeZZyTzVS72kkcUr7+RB4VrNpDpmN1fFDKIQ0j75v?= =?us-ascii?Q?F0dSviHcPjgPZJwbdS10w5m9H/xs2FlkrbgE7diwu2GHssmddduqdjzYOxZI?= =?us-ascii?Q?h/Xq0LEVRhSRGHWN06Pvo+7YBJrrAfJLE08+YyjwXzF3EFK8+PmrmWmsImuv?= =?us-ascii?Q?w15jAedipIaX3mH31Z5e9iYkjHsTEY65Q1R3+N5M1tQm+wMSWP7ELrEqwqdg?= =?us-ascii?Q?EtIUGZDNYEO0wsIG8TKbPmt34Pg9uagAO+6w513oTe3QrChCJoiUqiMJH8LN?= =?us-ascii?Q?t5ssWNFIX6UaeU1rZQMBKCXKHrz6MzVYKeNLkWCIjuMsNPVOOO/zQygSX7PJ?= =?us-ascii?Q?KPipCcuz6CAXc9jR0ZqYT5eYzAtjCRl2rUgsMQVPqUFDfceo6jwVSy0czQb1?= =?us-ascii?Q?ZjQ/wBJlCmynwLJH6fZBgXukmoE0EGQjFggKTBZp5uzPLvXyePwBY2AeoTEn?= =?us-ascii?Q?69U4YdlGOI9flBOrOYSwX/EocBWfkjYBgIRWuENVg9QrtJZJDBGq5+VJ2Avy?= =?us-ascii?Q?Nht9rc35RHDFEJre8bdveiKzAmzcx9AS2G05TXTX+dJAYbtNB/RHaxAnDZpd?= =?us-ascii?Q?Rx/AJ5b+9o96D2xb3QWitlAA7iQECKjGHmTFJQlY9tqZRmPbDmnNy5iL8Idc?= =?us-ascii?Q?oph1Arg1Lle9Dm4qk9gMF24t2pEw4bsGg/Zs5yY4J2RS6BLjz6S99R/ipurC?= =?us-ascii?Q?4NaX50ZZvD3jLTTXwxC8apSDYRa5SXv0Ga2pG4aUUL6D2XFluPLo9hj3c+Ts?= =?us-ascii?Q?cl5Tlb8U77M0A9qtlvhLDq3aVg8es8LF4UxQ6vPAjNhvo9S/kkc4vj5kZE3h?= =?us-ascii?Q?eo2WwKpVXs403fTYZ7wKdviTnNHADz9F+QQUu4yjKWocLRmUO8/Hw89aX2JT?= =?us-ascii?Q?ljtULQx0i7EXjkntfLp1JyYeHw18+0GTc2mUjTP1E4yIuTzvPEkTnwEJMqZ3?= =?us-ascii?Q?VWLo08YuQFQ=3D?= X-Forefront-PRVS: 03361FCC43 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39850400002)(39400400002)(39840400002)(39450400003)(6916009)(81166006)(6512007)(8676002)(6486002)(50226002)(5660300001)(107886003)(4326008)(6506006)(8656002)(38730400002)(53936002)(110136004)(2906002)(7736002)(1076002)(42186005)(5009440100003)(25786009)(5003940100001)(189998001)(36756003)(47776003)(42882006)(66066001)(48376002)(72206003)(3846002)(6666003)(2351001)(478600001)(305945005)(2361001)(53416004)(50986999)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:ZbDh9h/A2B3l1ZNuY/dto/SuNcNPok0hkAyT4hK?= =?us-ascii?Q?Tbk3zgIaivO/HZAHs6oGLFD38d3YLKQDbDS2qDMN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43OSfIh4Y6LuXm6DIB7jGA4jbwo0EQzLwTqsRjGreHMImVBs1YEnjugKPfwqLUHSMZpX/W78gQqm8uioSjVxtpauoHyE2VkA0w+g7YXCD7cA+x+TqzRT00yEDosNy9t4aJR64d5+b1hJUV/xQG9DJtnsUwQ5ezTEiYQwaWmvHrr9YZpkY3BO0j8Tg2+/8nHobHuDYJVZC9K3a8j1uD7KC6F2+HKMt03I9Qr+0JnXbrjIOfQG7bpZg/DG6GnWbJui7zUdCIvpWmlYVEH4Ail8JTimOPLTSSX6Y; 24:AebYuMZfoq8gNuuL+UgurXtnsFkjCwu9iFFQ9rO4pdfF9y0ymJ5ZH86gqGSgOG55Ra95s6inw0inatnqH8HsVLAF4rT0IIfoLfVPrDoS3S0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:ems8zVJK4U+0Id+KJBhM7Hkcr9wvhG0w+ieIPK/rhOy9kOnBhUS5dp3EPGiClpvZ93rA+dlX4IshG3vblHMJKw/TpU6j5bl65LY73obKHflEYfuBKkM3mGmsdtJAuC0cliyGSTXf/AEfBq074gk1fF9vA2MgWLCF68siXMbD1RA8ibcmFjV9pLwaIyhm8S3vYnDzS7BZnnU9ytRiZMdJBnP/DkGiXtUP30DCNZ9/NNCYq/WcS6bsepNJ3nodv2UAjDVU7St3boJlMZn38jUNwXgw+xj+jRhhi3VuB2kquLzm03M9Wx5OYdXvQWNC0ZPl+KyEzOC9LNg2e+bygyofRA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2017 11:46:49.1246 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: [dpdk-dev] [PATCH] eventdev: add producer enqueue hint 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, 12 Jun 2017 11:46:56 -0000 Some PMD like OCTEONTX can have optimized handling of events if the PMD knows it is a producer pattern in advance. For instance, OCTEONTX PMD can support burst mode if op == RTE_EVENT_OP_NEW. Since the event producer initialize(set all_op_new == 1) the event object before the main producer loop, This scheme does not call for any performance regression on other PMDs. Signed-off-by: Jerin Jacob --- Another option is to add a flag in enqueue API or have parallel enqueue API. --- drivers/event/octeontx/ssovf_worker.c | 12 ++++++++++-- lib/librte_eventdev/rte_eventdev.h | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index ad3fe684d..209c595cf 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -196,8 +196,16 @@ ssows_enq(void *port, const struct rte_event *ev) uint16_t __hot ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) { - RTE_SET_USED(nb_events); - return ssows_enq(port, ev); + uint16_t i; + struct ssows *ws = port; + + if (ev[0].all_op_new) { + rte_smp_wmb(); + for (i = 0; i < nb_events; i++) + ssows_new_event(ws, &ev[i]); + return i; + } else + return ssows_enq(port, ev); } void diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index a248fe90e..1c1a46593 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -933,7 +933,15 @@ struct rte_event { * and is undefined on dequeue. * @see RTE_EVENT_OP_NEW, (RTE_EVENT_OP_*) */ - uint8_t rsvd:4; + uint8_t all_op_new:1; + /**< Valid only with event enqueue operation - This hint + * indicates that the enqueue request has only the + * events with op == RTE_EVENT_OP_NEW. + * The event producer, typically use this pattern to + * inject the events to eventdev. + * @see RTE_EVENT_OP_NEW rte_event_enqueue_burst() + */ + uint8_t rsvd:3; /**< Reserved for future use */ uint8_t sched_type:2; /**< Scheduler synchronization type (RTE_SCHED_TYPE_*) -- 2.13.1