PERFORCE change 114148 for review
Christian S.J. Peron
csjp at FreeBSD.org
Wed Feb 7 02:52:23 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114148
Change 114148 by csjp at csjp_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);
}
More information about the p4-projects
mailing list