From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from prod-mail-xrelay02.akamai.com (prod-mail-xrelay02.akamai.com [72.246.2.14]) by dpdk.org (Postfix) with ESMTP id 4F31C11F5 for ; Thu, 2 Jul 2015 23:04:51 +0200 (CEST) Received: from prod-mail-xrelay02.akamai.com (localhost [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 3482428C67; Thu, 2 Jul 2015 21:04:50 +0000 (GMT) Received: from prod-mail-relay06.akamai.com (prod-mail-relay06.akamai.com [172.17.120.126]) by prod-mail-xrelay02.akamai.com (Postfix) with ESMTP id 0663C28C64; Thu, 2 Jul 2015 21:04:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=akamai.com; s=a1; t=1435871090; bh=1bKQfxA29Bq2e+7FxuJQ1+GjLzrmz2+0IWbr9NrayFU=; h=From:To:Subject:Date:From; b=dS5xv6lPofaD1EdDRowpitAJLpJX8a+GCoVTSW0/WUBOFBnluNSqr95pHrFmme0LJ ZNO17fISDXiDMEpf3mPfuPBq56jrLe/FEt9Y15Fyzg9EEv0l29kgvptqabri5An9FU zpKbNbMY0ZQmRhs4r7mvXc6VYBI0Cuf7n2uAsZuk= Received: from email.msg.corp.akamai.com (ustx2ex-cas2.msg.corp.akamai.com [172.27.25.31]) by prod-mail-relay06.akamai.com (Postfix) with ESMTP id E0BCC2036; Thu, 2 Jul 2015 21:04:49 +0000 (GMT) Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com (172.27.27.103) by ustx2ex-dag1mb2.msg.corp.akamai.com (172.27.27.102) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Thu, 2 Jul 2015 16:04:49 -0500 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com ([172.27.27.103]) by ustx2ex-dag1mb3.msg.corp.akamai.com ([172.27.27.103]) with mapi id 15.00.1076.000; Thu, 2 Jul 2015 16:04:49 -0500 From: "Sanford, Robert" To: "Richardson, Bruce" , Thomas Monjalon , "dev@dpdk.org" Thread-Topic: Ethernet API - multiple post-RX-burst callbacks' run-order is opposite to their add-order Thread-Index: AQHQtQq6522JRvZBpUKYMH/FZfH73Q== Date: Thu, 2 Jul 2015 21:04:48 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.133.191] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Ethernet API - multiple post-RX-burst callbacks' run-order is opposite to their add-order X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 21:04:52 -0000 When one adds multiple post-RX-burst callbacks to a queue, their execution = order is the opposite of the order in which they are added. For example, we= add callback A( ), and then we add callback B( ). When we call rte_eth_rx_= burst, after invoking the device's rx_pkt_burst function, it will invoke B(= ), and then A( ). The same goes for pre-TX-burst callbacks, too. This is counter-intuitive. Shouldn't we either execute the callbacks in the= same order that we add them (by changing the internals of the add-APIs), o= r change the add-APIs to allow one to specify whether a callback is added t= o the head or tail of the callback list? At the least, we could document th= e expected behavior. Any thoughts on this? -- Regards, Robert