[email protected]
[Top] [All Lists]

PERFORCE change 114260 for review

Subject: PERFORCE change 114260 for review
From: "Christian S.J. Peron"
Date: Thu, 8 Feb 2007 21:31:11 GMT
http://perforce.freebsd.org/chv.cgi?CH=114260

Change 114260 by [email protected]_rnd01 on 2007/02/08 21:30:37

        Change the prefetch algorithm to fetch the next packet's
        header instead of unconditionally prefetching everything.

Affected files ...

.. //depot/projects/zcopybpf/utils/bpfnull/bpfnull.c#15 edit

Differences ...

==== //depot/projects/zcopybpf/utils/bpfnull/bpfnull.c#15 (text+ko) ====

@@ -102,14 +102,9 @@
                return;
        b = bp = bz->bz_bufa;
        p = ep = bp + bz->bz_buflen;
-       if (pflag) {
-               for (i = 0; i < bz->bz_buflen;
-                   i += CACHE_LINE_SIZE) {
-                       p += i;
-                       __builtin_prefetch(p, 0, 2);
-               }
-       }
        while (bp < ep) {
+               if (pflag)
+                       __builtin_prefetch(bp + bhp->bh_datalen, 0, 3);
                clen = bhp->bh_caplen;
                hlen = bhp->bh_hdrlen;
                p = (u_char *)bp + hlen;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 114260 for review, Christian S.J. Peron <=