From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Cristian Dumitrescu
<cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] lib/librte_table: Fix table array lookup
Date: Tue, 16 Dec 2014 18:59:27 +0100 [thread overview]
Message-ID: <3098312.cgTdNF7W9b@xps13> (raw)
In-Reply-To: <20141213010638.28002.63966.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Cristian, this patch is about packet framework.
Could you review it please?
2014-12-12 17:06, Mark Wunderlich:
> The existing lookup function was returning an unmodified
> pkts_mask bitmask into lookup_hit_mask. This effectively
> assumes that all packets would index correctly into one
> of the array table entries.
>
> Also, there was no check that the metadata provided index
> value was within range of the table max entries. By using
> using table index bitmask on the metadata provided index
> the resulting entry position may falsely indicate a hit
> for index values provided that happen to be greter than
> the number of table entries.
>
> Like other table type lookup functions it would seem that
> the possibility exists that some of the packets provided
> to the function would not result in a hit. It is assumed
> that the metadata provided should be a direct index into
> the array table. So, code was added to build and return
> a bitmask for only those packets that correctly index
> directly into the table array.
>
> If the original intent for this table type was to accept
> any 32-bit value, then by applying the table index bitmask
> as a modulo index for distribution across table entries,
> then this patch would be invalid and should be rejected.
>
> Signed-off-by: Mark Wunderlich <mark.w.wunderlich-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> lib/librte_table/rte_table_array.c | 25 +++++++++++++++----------
> 1 file changed, 15 insertions(+), 10 deletions(-)
next prev parent reply other threads:[~2014-12-16 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 1:06 [PATCH] lib/librte_table: Fix table array lookup Mark Wunderlich
[not found] ` <20141213010638.28002.63966.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-12-16 17:59 ` Thomas Monjalon [this message]
2014-12-16 19:13 ` Dumitrescu, Cristian
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=3098312.cgTdNF7W9b@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.