Netdev List
 help / color / mirror / Atom feed
* should __LINK_STATE_* enums really be restricted to generic queueing layer?
@ 2018-08-24 11:17 rpjday
  2018-08-24 13:49 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: rpjday @ 2018-08-24 11:17 UTC (permalink / raw)
  To: netdev

   more curious pedantry ... in netdevice.h, one reads:

   /* These flag bits are private to the generic network queueing
    * layer; they may not be explicitly referenced by any other
    * code.
    */

   enum netdev_state_t {
         __LINK_STATE_START,
         __LINK_STATE_PRESENT,
         __LINK_STATE_NOCARRIER,
         __LINK_STATE_LINKWATCH_PENDING,
         __LINK_STATE_DORMANT,
   };

ok, but there are definitely a few examples of what look like
non-generic network queueing code referencing those enums.

   one example, drivers/net/ethernet/amd/sun3lance.c, which openly
(and amusingly) admits that it shouldn't be doing this:

         dev->netdev_ops = &lance_netdev_ops;
   //      KLUDGE -- REMOVE ME
         set_bit(__LINK_STATE_PRESENT, &dev->state);
         return 1;
   }

there are a few more places (admittedly, not many) -- is this
acceptable behaviour?

rday

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-24 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-24 11:17 should __LINK_STATE_* enums really be restricted to generic queueing layer? rpjday
2018-08-24 13:49 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox