Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[firefly-linux-kernel-4.4.55.git] / net / core / pktgen.c
index ebfb1268ac3cd4e1e68c50b4f57932f62c6b47ae..bfcdfaebca5c809b79b9076b56748e9b342cd776 100644 (file)
 
 #define VERSION  "pktgen v2.69: Packet Generator for packet performance testing.\n"
 
-/* The buckets are exponential in 'width' */
-#define LAT_BUCKETS_MAX 32
 #define IP_NAME_SZ 32
 #define MAX_MPLS_LABELS 16 /* This is the max label stack depth */
 #define MPLS_STACK_BOTTOM htonl(0x00000100)
@@ -405,7 +403,7 @@ static inline __u64 tv_to_us(const struct timeval *tv)
        return us;
 }
 
-static inline __u64 getCurUs(void)
+static __u64 getCurUs(void)
 {
        struct timeval tv;
        do_gettimeofday(&tv);
@@ -2044,7 +2042,6 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
        __u64 now;
 
        start = now = getCurUs();
-       printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
        while (now < spin_until_us) {
                /* TODO: optimize sleeping behavior */
                if (spin_until_us - now > jiffies_to_usecs(1) + 1)
@@ -2266,7 +2263,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
 
                                        while (ipv4_is_loopback(s) ||
                                               ipv4_is_multicast(s) ||
-                                              ipv4_is_badclass(s) ||
+                                              ipv4_is_lbcast(s) ||
                                               ipv4_is_zeronet(s) ||
                                               ipv4_is_local_multicast(s)) {
                                                t = random32() % (imx - imn) + imn;