Source-Changes-D archive

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

Re: CVS commit: src/sys/net

   Date: Tue, 16 Feb 2016 16:30:54 +0900
   From: Ryota Ozaki <>

   On Tue, Feb 16, 2016 at 6:16 AM, Taylor R Campbell
   <> wrote:
   > void
   > if_link_state_change(struct ifnet *ifp, int link_state)
   > {
   >         int s;
   >         s = splnet();
   >         if (ifp->if_link_state_pending == link_state)
   >                 goto out;
   >         if (ifp->if_link_state_pending != ifp->if_link_state) {

   What does the conditional intend?

I don't remember!  It doesn't make sense now that I look at it again.
This was just a sketch -- obviously it was missing some parts, such as
pool_cache_put, and some parts seem to make no sense.  I would just
take it out.

   Anyway I made a patch based on the above code:

   What I did are to make your code compilable and workable,
   and limit the number of pending events.

Looks reasonable to me.  We should have some automatic tests for all
this, though!

Home | Main Index | Thread Index | Old Index