[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B725E@saturn3.aculab.com>
Date: Fri, 31 May 2013 10:25:34 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Erik Hugne" <erik.hugne@...csson.com>,
"David Miller" <davem@...emloft.net>
Cc: <paul.gortmaker@...driver.com>, <netdev@...r.kernel.org>,
<jon.maloy@...csson.com>, <ying.xue@...driver.com>
Subject: RE: [PATCH net-next 02/12] tipc: Add "max_ports" configuration parameter
> > We never shrink the hash tables once we've grown them. That's a
> > reasonable way to behave.
>
> Very well.
> Currently, the refs/portID's are built up of a random part, and an index
> part. The index is obtained by masking against the table size.
> If the table is allowed to grow, we must remove the random part from the
> portID. Otherwise we would index out a nonexistant or wrong port
> from a received packet..
No - you just copy the entry into the correct location in the
new array.
One of the 'random' bits becomes an 'index' bit.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists