From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE0FBA2EEB for ; Thu, 12 Sep 2019 13:40:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E2AF1BEE3; Thu, 12 Sep 2019 13:40:20 +0200 (CEST) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by dpdk.org (Postfix) with ESMTP id 00E131BEE3 for ; Thu, 12 Sep 2019 13:40:19 +0200 (CEST) Received: by mail-pf1-f181.google.com with SMTP id b13so15822656pfo.8 for ; Thu, 12 Sep 2019 04:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=wSebl0SY+RrQoy4Ayatd0AfLjljjrdIJY1MfQcE75wM=; b=d33sUryFeCTEHhy3AvtqQC9Gx5vozN1qGCIQmaMCoj6CSAIAWJcyDkwxLZusy/pFIZ bF0Y/+A9L4HomubJLYl4HFFYEB/OQ+raJ+m/H4mzhzbE7cp7xkdt2ZGv4Ww0ETaUg8Wm Kl1wO86AsdLPNXwMIDX7hEwftDdFmXzdeGgYGF4Hv8Bs/hPamFIraZJHO7nEqtqlYjoX BDHhbbR7Ntm3drO80eFEsBjjJlg6LQ9ry5iegkMrxTHvk4RpAceEVU3FDr8YZNSJ8Ps2 W1lwCPtaV7mypuXl6nwtGvmaS2CAc5NMdV8U6IgefhuRFdBRjsh4awEZ86aZ1HyrHCtw ZR1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=wSebl0SY+RrQoy4Ayatd0AfLjljjrdIJY1MfQcE75wM=; b=k/cT2oDI0luSNaj6a0omX8rmxqJFw6LxEZAyuok0z0goqTPiPtQCgiy3kAVaBHt5Dn zXlfE4LVgZtkEOeEYwJghuRUvkpRJIYT9/UhdrpgQHQD75nI5KlOFFEfgkv0m6veYZD+ 52dC1XQ6rPIAk4YOTCVhGKnnxYlR47OsDFR7KV8EqnqlWs//TEP6GRQaB0EwmEzv8fGH MWUb8Le5KSIo9XmlkOhjuzRcGqzP12nTCn8g0u7axGbAfOSZWQWbDGIrckpcefnPm+l0 V/lgliV993YkBqr6wHv4Zrv90Ja5n6Ttu0YIANv+VDGvQzcdQB7wa62wWk0P2lkDWzsc ZWVQ== X-Gm-Message-State: APjAAAVkvPoQYrzwT+DH7lrBMhQWHok/qfzB1x+6yg0X272CBRoSHdbh Nj/UfY+kq5aRdDAt9SC7GJkE+Xij X-Google-Smtp-Source: APXvYqzVVYCD6TZwpDSRTcoviLCh7zIyPjDWpeMdnvv+lUrGm4JHB20qd8IStgBQ5+XHOvhHzvauBw== X-Received: by 2002:a63:925d:: with SMTP id s29mr11583527pgn.144.1568288419118; Thu, 12 Sep 2019 04:40:19 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id s4sm25711064pfh.15.2019.09.12.04.40.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 04:40:18 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Thu, 12 Sep 2019 20:40:15 +0900 Message-Id: <20190912114015.12473-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] shared: rename func spp_get_component_type X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa This update is to rename spp_get_component_type() to sppwk_get_comp_type() for conventions. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/spp_worker_th/cmd_utils.c | 7 +++---- src/shared/secondary/spp_worker_th/cmd_utils.h | 2 +- src/vf/spp_vf.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c index 15ceb6f..58db631 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.c +++ b/src/shared/secondary/spp_worker_th/cmd_utils.c @@ -492,11 +492,10 @@ del_vhost_sockfile(struct sppwk_port_info *vhost) /* Get component type of target component_info */ enum sppwk_worker_type -spp_get_component_type(int id) +sppwk_get_comp_type(int id) { - struct sppwk_comp_info *component_info = - (g_mng_data.p_component_info + id); - return component_info->wk_type; + struct sppwk_comp_info *ci = (g_mng_data.p_component_info + id); + return ci->wk_type; } /* Get core information which is in use */ diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h index fb68905..4e2f888 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.h +++ b/src/shared/secondary/spp_worker_th/cmd_utils.h @@ -136,7 +136,7 @@ enum sppwk_lcore_status sppwk_get_lcore_status(unsigned int lcore_id); * @param id Component ID. * @return Type of component executed */ -enum sppwk_worker_type spp_get_component_type(int id); +enum sppwk_worker_type sppwk_get_comp_type(int id); /* TODO(yasufum) revise the name of func. */ /** diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c index bf4cdbe..6c0c938 100644 --- a/src/vf/spp_vf.c +++ b/src/vf/spp_vf.c @@ -167,7 +167,7 @@ slave_main(void *arg __attribute__ ((unused))) if (status != SPPWK_LCORE_RUNNING) continue; - if (spp_check_core_update(lcore_id) == SPPWK_RET_OK) { + if (sppwk_is_lcore_updated(lcore_id) == 1) { /* Setting with the flush command trigger. */ info->ref_index = (info->upd_index+1) % TWO_SIDES; core = get_core_info(lcore_id); @@ -176,7 +176,7 @@ slave_main(void *arg __attribute__ ((unused))) /* It is for processing multiple components. */ for (cnt = 0; cnt < core->num; cnt++) { /* Component classification to call a function. */ - if (spp_get_component_type(core->id[cnt]) == + if (sppwk_get_comp_type(core->id[cnt]) == SPPWK_TYPE_CLS) { /* Component type for classifier. */ ret = classify_packets(core->id[cnt]); -- 2.17.1