On 09/18/14 13:50, Gleb Smirnoff wrote:
   Navdeep,

On Thu, Sep 18, 2014 at 01:09:05PM -0700, Navdeep Parhar wrote:
N> Consider changing if_inc_counter to be inline and have it take const
N> ints for the counter and increment.  The compiler will optimize away all
N> the unneeded code in if_inc_counter.

Yep, constifying is a good idea.

Regarding the contents of if_inc_counter(). The plan is to remove racy
counters, make array of counter(9), then if_inc_counter() will get rid
of switch(), instead it will do:

        counter_u64_add(ifp->counters[cnt]);

We can't make it inline, since we want drivers to be not aware of
struct ifnet entirely.

You can hide ifnet behind a stable KPI or KBI. Looks like your goal is the latter.

Regards,
Navdeep
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to