[email protected]
[Top] [All Lists]

PERFORCE change 114148 for review

Subject: PERFORCE change 114148 for review
From: "Christian S.J. Peron"
Date: Wed, 7 Feb 2007 02:51:45 GMT
http://perforce.freebsd.org/chv.cgi?CH=114148

Change 114148 by [email protected]_rnd01 on 2007/02/07 02:50:51

        Make sure we are checking for the presence of BPF zerocopy rather
        then just assuming we are using it.

Affected files ...

.. //depot/projects/zcopybpf/src/sys/net/bpf.c#13 edit

Differences ...

==== //depot/projects/zcopybpf/src/sys/net/bpf.c#13 (text+ko) ====

@@ -310,6 +310,19 @@
 }
 
 static int
+bpf_ioctl_rotate(struct thread *td, struct bpf_d *d, struct bpf_zbuf *bz)
+{
+
+       if (d->bd_bufmode != BPF_BUFMODE_ZBUF)
+               return (EOPNOTSUPP);
+#ifdef BPF_ZEROCOPY
+       return (bpf_zerocopy_ioctl_rotate(td, d, bz));
+#else
+       panic("bpf_ioctl_rotate");
+#endif
+}
+
+static int
 bpf_ioctl_getznext(struct thread *td, struct bpf_d *d, struct bpf_zbuf *bz)
 {
 
@@ -1285,8 +1298,7 @@
                return (bpf_ioctl_setzbuf(td, d, (struct bpf_zbuf *)addr));
 
        case BIOCROTZBUF:
-               return (bpf_zerocopy_ioctl_rotate(td, d, (struct bpf_zbuf *)
-                   addr));
+               return (bpf_ioctl_rotate(td, d, (struct bpf_zbuf *) addr));
        }
        return (error);
 }
_______________________________________________
[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 114148 for review, Christian S.J. Peron <=