On 2016-12-13 at 18:36 Barret Rhoden wrote:
> One thing that wasn't obvious to me until I looked into it was that we
> don't need to involve the protocols at all. Initially, I thought we'd
> need to check with TCP's data structures to make sure we get a free
> port or something. However, #ip handles the ports for all of the
> protocols. It might be called "IP", but it knows more than just IP
> headers.
There were two reasons why I had to involve the protocols, in my
initial notes on this.
1) Had to reserve ports. That turns out to be not the case (see
above), since the port numbers are reserved by #ip. That led me to
scrap the plan for talking to the protocols.
2) Need to figure out the port of an inbound packet. That's still
true. For instance, where the ports are in a packet is
protocol-specific (AFAIK), even though TCP and UDP happen to choose the
same, sane locations.
So I'll have to go back to an original plan: have each protocol that
we'll bypass have a little blurb right after it looks up the
conversation. For instance, in udp.c:
qlock(&udp->qlock);
c = iphtlook(&upriv->ht, raddr, rport, laddr, lport);
...
// add this
if (c->proto_bypass) {
qpass(c->rq, bp);
qunlock(&udp->qlock);
return;
}
And also instead of calling "bind" for "bypass", call "announce", which
adds the conversation to the protocol's hash table.
It's a little nastier, since I have to muck with the actual protocols,
and maybe make sure the protos know how to support the bypass.
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.