Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
To: x-fn-spp@sl.ntt-tx.co.jp, ferruh.yigit@intel.com
Cc: spp@dpdk.org
Subject: Re: [spp] [PATCH v2 1/1] spp_vf: fix initializing bug of forwarder
Date: Thu, 9 Aug 2018 11:43:10 +0900	[thread overview]
Message-ID: <0694f113-5838-b49d-ee98-2f22fa658653@lab.ntt.co.jp> (raw)
In-Reply-To: <201808090038.w790c6aE022190@imss04.silk.ntt-tx.co.jp>

On 2018/08/09 9:38, x-fn-spp@sl.ntt-tx.co.jp wrote:
> From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
> 
> clear_forward_info() always initializes path[0] of g_forward_info[id].
> It is a bug and causes stopping forwarding accidentally if path[0] is
> referenced by spp_forward().
> 
> This patch changes initializing as path[info->upd_index] instead of 0.
> It also includes refactoring to be simple by using local vars.
Hi Hideyuki,

Thanks for revising. Could you also update commit message for the change.

Thanks,
Yasufumi
> 
> 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_forward.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/src/vf/spp_forward.c b/src/vf/spp_forward.c
> index 0a43608..03bda10 100644
> --- a/src/vf/spp_forward.c
> +++ b/src/vf/spp_forward.c
> @@ -49,13 +49,6 @@ spp_forward_init(void)
>   	}
>   }
>   
> -/* Clear info for one element. */
> -static void
> -clear_forward_info(int id)
> -{
> -	memset(&g_forward_info[id].path, 0x00, sizeof(struct forward_path));
> -}
> -
>   /* Update forward info */
>   int
>   spp_forward_update(struct spp_component_info *component)
> @@ -84,7 +77,7 @@ spp_forward_update(struct spp_component_info *component)
>   		return -1;
>   	}
>   
> -	clear_forward_info(component->component_id);
> +	memset(path, 0x00, sizeof(struct forward_path));
>   
>   	RTE_LOG(INFO, FORWARD,
>   			"Component[%d] Start update component. (name = %s, type = %d)\n",
> 


-- 
Yasufumi Ogawa
NTT Network Service Systems Labs

  reply	other threads:[~2018-08-09  2:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  8:31 [spp] [PATCH] " x-fn-spp
2018-08-07  4:13 ` Yasufumi Ogawa
2018-08-07  6:31   ` [spp] [spp 03176] " Hideyuki Yamashita
2018-08-07  6:57     ` Yasufumi Ogawa
2018-08-08  5:34       ` [spp] [spp 03180] " Hideyuki Yamashita
2018-08-09  0:38 ` [spp] [PATCH v2 1/1] " x-fn-spp
2018-08-09  2:43   ` Yasufumi Ogawa [this message]
2018-08-09  4:06   ` [spp] [PATCH v3] " x-fn-spp
2018-08-09  4:25     ` Yasufumi Ogawa
2018-08-22  9:42       ` Ferruh Yigit

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=0694f113-5838-b49d-ee98-2f22fa658653@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).