Date: Mon, 24 Jun 2002 12:16:03 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: hackers@freebsd.org Cc: gallatin@cs.duke.edu Subject: Re: Re: bge driver issue Message-ID: <200206241916.g5OJG3O31261@vashon.polstra.com> In-Reply-To: <15639.28077.881363.884693@grasshopper.cs.duke.edu> References: <200206231552.g5NFqS002122@pacbell.net> <200206241645.g5OGjZH31049@vashon.polstra.com> <15639.28077.881363.884693@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <15639.28077.881363.884693@grasshopper.cs.duke.edu>, Andrew Gallatin <gallatin@cs.duke.edu> wrote: > > If the bge's API allows it, you could setup a receive descriptor with > a length of 14 bytes (size of ethernet header), and start the next > descripter 2 bytes after it (at a 16 byte offset from the front of the > mbuf). When the receive is done, just copy the 14 bytes. That was my first thought too, but unfortunately the device doesn't appear to support scatter-gather for received packets. I had another totally evil idea which isn't really feasible. Empirically, it appears that the buffer has to be aligned to an 8-byte boundary. Also empirically, it seems that when the buffer isn't aligned, only the part before the first 8-byte boundary is corrupted. So we could offset the buffer by 6 bytes. Then the only corruption would be in the first 2 bytes of the packet, i.e., the first two bytes of the destination ethernet address. If we could ignore promiscuous mode and multicast, we could guess those bytes based on our own Ethernet address ... nah, that's Just Too Evil. :-) John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206241916.g5OJG3O31261>