- d->rbytes = str2ull(procfile_lineword(ff, l, 1));
- d->rpackets = str2ull(procfile_lineword(ff, l, 2));
- d->rerrors = str2ull(procfile_lineword(ff, l, 3));
- d->rdrops = str2ull(procfile_lineword(ff, l, 4));
- d->rfifo = str2ull(procfile_lineword(ff, l, 5));
- d->rframe = str2ull(procfile_lineword(ff, l, 6));
- d->rcompressed = str2ull(procfile_lineword(ff, l, 7));
- d->rmulticast = str2ull(procfile_lineword(ff, l, 8));
-
- d->tbytes = str2ull(procfile_lineword(ff, l, 9));
- d->tpackets = str2ull(procfile_lineword(ff, l, 10));
- d->terrors = str2ull(procfile_lineword(ff, l, 11));
- d->tdrops = str2ull(procfile_lineword(ff, l, 12));
- d->tfifo = str2ull(procfile_lineword(ff, l, 13));
- d->tcollisions = str2ull(procfile_lineword(ff, l, 14));
- d->tcarrier = str2ull(procfile_lineword(ff, l, 15));
- d->tcompressed = str2ull(procfile_lineword(ff, l, 16));
+ if(likely(d->do_bandwidth != CONFIG_BOOLEAN_NO)) {
+ d->rbytes = str2kernel_uint_t(procfile_lineword(ff, l, 1));
+ d->tbytes = str2kernel_uint_t(procfile_lineword(ff, l, 9));
+ }
+
+ if(likely(d->do_packets != CONFIG_BOOLEAN_NO)) {
+ d->rpackets = str2kernel_uint_t(procfile_lineword(ff, l, 2));
+ d->rmulticast = str2kernel_uint_t(procfile_lineword(ff, l, 8));
+ d->tpackets = str2kernel_uint_t(procfile_lineword(ff, l, 10));
+ }
+
+ if(likely(d->do_errors != CONFIG_BOOLEAN_NO)) {
+ d->rerrors = str2kernel_uint_t(procfile_lineword(ff, l, 3));
+ d->terrors = str2kernel_uint_t(procfile_lineword(ff, l, 11));
+ }
+
+ if(likely(d->do_drops != CONFIG_BOOLEAN_NO)) {
+ d->rdrops = str2kernel_uint_t(procfile_lineword(ff, l, 4));
+ d->tdrops = str2kernel_uint_t(procfile_lineword(ff, l, 12));
+ }
+
+ if(likely(d->do_fifo != CONFIG_BOOLEAN_NO)) {
+ d->rfifo = str2kernel_uint_t(procfile_lineword(ff, l, 5));
+ d->tfifo = str2kernel_uint_t(procfile_lineword(ff, l, 13));
+ }
+
+ if(likely(d->do_compressed != CONFIG_BOOLEAN_NO)) {
+ d->rcompressed = str2kernel_uint_t(procfile_lineword(ff, l, 7));
+ d->tcompressed = str2kernel_uint_t(procfile_lineword(ff, l, 16));
+ }
+
+ if(likely(d->do_events != CONFIG_BOOLEAN_NO)) {
+ d->rframe = str2kernel_uint_t(procfile_lineword(ff, l, 6));
+ d->tcollisions = str2kernel_uint_t(procfile_lineword(ff, l, 14));
+ d->tcarrier = str2kernel_uint_t(procfile_lineword(ff, l, 15));
+ }