From: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>
To: mattias.ronnblom <mattias.ronnblom@ericsson.com>,
"Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
"Carrillo, Erik G" <erik.g.carrillo@intel.com>,
Jerin Jacob <jerinj@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Van Haaren, Harry" <harry.van.haaren@intel.com>,
"hofors@lysator.liu.se" <hofors@lysator.liu.se>,
mattias.ronnblom <mattias.ronnblom@ericsson.com>
Subject: RE: [PATCH 1/4] eventdev: have crypto adapter appropriately report idle
Date: Mon, 17 Oct 2022 05:47:49 +0000 [thread overview]
Message-ID: <PH0PR11MB5832ED30BC2699C3E413487DE8299@PH0PR11MB5832.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221010145406.118880-2-mattias.ronnblom@ericsson.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> -----Original Message-----
> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> Sent: Monday, October 10, 2022 8:24 PM
> To: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; Carrillo, Erik G
> <erik.g.carrillo@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jerin Jacob <jerinj@marvell.com>
> Cc: dev@dpdk.org; Van Haaren, Harry <harry.van.haaren@intel.com>;
> hofors@lysator.liu.se; mattias.ronnblom <mattias.ronnblom@ericsson.com>
> Subject: [PATCH 1/4] eventdev: have crypto adapter appropriately report idle
>
> Update the event crypto adapter's service function to report as idle (i.e., return
> -EAGAIN) in case no crypto operations were performed.
>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> ---
> lib/eventdev/rte_event_crypto_adapter.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index a11cbcf4f3..59777726f6 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -771,7 +771,7 @@ eca_crypto_adapter_deq_run(struct
> event_crypto_adapter *adapter,
> return nb_deq;
> }
>
> -static void
> +static int
> eca_crypto_adapter_run(struct event_crypto_adapter *adapter,
> unsigned int max_ops)
> {
> @@ -791,22 +791,26 @@ eca_crypto_adapter_run(struct
> event_crypto_adapter *adapter,
>
> }
>
> - if (ops_left == max_ops)
> + if (ops_left == max_ops) {
> rte_event_maintain(adapter->eventdev_id,
> adapter->event_port_id, 0);
> + return -EAGAIN;
> + } else
> + return 0;
> }
>
> static int
> eca_service_func(void *args)
> {
> struct event_crypto_adapter *adapter = args;
> + int ret;
>
> if (rte_spinlock_trylock(&adapter->lock) == 0)
> return 0;
> - eca_crypto_adapter_run(adapter, adapter->max_nb);
> + ret = eca_crypto_adapter_run(adapter, adapter->max_nb);
> rte_spinlock_unlock(&adapter->lock);
>
> - return 0;
> + return ret;
> }
>
> static int
> --
> 2.34.1
next prev parent reply other threads:[~2022-10-17 5:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 14:54 [PATCH 0/4] Have event adapters report idle status Mattias Rönnblom
2022-10-10 14:54 ` [PATCH 1/4] eventdev: have crypto adapter appropriately report idle Mattias Rönnblom
2022-10-17 5:47 ` Gujjar, Abhinandan S [this message]
2022-10-10 14:54 ` [PATCH 2/4] eventdev: have ethernet Rx " Mattias Rönnblom
2022-10-11 7:10 ` Jayatheerthan, Jay
2022-10-13 1:32 ` Naga Harish K, S V
2022-10-13 9:53 ` Mattias Rönnblom
2022-10-14 17:36 ` Jerin Jacob
2022-10-17 12:36 ` Naga Harish K, S V
2022-10-18 9:19 ` Jayatheerthan, Jay
2022-10-10 14:54 ` [PATCH 3/4] eventdev: have ethernet Tx " Mattias Rönnblom
2022-10-11 7:10 ` Jayatheerthan, Jay
2022-10-13 1:30 ` Naga Harish K, S V
2022-10-18 9:19 ` Jayatheerthan, Jay
2022-10-19 11:32 ` Jerin Jacob
2022-10-10 14:54 ` [PATCH 4/4] eventdev: have timer " Mattias Rönnblom
2022-10-17 21:42 ` Carrillo, Erik G
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH0PR11MB5832ED30BC2699C3E413487DE8299@PH0PR11MB5832.namprd11.prod.outlook.com \
--to=abhinandan.gujjar@intel.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=hofors@lysator.liu.se \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@marvell.com \
--cc=mattias.ronnblom@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).