Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 1/5] controller: fix bug to add vf comps on same core
Date: Mon,  4 Feb 2019 12:11:15 +0900	[thread overview]
Message-ID: <1549249879-31580-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1549249879-31580-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

SPP CLI is terminated if several components are assigned on the same
core because it try to find non-existent ID from list of unused cores
and failed to an error unexpectedly.

This patch is to add checking the required ID exists in the list before
to avoid not found error.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/controller/commands/vf.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/controller/commands/vf.py b/src/controller/commands/vf.py
index e715a17..7518c04 100644
--- a/src/controller/commands/vf.py
+++ b/src/controller/commands/vf.py
@@ -250,7 +250,8 @@ class SppVf(object):
                     print("Succeeded to start component '%s' on core:%d"
                           % (req_params['name'], req_params['core']))
                     self.worker_names.append(req_params['name'])
-                    self.unused_core_ids.remove(req_params['core'])
+                    if req_params['core'] in self.unused_core_ids:
+                        self.unused_core_ids.remove(req_params['core'])
                 elif res.status_code in error_codes:
                     pass
                 else:
-- 
2.7.4

  reply	other threads:[~2019-02-04  3:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  3:11 [spp] [PATCH 0/5] Fix bugs of SPP CLI ogawa.yasufumi
2019-02-04  3:11 ` ogawa.yasufumi [this message]
2019-02-04  3:11 ` [spp] [PATCH 2/5] controller: add checking syntax for vf port cmd ogawa.yasufumi
2019-02-04  3:11 ` [spp] [PATCH 3/5] controller: fix bug of history command ogawa.yasufumi
2019-02-04  3:11 ` [spp] [PATCH 4/5] controller: fix bug of completion of pri ogawa.yasufumi
2019-02-04  3:11 ` [spp] [PATCH 5/5] controller: refactor configuration of logfile ogawa.yasufumi

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=1549249879-31580-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /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).