This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: ETH - fix problem with scatter-gather list
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Gary Thomas <gthomas at ecoscentric dot com>
- Cc: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: Wed, 14 Aug 2002 09:41:56 +0200
- Subject: Re: ETH - fix problem with scatter-gather list
- References: <1029254213.8809.370.camel@hermes.chez-thomas.org>
> @@ -782,10 +789,13 @@ eth_drv_recv(struct eth_drv_sc *sc, int
> struct ifnet *ifp = &sc->sc_arpcom.ac_if;
> struct ether_header _eh, *eh=&_eh;
> struct mbuf *top, **mp, *m;
> int mlen;
> unsigned char *data;
> +#if MAX_ETH_DRV_SG > 64
> + static // Avoid large stack requirements
> +#endif
> struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
> int sg_len;
>
> if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING) {
> return; // Interface not up, ignore this request
Hi Gary.
I sore this and imeadiately thought "Is this multi-thread safe?"
The best answer i can think of it no/yes. No the code is not
multi-thread safe, but all the ethernet driver code is executed from
only one thread, so does not have to be multi-thread safe.
Do i have this right?
Andrew