From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id AFCF1C74E for ; Tue, 23 Jun 2015 05:51:07 +0200 (CEST) Received: by paceq1 with SMTP id eq1so122917007pac.3 for ; Mon, 22 Jun 2015 20:51:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=j4b2duP4QkHcxLxkdbbbubkndh03UpPQdQq+iV+K+rM=; b=AeYRL5mnaIxsZVHIRO8znYJcjXyDqA/4vDlhVnuFV0OaCJjJxmOqZKXJT3HYLC2bh4 PidC5Y+6J9P0FSw6vhwz4+2lGNBxgpRuwZVm3KNvkoFxH5pBmvcfSF6vK8WWR+ZaDpv3 2cQ80K9oWCeLkf/GvS/hI3oFeq9zXFf2hrXVNfEBIDvbSe2V1Kp3a+VqvnXinrzRJBk+ zI5IQBbrRIMdIkCK6HKo2BoRHWBfiZ8fY+Jv/2Nhg4Fi6F23d2olu5Irv8b7BkFSJ5Wj yBqE3FYrOxb2U/bdbE4/Mpn7jGGhoCXo1BSvzzFIjb5zVgKa4jNPJ+AfIv9Jj5zXq1TR LuIQ== X-Gm-Message-State: ALoCoQmME481UC6/cVlOjHW0C9SFpZJLuS2nngAh+8bwEDzk5tJMYJhYfDXzGRyuXh/+eOXmlFJX X-Received: by 10.66.221.138 with SMTP id qe10mr63635955pac.45.1435031467062; Mon, 22 Jun 2015 20:51:07 -0700 (PDT) Received: from uryu.home.lan ([144.49.132.22]) by mx.google.com with ESMTPSA id vy6sm9156963pbc.72.2015.06.22.20.51.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 20:51:06 -0700 (PDT) Date: Mon, 22 Jun 2015 23:51:02 -0400 From: Stephen Hemminger To: Matthew Hall Message-ID: <20150622235102.41c3619a@uryu.home.lan> In-Reply-To: <20150622175302.GA15788@mhcomputing.net> References: <5A3882CB-0DE0-43DB-8DCA-051D561AA943@mhcomputing.net> <20150622175302.GA15788@mhcomputing.net> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "" Subject: Re: [dpdk-dev] rte_lpm with larger nexthops or another method? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2015 03:51:08 -0000 In order to make Vyatta/Brocade router work with LPM code I ended up redoing the layout. It is: /** Tbl24 entry structure. */ struct rte_lpm_tbl24_entry { /* Using single uint8_t to store 3 values. */ uint8_t valid :1; /**< Validation flag. */ uint8_t ext_entry :1; /**< external entry? */ uint8_t depth; /**< Rule depth. */ /* Stores Next hop or group index (i.e. gindex)into tbl8. */ union { uint16_t next_hop; uint16_t tbl8_gindex; }; }; /** Tbl8 entry structure. */ struct rte_lpm_tbl8_entry { uint16_t next_hop; /**< next hop. */ uint8_t depth; /**< Rule depth. */ uint8_t valid :1; /**< Validation flag. */ uint8_t valid_group :1; /**< Group validation flag. */ }; And also several other scalability improvements (plus IPv6) and the correct handling of /32. Unfortunately, this is such a big binary change that I was reluctant to break any tests or applications using existing code and therefore never submitted the patches.