> -----Original Message-----
> From: Stephen Hemminger [mailto:[email protected]]
> Sent: Wednesday, June 19, 2013 11:56 AM
>
> On Thu, 13 Jun 2013 20:55:15 -0700
> Jeff Kirsher <[email protected]> wrote:
>
> > +
> > +char i40e_driver_name[] = "i40e";
>
> Obviously const
Yep.
> +/* Helper macros for reading the stats registers
> + *
> + * Since the device stats are not reset at PFReset, they likely will
> not
> + * be zeroed when the driver starts. We'll save the first values read
> + * and use them as offsets to be subtracted from the raw values in
> order
> + * to report stats that count from zero.
> + */
> +#define I40E_STAT_UPDATE48(hireg, loreg, offset_loaded, offset, stat)
> \
> +do {
> \
> + u64 new_data; \
> + new_data = rd64(hw, (loreg)); \
> + if (!(offset_loaded)) \
> + (offset) = new_data; \
> + if (likely(new_data >= (offset))) \
> + (stat) = new_data - (offset); \
> + else \
> + (stat) = (new_data + ((u64)1 << 48)) - (offset); \
> + (stat) &= 0xFFFFFFFFFFFFULL; \
> +} while (0)
>
> Macro's suck, this could just as well be a function
> or maybe a macro that calls function (and go ahead and do string
> manipulation)
Yep - thanks.
sln
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired