Re: [Masq-dev] Use daddr and dport as hash keys for faster masq redirector!

Juanjo Ciarlante (irriga@impsat1.com.ar)
Mon, 7 Jun 1999 07:43:22 -0300


On Sun, Jun 06, 1999 at 05:20:06PM -0700, John D. Hardin wrote:
> On Sat, 5 Jun 1999, Julian Anastasov wrote:
>
> > Current hashing in ip_masq_m_tab[IP_MASQ_TAB_SIZE] and
> > ip_masq_s_tab[IP_MASQ_TAB_SIZE] is inadequate for virtual server,
>
> {snip}
>
> > I thing it is possible and preferable all masq entries with
> > IP_MASQ_F_MPORT flag set to be hashed in ip_masq_hash/ip_masq_unhash
> > using daddr and dport as keys:
> >
> > ip_masq_hash_key(ms->protocol, ms->maddr^ms->daddr, ms->mport^ms->dport)
>
> erm, no. A more flexible and general solution would be to add a
> destination lookup table as well as source and masq, and have the
> ability to look up by hashing the source address and port from inbound
> packets into the destination lookup table.
Agreed that we *need* dtable's; but be careful: there is no
way to accomplish short lookups in masq if we use BOTH
"normal" and "reverse" (portfw) masq
Maybe we could put some fuzzy and do
in demasq path:
if (dport >= PORT_MASQ_BEGIN)
lookup mtable (normal masq)
else
lookup dtable

-- 
-- Juanjo       http://juanjox.kernelnotes.org/
            ... because there IS an OS that CAN follow your power 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/