> -----Original Message----- > From: Jakub Kicinski <k...@kernel.org> > Sent: Monday, June 29, 2020 2:31 PM > To: Brady, Alan <alan.br...@intel.com> > Cc: Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>; da...@davemloft.net; > Michael, Alice <alice.mich...@intel.com>; netdev@vger.kernel.org; > nhor...@redhat.com; sassm...@redhat.com; Burra, Phani R > <phani.r.bu...@intel.com>; Hay, Joshua A <joshua.a....@intel.com>; Chittim, > Madhu <madhu.chit...@intel.com>; Linga, Pavan Kumar > <pavan.kumar.li...@intel.com>; Skidmore, Donald C > <donald.c.skidm...@intel.com>; Brandeburg, Jesse > <jesse.brandeb...@intel.com>; Samudrala, Sridhar > <sridhar.samudr...@intel.com> > Subject: Re: [net-next v3 13/15] iecm: Add ethtool > > On Mon, 29 Jun 2020 21:00:57 +0000 Brady, Alan wrote: > > > > +/* Helper macro to define an iecm_stat structure with proper size and > type. > > > > + * Use this when defining constant statistics arrays. Note that > > > > +@_type expects > > > > + * only a type name and is used multiple times. > > > > + */ > > > > +#define IECM_STAT(_type, _name, _stat) { \ > > > > + .stat_string = _name, \ > > > > + .sizeof_stat = sizeof_field(_type, _stat), \ > > > > + .stat_offset = offsetof(_type, _stat) \ } > > > > + > > > > +/* Helper macro for defining some statistics related to queues */ > > > > +#define IECM_QUEUE_STAT(_name, _stat) \ > > > > + IECM_STAT(struct iecm_queue, _name, _stat) > > > > + > > > > +/* Stats associated with a Tx queue */ static const struct > > > > +iecm_stats iecm_gstrings_tx_queue_stats[] = { > > > > + IECM_QUEUE_STAT("%s-%u.packets", q_stats.tx.packets), > > > > + IECM_QUEUE_STAT("%s-%u.bytes", q_stats.tx.bytes), }; > > > > + > > > > +/* Stats associated with an Rx queue */ static const struct > > > > +iecm_stats iecm_gstrings_rx_queue_stats[] = { > > > > + IECM_QUEUE_STAT("%s-%u.packets", q_stats.rx.packets), > > > > + IECM_QUEUE_STAT("%s-%u.bytes", q_stats.rx.bytes), > > > > + IECM_QUEUE_STAT("%s-%u.generic_csum", q_stats.rx.generic_csum), > > > > + IECM_QUEUE_STAT("%s-%u.basic_csum", q_stats.rx.basic_csum), > > > > > > What's basic and generic? perhaps given them the Linux names? > > > > I believe these should be hw_csum for basic_csum and csum_valid for > generic_csum, will fix. > > I was thinking of just saying csum_complete and csum_unnecessary. > > But generic_sum doesn't seem to be incremented in this patch, so hard to tell > what it is :S >
csum_complete and csum_unnecessary works. Sorry some of the checksum functionality didn't quite make the cut in time for the patch series but will appear in a future patch soon. Thanks. Alan