From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
To: x-fn-spp@sl.ntt-tx.co.jp
Cc: ferruh.yigit@intel.com, spp@dpdk.org
Subject: Re: [spp] [PATCH 1/5] spp_vf: remove while loop in classifier_mac
Date: Wed, 6 Feb 2019 12:46:41 +0900 [thread overview]
Message-ID: <d920bb72-7e59-6ee6-0a8a-5c47cb5c7bb8@lab.ntt.co.jp> (raw)
In-Reply-To: <201902051147.x15Blg5C014220@imss03.silk.ntt-tx.co.jp>
On 2019/02/05 20:47, x-fn-spp@sl.ntt-tx.co.jp wrote:
> From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
>
> So far, spp_classifier_mac_do() has while loop and it does not return
> until the classifier component is requested to stop and thus the worker
> thread can not execute packet processing for forwarder/merger.
> To introduce core-sharing, this patch removes the while loop.
I am not sure why this change is required for core sharing. Could explain in shortly? I think it is explained in added code.
>
> Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
> Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
> ---
> src/vf/spp_vf.c | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
> index b98444d..bdc4c10 100644
> --- a/src/vf/spp_vf.c
> +++ b/src/vf/spp_vf.c
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation
> + * Copyright(c) 2017-2019 Nippon Telegraph and Telephone Corporation
> */
>
> #include <netinet/in.h>
> @@ -209,21 +209,18 @@ slave_main(void *arg __attribute__ ((unused)))
> core = get_core_info(lcore_id);
> }
>
> + /* It is for processing multiple components. */
> for (cnt = 0; cnt < core->num; cnt++) {
> - if (spp_get_component_type(lcore_id) ==
It should have a comment for the condition of core sharing.
> + if (spp_get_component_type(core->id[cnt]) ==
> SPP_COMPONENT_CLASSIFIER_MAC) {
> - /* Classifier loops inside the function. */
> ret = spp_classifier_mac_do(core->id[cnt]);
> - break;
> + if (unlikely(ret != 0))
> + break;
It should have here too.
> + } else {
> + ret = spp_forward(core->id[cnt]);
> + if (unlikely(ret != 0))
> + break;
> }
> -
> - /*
> - * Forward / Merge returns at once.
> - * It is for processing multiple components.
> - */
> - ret = spp_forward(core->id[cnt]);
> - if (unlikely(ret != 0))
> - break;
> }
> if (unlikely(ret != 0)) {
> RTE_LOG(ERR, APP, "Core[%d] Component Error. "
>
next prev parent reply other threads:[~2019-02-06 3:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190205114742.24502-1-x-fn-spp@sl.ntt-tx.co.jp>
2019-02-05 11:47 ` x-fn-spp
2019-02-06 3:46 ` Yasufumi Ogawa [this message]
2019-02-05 11:47 ` [spp] [PATCH 2/5] spp_vf: change to handle multiples component x-fn-spp
2019-02-06 3:58 ` Yasufumi Ogawa
2019-02-05 11:47 ` [spp] [PATCH 3/5] spp_vf: move classifier component init x-fn-spp
2019-02-05 11:47 ` [spp] [PATCH 4/5] spp_vf: remove to check unused cores no needed x-fn-spp
2019-02-05 11:47 ` [spp] [PATCH 5/5] spp_vf: change retrieve component type x-fn-spp
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=d920bb72-7e59-6ee6-0a8a-5c47cb5c7bb8@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
--cc=x-fn-spp@sl.ntt-tx.co.jp \
/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).