From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0056.outbound.protection.outlook.com [104.47.41.56]) by dpdk.org (Postfix) with ESMTP id 4C21B1B1FD for ; Mon, 2 Oct 2017 12:40:21 +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=3MVlJH0wHBwM+T7eyPHUUkkdf/cX2un/AgBpdkGVWd8=; b=mdKSgxQLvHs00UsGrQYDad7g69JBvkgdikZCRhIQZaA2NJQvSXttA1mGt4qD/KKBh++dENs9MI13cVeDZ8P8tTnZpEUVy/TKnvNHnbM6pZ+KYVLKTb7OWYTlYv595EjcvB/xkvQjxiT+ZY7UKCZBdjofWBV8vxpe7W9oSkk6mtc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.115.14) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 2 Oct 2017 10:40:14 +0000 Date: Mon, 2 Oct 2017 16:09:56 +0530 From: Jerin Jacob To: "Rao, Nikhil" Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org, thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, narender.vangati@intel.com, erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com Message-ID: <20171002103955.GA11011@jerin> References: <1506028634-22998-1-git-send-email-nikhil.rao@intel.com> <1506028634-22998-4-git-send-email-nikhil.rao@intel.com> <20170922091032.GA5895@jerin> <92c090c8-b024-dc9f-6d76-59d4b44ab3f5@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.115.14] X-ClientProxiedBy: MA1PR0101CA0039.INDPRD01.PROD.OUTLOOK.COM (52.134.137.25) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 764142d2-da65-42ae-9a0b-08d50981f925 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:DBEiL9vw58QJ9Ud4Hsteyw/yLoAkXPRpryEJhyLsEy1pyXEU3J36L+WQaXYPhPG0/GWMG92GzQM/g0v6I5QBmd/pNqOZB29wNhwTD5iwHuaSOxCr2utNJUK6AZ93JjzyYdpBuTg23WmfzD0i3Tf3dhv30jNToxI5f2pSZCO7DN06cmw6BVtwWd9FmkCkw03iX7uyxTi3uqZDI8XkrXThDW6ICjwZOk8UeCqqqgmNx5oDqoo1inJ9AoQPvey8eZ7l; 25:Ys4MGQJU/o37WV1VPwfLJn9ms0hYCOtuYkY3wMVe76XmAEXEV1TWtKFGkBgPgsUgl7Iif+DOux8xBGMBe49BUD+SQrExHLASOnoKqgtfvU6iO8uTzvTK07AZvEDzkv0iiW/gzQr0clB3ANH46BurOA58+CjJEJxukR5kMmFcytTTVd2L9AP6DOmGPAPXNGjcUfeDf0y5gu4rj6E6nkjAI6GEpGgqWp8KTLmlE6Dl08ndaRI1jArWsl69x/YTGHsZ4gXrQM4BkWdv3gPvuGJJZNJxgKphPuKTaxllT0L/U+HMxLirysucBpT4iysfAKXudzslGohNTCquwwT3iLsZSg==; 31:Qugp3o27L1IzEdhE8QF0PocyBG9ifoZBWrHaS+zczUsE7ISEdyvkaKySdGIjxTq9QWFJOTxrSxRMTFLrILzbdELMl5zR52H3W4FKQBoihm053Rrd5/j7yd0lf5HWIm6tq/R7hTJtawYPpEgxH6bLT6eVmWBXfd1P1JY0DzvfIiMPVpz3S23mIG55GuHxbE5c2n7YJm7w0E/4pxmhc+lzIK+pp+GqdUuoGx5Ta7wnJ2U= X-MS-TrafficTypeDiagnostic: CO2PR07MB2520: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 20:fnMrocIZSkbrqbsJoa2RBVpSwFbQ4NoFdIO8hI1E/jC2E+O4Z5GMMb+NmsRvED8gZ2InKH0hDoi5LN7hcQTMnnqSwv5n/tmwIx4BgjwVICcYbzGSFmmH3JuLoI4Wwe18wqBqI5+mjCoaGG2fSv+VD/4cBJ+XBA99kD0rRlWpXPL6qgx/zaIqxmRvQbpmYMDABuHMofNtUrQSKYfIpo1AmABzTN5tSj9t+C10eZtUhUoUAhIO5s68sM+DQKtRPWAkqt2EyGabJV8Orii8MYS+euS1sMWNH52z3QhbovsBZrD2vmHK9zRwi3716ve5N0TJ5l8Cf2EQEpOs62dytAKv7UIXgxvQUunvyVF+nbvbO9AVzUBKceWfEYgOyRsupBqXSk/oMJGNFRYdRyb6L0kyiFwooqJEzhBciRMI7U+tCbYMe+BbVD6udwYaBuX+LjxdbBgfGHT1o1Vb7+vZkY7n53PlkYI1f1hMWp4+qIi1NMO3nqwQX9C1qKFJ391i3l3Uc8WupcoxSuo6R6Ut9W7Xytslmt70pmC5YcAOTO1NGR3GL3Q6BObvyWcNYfS+sGiF88VYiNQeQJPAsx4xq85B36vQMU+iwIe4Aq0rmEZSuVg= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(6041248)(20161123555025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 4:UYoPxHlX2ojP1h7sZODRY/TOgsXA3HNqhqakJmE1YM5vKqDOsrNZ0i5A86VwB52Oz7E3YcF0N288cFPlt72liTRtCw3WHOuTgJ7BPGzn61GQ0Qs8LDkHKWaK1F9SsoR1pSiKrqwZUrpCQbSblfFxYAS3b/41W2hHlfKimGhckmok8F9P2UUFSVOw0GSu1z6VYZiWP2lxHjxCS27UYlakGr9jGuaad/USLr0wQwcGlld+rI+lCNWEfhs8svJPMvzqwws5amX7h8fNFWAXWHc7rcCUpOgeisMeEQCAaW/H0Dqzu0rYN/N72giHwTYl0KwWkluo2YkdCUQeTWYrNE1eJg== X-Forefront-PRVS: 0448A97BF2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(13464003)(377454003)(24454002)(189002)(51884002)(316002)(33656002)(72206003)(53936002)(16526017)(7416002)(93886005)(8656003)(50466002)(229853002)(5660300001)(2870700001)(25786009)(478600001)(47776003)(55016002)(58126008)(9686003)(66066001)(4326008)(97736004)(2906002)(107886003)(105586002)(106356001)(3846002)(6666003)(6116002)(8936002)(6246003)(1076002)(33716001)(68736007)(189998001)(101416001)(50986999)(6496005)(83506001)(2950100002)(53546010)(42882006)(81156014)(81166006)(305945005)(6916009)(7736002)(23676002)(76176999)(8676002)(54356999)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X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 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2017 10:40:14.0558 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 Subject: Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter 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, 02 Oct 2017 10:40:21 -0000 -----Original Message----- > Date: Mon, 2 Oct 2017 15:58:56 +0530 > From: "Rao, Nikhil" > To: Jerin Jacob > CC: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org, > thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, > nipun.gupta@nxp.com, narender.vangati@intel.com, > erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com, > santosh.shukla@caviumnetworks.com > Subject: Re: [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.3.0 > > On 9/25/2017 8:29 AM, Rao, Nikhil wrote: > > On 9/24/2017 11:46 PM, Rao, Nikhil wrote: > > > On 9/22/2017 2:40 PM, Jerin Jacob wrote: > > > > > > > When we worked on a prototype, we figured out that we need a > > > > separate event type > > > > for RX adapter. Probably RTE_EVENT_TYPE_ETHDEV_RX_ADAPTER? > > > > The Reason is: > > > > - In the HW based Rx adapter case, the packet are coming > > > > directly to eventdev once it is configured. > > > > - So on a HW implementation of the event dequeue(), CPU needs to > > > > convert HW specific > > > > metadata to mbuf > > > > - The event dequeue() is used in two cases > > > > a) octeontx eventdev driver used with any external NIC > > > > b) octeontx eventdev driver used with integrated NIC(without service > > > > core to inject the packet) > > > > We need some identifier to understand case (a) and (b).So, in > > > > dequeue(), if the > > > > packet is from RTE_EVENT_TYPE_ETHDEV then we can do "HW specific > > > > metadata" to mbuf > > > > conversion and in another case (!RTE_EVENT_TYPE_ETHDEV) result > > > > in no mbuf > > > > conversion. > > > > > > > > Application can check if it is an Ethernet type event by > > > > ev.event_type == RTE_EVENT_TYPE_ETHDEV || ev.event_type == > > > > RTE_EVENT_TYPE_ETHDEV_RX_ADAPTER > > > > > > > > > > As per my understanding, the case (a) uses an in built port > > > Is it possible for the eventdev PMD to do the conversion based off > > > the eventdev port ? > > > > > > > I realized the dequeue wouldn't have knowledge of the port the event was > > injected from, the application shouldn't have to see the difference > > between case (a) & (b). > > > > Would it be possible to use the impl_opaque field within struct rte_event ? > > > > Nikhil > > Hi Jerin, > > Any further thoughts on this ? impl_opaque field could be one option. But I think, NXP driver is using it for internal operation. So overriding it from Rx adapter will cause issue. How about adding new event type? So it gets a new name space so no collision. ➜ [master][dpdk-next-eventdev] $ git diff diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index ec7aabd9a..b33423c7e 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -878,6 +878,8 @@ rte_event_dev_close(uint8_t dev_id); /**< The event generated from cpu for pipelining. * Application may use *sub_event_type* to further classify the event */ +#define RTE_EVENT_TYPE_ETHDEV_ADAPTER 0x4 +/**< The event generated from ethdev Rx adapter */ #define RTE_EVENT_TYPE_MAX 0x10 /**< Maximum number of event types */