Commit Graph
14 Commits
Author SHA1 Message Date
Ben Pfaff eda1328578 Avoid pointer arithmetic on void*.
This is a GCC extension not supported by other compilers.
2008-09-04 13:53:26 -07:00
Ben Pfaff 5549180a54 Rename struct buffer to struct ofpbuf.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Ben Pfaff ab43666b20 vlog: Apply rate-limiting everywhere it seems warranted. 2008-08-26 13:25:21 -07:00
Ben Pfaff b3b28afb7b Use signal-based timekeeping functions throughout the source base. 2008-08-12 15:21:30 -07:00
Ben Pfaff f730dded18 Move Autoconf's macro definitions into config.h.
This makes "make" output slightly more readable.
2008-07-21 15:05:53 -07:00
Ben Pfaff 86ad61454e buffer: Rename buffer_reserve_headroom to buffer_prealloc_headroom.
Similarly for buffer_reserve_tailroom.

The new name better reflects what they do, and make way for a different
use of the term "reserve" in the upcoming buffer_reserve() function.
2008-07-18 13:42:37 -07:00
Ben Pfaff 25c6b13561 Enable the netlink library to dump more verbose debug output. 2008-04-28 13:52:48 -07:00
Ben Pfaff cacf0c4926 Make nl_sock_sendv properly implement 'wait' option. 2008-04-28 13:52:27 -07:00
Ben Pfaff c5f976a78f Get rid of build dependency on netlink-related headers from Linux 2.6.
This fixes userspace program build problems on top of systems with
Linux 2.4 headers.
2008-04-24 16:29:53 -07:00
root cdd0a5ba36 Tolerate ENOBUFS from kernel netlink code in second call to recvmsg.
The Linux kernel returns ENOBUFS to userspace code to indicate that
a netlink message that the kernel wanted to send could not be due to
a lack of buffer space.  We checked for this and dealt with it in
one recvmsg call but not in another.  This change tolerates it in
both places.

Should fix a problem encountered on the OF6k under "hping3 --flood".

** This fix was done by Ben. **
2008-04-23 15:20:58 -07:00
Ben Pfaff 15bf0e0b5d Support NETLINK_ADD_MEMBERSHIP even when compiled with old kernel headers.
Commit 0a9024a2d7, "Changes based on feedback from GigaFin," added support
for compiling on a system that lacked up-to-date Linux kernel headers, by
dropping support for a feature only in newer kernels on such a system.
But the code already supported such a system properly; only the lack of
a macro definition kept it from compiling.  So define the macro ourselves
instead of disabling the feature.

To elaborate, there are two issues here.

The first is kernel support for NETLINK_ADD_MEMBERSHIP.  Older
kernels don't support this.  But NETLINK_ADD_MEMBERSHIP was added
at the same time as support for more than 32 netlink multicast
groups.  Netlink multicast groups numbered less than 32 can be
subscribed using a different mechanism, and in fact we do that
for such groups.  Thus, attempting to use NETLINK_ADD_MEMBERSHIP
on an older kernel basically can't happen, and if it did it would
be a bug in the OpenFlow kernel module for telling userspace to
subscribe to a multicast group that cannot exist on that kernel.

The second is the kernel headers that the userspace programs are
compiled with.  Without the change quoted below, the userspace
programs will silently fail if they are compiled with 2.4.x
headers and then run on a 2.6.x kernel and given a multicast
group numbered above 32, because they will not even try to
subscribe to that group.  With the change, the userspace programs
will work properly when run on 2.4.x or 2.6.x kernels regardless
of the multicast group number and regardless of whether the
headers they were compiled against were from 2.4.x or 2.6.x.
2008-04-23 14:25:27 -07:00
Justin Pettit 0a9024a2d7 Changes based on feedback from GigaFin. 2008-04-10 15:50:25 -07:00
casado 3f0201adb5 Update copyright on all non-GPL files 2008-03-27 20:12:18 -07:00
Martin Casado 468e00132f Initial import 2008-03-04 13:12:53 -08:00