remove FCS from pktgen bandwidth calculation
Subsystems (2)
PATCH 1/1 remove FCS from pktgen bandwidth calculation
Hi,
This patch stops pktgen from counting the FCS in the 'total number of bytes transmitted' and 'bits per second' calculations.
cheers,
Lennert
pktgen.c renamed from pktgen.c.orig +3 -4
@@ -2564,7 +2564,6 @@static void show_results (struct pktgen_dev *pkt_dev,int nr_frags) {__u64 total_us, bps, mbps, pps, idle; -int size = pkt_dev->cur_pkt_size +4 ;/* incl 32bit ethernet CRC */ char *p = pkt_dev->result; total_us = pkt_dev->stopped_at - pkt_dev->started_at;
@@ -2576,7 +2575,7 @@ p +=sprintf (p,"OK: %llu(c%llu+d%llu) usec, %llu (%dbyte,%dfrags)\n" , total_us, (unsigned long long )(total_us - idle), idle, - pkt_dev->sofar, size, nr_frags); + pkt_dev->sofar, pkt_dev->cur_pkt_size, nr_frags); pps = pkt_dev->sofar *USEC_PER_SEC ;
@@ -2588,7 +2587,7 @@do_div (pps, total_us); - bps = pps *8 * size; + bps = pps *8 * pkt_dev->cur_pkt_size; mbps = bps;do_div (mbps,1000000 );
@@ -2777,7 +2776,7 @@ pkt_dev->last_ok =1 ; pkt_dev->sofar++; pkt_dev->seq_num++; - pkt_dev->tx_bytes += (pkt_dev->cur_pkt_size +4 );/* count csum */ + pkt_dev->tx_bytes += pkt_dev->cur_pkt_size; }else if (ret ==NETDEV_TX_LOCKED && (odev->features &NETIF_F_LLTX )) {
PATCH 1/1 remove FCS from pktgen bandwidth calculation
OK! We strictly define statistics to be based on the data we deliver to hard_xmit. Feel free to change the current kernel version... while we wait for 2.7 :-)
--ro
Quoted 48 lines · Lennert Buytenhek
Hi,
This patch stops pktgen from counting the FCS in the 'total number of bytes transmitted' and 'bits per second' calculations.
cheers,
Lennertpktgen.c renamed from pktgen.c.orig +3
-4@@ -2564,7 +2564,6 @@static void show_results (struct pktgen_dev *pkt_dev,int nr_frags) {__u64 total_us, bps, mbps, pps, idle; -int size = pkt_dev->cur_pkt_size +4 ;/* incl 32bit ethernet CRC */ char *p = pkt_dev->result; total_us = pkt_dev->stopped_at - pkt_dev->started_at;@@ -2576,7 +2575,7 @@ p +=sprintf (p,"OK: %llu(c%llu+d%llu) usec, %llu (%dbyte,%dfrags)\n" , total_us, (unsigned long long )(total_us - idle), idle, - pkt_dev->sofar, size, nr_frags); + pkt_dev->sofar, pkt_dev->cur_pkt_size, nr_frags); pps = pkt_dev->sofar *USEC_PER_SEC ;@@ -2588,7 +2587,7 @@do_div (pps, total_us); - bps = pps *8 * size; + bps = pps *8 * pkt_dev->cur_pkt_size; mbps = bps;do_div (mbps,1000000 );@@ -2777,7 +2776,7 @@ pkt_dev->last_ok =1 ; pkt_dev->sofar++; pkt_dev->seq_num++; - pkt_dev->tx_bytes += (pkt_dev->cur_pkt_size +4 );/* count csum */ + pkt_dev->tx_bytes += pkt_dev->cur_pkt_size; }else if (ret ==NETDEV_TX_LOCKED && (odev->features &NETIF_F_LLTX )) {
David S. Miller
maintainerQuoted 3 lines · On Thu, 9 Dec 2004 14:48:50 +0100 Robert Olsson <[email protected]>…
OK! We strictly define statistics to be based on the data we deliver to
hard_xmit. Feel free to change the current kernel version... while we wait for 2.7 :-)
Robert can you collect together the various pktgen patches that have been floating about over the past few days and send to me what you think should be applied.
There is this FCS patch, and the naonspin one from Lennert as well. There may have been others.
Quoted 10 lines · David S. Miller
Quoted 3 lines
OK! We strictly define statistics to be based on the data we deliver to
hard_xmit. Feel free to change the current kernel version... while we wait for 2.7 :-)Robert can you collect together the various pktgen patches that have been floating about over the past few days and send to me what you think should be applied.
There is this FCS patch, and the naonspin one from Lennert as well. There may have been others.
At least the nanospin patch won't apply cleanly against the pktgen version currently in mainline. I'm reworking it anyway since it's actually buggy -- give me a day or two and I'll post updated patches against 2.6 as well as Robert's devel version.
(See ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ for Robert's devel versions.)
cheers,
Lennert