Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Add get_ethtool_stats() support

Antonio Quartulli
2012-04-17T13:29:34Z

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

On Tue, Apr 17, 2012 at 03:24:48PM +0200, Martin Hundebøll wrote:
> >> +struct bat_stats {
> >> + uint64_t forward;
> >> + uint64_t mgmt_tx;
> >> + uint64_t mgmt_rx;
> >> + uint64_t tt_request_tx;
> >> + uint64_t tt_request_rx;
> >> + uint64_t tt_response_tx;
> >> + uint64_t tt_response_rx;
> >> + uint64_t tt_roam_adv_tx;
> >> + uint64_t tt_roam_adv_rx;
> >> + uint64_t dat_request_tx;
> >> + uint64_t dat_request_rx;
> >> + uint64_t dat_reply_tx;
> >> + uint64_t dat_reply_rx;
> >> +};
> >
> > How do we handle code segments that are not compiled into the module ? We
> > simply leave this counters hanging around at 0 ?
>
> As I understand it, ethtool doesn't mind "unused" counters in general, so it comes down to the memory footprint of batman-adv. Do we want to clutter the code with ifdef's to save the memory?

As we do for all the other component-private fields in bat_priv, I'd say that it
would be better to do the same here by using ifdefs.

Cheers,

--
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]