DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vladimir Medvedkin <medvedkinv@gmail.com>
To: Matthew Hall <mhall@mhcomputing.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1 0/3] lpm: increase number of next hops for lpm (ipv4)
Date: Fri, 23 Oct 2015 22:13:35 +0300	[thread overview]
Message-ID: <CANDrEHmhMp9U9AE=7LRbb6jV_znGzNVnx26ryC+KCw1Ny+KfeQ@mail.gmail.com> (raw)
In-Reply-To: <20151023183811.GA11859@mhcomputing.net>

Hi all,

I also have LPM library implementation. Main points:
- First, we don't need two separate structures rte_lpm_tbl8_entry and
rte_lpm_tbl24_entry. I think it's better to merge in one rte_lpm_tbl_entry
because there is only one difference in name of one bit - valid_group vs
ext_entry. Let it's name will be ext_valid.
- Second, I think that 16 bit is more than enough for next-hop index. It's
better to use remaining 8 bits for so called forwarding class. It is
something like Juniper DCU that can help us to classify traffic based on
dst prefix. But after conversation with Bruce Richardson I agree with him
that next-hop index and forwarding class can be split from one return value
by the application.
- Third, I want to add posibility to lookup AS number (or any other 4 byte)
that originate that prefix. It can be defined like:
union rte_lpm_tbl_entry_extend {
#ifdef RTE_LPM_ASNUM
uint64_t entry;
#else
uint32_t entry;
#endif
#ifdef RTE_LPM_ASNUM
   uint32_t as_num;
#endif
   struct{
       uint32_t next_hop       :24;/**< next hop. */
       uint32_t valid          :1; /**< Validation flag. */
       uint32_t ext_valid :1; /**< External entry. */
       uint32_t depth             :6; /**< Rule depth. */
    };
};
- Fourth, extension of next-hop index is done not only for increasing of
next-hops but also to increase more specific routes. So I think that should
be fixed
+               unsigned tbl8_index = (uint8_t)ip +
+                               ((uint8_t)tbl_entry *
RTE_LPM_TBL8_GROUP_NUM_ENTRIES);

Regards,
Vladimir

2015-10-23 21:38 GMT+03:00 Matthew Hall <mhall@mhcomputing.net>:

> On Fri, Oct 23, 2015 at 09:33:05AM -0700, Stephen Hemminger wrote:
> > On Fri, 23 Oct 2015 09:20:33 -0700
> > Matthew Hall <mhall@mhcomputing.net> wrote:
> >
> > > On Fri, Oct 23, 2015 at 03:51:48PM +0200, Michal Jastrzebski wrote:
> > > > From: Michal Kobylinski  <michalx.kobylinski@intel.com>
> > > >
> > > > The current DPDK implementation for LPM for IPv4 and IPv6 limits the
> > > > number of next hops to 256, as the next hop ID is an 8-bit long
> field.
> > > > Proposed extension increase number of next hops for IPv4 to 2^24 and
> > > > also allows 32-bits read/write operations.
> > > >
> > > > This patchset requires additional change to rte_table library to meet
> > > > ABI compatibility requirements. A v2 will be sent next week.
> > >
> > > I also have a patchset for this.
> > >
> > > I will send it out as well so we could compare.
> > >
> > > Matthew.
> >
> > Could you consider rolling in the Brocade/Vyatta changes to LPM
> > structure as well. Would prefer only one ABI change
>
> Hi Stephen,
>
> I asked you if you could send me these a while ago but I never heard
> anything.
>
> That's the only reason I made my own version.
>
> If you have them available also maybe we can consolidate things.
>
> Matthew.
>

  reply	other threads:[~2015-10-23 19:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 13:51 Michal Jastrzebski
2015-10-23 13:51 ` [dpdk-dev] [PATCH v1 1/3] " Michal Jastrzebski
2015-10-23 14:38   ` Bruce Richardson
2015-10-23 14:59     ` Jastrzebski, MichalX K
2015-10-23 13:51 ` [dpdk-dev] [PATCH v1 2/3] examples: update of apps using librte_lpm (ipv4) Michal Jastrzebski
2015-10-23 13:51 ` [dpdk-dev] [PATCH v1 3/3] doc: update release 2.2 after changes in librte_lpm Michal Jastrzebski
2015-10-23 14:21   ` Bruce Richardson
2015-10-23 14:33     ` Jastrzebski, MichalX K
2015-10-23 16:20 ` [dpdk-dev] [PATCH v1 0/3] lpm: increase number of next hops for lpm (ipv4) Matthew Hall
2015-10-23 16:33   ` Stephen Hemminger
2015-10-23 18:38     ` Matthew Hall
2015-10-23 19:13       ` Vladimir Medvedkin [this message]
2015-10-23 19:59       ` Stephen Hemminger
2015-10-24  6:09   ` Matthew Hall
2015-10-25 17:52     ` Vladimir Medvedkin
     [not found]       ` <20151026115519.GA7576@MKJASTRX-MOBL>
2015-10-26 11:57         ` Jastrzebski, MichalX K
2015-10-26 14:03           ` Vladimir Medvedkin
2015-10-26 15:39             ` Michal Jastrzebski
2015-10-26 16:59               ` Vladimir Medvedkin
2015-10-26 12:13     ` Jastrzebski, MichalX K
2015-10-26 18:40       ` Matthew Hall
2015-10-27 10:35         ` Vladimir Medvedkin
2015-10-27 10:33           ` Vladimir Medvedkin
2015-10-30  7:17         ` Matthew Hall

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='CANDrEHmhMp9U9AE=7LRbb6jV_znGzNVnx26ryC+KCw1Ny+KfeQ@mail.gmail.com' \
    --to=medvedkinv@gmail.com \
    --cc=dev@dpdk.org \
    --cc=mhall@mhcomputing.net \
    /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).