DPDK patches and discussions
 help / color / mirror / Atom feed
From: "那娜(恒月)" <nana.nn@alibaba-inc.com>
To: "Bruce Richardson" <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>
Subject: [dpdk-dev] 答复: [PATCH] lib/lpm:fix two issues in the delete_depth_small()
Date: Thu, 29 Oct 2015 19:08:27 +0800	[thread overview]
Message-ID: <5bc6a2f1-5448-480f-9b8b-13ff0bc94fca.nana.nn@alibaba-inc.com> (raw)
In-Reply-To: 20151029101854.GC6160@bricha3-MOBL3

HI Bruce:    How about this, I send you the test program , then you can demonstrate the bugs .    If you demonstrate the bugs ,then you can get the lpm bug's fix into the release first.        Further ,we explicitly discuss the details about the unit test and make it a patch of dpdk.    Thank you very much!
Regards
Na Na



    
------------------------------------------------------------------发件人:Bruce Richardson <bruce.richardson@intel.com>发送时间:2015年10月29日(星期四) 18:18收件人:那娜(恒月) <nana.nn@alibaba-inc.com>抄 送:Jijiang Liu <jijiang.liu@intel.com>,dev <dev@dpdk.org>主 题:Re: [dpdk-dev] [PATCH] lib/lpm:fix two issues in the delete_depth_small()
On Thu, Oct 29, 2015 at 10:41:45AM +0800, nana.nn wrote:
> Hi Bruce:
>  Should I send the test unit as a DPDK patch, or just the program for you to demonstrate the bugs? 
>         
>  
>  Thank you very much!
> 
> 
> Regards
> 
> Na Na
> 

A patch to add a unit test for the bug would be best.
/Bruce

> 
> 
> 
> On Oct 28, 2015, at 10:40 PM, Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > On Wed, Oct 28, 2015 at 11:44:15AM +0800, Jijiang Liu wrote:
> >> Fix two issues in the delete_depth_small() function.
> >> 
> >> 1> The control is not strict in this function.
> >> 
> >> In the following structure,
> >> struct rte_lpm_tbl24_entry {
> >>        union {
> >>                uint8_t next_hop;
> >>                uint8_t tbl8_gindex;
> >>        };
> >>     uint8_t ext_entry :1;
> >> }
> >> 
> >> When ext_entry = 0, use next_hop.only to process rte_lpm_tbl24_entry.
> >> 
> >> When ext_entry = 1, use tbl8_gindex to process the rte_lpm_tbl8_entry.
> >> 
> >> When using LPM24 + 8 algorithm, it will use ext_entry to decide to process rte_lpm_tbl24_entry structure or rte_lpm_tbl8_entry structure. 
> >> If a route is deleted, the prefix of previous route is used to override the deleted route. when (lpm->tbl24[i].ext_entry == 0 && lpm->tbl24[i].depth > depth) 
> >> it should be ignored, but due to the incorrect logic, the next_hop is used as tbl8_gindex and will process the rte_lpm_tbl8_entry.
> >> 
> >> 2> Initialization of rte_lpm_tbl8_entry is incorrect in this function 
> >> 
> >> In this function, use new rte_lpm_tbl8_entry we call A to replace the old rte_lpm_tbl8_entry. But the valid_group do not set VALID, so it will be INVALID.
> >> Then when adding a new route which depth is > 24,the tbl8_alloc() function will search the rte_lpm_tbl8_entrys to find INVALID valid_group, 
> >> and it will return the A to the add_depth_big function, so A's data is overridden.
> >> 
> >> Signed-off-by: NaNa <nana.nn@alibaba-inc.com>
> >> 
> > 
> > Hi NaNa, Jijiang,
> > 
> > since this patch contains two separate fixes, it would be better split into
> > two separate patches, one for each fix. Also, please add a "Fixes" line to
> > the commit log.
> > 
> > Are there still plans for a unit test to demonstrate the bug(s) and make it easy
> > for us to verify the fix?
> > 
> > Regards,
> > /Bruce
> 


      parent reply	other threads:[~2015-10-29 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28  3:44 [dpdk-dev] " Jijiang Liu
     [not found] ` <BE55DC9B-FD48-47E7-A9AA-56278CB0D1F6@alibaba-inc.com>
2015-10-28  4:03   ` [dpdk-dev] 答复: " 洪余柯(洪余柯)
2015-10-28 14:40 ` [dpdk-dev] " Bruce Richardson
2015-10-28 16:55   ` Nikita Kozlov
2015-10-28 17:10     ` Bruce Richardson
     [not found]   ` <1E3F319B-C4DF-45E9-9FC4-4D93B176CC9C@alibaba-inc.com>
2015-10-29 10:18     ` Bruce Richardson
2015-10-29 11:08     ` 那娜(恒月) [this message]

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=5bc6a2f1-5448-480f-9b8b-13ff0bc94fca.nana.nn@alibaba-inc.com \
    --to=nana.nn@alibaba-inc.com \
    --cc=bruce.richardson@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).