>-----Original Message----- >From: Gujjar, Abhinandan S [mailto:[email protected]] >Sent: 20 April 2018 21:01 >To: Verma, Shally <[email protected]>; Jacob, Jerin ><[email protected]>; [email protected]; >[email protected]; [email protected] >Cc: De Lara Guarch, Pablo <[email protected]>; Doherty, Declan ><[email protected]>; Vangati, Narender ><[email protected]>; Rao, Nikhil <[email protected]>; Athreya, >Narayana Prasad ><[email protected]>; Murthy, Nidadavolu ><[email protected]> >Subject: RE: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapter >auto-test > >Hi Shally, > >> -----Original Message----- >> From: Verma, Shally [mailto:[email protected]] >> Sent: Friday, April 20, 2018 6:31 PM >> To: Gujjar, Abhinandan S <[email protected]>; Jacob, Jerin >> <[email protected]>; [email protected]; >> [email protected]; [email protected] >> Cc: De Lara Guarch, Pablo <[email protected]>; Doherty, Declan >> <[email protected]>; Vangati, Narender >> <[email protected]>; Rao, Nikhil <[email protected]>; Athreya, >> Narayana Prasad <[email protected]>; Murthy, Nidadavolu >> <[email protected]> >> Subject: RE: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapter >> auto- >> test >> >> HI >> >> >-----Original Message----- >> >From: dev [mailto:[email protected]] On Behalf Of Abhinandan Gujjar >> >Sent: 04 April 2018 12:27 >> >To: Jacob, Jerin <[email protected]>; >> >[email protected]; [email protected]; [email protected] >> >Cc: [email protected]; [email protected]; >> >[email protected]; [email protected]; >> >[email protected] >> >Subject: [dpdk-dev] [dpdk-dev, v1, 3/5] test: add event crypto adapter >> >auto-test >> > >> >Signed-off-by: Abhinandan Gujjar <[email protected]> >> >> //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 = 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 >the crypto adapter. [Shally] you mean TEST_PORT_ID is local port of crypto adapter?
As I see @code eca_default_config_cb() in patch 2/5, crypto adapter is set to use port_id = dev_conf.nb_event_ports; and test app @ evdev_set_conf_values , sets dev_conf->nb_event_ports = 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. So, am confused, which port id test app should enqueue to? 0 or 1? Per my understanding, test app should use 1. >> >> >+ 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) == 0) >> >+ rte_pause(); >> >+ >> >+ op = recv_ev.event_ptr; >> >+#if PKT_TRACE >> >+ struct rte_mbuf *m = 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

