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.
> 
> >+    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

Reply via email to