From: Jianbo Liu <jianbo.liu@arm.com>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: avoid the failure of creating hash table
Date: Mon, 30 Oct 2017 11:33:18 +0800 [thread overview]
Message-ID: <20171030033316.GA26390@arm.com> (raw)
In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BADB0A0@IRSMSX108.ger.corp.intel.com>
The 10/27/2017 10:01, Dumitrescu, Cristian wrote:
>
>
> > -----Original Message-----
> > From: Jianbo Liu [mailto:jianbo.liu@arm.com]
> > Sent: Friday, October 27, 2017 3:55 AM
> > To: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> > Cc: Jianbo Liu <jianbo.liu@arm.com>
> > Subject: [PATCH] examples/ip_pipeline: avoid the failure of creating hash
> > table
> >
> > Hash table function will check if the input bucket size is power of 2,
> > so the parameter should be rounded up before sending to the creating
> > function.
> >
> > Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
> > ---
> > examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c | 2 +-
> > examples/ip_pipeline/pipeline/pipeline_routing_be.c | 3 ++-
> > 2 files changed, 3 insertions(+), 2 deletions(-)
> >
>
> Existing code is simply letting the library detect the misconfiguration and gracefully fail. It avoids duplicating library checks in the app.
>
> Your proposal tries to prevent library from failing by silently tweaking some user configuration params. Easier to debug in some cases.
Yes. but is it must for the parameters to be power of 2? I saw the
config exmple in examples/ip_pipeline/config/network_layers.cfg:
....
178 port_local_dest = 4 ; SINK2 (Drop)
179 n_arp_entries = 1000
180 ip_hdr_offset = 270
If not, it's the programmer to correct it before sending to the library.
Thanks!
Jianbo
>
> For this case, I am OK with your proposal, although not really required, so:
>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2017-10-30 3:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 2:55 Jianbo Liu
2017-10-27 10:01 ` Dumitrescu, Cristian
2017-10-30 3:33 ` Jianbo Liu [this message]
2017-11-01 13:39 ` Dumitrescu, Cristian
2017-11-07 7:47 ` 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=20171030033316.GA26390@arm.com \
--to=jianbo.liu@arm.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@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).