From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66082A0584; Wed, 19 Oct 2022 13:32:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5937042B79; Wed, 19 Oct 2022 13:32:53 +0200 (CEST) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mails.dpdk.org (Postfix) with ESMTP id 95B32410D1 for ; Wed, 19 Oct 2022 13:32:52 +0200 (CEST) Received: by mail-qt1-f176.google.com with SMTP id f22so11419189qto.3 for ; Wed, 19 Oct 2022 04:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gxam0IZ9Q1vicEBZ/vsO6DqsRxE6yiyK0amQ/NesgGM=; b=IIL/Y9zqZ8K/xeydKCXZmjhSevb4sHVmAk3OClA3Z/86AtcqqL4gViuPki4ThLbYQy PlzmarDdyHdWEIjsyChZVXPBiYPrMmrbWWq5iwGOCa2i+D8a/GQjdrnGSoF49lRnm4TC CXWcnGsgyJqUIBrHPJ/a0jPRp+7u8LQwb/sWDAMbn4zUlCKrUK0YsNuuT60H25vx1/bk zxrAsrkKEBO+gf622Z9MDqfVQHb2qMmUukfP/Pjtr3jU7d15W978vYNcolwBSPt4dth4 qYNrOLyUNZcll/ng1jQekxcduFRMzTf6feVW0ewXmbPc0KusHMuqv7dXXSHuYMb9+BBd 6UJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gxam0IZ9Q1vicEBZ/vsO6DqsRxE6yiyK0amQ/NesgGM=; b=jF/Gd9vtUuFvGfy40Nqr2FanPP0yF+E5RLYeQCmwI+oXjHuPrnC0Fntgx1WqHBOpli /DHq0PkdKYkxl3UVvG+0duf6NINI4+AVAFsIVIfewHl7+N59T/QZiSUxsy/0a+RLWr7S 0aqX8m4ntIEI50BcJWLK+TvnzRIiP5uX4GIwlVHw4Lab5fT6H0N+NWPOX7MA2GMCXrV3 gFGYAFIM3FxlQuc48BAjUWPsyiX2wFcKWaNYsgVp0rb5OQXHL9m8bIyggjC3WLjbq1A5 OwLO9X9NAAYXYC8NfRGOYoOPK9pqRwwe7ssTKkGAlNlomvwXjrmZoNmd6vhj8y8LD243 mnEQ== X-Gm-Message-State: ACrzQf0aqMBfMF0QWzGbZpzPQgQXVCc3kznEngBJqAdKnG1/whYx0sd7 pOiqr5Npchg3Rtk5P+xCgl+WPo1BdKKRuoqrvaw= X-Google-Smtp-Source: AMsMyM7rvctZ7yIDvvYQxULJjvBwkOJbyzFky1ljjIYK5vwXAUskgH8U0nQOxyO5AzcOxoqQONnpbBc38FOph1kGXeE= X-Received: by 2002:ac8:7d8c:0:b0:39c:f4b6:f02f with SMTP id c12-20020ac87d8c000000b0039cf4b6f02fmr5768492qtd.252.1666179171958; Wed, 19 Oct 2022 04:32:51 -0700 (PDT) MIME-Version: 1.0 References: <20221010145406.118880-1-mattias.ronnblom@ericsson.com> <20221010145406.118880-4-mattias.ronnblom@ericsson.com> In-Reply-To: From: Jerin Jacob Date: Wed, 19 Oct 2022 17:02:26 +0530 Message-ID: Subject: Re: [PATCH 3/4] eventdev: have ethernet Tx adapter appropriately report idle To: "Jayatheerthan, Jay" Cc: "Naga Harish K, S V" , "mattias.ronnblom" , "Carrillo, Erik G" , "Gujjar, Abhinandan S" , Jerin Jacob , "dev@dpdk.org" , "Van Haaren, Harry" , "hofors@lysator.liu.se" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Oct 18, 2022 at 2:49 PM Jayatheerthan, Jay wrote: > > Looks good to me. Thanks for submitting this! > > Acked by: Jay Jayatheerthan Updated the git commit as follows and series applied to dpdk-next-net-eventdev/for-main. Thanks commit 76d97b8d05b62da1a15c0716d15f1179dd77369e (HEAD -> for-main, origin/for-main, origin/HEAD) Author: Mattias R=C3=B6nnblom Date: Mon Oct 10 16:54:06 2022 +0200 eventdev/timer: support appropriately report idle Update the Event Timer Adapter's service function to report as idle (i.e., return -EAGAIN) in case no timer events were enqueued to the event device. Signed-off-by: Mattias R=C3=B6nnblom Acked-by: Erik Gabriel Carrillo commit a7f9687a436a5e0af2512bca9bf430f1d28085f6 Author: Mattias R=C3=B6nnblom Date: Mon Oct 10 16:54:05 2022 +0200 eventdev/eth_tx: support appropriately report idle Update the Event Ethernet Tx Adapter's service function to report as idle (i.e., return -EAGAIN) in case no events were dequeued from the event device and no Ethernet frames were sent out on the wire. Signed-off-by: Mattias R=C3=B6nnblom Reviewed-by: Naga Harish K S V Acked-by: Jay Jayatheerthan commit 0474cb12be6a4d82d0019db1621050af959f908e Author: Mattias R=C3=B6nnblom Date: Mon Oct 10 16:54:04 2022 +0200 eventdev/eth_rx: support appropriately report idle Update the Event Ethernet Rx Adapter's service function to report as idle (i.e., return -EAGAIN) in case no Ethernet frames were received from the ethdev and no events were enqueued to the event device. Signed-off-by: Mattias R=C3=B6nnblom Reviewed-by: Naga Harish K S V Acked-by: Jay Jayatheerthan commit 855d32d7af3c7ef4e2231edf6d2d3ffe943ff15d Author: Mattias R=C3=B6nnblom Date: Mon Oct 10 16:54:03 2022 +0200 eventdev/crypto: support 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=C3=B6nnblom Acked-by: Abhinandan Gujjar > > -Jay > > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Thursday, October 13, 2022 7:00 AM > > To: Jayatheerthan, Jay ; mattias.ronnblom = ; Carrillo, Erik G > > ; Gujjar, Abhinandan S ; Jerin Jacob > > Cc: dev@dpdk.org; Van Haaren, Harry ; hofor= s@lysator.liu.se; mattias.ronnblom > > > > Subject: RE: [PATCH 3/4] eventdev: have ethernet Tx adapter appropriate= ly report idle > > > > > > > > > -----Original Message----- > > > From: Jayatheerthan, Jay > > > Sent: Tuesday, October 11, 2022 12:41 PM > > > To: mattias.ronnblom ; Carrillo, Erik = G > > > ; Gujjar, Abhinandan S > > > ; Jerin Jacob ; Naga > > > Harish K, S V > > > Cc: dev@dpdk.org; Van Haaren, Harry ; > > > hofors@lysator.liu.se; mattias.ronnblom > > > Subject: RE: [PATCH 3/4] eventdev: have ethernet Tx adapter appropria= tely > > > report idle > > > > > > @Harish, could you review the patch ? > > > > > > -Jay > > > > > > > > > > > > > -----Original Message----- > > > > From: Mattias R=C3=B6nnblom > > > > Sent: Monday, October 10, 2022 8:24 PM > > > > To: Jayatheerthan, Jay ; Carrillo, Eri= k G > > > > ; Gujjar, Abhinandan S > > > > ; Jerin Jacob > > > > Cc: dev@dpdk.org; Van Haaren, Harry ; > > > > hofors@lysator.liu.se; mattias.ronnblom > > > > > > > > Subject: [PATCH 3/4] eventdev: have ethernet Tx adapter appropriate= ly > > > > report idle > > > > > > > > Update the Event Ethernet Tx Adapter's service function to report a= s > > > > idle (i.e., return -EAGAIN) in case no events were dequeued from th= e > > > > event device and no Ethernet frames were sent out on the wire. > > > > > > > > Signed-off-by: Mattias R=C3=B6nnblom > > > > --- > > > > lib/eventdev/rte_event_eth_tx_adapter.c | 13 +++++++++---- > > > > 1 file changed, 9 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c > > > > b/lib/eventdev/rte_event_eth_tx_adapter.c > > > > index 7f7d86f683..c2a848103b 100644 > > > > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > > > > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > > > > @@ -639,6 +639,7 @@ txa_service_func(void *args) > > > > struct txa_service_data *txa =3D args; > > > > uint8_t dev_id; > > > > uint8_t port; > > > > + int ret =3D -EAGAIN; > > > > uint16_t n; > > > > uint32_t nb_tx, max_nb_tx; > > > > struct rte_event ev[TXA_BATCH_SIZE]; @@ -648,10 +649,10 @@ > > > > txa_service_func(void *args) > > > > port =3D txa->port_id; > > > > > > > > if (txa->nb_queues =3D=3D 0) > > > > - return 0; > > > > + return ret; > > > > > > > > if (!rte_spinlock_trylock(&txa->tx_lock)) > > > > - return 0; > > > > + return ret; > > > > > > > > for (nb_tx =3D 0; nb_tx < max_nb_tx; nb_tx +=3D n) { > > > > > > > > @@ -659,6 +660,7 @@ txa_service_func(void *args) > > > > if (!n) > > > > break; > > > > txa_service_tx(txa, ev, n); > > > > + ret =3D 0; > > > > } > > > > > > > > if ((txa->loop_cnt++ & (TXA_FLUSH_THRESHOLD - 1)) =3D=3D 0) { @@ = - > > > 692,10 > > > > +694,13 @@ txa_service_func(void *args) > > > > } > > > > } > > > > > > > > - txa->stats.tx_packets +=3D nb_tx; > > > > + if (likely(nb_tx > 0)) { > > > > How are the performance numbers before and after this patch? > > Trying to understand the performance impact, as new condition is added = to the service function Datapath. > > > > > > + txa->stats.tx_packets +=3D nb_tx; > > > > + ret =3D 0; > > > > + } > > > > } > > > > rte_spinlock_unlock(&txa->tx_lock); > > > > - return 0; > > > > + return ret; > > > > } > > > > > > > > static int > > > > -- > > > > 2.34.1 >