From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0084.outbound.protection.outlook.com [104.47.37.84]) by dpdk.org (Postfix) with ESMTP id A25A51E2DA; Mon, 11 Jun 2018 14:17:18 +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=O9xE0XlZqA7WY1ORefOpVDaIwhX8fG72ZdUfAlmyVGk=; b=oAVvNNoXND4YBvfM4MWQdR+vq1FUyzJyxojJ0hRKONsUx3PlMP6CW1CUt5kmYmb2Ryl28Mwy1vc6iZRW+lmYSFEsWfFJ5vpTXEJjhr4p2CHxq7JPX0zt16HY7kqBuxxM0TChbfR9GvXER2K8+9Cr9e8rWBqxS5KoZ41F5iUaZBM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) 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.841.14; Mon, 11 Jun 2018 12:17:15 +0000 Date: Mon, 11 Jun 2018 17:46:57 +0530 From: Jerin Jacob To: Nikhil Rao Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180611121656.GB8358@jerin> References: <1528029745-69148-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: <1528029745-69148-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR0101CA0044.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::30) 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:RgsgyVIBkPTwzjec3wj6cAxwZjyT10Xv0zqbq2+kR8MkkFnEvWtVRETnKFmywwC2DstvUK4Q6t9IX0rz3tqmXzaMXbx4xKRxXOmEFFRLKcneiWbnnNlEknAQPU5nx/PIjH1ssj0OJBve3wOWn8XO+aTJel1YsOPDx/gLd1YL72v9ZXOwQb/5kHnkLV7gko7MgLLhTjpRwWcAia5P+i6TLaK2C8MB+Ng0o1MUu4hNlnuFwZheTU1YNy2He6tjiKPA; 25:5DNGveQpfXn7/aZymjYgpc9kmBgKrCJN5ZsHkk+uFPkPGCaw5Me2OQ2x4e6B4/GecF+ZgYUsFPkBOgSr9SMCGEZdxtKG+uhW++jIyB8Lh51aQJKmFAGFLbOAQOVAAT/8lVXkoIR9JGs+PD3mToHuPQv+GCE1iUDpaCDhaE43+ddAWxB/b5UVb01YaTkKFTwfLTciaU+GcemByV4oNrPswLgIJlNF6qc20vv4GRK7+MN5o96BtKMETTAxWyXPjGet4jvYyepoNK3b89SEa1SdIuPGAuYq9Vzb+5DDHXqg3fd9ytUsSK0sL5zojRGyJlGN9YI7cGbRDCvaXpZV9CGvGg==; 31:wKw3nuTpLZMflGZB4VZ5U4fYzF6/O/HFwDtBzE0bqb9I3EfyTj4/x2TAccrBwYnRgKfTSBR9P/02XH/ZMNd5/vNt9Wx2O58BmjteY+EpqIJdQ+l6xmhRIX4Knms26kcD+Enrz2Pcx5HQkAQiMECDj2gIjCo91H2jPZmJ+boSrlzpRMGCFuSuC5IlQWwFhC4F+jzhhdP0mNMh6XlqSGEux3iugArh4JxMFWekjwjanYI= X-MS-TrafficTypeDiagnostic: BN3PR07MB2514: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 20:KWCtQ3jrYeqbjg16Ec6XvWjx8j9J23DIAcWe4/WMU0ZaBa0iVP3gIdnUYS4/Mg4pD7PsY1A7gtv19SGVLlzmflTZV3vAq0E/4CfH6SlfJpSDfG2Xzpqo+izNZd/qLTg1Ky+hLD4bINWxokQxubbIE82AOKxbejR4Ao62D5qQZnD3BxcVNgiMXAtbB794MBzZHmbiMjXiPlGx4AshnakA5MEmpWvCxXKpbeuOA+eUzuJ4Oe9eHOjahMu/1b1afY/wTihQv1T+WhdAa97SBrGq4K/bBbT2xy3OcZ1nDnREd6LGON2xbf6ScBqvVNEwZ5/JusYnD5S48jLBtwgizzST2dp40Oa5rq78UJKxW2yQKElETAhbFbzr1Ce8NU8GnAD9vP+F4FIxYIWqDZkBAmtlHRv4IDCWZfgWhnKVNAHjP5sBK8XcjWocZQAvH14UMYXLzzWu2xXmgft1I/Ua5hbRQ9WY9BnpA2JMMkpPOhmz5fLFsjNSmn1ThWJKQ3GK4kHat+heSCNJVNfHDj+VcNBFYZQHhn6eyhaBcsYcYr6UpgOWXUnqVblK4qy6x1Vji69c9JLy2J5CHtogitX04ZjAmdH36StjXjgVrGyVmOEdqB8=; 4:Yab7JU+EjSCCaT85154yzFgLau8k05OXcd9vUQhNZb0y5IwbM+rWrFm5dTIjlWIUGVQYGmtjAmjQ2/Pvs+q60jmOf+QJJ97Qh2H/VtdGU0jEgxW91Cf81hLAQFV0QqMGKOCdlRjs5j/fOFGwaf+vdIBVPI91p9qBO9fsBdOO3Z7pJ+vAyg02dRKyUPXuL4P+8VnNxRI1UEwYYGVhNMAAucbAereRFN09svP0rsDuqBepBRU2tpGtzWUPu7c/lJPySuF/awxXSiS98pHQqbDhT28ZIYJgcEe2PXGUX1PSMb3lzMHtCYt+FLmP4sWaD7CW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2514; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2514; X-Forefront-PRVS: 070092A9D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(346002)(376002)(396003)(39850400004)(199004)(189003)(13464003)(105586002)(55236004)(486006)(8936002)(59450400001)(8676002)(81156014)(3846002)(6116002)(478600001)(23726003)(2906002)(386003)(316002)(25786009)(5660300001)(58126008)(72206003)(16586007)(50466002)(33656002)(81166006)(1076002)(44832011)(4326008)(97736004)(956004)(106356001)(476003)(446003)(11346002)(53936002)(55016002)(6246003)(305945005)(52116002)(33716001)(66066001)(47776003)(6496006)(186003)(26005)(9686003)(76176011)(16526019)(6666003)(229853002)(42882007)(6916009)(68736007)(7736002)(33896004)(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:0M9tUkxeztiNjGtwoY9eUOFxwb+CZhxbULFs6/nva?= =?us-ascii?Q?X8AhSvvHzZXRCthXtFoQEtx0+5MMYWU+PdtwNRPQwljf5DHnzBcaQmhmW4ct?= =?us-ascii?Q?dsHH1CJtGXhrNLhJW2kBhhD698vLMetQkiw0xYksckZaNWeROJ6zwK9SwFhN?= =?us-ascii?Q?Om6ydO4lOleSBjVS71sub4OOLc8wcHZiOZc+VMBnaARq+huw+T9wFRG+I+nr?= =?us-ascii?Q?a+xIuZs+fmOEIPWiF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I/83PENSUqcH?= =?us-ascii?Q?HECe1WzyMqJNJi2o/H9CnoCnm4nOvWXPoLR1j5eKNswiuh3IRHEO8eWn+l+7?= =?us-ascii?Q?/jKEGIPKcXIM5xVlKkOmFWxXMg12e+O65/rMSWcYkOXq/rfsxGoKNfGxNL09?= =?us-ascii?Q?HcRub9Eq7P485jVlOsYqPqhlD4jwnABSPOd2etFw9PGxh7tO5y0chUJPEPpI?= =?us-ascii?Q?PWgIUDZV7DVW57KPu6AfYGSCdY/lXHrG0PcTuhasEnUXheACZBhXvWitN01u?= =?us-ascii?Q?7R7XqVAkWcMy0M6q5lAkJH9DQA=3D?= X-Microsoft-Antispam-Message-Info: Le2whA51jGOYcWq77SR45hWeMghjBMWnIGBDexBrzth8AfJsd9PQytmozcH45fAKXygpdcQf7lFu9d1hVZOsX0+splIF2eQobEI/gJLuzsAS2ljsAvdqmAfu8DZk7B0tt0im7mn0C7XkhzLdUuJxGrLbsZl+pEyU8ezqs+KzoCxXaQWFeOzIQGqrGt7Y1R+s X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 6:IWQYogdvA5pealc4heoJQFLf6heAnDApAmnhfF8uc+hZyYVDu42EIL9avP0PwpVJ48DE7S82HthaHt2jyrVh59GCnpZHO08xKDhFQgyVChzcNF5ALDGZmF22/+fVa5bYxr02OfoQRsNiFxd+q84KYpro5Utkhk1xABA/0wmeQzwcw0o3wIyqOAzif/8OPcCvRfv3r0YGQaIBz6Xro/Onoe3LMcoEYSJqNi/a/ldwil3thD/eMNfSk5PXT0QDhp/n6WIMrK+3XG2e90fS/WS7Z85R0C2kYQ19m6CYaw34lXiyLbHM71cg/Dl82DEQBginK/QRwb6JuOX6959JeZPX7owzqK2amJ/OYEMlvnlwC7KjUyIoyjuSA9hQn1n1E/p4Al2UGgsyRL2FNQga60+iSk7KUG2KZdzYcF4iu5JqUXhW9qqXcjWau5pcVNTsunMQY56imhjUp2elpw0/9ZXe+w==; 5:QELBi2Xt33y0a8KN6SDPrfVPKEzMBqA4g7/7UfGUxwQnxOY70a6hZ4HLTvi8OKeFTZ7CczpXJSk5LKTU+rfBnMj+faCd/uQuMVqidfeQa/HKcWM2TAiuYYJJ5rUMlkZjOupo5Ot5uobbt1gcFiM+eebT8va8e2I0hZ00s8er2Vg=; 24:Nia6DWsDqMzVD2dDpd3BdTrc0cK0/HsxIYEIybjE44qhzGNok7IQpgJKl70XxZvfxe+ZNCEyGJWigbk3mLL7BkSsCXNH3sYWFolDGlrpt1E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 7:y+6APaN/zi540bRkp94Ri89wejBU7yBV6th7zcaliZmxnIvyezzi5S/0ZCaD98RbuM2eVkru26/LrV8xl+4lQMzhSEn1dN4A5AHX1VDum3c90FXvuqE0NR5bYzRj5MIj5vVyJrIhoT8DpyLg9gOdzxihfgkosnhLjh3CANiq6c4nwpiPEqfOnPXxAY6KN9e4h84/6HhNe0jwy28OVo64C4F2eiGUmRBhNX15kSX0aiGns4ryU3zxxGx875kn+18X X-MS-Office365-Filtering-Correlation-Id: 17947a8b-296b-4bb7-ed0c-08d5cf9545bb X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2018 12:17:15.0217 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17947a8b-296b-4bb7-ed0c-08d5cf9545bb 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-stable] [PATCH] eventdev: add event buffer flush in Rx adapter X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 12:17:19 -0000 -----Original Message----- > Date: Sun, 3 Jun 2018 18:12:25 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Nikhil Rao , stable@dpdk.org > Subject: [PATCH] eventdev: add event buffer flush in Rx adapter > X-Mailer: git-send-email 1.8.3.1 > > Add an event buffer flush when the current invocation > of the Rx adapter is completed. > > This patch provides lower latency in case there is a > BATCH_SIZE of events in the event buffer. > > Suggested-by: Narender Vangati > Signed-off-by: Nikhil Rao > Cc: stable@dpdk.org Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/master. Thanks. > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > index 53a3788..3a70058 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -490,7 +490,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > * the hypervisor's switching layer where adjustments can be made to deal with > * it. > */ > -static inline uint32_t > +static inline void > eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter) > { > uint32_t num_queue; > @@ -519,7 +519,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > flush_event_buffer(rx_adapter); > if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count)) { > rx_adapter->wrr_pos = wrr_pos; > - break; > + return; > } > > stats->rx_poll_count++; > @@ -535,7 +535,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > if (nb_rx > max_nb_rx) { > rx_adapter->wrr_pos = > (wrr_pos + 1) % rx_adapter->wrr_len; > - return nb_rx; > + break; > } > } > > @@ -543,20 +543,18 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > wrr_pos = 0; > } > > - return nb_rx; > + if (buf->count >= BATCH_SIZE) > + flush_event_buffer(rx_adapter); > } > > static int > event_eth_rx_adapter_service_func(void *args) > { > struct rte_event_eth_rx_adapter *rx_adapter = args; > - struct rte_eth_event_enqueue_buffer *buf; > > - buf = &rx_adapter->event_enqueue_buffer; > if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0) > return 0; > - if (eth_rx_poll(rx_adapter) == 0 && buf->count) > - flush_event_buffer(rx_adapter); > + eth_rx_poll(rx_adapter); > rte_spinlock_unlock(&rx_adapter->rx_lock); > return 0; > } > -- > 1.8.3.1 >