This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ETH - fix problem with scatter-gather list


> @@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]