From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 48C5D235 for ; Mon, 23 Apr 2018 07:42:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Apr 2018 22:42:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,316,1520924400"; d="scan'208";a="52849000" Received: from pgsmsx111.gar.corp.intel.com ([10.108.55.200]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2018 22:42:28 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.180]) by PGSMSX111.gar.corp.intel.com ([169.254.2.233]) with mapi id 14.03.0319.002; Mon, 23 Apr 2018 13:42:27 +0800 From: "Gujjar, Abhinandan S" To: "Verma, Shally" , "Jacob, Jerin" , "hemant.agrawal@nxp.com" , "akhil.goyal@nxp.com" , "dev@dpdk.org" CC: "De Lara Guarch, Pablo" , "Doherty, Declan" , "Vangati, Narender" , "Rao, Nikhil" , "Athreya, Narayana Prasad" , "Murthy, Nidadavolu" Thread-Topic: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapter auto-test Thread-Index: AQHT2Kes5OWg2Q7MREy9QKhIACRMJKQJxbPggAOGioCAAIjXEA== Date: Mon, 23 Apr 2018 05:42:26 +0000 Message-ID: <5612CB344B05EE4F95FC5B729939F780706F0C68@PGSMSX106.gar.corp.intel.com> References: <1522825021-61657-1-git-send-email-abhinandan.gujjar@intel.com> <5612CB344B05EE4F95FC5B729939F780706F06D4@PGSMSX106.gar.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGM4NjA5M2UtZDU1My00ZmFmLTkzODgtOTEwOTYwNjgxYzRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IldnSWgwVHdqSGhtUVFWRmJOaUl0Rm5yTmFtcHBzbHdnekd5SWNXK0xJXC9NPSJ9 dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapter auto-test 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, 23 Apr 2018 05:42:31 -0000 Hi Shally, > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Monday, April 23, 2018 10:44 AM > To: Gujjar, Abhinandan S ; Jacob, Jerin > ; hemant.agrawal@nxp.com; > akhil.goyal@nxp.com; dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Doherty, Decl= an > ; Vangati, Narender > ; Rao, Nikhil ; Athreya= , > Narayana Prasad ; Murthy, Nidadavolu > > Subject: RE: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapte= r auto- > test >=20 >=20 >=20 > >-----Original Message----- > >From: Gujjar, Abhinandan S [mailto:abhinandan.gujjar@intel.com] > >Sent: 20 April 2018 21:01 > >To: Verma, Shally ; Jacob, Jerin > >; hemant.agrawal@nxp.com; > >akhil.goyal@nxp.com; dev@dpdk.org > >Cc: De Lara Guarch, Pablo ; Doherty, > >Declan ; Vangati, Narender > >; Rao, Nikhil ; > >Athreya, Narayana Prasad ; Murthy, > >Nidadavolu > >Subject: RE: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto > >adapter auto-test > > > >Hi Shally, > > > >> -----Original Message----- > >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] > >> Sent: Friday, April 20, 2018 6:31 PM > >> To: Gujjar, Abhinandan S ; Jacob, Jerin > >> ; hemant.agrawal@nxp.com; > >> akhil.goyal@nxp.com; dev@dpdk.org > >> Cc: De Lara Guarch, Pablo ; Doherty, > >> Declan ; Vangati, Narender > >> ; Rao, Nikhil ; > >> Athreya, Narayana Prasad ; Murthy, > >> Nidadavolu > >> Subject: RE: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto > >> adapter auto- test > >> > >> HI > >> > >> >-----Original Message----- > >> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Abhinandan > >> >Gujjar > >> >Sent: 04 April 2018 12:27 > >> >To: Jacob, Jerin ; > >> >hemant.agrawal@nxp.com; akhil.goyal@nxp.com; dev@dpdk.org > >> >Cc: pablo.de.lara.guarch@intel.com; declan.doherty@intel.com; > >> >narender.vangati@intel.com; abhinandan.gujjar@intel.com; > >> >nikhil.rao@intel.com > >> >Subject: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto > >> >adapter auto-test > >> > > >> >Signed-off-by: Abhinandan Gujjar > >> > >> //snip > >> > >> >+++ b/test/test/test_event_crypto_adapter.c > >> >@@ -0,0 +1,866 @@ > >> >+/* SPDX-License-Identifier: BSD-3-Clause > >> >+ * Copyright(c) 2018 Intel Corporation */ > >> >+ > >> > >> //snip > >> > >> >+static int > >> >+send_recv_ev(struct rte_event *ev) > >> >+{ > >> >+ struct rte_crypto_op *op; > >> >+ struct rte_event recv_ev; > >> >+ int ret; > >> >+ > >> >+ > >> >+ ret =3D rte_event_enqueue_burst(evdev, TEST_PORT_ID, ev, 1); > >> > >> [Shally] Shouldn't it enqueue to a port id returned by > >> rte_event_crypto_adapter_event_port_get () as adapter will dequeue > >> from that port from eventdev? > >[Abhinandan]This is the local port of crypto adapter. The reason for > >exposing this for the application is for enq-deq mode, application has > >to link its event queue to this port to start enqueuing events towards t= he crypto > adapter. > [Shally] you mean TEST_PORT_ID is local port of crypto adapter? No. TEST_PORT_ID is application's local port. >=20 > As I see @code eca_default_config_cb() in patch 2/5, crypto adapter is se= t to > use port_id =3D dev_conf.nb_event_ports; and test app @ evdev_set_conf_va= lues > , sets dev_conf->nb_event_ports =3D NB_TEST_PORTS whose value is 1, which > gives me impression that crypto adapter local port would be 1, whereas, > TEST_PORT_ID has value 0. Initially evdev is configured with nb_event_ports =3D 1, then crypto adapte= r calls the callback eca_default_config_cb() with the statement "dev_conf.nb_event_ports +=3D 1;= " and then new event port is created which is used as local port for crypto adapter an= d same is exposed to the application using rte_event_crypto_adapter_event_port_get() API. > So, am confused, which port id test app should enqueue to? 0 or 1? Per my > understanding, test app should use 1. So, TEST_PORT_ID (port 0) is application's local port. Port 1 which is created by crypto adapter is local port of the adapter. In case of ENQ-DEQ mode: Application uses port 0 to enqueue/dequeue events to/from crypto adapter. Adapter uses port 1 for dequeue/enqueue events from/to application. Application creates only one port that is its own local port and adapter cr= eates its own. Please ignore "ADAPTER_PORT_ID" which is not used in the code. I will remov= e it in next patch. >=20 > >> > >> >+ TEST_ASSERT_EQUAL(ret, 1, "Failed to send event to crypto > >> >+adapter\n"); > >> >+ > >> >+ while (rte_event_dequeue_burst(evdev, > >> >+ TEST_PORT_ID, &recv_ev, 1, 0) =3D=3D 0) > >> >+ rte_pause(); > >> >+ > >> >+ op =3D recv_ev.event_ptr; > >> >+#if PKT_TRACE > >> >+ struct rte_mbuf *m =3D op->sym->m_src; > >> >+ rte_pktmbuf_dump(stdout, m, rte_pktmbuf_pkt_len(m)); #endif > >> >+ rte_pktmbuf_free(op->sym->m_src); > >> >+ rte_crypto_op_free(op); > >> >+ > >> >+ return TEST_SUCCESS; > >> >+} > >> > >> //snip > >> -- > >> >1.9.1 > >> > >> Thanks > >> Shally