Patch: SyncPPP - accounting

From: Jan Kasprzak (kas@informatics.muni.cz)
Date: Fri Mar 03 2000 - 11:04:37 EST


        Hello syncppp hackers,

        I wonder what are the ibytes,obytes,ipkts and opkts members
of the struct sppp for? It seems nobody in the current kernel uses it
(except of the code in syncppp.c which increments these values, but
does not use them itself). Can we get rid of these values? I think
drivers maintain their own statistics themselves. Patch relative
to 2.3.49 attached.

        Sincerely,

-Yenya

--- linux/drivers/net/wan/syncppp.h.orig Fri Mar 3 17:01:10 2000
+++ linux/drivers/net/wan/syncppp.h Fri Mar 3 17:01:18 2000
@@ -43,8 +43,6 @@
         u32 pp_rseq; /* remote sequence number */
         struct slcp lcp; /* LCP params */
         struct sipcp ipcp; /* IPCP params */
- u32 ibytes,obytes; /* Bytes in/out */
- u32 ipkts,opkts; /* Packets in/out */
         struct timer_list pp_timer;
         struct net_device *pp_if;
 };
--- linux/drivers/net/wan/syncppp.c.orig Fri Mar 3 17:01:07 2000
+++ linux/drivers/net/wan/syncppp.c Fri Mar 3 17:01:39 2000
@@ -194,13 +194,6 @@
         skb->dev=dev;
         skb->mac.raw=skb->data;
         
- if (dev->flags & IFF_UP)
- {
- /* Count received bytes, add FCS and one flag */
- sp->ibytes+= skb->len + 3;
- sp->ipkts++;
- }
-
         if (skb->len <= PPP_HEADER_LEN) {
                 /* Too small packet, drop it. */
                 if (sp->pp_flags & PP_DEBUG)
@@ -776,7 +769,6 @@
                         sppp_print_bytes ((u8*) (lh+1), len);
                 printk (">\n");
         }
- sp->obytes += skb->len;
         /* Control is high priority so it doesnt get queued behind data */
         skb->priority=TC_PRIO_CONTROL;
         skb->dev = dev;

-- 
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
 Its purely bandwidth.  If it was 40 instances of Miguel reading web pages
flat out over 100baseT you would definitely be right. But its not...  (Alan)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:14 EST