[Openib-windows] RE: [openib-general] Microsoft virtual machine and Infiniband

Fabian Tillier ftillier at silverstorm.com
Wed Mar 1 21:07:54 PST 2006


On 3/1/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
> > -----Original Message-----
> > From: ftillier.sst at gmail.com [mailto:ftillier.sst at gmail.com]
> > On Behalf Of Fabian Tillier
> >
> > Currently the receive flow does something like this:
> >
> > resolve endpoints
> > discard loopback
> > switch packet type
> > {
> >     case IP:
> >         handle IP packet; break;
> >
> >     case ARP:
> >         handle ARP packet; break;
> >
> >     default:
> >         handle generic packet; break;
> > }
> >
> > This would have to change to something like this:
> >
> > resolve source by LID/GID and discard loopback switch packet type {
> >     case IP:
> >         resolve endpoints by IP;
> >         handle IP packet; break;
> >
> >     case ARP:
> >         process ARP, creating IP mappings; break;
> >
> >     default:
> >         resolve destination from WC;
> >         handle generic packet; break;
> > }
> >
> I was thinking something a little different, see bellow. I believe that
> it makes it simpler to see where the support for virtual machine is:
>
>  switch packet type
>  {
>     case IP:
>         handle IP packet;
>           Fix MAC by IP's
>           break;
>
>     case ARP:
>         handle ARP packet;
>         If Arp request update table.
>         If Arp reply, fix it's destination like for IP.
>         break;
>
>     default:
>         handle generic packet; break;
>  }

These two aren't that different.  The endpoint resolution in my case
is only there to allow filling in the MAC addresses in the ethernet
header.  Filling these in as they currently are, and then doing a
second lookup to reformat them using the IP as key for the lookup
seems a little inefficient.

I had missed the special ARP handling, however.

> > > One bug that I have already found is that if a broadcast packet is
> > > sent for example an ARP request, we send the packet as a multicast,
> > > and we also receive the packet ourselves, and later we send this
> > > packet to NDIS. This is not the correct behavior (assuming we are
> > > emulating Ethernet behavior) and we should remove this packets.
> >
> > Yes, I have a fix for this in my sandbox already.  Any packet
> > we receive where we are the sender needs to be discarded.
> > The existing check in the code for loopback packets uses the
> > unformatted ethernet header, which clearly doesn't work.
> > Thanks for pointing it out, though!
>
> It would be nice if you can check in the fix to winib.

Already done, in revision 224.  There are other fixes there too, as
I'm going through the NDIS WHQL tests and making things pass where
they currently fail.

- Fab



More information about the ofw mailing list