tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: refactoring ip_output() and the L2 _output()

On Fri, Feb 01, 2013 at 05:27:07PM -0600, David Young wrote:
>                 /* If broadcasting on a simplex interface, loopback a copy */
>                 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
>                         mcopy = m_copy(m, 0, (int)M_COPYALL);
> BTW, it makes me grimace to see the simplex-loopback handled in an L2
> transmit routine...

The 'should you receive your transmits as if someone else had sent
the packet' question - which is what I think IFF_SIMPLEX is about
is 'interesting'.
Not doing it used to stop some stuff working, doing it confused
other places - unfortunately I can't remember what!

One one hand it might be worth making all the MAC drivers ensure it
happens, OTOH it probably only happens in hardware for some HDX interfaces.
So it might be always doing the software version and filitering out
the duplicates in places where they can happen.

In either case, doing the reflect in the middle of the ARP code
seems wrong!

IIRC some hardware would receive its own transmittiona at 10M HDX, but
not at 100M HDX (sun feps sbus card). Since the driver doesn't need to know
whether the speed in 10M or 100M (only HDX v FDX) the driver I did
always did the software reflect and software filtered any received
packets from its own MAC address.


David Laight:

Home | Main Index | Thread Index | Old Index